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>
void setFixedScalarBCs (const Domain &domain)
 Constrain the dofs of a scalar field over a domain.
 
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, int field_dim>
void setFixedVectorBCs (const Domain &domain, int component)
 Constrain the dofs of a scalar field over a domain.
 
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 smith BoundaryConditionManager.
 

Detailed Description

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

Definition at line 22 of file dirichlet_boundary_conditions.hpp.

Member Function Documentation

◆ 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 79 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 40 of file dirichlet_boundary_conditions.hpp.


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