GEOS
PlanarGeometricObject.hpp
Go to the documentation of this file.
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 
20 #ifndef GEOS_MESH_SIMPLEGEOMETRICOBJECTS_PLANARGEOMETRICOBJECT_HPP_
21 #define GEOS_MESH_SIMPLEGEOMETRICOBJECTS_PLANARGEOMETRICOBJECT_HPP_
22 
23 #include "SimpleGeometricObjectBase.hpp"
24 
25 namespace geos
26 {
27 
33 {
34 public:
35 
40 
46  PlanarGeometricObject( const string & name,
47  Group * const parent );
48 
52  virtual ~PlanarGeometricObject() override;
53 
55 
60 
65  static string catalogName() { return "PlanarGeometricObject"; }
66 
68 
74  virtual bool isCoordInObject( real64 const ( &coord ) [3] ) const override = 0;
75 
80 
85  R1Tensor & getNormal() {return m_normal;}
86 
90  R1Tensor const & getNormal() const {return m_normal;}
91 
97 
101  R1Tensor const & getWidthVector() const {return m_widthVector;}
102 
108 
112  R1Tensor const & getLengthVector() const {return m_lengthVector;}
113 
118  virtual R1Tensor & getCenter() = 0;
119 
123  virtual R1Tensor const & getCenter() const = 0;
124 
125 protected:
126 
135 
137  static constexpr real64 orthoNormalBaseTolerance = 1e-10;
138 
140 
141  struct viewKeyStruct
142  {
143  static constexpr char const * normalString() { return "normal"; }
144  static constexpr char const * mLengthVectorString() { return "lengthVector"; }
145  static constexpr char const * mWidthVectorString() { return "widthVector"; }
146  };
147 
149 
150 };
151 } /* namespace geos */
152 
153 #endif /* GEOS_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:99
Structure to hold scoped key names.
Definition: Group.hpp:1442