MoCSI API Reference
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
GridBase< T > Class Template Referenceabstract

#include <GridBase.h>

Inheritance diagram for GridBase< T >:
Inheritance graph
Collaboration diagram for GridBase< T >:
Collaboration graph

Public Member Functions

std::vector< std::unique_ptr< GenericElement< T > > > & getCells ()
 
virtual void createGrid ()=0
 
void setMesh (std::shared_ptr< ShapeBase< T > > mesh)
 Sets the bounding surface mesh for the object, if a mesh is used.
 
int getGridSize () const
 
 GridBase ()
 Default Constructor.
 
 GridBase (SimulationClassBase< T > *sim_ptr, std::shared_ptr< ShapeBase< T > > mesh_ptr)
 Constructor for the empty grid class, as each concrete grid needs to be built differently.
 
 ~GridBase ()=default
 

Protected Attributes

bool can_contain_nullptrs {false}
 
int grid_size {-1}
 
std::shared_ptr< ShapeBase< T > > m_poly_mesh {}
 
SimulationClassBase< T > * sim {}
 
std::vector< std::unique_ptr< GenericElement< T > > > all_cells {}
 

Detailed Description

template<typename T>
class GridBase< T >

Grid abstract base class for the finite element method. All grid implementations should inherit from this class

Constructor & Destructor Documentation

◆ GridBase() [1/2]

template<typename T >
GridBase< T >::GridBase ( )

Default Constructor.

◆ GridBase() [2/2]

template<typename T >
GridBase< T >::GridBase ( SimulationClassBase< T > *  sim_ptr,
std::shared_ptr< ShapeBase< T > >  mesh_ptr 
)

Constructor for the empty grid class, as each concrete grid needs to be built differently.

Parameters
sim_ptrPointer to the sim class.

◆ ~GridBase()

template<typename T >
GridBase< T >::~GridBase ( )
default

Member Function Documentation

◆ createGrid()

template<typename T >
virtual void GridBase< T >::createGrid ( )
pure virtual

Implemented in GridOneDim< T >.

◆ getCells()

template<typename T >
std::vector< std::unique_ptr< GenericElement< T > > > & GridBase< T >::getCells ( )
inline

◆ getGridSize()

template<typename T >
int GridBase< T >::getGridSize ( ) const
inline

◆ setMesh()

template<typename T >
void GridBase< T >::setMesh ( std::shared_ptr< ShapeBase< T > >  mesh)

Sets the bounding surface mesh for the object, if a mesh is used.

Parameters
meshPointer to the ShapeHandler object that manages meshes describing the shape of the object.

Member Data Documentation

◆ all_cells

template<typename T >
std::vector<std::unique_ptr<GenericElement<T> > > GridBase< T >::all_cells {}
protected

◆ can_contain_nullptrs

template<typename T >
bool GridBase< T >::can_contain_nullptrs {false}
protected

◆ grid_size

template<typename T >
int GridBase< T >::grid_size {-1}
protected

◆ m_poly_mesh

template<typename T >
std::shared_ptr<ShapeBase<T> > GridBase< T >::m_poly_mesh {}
protected

◆ sim

template<typename T >
SimulationClassBase<T>* GridBase< T >::sim {}
protected

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