Chi-Tech
|
#include <CellMapping.h>
Public Member Functions | |
const chi_mesh::Cell & | ReferenceCell () const |
const chi_mesh::MeshContinuum & | ReferenceGrid () const |
size_t | NumNodes () const |
size_t | NumFaceNodes (size_t face_index) const |
const std::vector< std::vector< int > > & | GetFaceNodeMappings () const |
double | CellVolume () const |
double | FaceArea (size_t face_index) const |
int | MapFaceNode (size_t face_index, size_t face_node_index) const |
virtual double | ShapeValue (int i, const chi_mesh::Vector3 &xyz) const =0 |
virtual void | ShapeValues (const chi_mesh::Vector3 &xyz, std::vector< double > &shape_values) const =0 |
virtual chi_mesh::Vector3 | GradShapeValue (int i, const chi_mesh::Vector3 &xyz) const =0 |
virtual void | GradShapeValues (const chi_mesh::Vector3 &xyz, std::vector< chi_mesh::Vector3 > &gradshape_values) const =0 |
const std::vector< chi_mesh::Vector3 > & | GetNodeLocations () const |
virtual finite_element::VolumetricQuadraturePointData | MakeVolumetricQuadraturePointData () const =0 |
virtual finite_element::SurfaceQuadraturePointData | MakeSurfaceQuadraturePointData (size_t face_index) const =0 |
virtual | ~CellMapping ()=default |
Protected Types | |
typedef std::function< void(const chi_mesh::MeshContinuum &, const chi_mesh::Cell &, double &, std::vector< double > &)> | VandAFunction |
Protected Member Functions | |
CellMapping (const chi_mesh::MeshContinuum &grid, const chi_mesh::Cell &cell, size_t num_nodes, std::vector< chi_mesh::Vector3 > node_locations, std::vector< std::vector< int > > face_node_mappings, const VandAFunction &volume_area_function) | |
Static Protected Member Functions | |
static void | ComputeCellVolumeAndAreas (const chi_mesh::MeshContinuum &grid, const chi_mesh::Cell &cell, double &volume, std::vector< double > &areas) |
Protected Attributes | |
const chi_mesh::MeshContinuum & | ref_grid_ |
const chi_mesh::Cell & | cell_ |
const size_t | num_nodes_ |
const std::vector< chi_mesh::Vector3 > | node_locations_ |
double | volume_ = 0.0 |
std::vector< double > | areas_ |
const std::vector< std::vector< int > > | face_node_mappings_ |
Base class for all cell mappings.
Definition at line 29 of file CellMapping.h.
|
protected |
This function gets called to compute the cell-volume and face-areas. If simple linear cells are used then the default CellMapping::ComputeCellVolumeAndAreas can be used as this function. Otherwise (i.e. for higher order elements, the child-class should bind a different function to this.
Definition at line 102 of file CellMapping.h.
|
virtualdefault |
|
protected |
Definition at line 12 of file CellMapping.cc.
double chi_math::CellMapping::CellVolume | ( | ) | const |
Returns the cell volume.
Definition at line 46 of file CellMapping.cc.
|
staticprotected |
Static method that all child elements can use as a default.
Definition at line 67 of file CellMapping.cc.
double chi_math::CellMapping::FaceArea | ( | size_t | face_index | ) | const |
Returns the given face area.
Definition at line 48 of file CellMapping.cc.
const std::vector< std::vector< int > > & chi_math::CellMapping::GetFaceNodeMappings | ( | ) | const |
Definition at line 41 of file CellMapping.cc.
const std::vector< chi_mesh::Vector3 > & chi_math::CellMapping::GetNodeLocations | ( | ) | const |
Returns the node locations associated with this element.
Definition at line 156 of file CellMapping.cc.
|
pure virtual |
Returns the value of the required shape function gradient at the world xyz point.
Implemented in chi_math::cell_mapping::FiniteVolumeMapping, chi_math::cell_mapping::LagrangeBaseMapping, chi_math::cell_mapping::PieceWiseLinearPolygonMapping, chi_math::cell_mapping::PieceWiseLinearPolyhedronMapping, and chi_math::cell_mapping::PieceWiseLinearSlabMapping.
|
pure virtual |
Populates all the shape function gradient values at the given world xyz point. This method is optimized to minimize reallocation of gradshape_values.
Implemented in chi_math::cell_mapping::FiniteVolumeMapping, chi_math::cell_mapping::LagrangeBaseMapping, chi_math::cell_mapping::PieceWiseLinearPolygonMapping, chi_math::cell_mapping::PieceWiseLinearPolyhedronMapping, and chi_math::cell_mapping::PieceWiseLinearSlabMapping.
|
pure virtual |
Makes the surface quadrature point data for this element, at the specified face.
Implemented in chi_math::cell_mapping::FiniteVolumeMapping, chi_math::cell_mapping::LagrangeBaseMapping, chi_math::cell_mapping::PieceWiseLinearPolygonMapping, chi_math::cell_mapping::PieceWiseLinearPolyhedronMapping, and chi_math::cell_mapping::PieceWiseLinearSlabMapping.
|
pure virtual |
Makes the volumetric/internal quadrature point data for this element.
Implemented in chi_math::cell_mapping::FiniteVolumeMapping, chi_math::cell_mapping::LagrangeBaseMapping, chi_math::cell_mapping::PieceWiseLinearPolygonMapping, chi_math::cell_mapping::PieceWiseLinearPolyhedronMapping, and chi_math::cell_mapping::PieceWiseLinearSlabMapping.
int chi_math::CellMapping::MapFaceNode | ( | size_t | face_index, |
size_t | face_node_index | ||
) | const |
Given the face index and the face node index, returns the index of the cell node the face node corresponds to.
Definition at line 53 of file CellMapping.cc.
size_t chi_math::CellMapping::NumFaceNodes | ( | size_t | face_index | ) | const |
Returns the number of nodes on the given face.
Definition at line 36 of file CellMapping.cc.
size_t chi_math::CellMapping::NumNodes | ( | ) | const |
Returns the number of nodes on this element.
Definition at line 34 of file CellMapping.cc.
const chi_mesh::Cell & chi_math::CellMapping::ReferenceCell | ( | ) | const |
Returns the cell this mapping is based on.
Definition at line 27 of file CellMapping.cc.
const chi_mesh::MeshContinuum & chi_math::CellMapping::ReferenceGrid | ( | ) | const |
Returns the grid on which the cell for this mapping lives.
Definition at line 29 of file CellMapping.cc.
|
pure virtual |
Returns the value of the required shape function at the world xyz point.
Implemented in chi_math::cell_mapping::FiniteVolumeMapping, chi_math::cell_mapping::LagrangeBaseMapping, chi_math::cell_mapping::PieceWiseLinearPolygonMapping, chi_math::cell_mapping::PieceWiseLinearPolyhedronMapping, and chi_math::cell_mapping::PieceWiseLinearSlabMapping.
|
pure virtual |
Populates all the shape function values at the given world xyz point. This method is optimized to minimize reallocation of shape_values.
Implemented in chi_math::cell_mapping::FiniteVolumeMapping, chi_math::cell_mapping::LagrangeBaseMapping, chi_math::cell_mapping::PieceWiseLinearPolygonMapping, chi_math::cell_mapping::PieceWiseLinearPolyhedronMapping, and chi_math::cell_mapping::PieceWiseLinearSlabMapping.
|
protected |
Definition at line 124 of file CellMapping.h.
|
protected |
Definition at line 118 of file CellMapping.h.
|
protected |
For each cell face, map from the face node index to the corresponding cell node index. More specifically, face_dof_mappings
[f][fi], with fi
the face node index of the face identified by face index f
, contains the corresponding cell node index.
Definition at line 130 of file CellMapping.h.
|
protected |
Definition at line 121 of file CellMapping.h.
|
protected |
Definition at line 120 of file CellMapping.h.
|
protected |
Definition at line 117 of file CellMapping.h.
|
protected |
Definition at line 123 of file CellMapping.h.