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

Concrete Implementation of a 1D linear (line) element for the FEM. More...

#include <OneDimLinearElement.h>

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

Public Member Functions

void writeMatrixVectorBlock () override
 The implementation of the FEM scheme on this element type. Calculates all the values that you get solving the integrals of the FEM with the shape functions of a 1D linear element and writes them to the corresponding spots in the global capacitance matrix, stiffness matrix and forcing vector.
 
void writeBoundaryCondition () override
 The implementation of a boundary cell in the FEM scheme on this element type. If this cell is a boundary cell, only this function will be run.
 
 OneDimLinearElement (bool is_boundary_point, std::map< std::string_view, std::vector< int > > all_boundary_points, std::vector< int > nodal_values, SimulationClassBase< T > *sim, int cell_nr, ElementProperties< T > props)
 Constructor for a OneDimLinearElement object.
 
 ~OneDimLinearElement () override=default
 
- Public Member Functions inherited from GenericElement< T >
void setBoundaryConditions (std::map< std::string_view, std::unique_ptr< GenericBoundaryCondition< T > > > &boundary_cond)
 Sets the map of boundary condition objects.
 
std::map< std::string_view, std::unique_ptr< GenericBoundaryCondition< T > > > & getBoundaryCondition ()
 
void registerElementsCsr (GenericMatrix< T > &capacitance_matrix, GenericMatrix< T > &stiffness_matrix)
 
void getReferenceToElements (GenericMatrix< T > &capacitance_matrix, GenericMatrix< T > &stiffness_matrix, std::valarray< T > &forcing_vector)
 Sets up a reference_wrapper vector to the elements within the matrix object. This adds a bit of pre-calculation overhead, but always allows const time element access even for matrix object that don't normally have const time random access. This of course assumes a static grid.
 
bool isBoundary ()
 
 GenericElement (bool is_boundary_point, std::map< std::string_view, std::vector< int > > all_boundary_points, std::vector< int > nodal_values, SimulationClassBase< T > *sim, int num_cell, ElementProperties< T > properties)
 Constructor for a GenericElement object. Sets all parameters that are known at creation.
 
virtual ~GenericElement ()=default
 

Additional Inherited Members

- Protected Attributes inherited from GenericElement< T >
bool m_is_boundary
 
std::map< std::string_view, std::vector< int > > m_boundary_points
 
std::vector< intm_nodal_values
 
std::vector< std::reference_wrapper< T > > m_capacitance_matrix_elements {}
 
std::vector< std::reference_wrapper< T > > m_stiffness_matrix_elements {}
 
std::vector< std::reference_wrapper< T > > m_forcing_vector_elements {}
 
SimulationClassBase< T > * m_sim {}
 
int m_element_nr {-1}
 
std::map< std::string_view, std::unique_ptr< GenericBoundaryCondition< T > > > m_boundary_conditions {}
 
ElementProperties< Tm_properties {}
 

Detailed Description

template<typename T>
class OneDimLinearElement< T >

Concrete Implementation of a 1D linear (line) element for the FEM.

Constructor & Destructor Documentation

◆ OneDimLinearElement()

template<typename T >
OneDimLinearElement< T >::OneDimLinearElement ( bool  is_boundary_point,
std::map< std::string_view, std::vector< int > >  all_boundary_points,
std::vector< int nodal_values,
SimulationClassBase< T > *  sim,
int  cell_nr,
ElementProperties< T props 
)

Constructor for a OneDimLinearElement object.

Parameters
is_boundary_pointFlag whether this element has boundary nodes or not.
all_boundary_pointsA map containg the types of boundary conditions and all the nodes belonging to that type (to allow for multiple boundary conditions in one element).
nodal_valuesThe node numbers of all nodes within the element. Needed to sort them into the correct position within the matrix.
simThe pointer to the sim class.
cell_nrThe number of the cell.
propsProperties of the element (length and area).

◆ ~OneDimLinearElement()

template<typename T >
OneDimLinearElement< T >::~OneDimLinearElement ( )
overridedefault

Member Function Documentation

◆ writeBoundaryCondition()

template<typename T >
void OneDimLinearElement< T >::writeBoundaryCondition ( )
overridevirtual

The implementation of a boundary cell in the FEM scheme on this element type. If this cell is a boundary cell, only this function will be run.

Implements GenericElement< T >.

◆ writeMatrixVectorBlock()

template<typename T >
void OneDimLinearElement< T >::writeMatrixVectorBlock ( )
overridevirtual

The implementation of the FEM scheme on this element type. Calculates all the values that you get solving the integrals of the FEM with the shape functions of a 1D linear element and writes them to the corresponding spots in the global capacitance matrix, stiffness matrix and forcing vector.

Implements GenericElement< T >.


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