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 Total, S.A
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 GEOSX_MESHUTILITIES_SIMPLEGEOMETRICOBJECTS_BOX_HPP_
21 #define GEOSX_MESHUTILITIES_SIMPLEGEOMETRICOBJECTS_BOX_HPP_
22 
23 #include "SimpleGeometricObjectBase.hpp"
24 
25 namespace geosx
26 {
27 
33 {
34 public:
35 
39 
46  Box( const std::string & name,
47  Group * const parent );
48 
52  virtual ~Box() override;
53 
55 
59 
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 auto xMinString = "xMin";
99  static constexpr auto xMaxString = "xMax";
100  static constexpr auto strikeAngleString = "strike";
101  static constexpr auto boxCenterString = "center";
102  static constexpr auto cosStrikeString = "cosStrike";
103  static constexpr auto sinStrikeString = "sinStrike";
104 
105  dataRepository::ViewKey xmin = { "xMin" };
106  dataRepository::ViewKey xmax = { "xMax" };
107  } viewKeys;
108 
110 
111 };
112 } /* namespace geosx */
113 
114 #endif /* GEOSX_MESHUTILITIES_SIMPLEGEOMETRICOBJECTS_BOX_HPP_
115  */
virtual void PostProcessInput() override final
This function provides capability to post process input values prior to any other initialization oper...
Class to represent a geometric box in GEOSX.
Definition: Box.hpp:32
double real64
64-bit floating point type.
Definition: DataTypes.hpp:136
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
Definition: Group.hpp:1545
Base class for the geometric objects (box, plane, cylinder).
Box(const std::string &name, Group *const parent)
Constructor.
bool IsCoordInObject(real64 const (&coord) [3]) const override final
Check if the input coordinates are in the object.
static string CatalogName()
Get the catalog name.
Definition: Box.hpp:65
virtual ~Box() override
Default destructor.
std::string string
String type.
Definition: DataTypes.hpp:131