https://mooseframework.inl.gov
CSGPlane.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "CSGSurface.h"
13 
14 #include "libmesh/point.h"
15 
16 namespace CSG
17 {
18 
23 class CSGPlane : public CSGSurface
24 {
25 public:
34  CSGPlane(const std::string & name, const Point & p1, const Point & p2, const Point & p3);
35 
46  CSGPlane(const std::string & name, const Real a, const Real b, const Real c, const Real d);
47 
51  virtual ~CSGPlane() = default;
52 
59  virtual std::unordered_map<std::string, Real> getCoeffs() const override;
60 
67  virtual Real evaluateSurfaceEquationAtPoint(const Point & p) const override;
68 
69 protected:
70  // calculate the equivalent coeffients (aX + bY + cZ = d) from 3 points on a plane
71  void coeffsFromPoints(const Point & p1, const Point & p2, const Point & p3);
72 
75 
78 
81 
84 };
85 } // namespace CSG
virtual Real evaluateSurfaceEquationAtPoint(const Point &p) const override
given a point, determine its evaluation based on the equation of the plane
Definition: CSGPlane.C:53
std::string name(const ElemQuality q)
Real _a
Value of a in equation of plane.
Definition: CSGPlane.h:74
CSGPlane creates an internal representation of a Constructive Solid Geometry (CSG) plane...
Definition: CSGPlane.h:23
CSGPlane(const std::string &name, const Point &p1, const Point &p2, const Point &p3)
Construct a new CSGPlane surface from three non co-linear points.
Definition: CSGPlane.C:15
virtual ~CSGPlane()=default
Destructor.
Real _b
Value of b in equation of plane.
Definition: CSGPlane.h:77
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _d
Value of d in equation of plane.
Definition: CSGPlane.h:83
CSGSurface creates an internal representation of a Constructive Solid Geometry (CSG) surface...
Definition: CSGSurface.h:26
Real _c
Value of c in equation of plane.
Definition: CSGPlane.h:80
void coeffsFromPoints(const Point &p1, const Point &p2, const Point &p3)
Definition: CSGPlane.C:34
virtual std::unordered_map< std::string, Real > getCoeffs() const override
get coefficients (a, b, c, d) of the Plane aX + bY + cZ = d
Definition: CSGPlane.C:27