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 
41  PlanarGeometricObject( const string & name,
42  Group * const parent );
43 
48 
53  static string catalogName() { return "PlanarGeometricObject"; }
54 
56 
62  virtual bool isCoordInObject( real64 const ( &coord ) [3] ) const override = 0;
63 
68 
73  R1Tensor & getNormal() {return m_normal;}
74 
78  R1Tensor const & getNormal() const {return m_normal;}
79 
85 
89  R1Tensor const & getWidthVector() const {return m_widthVector;}
90 
96 
100  R1Tensor const & getLengthVector() const {return m_lengthVector;}
101 
106  virtual R1Tensor & getCenter() = 0;
107 
111  virtual R1Tensor const & getCenter() const = 0;
112 
113 protected:
114 
123 
125  static constexpr real64 orthoNormalBaseTolerance = 1e-10;
126 
128 
129  struct viewKeyStruct
130  {
131  static constexpr char const * normalString() { return "normal"; }
132  static constexpr char const * mLengthVectorString() { return "lengthVector"; }
133  static constexpr char const * mWidthVectorString() { return "widthVector"; }
134  };
135 
137 
138 };
139 } /* namespace geos */
140 
141 #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.
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:98
Structure to hold scoped key names.
Definition: Group.hpp:1444