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 Total, S.A
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 
41 
47  Box( const string & name,
48  Group * const parent );
49 
53  virtual ~Box() override;
54 
56 
61 
66  static string catalogName() { return "Box"; }
67 
69 
70  bool isCoordInObject( real64 const ( &coord ) [3] ) const override final;
71 
72 protected:
73 
78  virtual void postInputInitialization() override final;
79 
80 private:
81 
83  R1Tensor m_min;
85  R1Tensor m_max;
87  real64 m_strikeAngle=0.0;
89  R1Tensor m_boxCenter={0.0, 0.0, 0.0};
91  real64 m_cosStrike=0.0;
93  real64 m_sinStrike=0.0;
94 
96 
97  struct viewKeyStruct
98  {
99  static constexpr char const * xMinString() { return "xMin"; }
100  static constexpr char const * xMaxString() { return "xMax"; }
101  static constexpr char const * strikeAngleString() { return "strike"; }
102  static constexpr char const * boxCenterString() { return "center"; }
103  static constexpr char const * cosStrikeString() { return "cosStrike"; }
104  static constexpr char const * sinStrikeString() { return "sinStrike"; }
105 
106  dataRepository::ViewKey xmin = { xMinString() };
107  dataRepository::ViewKey xmax = { xMaxString() };
108  } viewKeys;
109 
111 
112 };
113 } /* namespace geos */
114 
115 #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...
virtual ~Box() override
Default destructor.
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:66
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:1662
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99