https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CSGYCylinder.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
16namespace CSG
17{
18
24{
25public:
34 CSGYCylinder(const std::string & name, const Real x0, const Real z0, const Real r);
35
39 virtual ~CSGYCylinder() = default;
40
47 virtual std::unordered_map<std::string, Real> getCoeffs() const override;
48
55 virtual Real evaluateSurfaceEquationAtPoint(const Point & p) const override;
56
57protected:
63 virtual std::unique_ptr<CSGSurface> clone() const override
64 {
65 return std::make_unique<CSGYCylinder>(_name, _x0, _z0, _r);
66 }
67
68 // check that radius is positive
69 void checkRadius() const;
70
72 Real _x0;
73
75 Real _z0;
76
78 Real _r;
79};
80} // namespace CSG
CSGSurface creates an internal representation of a Constructive Solid Geometry (CSG) surface,...
Definition CSGSurface.h:27
std::string _name
Name of surface.
Definition CSGSurface.h:122
CSGYCylinder creates an internal representation of a Constructive Solid Geometry (CSG) y-axis aligned...
Real _x0
Value of x0 in equation of an y-axis aligned cylinder.
virtual std::unique_ptr< CSGSurface > clone() const override
create clone of CSGYCylinder object
virtual std::unordered_map< std::string, Real > getCoeffs() const override
Get the coefficients (x0, z0, and r) that define the cylindrical surface with the equation: (x - x0)^...
Real _z0
Value of z0 in equation of an y-axis aligned cylinder.
void checkRadius() const
Real _r
Value of r in equation of an y-axis aligned cylinder.
virtual Real evaluateSurfaceEquationAtPoint(const Point &p) const override
given a point, determine its evaluation based on the equation of the cylinder
virtual ~CSGYCylinder()=default
Destructor.