libMesh
|
This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids and system variable ids. More...
#include <dirichlet_boundaries.h>
Public Member Functions | |
DirichletBoundary (const std::set< boundary_id_type > &b_in, const std::vector< unsigned int > &variables_in, const FunctionBase< Number > *f_in, const FunctionBase< Gradient > *g_in=nullptr) | |
Constructor for a system-variable-order boundary using pointers-to-functors. More... | |
DirichletBoundary (const std::set< boundary_id_type > &b_in, const std::vector< unsigned int > &variables_in, const FunctionBase< Number > &f_in, VariableIndexing type=SYSTEM_VARIABLE_ORDER) | |
Constructor for a boundary from reference-to-functor. More... | |
DirichletBoundary (const std::set< boundary_id_type > &b_in, const std::vector< unsigned int > &variables_in, const FunctionBase< Number > &f_in, const FunctionBase< Gradient > &g_in, VariableIndexing type=SYSTEM_VARIABLE_ORDER) | |
Constructor for a system-variable-order boundary from references-to-functors. More... | |
DirichletBoundary (const std::set< boundary_id_type > &b_in, const std::vector< unsigned int > &variables_in, const System &f_sys_in, const FEMFunctionBase< Number > *f_in, const FEMFunctionBase< Gradient > *g_in=nullptr) | |
Constructor for a system-variable-order boundary from pointers-to-fem-functors. More... | |
DirichletBoundary (const std::set< boundary_id_type > &b_in, const std::vector< unsigned int > &variables_in, const System &f_sys_in, const FEMFunctionBase< Number > &f_in, VariableIndexing type=SYSTEM_VARIABLE_ORDER) | |
Constructor for a system-variable-order boundary from reference-to-fem-functor. More... | |
DirichletBoundary (const std::set< boundary_id_type > &b_in, const std::vector< unsigned int > &variables_in, const System &f_sys_in, const FEMFunctionBase< Number > &f_in, const FEMFunctionBase< Gradient > &g_in, VariableIndexing type=SYSTEM_VARIABLE_ORDER) | |
Constructor for a system-variable-order boundary from references-to-fem-functors. More... | |
DirichletBoundary (const DirichletBoundary &dirichlet_in) | |
Copy constructor. More... | |
~DirichletBoundary () | |
Standard destructor. More... | |
Public Attributes | |
std::set< boundary_id_type > | b |
std::vector< unsigned int > | variables |
std::unique_ptr< FunctionBase< Number > > | f |
std::unique_ptr< FunctionBase< Gradient > > | g |
std::unique_ptr< FEMFunctionBase< Number > > | f_fem |
std::unique_ptr< FEMFunctionBase< Gradient > > | g_fem |
const System * | f_system |
Real | jacobian_tolerance |
Defaults to zero, but can be set to a custom small negative value to try and avoid spurious zero (or negative) Jacobian values when applying Dirichlet constraints. More... | |
This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids and system variable ids.
Dirichlet values must be supplied as the input function "f"; when using some specialized elements, gradient values must be supplied via the input function "g".
Dirichlet functions may be subclasses of FunctionBase or FEMFunctionBase; in the latter case the user must also supply a reference to the System on which the FEMFunctionBase will be evaluated.
Dirichlet functions are allowed to return NaN; if this is encountered, then the degree of freedom values in a patch around the location of the returned NaN will be left unconstrained. E.g. a NaN on a boundary edge in 3D would leave that edge and the two adjoining face interiors unconstrained, but would still permit the other edge and node DoFs around those faces to be constrained.
Class for specifying Dirichlet boundary conditions as constraints.
Definition at line 88 of file dirichlet_boundaries.h.
libMesh::DirichletBoundary::DirichletBoundary | ( | const std::set< boundary_id_type > & | b_in, |
const std::vector< unsigned int > & | variables_in, | ||
const FunctionBase< Number > * | f_in, | ||
const FunctionBase< Gradient > * | g_in = nullptr |
||
) |
Constructor for a system-variable-order boundary using pointers-to-functors.
Definition at line 34 of file dirichlet_boundary.C.
References f, g, and libMesh::libmesh_assert().
libMesh::DirichletBoundary::DirichletBoundary | ( | const std::set< boundary_id_type > & | b_in, |
const std::vector< unsigned int > & | variables_in, | ||
const FunctionBase< Number > & | f_in, | ||
VariableIndexing | type = SYSTEM_VARIABLE_ORDER |
||
) |
Constructor for a boundary from reference-to-functor.
Defaults to system variable indexing for backwards compatibility, but most users will prefer local indexing.
Definition at line 53 of file dirichlet_boundary.C.
References libMesh::FunctionBase< Output >::clone(), f, and libMesh::LOCAL_VARIABLE_ORDER.
libMesh::DirichletBoundary::DirichletBoundary | ( | const std::set< boundary_id_type > & | b_in, |
const std::vector< unsigned int > & | variables_in, | ||
const FunctionBase< Number > & | f_in, | ||
const FunctionBase< Gradient > & | g_in, | ||
VariableIndexing | type = SYSTEM_VARIABLE_ORDER |
||
) |
Constructor for a system-variable-order boundary from references-to-functors.
Defaults to system variable indexing for backwards compatibility, but most users will prefer local indexing.
Definition at line 76 of file dirichlet_boundary.C.
References libMesh::FunctionBase< Output >::clone(), f, g, and libMesh::LOCAL_VARIABLE_ORDER.
libMesh::DirichletBoundary::DirichletBoundary | ( | const std::set< boundary_id_type > & | b_in, |
const std::vector< unsigned int > & | variables_in, | ||
const System & | f_sys_in, | ||
const FEMFunctionBase< Number > * | f_in, | ||
const FEMFunctionBase< Gradient > * | g_in = nullptr |
||
) |
Constructor for a system-variable-order boundary from pointers-to-fem-functors.
Definition at line 108 of file dirichlet_boundary.C.
References f_fem, and libMesh::libmesh_assert().
libMesh::DirichletBoundary::DirichletBoundary | ( | const std::set< boundary_id_type > & | b_in, |
const std::vector< unsigned int > & | variables_in, | ||
const System & | f_sys_in, | ||
const FEMFunctionBase< Number > & | f_in, | ||
VariableIndexing | type = SYSTEM_VARIABLE_ORDER |
||
) |
Constructor for a system-variable-order boundary from reference-to-fem-functor.
Defaults to system variable indexing for backwards compatibility, but most users will prefer local indexing.
Definition at line 125 of file dirichlet_boundary.C.
References libMesh::FEMFunctionBase< Output >::clone(), f_fem, and libMesh::LOCAL_VARIABLE_ORDER.
libMesh::DirichletBoundary::DirichletBoundary | ( | const std::set< boundary_id_type > & | b_in, |
const std::vector< unsigned int > & | variables_in, | ||
const System & | f_sys_in, | ||
const FEMFunctionBase< Number > & | f_in, | ||
const FEMFunctionBase< Gradient > & | g_in, | ||
VariableIndexing | type = SYSTEM_VARIABLE_ORDER |
||
) |
Constructor for a system-variable-order boundary from references-to-fem-functors.
Defaults to system variable indexing for backwards compatibility, but most users will prefer local indexing.
Definition at line 147 of file dirichlet_boundary.C.
References libMesh::FEMFunctionBase< Output >::clone(), f_fem, g_fem, and libMesh::LOCAL_VARIABLE_ORDER.
libMesh::DirichletBoundary::DirichletBoundary | ( | const DirichletBoundary & | dirichlet_in | ) |
Copy constructor.
Deep copies (clones) functors; shallow copies any System reference
Definition at line 177 of file dirichlet_boundary.C.
References f, f_fem, f_system, g, g_fem, and libMesh::libmesh_assert().
libMesh::DirichletBoundary::~DirichletBoundary | ( | ) |
std::set<boundary_id_type> libMesh::DirichletBoundary::b |
Definition at line 173 of file dirichlet_boundaries.h.
Referenced by libMesh::DofMap::check_dirichlet_bcid_consistency(), libMesh::DofMap::remove_adjoint_dirichlet_boundary(), and libMesh::DofMap::remove_dirichlet_boundary().
std::unique_ptr<FunctionBase<Number> > libMesh::DirichletBoundary::f |
Definition at line 176 of file dirichlet_boundaries.h.
Referenced by DirichletBoundary().
std::unique_ptr<FEMFunctionBase<Number> > libMesh::DirichletBoundary::f_fem |
Definition at line 179 of file dirichlet_boundaries.h.
Referenced by DirichletBoundary().
const System* libMesh::DirichletBoundary::f_system |
Definition at line 182 of file dirichlet_boundaries.h.
Referenced by DirichletBoundary().
std::unique_ptr<FunctionBase<Gradient> > libMesh::DirichletBoundary::g |
Definition at line 177 of file dirichlet_boundaries.h.
Referenced by DirichletBoundary().
std::unique_ptr<FEMFunctionBase<Gradient> > libMesh::DirichletBoundary::g_fem |
Definition at line 180 of file dirichlet_boundaries.h.
Referenced by DirichletBoundary().
Real libMesh::DirichletBoundary::jacobian_tolerance |
Defaults to zero, but can be set to a custom small negative value to try and avoid spurious zero (or negative) Jacobian values when applying Dirichlet constraints.
This can be useful in various different situations, for example: 1.) When specifying DirichletBCs on poorly-shaped elements. 2.) When degenerate Hexahedra are used in place of Prisms for convenience. 3.) On elements (e.g. Pyramids) which always have a zero Jacobian at the "apex" node. In theory there's nothing preventing someone from specifying DirichletBCs in such cases; setting this tolerance to a small negative value makes this possible in practice.
Definition at line 196 of file dirichlet_boundaries.h.
std::vector<unsigned int> libMesh::DirichletBoundary::variables |
Definition at line 174 of file dirichlet_boundaries.h.
Referenced by libMesh::DofMap::remove_adjoint_dirichlet_boundary(), and libMesh::DofMap::remove_dirichlet_boundary().