GEOS
Box.hpp
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
16 /*
17  * @file Box.hpp
18  *
19  */
20 
21 #ifndef GEOS_MESH_SIMPLEGEOMETRICOBJECTS_BOX_HPP_
22 #define GEOS_MESH_SIMPLEGEOMETRICOBJECTS_BOX_HPP_
23 
24 #include "SimpleGeometricObjectBase.hpp"
25 
26 namespace geos
27 {
28 
34 {
35 public:
36 
42  Box( const string & name,
43  Group * const parent );
44 
49 
54  static string catalogName() { return "Box"; }
55 
57 
58  bool isCoordInObject( real64 const ( &coord ) [3] ) const override final;
59 
60 protected:
61 
66  virtual void postInputInitialization() override final;
67 
68 private:
69 
71  R1Tensor m_min;
73  R1Tensor m_max;
75  real64 m_strikeAngle=0.0;
77  R1Tensor m_boxCenter={0.0, 0.0, 0.0};
79  real64 m_cosStrike=0.0;
81  real64 m_sinStrike=0.0;
82 
84 
85  struct viewKeyStruct
86  {
87  static constexpr char const * xMinString() { return "xMin"; }
88  static constexpr char const * xMaxString() { return "xMax"; }
89  static constexpr char const * strikeAngleString() { return "strike"; }
90  static constexpr char const * boxCenterString() { return "center"; }
91  static constexpr char const * cosStrikeString() { return "cosStrike"; }
92  static constexpr char const * sinStrikeString() { return "sinStrike"; }
93 
94  dataRepository::ViewKey xmin = { xMinString() };
95  dataRepository::ViewKey xmax = { xMaxString() };
96  } viewKeys;
97 
99 
100 };
101 } /* namespace geos */
102 
103 #endif /* GEOS_MESH_SIMPLEGEOMETRICOBJECTS_BOX_HPP_ */
Class to represent a geometric box in GEOSX.
Definition: Box.hpp:34
virtual void postInputInitialization() override final
This function provides capability to post process input values prior to any other initialization oper...
bool isCoordInObject(real64 const (&coord)[3]) const override final
Check if the input coordinates are in the object.
Box(const string &name, Group *const parent)
Constructor.
static string catalogName()
Get the catalog name.
Definition: Box.hpp:54
Base class for the geometric objects (box, plane, cylinder).
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
Definition: Group.hpp:1664
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98