GEOSX
Box.hpp
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 TotalEnergies
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
15 /*
16  * @file Box.hpp
17  *
18  */
19 
20 #ifndef GEOS_MESH_SIMPLEGEOMETRICOBJECTS_BOX_HPP_
21 #define GEOS_MESH_SIMPLEGEOMETRICOBJECTS_BOX_HPP_
22 
23 #include "SimpleGeometricObjectBase.hpp"
24 
25 namespace geos
26 {
27 
33 {
34 public:
35 
40 
46  Box( const string & name,
47  Group * const parent );
48 
52  virtual ~Box() override;
53 
55 
60 
65  static string catalogName() { return "Box"; }
66 
68 
69  bool isCoordInObject( real64 const ( &coord ) [3] ) const override final;
70 
71 protected:
72 
77  virtual void postProcessInput() override final;
78 
79 private:
80 
82  R1Tensor m_min;
84  R1Tensor m_max;
86  real64 m_strikeAngle=0.0;
88  R1Tensor m_boxCenter={0.0, 0.0, 0.0};
90  real64 m_cosStrike=0.0;
92  real64 m_sinStrike=0.0;
93 
95 
96  struct viewKeyStruct
97  {
98  static constexpr char const * xMinString() { return "xMin"; }
99  static constexpr char const * xMaxString() { return "xMax"; }
100  static constexpr char const * strikeAngleString() { return "strike"; }
101  static constexpr char const * boxCenterString() { return "center"; }
102  static constexpr char const * cosStrikeString() { return "cosStrike"; }
103  static constexpr char const * sinStrikeString() { return "sinStrike"; }
104 
105  dataRepository::ViewKey xmin = { xMinString() };
106  dataRepository::ViewKey xmax = { xMaxString() };
107  } viewKeys;
108 
110 
111 };
112 } /* namespace geos */
113 
114 #endif /* GEOS_MESH_SIMPLEGEOMETRICOBJECTS_BOX_HPP_ */
Class to represent a geometric box in GEOSX.
Definition: Box.hpp:33
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:65
virtual void postProcessInput() override final
This function provides capability to post process input values prior to any other initialization oper...
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:1625
double real64
64-bit floating point type.
Definition: DataTypes.hpp:139