GEOSX
PlanarGeometricObject.hpp
Go to the documentation of this file.
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 
19 #ifndef GEOSX_MESH_SIMPLEGEOMETRICOBJECTS_PLANARGEOMETRICOBJECT_HPP_
20 #define GEOSX_MESH_SIMPLEGEOMETRICOBJECTS_PLANARGEOMETRICOBJECT_HPP_
21 
22 #include "SimpleGeometricObjectBase.hpp"
23 
24 namespace geos
25 {
26 
32 {
33 public:
34 
39 
45  PlanarGeometricObject( const string & name,
46  Group * const parent );
47 
51  virtual ~PlanarGeometricObject() override;
52 
54 
59 
64  static string catalogName() { return "PlanarGeometricObject"; }
65 
67 
73  virtual bool isCoordInObject( real64 const ( &coord ) [3] ) const override = 0;
74 
79 
84  R1Tensor & getNormal() {return m_normal;}
85 
89  R1Tensor const & getNormal() const {return m_normal;}
90 
96 
100  R1Tensor const & getWidthVector() const {return m_widthVector;}
101 
107 
111  R1Tensor const & getLengthVector() const {return m_lengthVector;}
112 
117  virtual R1Tensor & getCenter() = 0;
118 
122  virtual R1Tensor const & getCenter() const = 0;
123 
124 protected:
125 
134 
136  static constexpr real64 orthoNormalBaseTolerance = 1e-10;
137 
139 
140  struct viewKeyStruct
141  {
142  static constexpr char const * normalString() { return "normal"; }
143  static constexpr char const * mLengthVectorString() { return "lengthVector"; }
144  static constexpr char const * mWidthVectorString() { return "widthVector"; }
145  };
146 
148 
149 };
150 } /* namespace geosx */
151 
152 #endif /* GEOSX_MESH_SIMPLEGEOMETRICOBJECTS_PLANARGEOMETRICOBJECT_HPP_*/
Abstract class to implement functions used by all bounded geometric objects in GEOSX,...
static string catalogName()
Get the catalog name.
R1Tensor & getNormal()
Get the normal to the plane.
static constexpr real64 orthoNormalBaseTolerance
tolerance to check if base is orthonormal
R1Tensor const & getLengthVector() const
Get one of the tangent vectors defining the orthonormal basis along with the normal.
virtual R1Tensor const & getCenter() const =0
Get the origin of the plane.
R1Tensor const & getWidthVector() const
Get one of the tangent vectors defining the orthonormal basis along with the normal.
real64 m_tolerance
tolerance to determine if a point sits on the PlanarGeometricObject or not
virtual R1Tensor & getCenter()=0
Get the origin of the plane.
virtual bool isCoordInObject(real64 const (&coord)[3]) const override=0
Check if the input coordinates are in the object.
R1Tensor const & getNormal() const
Get the normal to the plane.
R1Tensor m_normal
Normal (n_x,n_y,n_z) to the plane (will be normalized automatically)
PlanarGeometricObject(const string &name, Group *const parent)
Constructor.
R1Tensor & getLengthVector()
Get one of the tangent vectors defining the orthonormal basis along with the normal.
R1Tensor m_widthVector
Width vector in the orthonormal basis along with the normal.
R1Tensor m_lengthVector
Length vector in the orthonormal basis along with the normal.
virtual ~PlanarGeometricObject() override
Default destructor.
R1Tensor & getWidthVector()
Get one of the tangent vectors defining the orthonormal basis along with the normal.
Base class for the geometric objects (box, plane, cylinder).
double real64
64-bit floating point type.
Definition: DataTypes.hpp:139