Chi-Tech
chi_math::CellMapping Class Referenceabstract

#include <CellMapping.h>

Inheritance diagram for chi_math::CellMapping:
chi_math::cell_mapping::FiniteVolumeMapping chi_math::cell_mapping::LagrangeBaseMapping chi_math::cell_mapping::PieceWiseLinearBaseMapping chi_math::cell_mapping::LagrangeHexMapping chi_math::cell_mapping::LagrangeQuadMapping chi_math::cell_mapping::LagrangeSlabMapping chi_math::cell_mapping::LagrangeTetMapping chi_math::cell_mapping::LagrangeTriangleMapping chi_math::cell_mapping::LagrangeWedgeMapping chi_math::cell_mapping::PieceWiseLinearPolygonMapping chi_math::cell_mapping::PieceWiseLinearPolyhedronMapping chi_math::cell_mapping::PieceWiseLinearSlabMapping

Public Member Functions

const chi_mesh::CellReferenceCell () const
 
const chi_mesh::MeshContinuumReferenceGrid () 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::MeshContinuumref_grid_
 
const chi_mesh::Cellcell_
 
const size_t num_nodes_
 
const std::vector< chi_mesh::Vector3node_locations_
 
double volume_ = 0.0
 
std::vector< double > areas_
 
const std::vector< std::vector< int > > face_node_mappings_
 

Detailed Description

Base class for all cell mappings.

Definition at line 29 of file CellMapping.h.

Member Typedef Documentation

◆ VandAFunction

typedef std::function<void(const chi_mesh::MeshContinuum&, const chi_mesh::Cell&, double&, std::vector<double>&)> chi_math::CellMapping::VandAFunction
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.

Constructor & Destructor Documentation

◆ ~CellMapping()

virtual chi_math::CellMapping::~CellMapping ( )
virtualdefault

◆ CellMapping()

chi_math::CellMapping::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 
)
protected

Definition at line 12 of file CellMapping.cc.

Member Function Documentation

◆ CellVolume()

double chi_math::CellMapping::CellVolume ( ) const

Returns the cell volume.

Definition at line 46 of file CellMapping.cc.

◆ ComputeCellVolumeAndAreas()

void chi_math::CellMapping::ComputeCellVolumeAndAreas ( const chi_mesh::MeshContinuum grid,
const chi_mesh::Cell cell,
double &  volume,
std::vector< double > &  areas 
)
staticprotected

Static method that all child elements can use as a default.

Definition at line 67 of file CellMapping.cc.

◆ FaceArea()

double chi_math::CellMapping::FaceArea ( size_t  face_index) const

Returns the given face area.

Definition at line 48 of file CellMapping.cc.

◆ GetFaceNodeMappings()

const std::vector< std::vector< int > > & chi_math::CellMapping::GetFaceNodeMappings ( ) const

Definition at line 41 of file CellMapping.cc.

◆ GetNodeLocations()

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.

◆ GradShapeValue()

virtual chi_mesh::Vector3 chi_math::CellMapping::GradShapeValue ( int  i,
const chi_mesh::Vector3 xyz 
) const
pure virtual

◆ GradShapeValues()

virtual void chi_math::CellMapping::GradShapeValues ( const chi_mesh::Vector3 xyz,
std::vector< chi_mesh::Vector3 > &  gradshape_values 
) const
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.

◆ MakeSurfaceQuadraturePointData()

virtual finite_element::SurfaceQuadraturePointData chi_math::CellMapping::MakeSurfaceQuadraturePointData ( size_t  face_index) const
pure virtual

◆ MakeVolumetricQuadraturePointData()

◆ MapFaceNode()

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.

◆ NumFaceNodes()

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.

◆ NumNodes()

size_t chi_math::CellMapping::NumNodes ( ) const

Returns the number of nodes on this element.

Definition at line 34 of file CellMapping.cc.

◆ ReferenceCell()

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.

◆ ReferenceGrid()

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.

◆ ShapeValue()

virtual double chi_math::CellMapping::ShapeValue ( int  i,
const chi_mesh::Vector3 xyz 
) const
pure virtual

◆ ShapeValues()

virtual void chi_math::CellMapping::ShapeValues ( const chi_mesh::Vector3 xyz,
std::vector< double > &  shape_values 
) const
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.

Field Documentation

◆ areas_

std::vector<double> chi_math::CellMapping::areas_
protected

Definition at line 124 of file CellMapping.h.

◆ cell_

const chi_mesh::Cell& chi_math::CellMapping::cell_
protected

Definition at line 118 of file CellMapping.h.

◆ face_node_mappings_

const std::vector<std::vector<int> > chi_math::CellMapping::face_node_mappings_
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.

◆ node_locations_

const std::vector<chi_mesh::Vector3> chi_math::CellMapping::node_locations_
protected

Definition at line 121 of file CellMapping.h.

◆ num_nodes_

const size_t chi_math::CellMapping::num_nodes_
protected

Definition at line 120 of file CellMapping.h.

◆ ref_grid_

const chi_mesh::MeshContinuum& chi_math::CellMapping::ref_grid_
protected

Definition at line 117 of file CellMapping.h.

◆ volume_

double chi_math::CellMapping::volume_ = 0.0
protected

Definition at line 123 of file CellMapping.h.


The documentation for this class was generated from the following files: