Prism#

A prism is by definition a cylinder whose basis is a polygonal surface ( Polygon, Triangle , Quadrangle , Parallelogram , Rectangle , or SquareGeo ). The Prism class inherits from Cylinder class.

Figure made with TikZ

Figure made with TikZ

As for cylinder, use parameters _basis and _direction. _basis parameter, as for trunks, take any polygonal object: Polygon, Triangle, Quadrangle, Parallelogram, Rectangle or SquareGeo . _direction parameter takes a vector of real numbers (Point or Reals objects) or a single value (in this case, it is like a direction parallel to x-axis).

Often a prism refers to a cylinder with triangular basis (as the finite element cell). A prism can also be defined from 3 points (for triangular basis), using parameters _v1, _v2, _v3 instead of _basis parameter, taking a point or a single value (in this case, it is like a 1D point).

_nnodes can take one single value, an explicit list of 3 or \(n\) values or a Numbers object, where \(n\) is 3 times the number of edges of the basis. _hsteps can take one real value, an explicit list of \(p\) real values or a Reals object, where \(p\) is the number of points defining the trunk. If required, give names of main domain and side domains as explained in Geometry definition:

Prism p1(_basis=Triangle(_v1=Point(0.,0.,0.),_v2=Point(2.,0.,0.),_v3=Point(0.,1.,0.)), _direction=Reals(0.,2.,1.), _nnodes={10, 10, 10, 5, 5, 5, 20, 20, 20}, _domain_name="Omega", _side_names={"Gamma", "Gamma", "Sigma", "Sigma", "Sigma"});
Prism p2(_basis=Triangle(_v1=Point(0.,0.,0.), _v2=Point(2.,0.,0.), _v3=Point(0.,1.,0.)), _direction=Reals(0.,2.,1.), _nnodes={10, 5, 20}, _domain_name="Omega", _side_names={"Gamma", "Gamma", "Sigma", "Sigma", "Sigma"});
Prism p3(_v1=Point(0.,0.,0.), _v2=Point(2.,0.,0.), _v3=Point(0.,1.,0.), _direction=Reals(0.,2.,1.), _nnodes={10, 5, 20}, _domain_name="Omega", _side_names={"Gamma", "Gamma", "Sigma", "Sigma", "Sigma"});

These are 3 definitions of the same Prism object, explaining the ability to give 3 values for _nnodes, instead of 9.

Let’s summarize information about geometrical keys on prisms:

key(s)

authorized types

examples

_basis

Polygon , Triangle , Quadrangle , Parallelogram , Rectangle , SquareGeo

_basis=Triangle (...)

_direction

std::vector of real values, Reals or Point

_direction=Reals(0.,0.,1.), _direction=Point(0.,0.,1.)

_v1, _v2, _v3

Point

_v2 = Point(0.,0.,0.)