Serac  0.1
Serac is an implicit thermal strucural mechanics simulation code.
Public Member Functions | List of all members
serac::BoundaryConditionManager Class Reference

A container for the boundary condition information relating to a specific physics module. More...

#include <boundary_condition_manager.hpp>

Public Member Functions

 BoundaryConditionManager (const mfem::ParMesh &mesh)
 Construct a new Boundary Condition Manager object. More...
 
void addEssential (const std::set< int > &ess_bdr, serac::GeneralCoefficient ess_bdr_coef, mfem::ParFiniteElementSpace &space, const std::optional< int > component={})
 Set the essential boundary conditions from a list of boundary markers and a coefficient. More...
 
void addEssential (const mfem::Array< int > &local_dofs, std::shared_ptr< mfem::Coefficient > ess_bdr_coef, mfem::ParFiniteElementSpace &space, std::optional< int > component={})
 Set a list of local degrees of freedom from a scalar coefficient. More...
 
void addEssentialByTrueDofs (const mfem::Array< int > &true_dofs, std::shared_ptr< mfem::VectorCoefficient > ess_bdr_coef, mfem::ParFiniteElementSpace &space)
 
const mfem::Array< int > & allEssentialTrueDofs () const
 Returns all the true degrees of freedom associated with all the essential BCs. More...
 
const mfem::Array< int > & allEssentialLocalDofs () const
 Returns all the local degrees of freedom associated with all the essential BCs. More...
 
std::unique_ptr< mfem::HypreParMatrix > eliminateAllEssentialDofsFromMatrix (mfem::HypreParMatrix &matrix) const
 Eliminates all essential BCs from a matrix. More...
 
std::vector< BoundaryCondition > & essentials ()
 Accessor for the essential BC objects.
 
const std::vector< BoundaryCondition > & essentials () const
 Accessor for the essential BC objects.
 

Detailed Description

A container for the boundary condition information relating to a specific physics module.

Definition at line 28 of file boundary_condition_manager.hpp.

Constructor & Destructor Documentation

◆ BoundaryConditionManager()

serac::BoundaryConditionManager::BoundaryConditionManager ( const mfem::ParMesh &  mesh)
inlineexplicit

Construct a new Boundary Condition Manager object.

Parameters
meshThe mesh for the underlying physics module

Definition at line 35 of file boundary_condition_manager.hpp.

Member Function Documentation

◆ addEssential() [1/2]

void serac::BoundaryConditionManager::addEssential ( const mfem::Array< int > &  local_dofs,
std::shared_ptr< mfem::Coefficient >  ess_bdr_coef,
mfem::ParFiniteElementSpace &  space,
std::optional< int >  component = {} 
)

Set a list of local degrees of freedom from a scalar coefficient.

Parameters
[in]local_dofsIndices of ldofs to set with a Dirichlet condition
[in]ess_bdr_coefThe scalar coefficient that evaluates to the Dirichlet condition
[in]spaceThe finite element space to which the BC should be applied
[in]componentThe component to set (null implies all components are set)

Definition at line 32 of file boundary_condition_manager.cpp.

◆ addEssential() [2/2]

void serac::BoundaryConditionManager::addEssential ( const std::set< int > &  ess_bdr,
serac::GeneralCoefficient  ess_bdr_coef,
mfem::ParFiniteElementSpace &  space,
const std::optional< int >  component = {} 
)

Set the essential boundary conditions from a list of boundary markers and a coefficient.

Parameters
[in]ess_bdrThe set of essential BC attributes
[in]ess_bdr_coefThe essential BC value coefficient
[in]spaceThe finite element space to which the BC should be applied
[in]componentThe component to set (null implies all components are set)

Definition at line 15 of file boundary_condition_manager.cpp.

◆ addEssentialByTrueDofs()

void serac::BoundaryConditionManager::addEssentialByTrueDofs ( const mfem::Array< int > &  true_dofs,
std::shared_ptr< mfem::VectorCoefficient >  ess_bdr_coef,
mfem::ParFiniteElementSpace &  space 
)

@ brief Set a list of true degrees of feedom from a vector coefficient

Parameters
[in]true_dofsIndices of tdofs to set with a Dirichlet condition
[in]ess_bdr_coefThe coefficient that evaluates to the Dirichlet condition
[in]spaceThe finite element space to which the BC should be applied

Definition at line 47 of file boundary_condition_manager.cpp.

◆ allEssentialLocalDofs()

const mfem::Array<int>& serac::BoundaryConditionManager::allEssentialLocalDofs ( ) const
inline

Returns all the local degrees of freedom associated with all the essential BCs.

Returns
A const reference to the list of local DOF indices, without duplicates and sorted

Definition at line 85 of file boundary_condition_manager.hpp.

◆ allEssentialTrueDofs()

const mfem::Array<int>& serac::BoundaryConditionManager::allEssentialTrueDofs ( ) const
inline

Returns all the true degrees of freedom associated with all the essential BCs.

Returns
A const reference to the list of true DOF indices, without duplicates and sorted

Definition at line 73 of file boundary_condition_manager.hpp.

◆ eliminateAllEssentialDofsFromMatrix()

std::unique_ptr<mfem::HypreParMatrix> serac::BoundaryConditionManager::eliminateAllEssentialDofsFromMatrix ( mfem::HypreParMatrix &  matrix) const
inline

Eliminates all essential BCs from a matrix.

Parameters
[in,out]matrixThe matrix to eliminate from, will be modified
Returns
The eliminated matrix entries
Note
The sum of the eliminated matrix and the modified parameter is equal to the initial state of the parameter

Definition at line 100 of file boundary_condition_manager.hpp.


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