Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
Public Member Functions | List of all members
smith::DirichletBoundaryConditions Class Reference

A generic class for setting Dirichlet boundary conditions on arbitrary physics. More...

#include <dirichlet_boundary_conditions.hpp>

Public Member Functions

 DirichletBoundaryConditions (const mfem::ParMesh &mfem_mesh, mfem::ParFiniteElementSpace &space)
 Construct from mfem::ParMesh.
 
 DirichletBoundaryConditions (const Mesh &mesh, mfem::ParFiniteElementSpace &space)
 Construct from smith::Mesh.
 
template<int spatial_dim, typename AppliedDisplacementFunction >
void setVectorBCs (const Domain &domain, std::vector< int > components, AppliedDisplacementFunction applied_displacement)
 Specify time and space varying Dirichlet boundary conditions over a domain. More...
 
template<int spatial_dim, typename AppliedDisplacementFunction >
void setVectorBCs (const Domain &domain, AppliedDisplacementFunction applied_displacement)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<int spatial_dim, typename AppliedDisplacementFunction >
void setScalarBCs (const Domain &domain, AppliedDisplacementFunction applied_displacement)
 Specify time and space varying Dirichlet boundary conditions over a domain. More...
 
template<int spatial_dim, typename AppliedDisplacementFunction >
void setScalarBCsOnLocalDofs (const mfem::Array< int > &local_dofs, AppliedDisplacementFunction applied_displacement)
 Specify time and space varying Dirichlet boundary conditions over an explicit list of local scalar dofs.
 
template<int spatial_dim>
void setFixedScalarBCs (const Domain &domain)
 Constrain the dofs of a scalar field over a domain.
 
template<int spatial_dim>
void setFixedScalarBCsOnLocalDofs (const mfem::Array< int > &local_dofs)
 Constrain an explicit list of local scalar dofs.
 
template<int spatial_dim, int field_dim>
void setFixedVectorBCs (const Domain &domain, std::vector< int > components)
 Constrain the vector dofs over a domain corresponding to a subset of the vector components.
 
template<int spatial_dim>
void setFixedVectorBCs (const Domain &domain, std::vector< int > components)
 Constrain selected vector components over a domain to zero.
 
template<int spatial_dim, int field_dim>
void setFixedVectorBCs (const Domain &domain, int component)
 Constrain one vector component over a domain to zero.
 
template<int spatial_dim>
void setFixedVectorBCs (const Domain &domain, int component)
 Constrain one vector component over a domain to zero.
 
template<int spatial_dim, int field_dim = spatial_dim>
void setFixedVectorBCs (const Domain &domain)
 Constrain all the vector dofs over a domain.
 
const smith::BoundaryConditionManagergetBoundaryConditionManager () const
 Return the value-level smith BoundaryConditionManager.
 
const smith::BoundaryConditionManagergetSecondDerivativeManager () const
 Return the BC manager whose prescribed values are the second time derivative of the value-level BC, computed by one-sided three-point forward FD with step h = 1e-4 * max(1,|t|). More...
 

Detailed Description

A generic class for setting Dirichlet boundary conditions on arbitrary physics.

Definition at line 24 of file dirichlet_boundary_conditions.hpp.

Member Function Documentation

◆ getSecondDerivativeManager()

const BoundaryConditionManager & smith::DirichletBoundaryConditions::getSecondDerivativeManager ( ) const

Return the BC manager whose prescribed values are the second time derivative of the value-level BC, computed by one-sided three-point forward FD with step h = 1e-4 * max(1,|t|).

Rebuilt on each call from current value-level essentials, so late additions are reflected.

Definition at line 87 of file dirichlet_boundary_conditions.cpp.

◆ setScalarBCs()

template<int spatial_dim, typename AppliedDisplacementFunction >
void smith::DirichletBoundaryConditions::setScalarBCs ( const Domain domain,
AppliedDisplacementFunction  applied_displacement 
)
inline

Specify time and space varying Dirichlet boundary conditions over a domain.

Parameters
domainAll dofs in this domain have boundary conditions applied to it.
applied_displacementapplied_displacement is a functor which takes time, and a smith::tensor<double,spatial_dim> corresponding to the spatial coordinate. The functor must return a double. For example: [](double t, smith::tensor<double, dim> X) { return 1.0; }

Definition at line 81 of file dirichlet_boundary_conditions.hpp.

◆ setVectorBCs()

template<int spatial_dim, typename AppliedDisplacementFunction >
void smith::DirichletBoundaryConditions::setVectorBCs ( const Domain domain,
std::vector< int >  components,
AppliedDisplacementFunction  applied_displacement 
)
inline

Specify time and space varying Dirichlet boundary conditions over a domain.

Parameters
domainAll dofs in this domain have boundary conditions applied to it.
componentsvectors of computents. The applied_displacement function returns the full vector, this specifies which subset of those should have dirichlet boundary conditions applied. direction to apply boundary condition to if the underlying field is a vector-field.
applied_displacementapplied_displacement is a functor which takes time, and a smith::tensor<double,spatial_dim> corresponding to the spatial coordinate. The functor must return a smith::Tensor<double,field_dim>, where field_dim is the dimension of the vector space for the field. For example: [](double t, smith::tensor<double, dim> X) { return smith::tensor<double,2>{}; }

Definition at line 42 of file dirichlet_boundary_conditions.hpp.


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