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 (std::set< boundary_id_type > b_in, 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 (std::set< boundary_id_type > b_in, 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 (std::set< boundary_id_type > b_in, 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 (std::set< boundary_id_type > b_in, 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 (std::set< boundary_id_type > b_in, 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 (std::set< boundary_id_type > b_in, 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 assignment/constructor. More... | |
DirichletBoundary & | operator= (const DirichletBoundary &) |
DirichletBoundary (DirichletBoundary &&)=default | |
This class is default move-assignable and move-constructible. More... | |
DirichletBoundary & | operator= (DirichletBoundary &&)=default |
~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.
Definition at line 88 of file dirichlet_boundaries.h.
libMesh::DirichletBoundary::DirichletBoundary | ( | std::set< boundary_id_type > | b_in, |
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 36 of file dirichlet_boundary.C.
References f, g, and libMesh::libmesh_assert().
libMesh::DirichletBoundary::DirichletBoundary | ( | std::set< boundary_id_type > | b_in, |
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 55 of file dirichlet_boundary.C.
References libMesh::FunctionBase< Output >::clone(), f, libMesh::LOCAL_VARIABLE_ORDER, and variables.
libMesh::DirichletBoundary::DirichletBoundary | ( | std::set< boundary_id_type > | b_in, |
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 78 of file dirichlet_boundary.C.
References libMesh::FunctionBase< Output >::clone(), f, g, libMesh::LOCAL_VARIABLE_ORDER, and variables.
libMesh::DirichletBoundary::DirichletBoundary | ( | std::set< boundary_id_type > | b_in, |
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 110 of file dirichlet_boundary.C.
References f_fem, and libMesh::libmesh_assert().
libMesh::DirichletBoundary::DirichletBoundary | ( | std::set< boundary_id_type > | b_in, |
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 127 of file dirichlet_boundary.C.
References libMesh::FEMFunctionBase< Output >::clone(), f_fem, libMesh::LOCAL_VARIABLE_ORDER, and variables.
libMesh::DirichletBoundary::DirichletBoundary | ( | std::set< boundary_id_type > | b_in, |
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 149 of file dirichlet_boundary.C.
References libMesh::FEMFunctionBase< Output >::clone(), f_fem, g_fem, libMesh::LOCAL_VARIABLE_ORDER, and variables.
libMesh::DirichletBoundary::DirichletBoundary | ( | const DirichletBoundary & | dirichlet_in | ) |
Copy assignment/constructor.
Deep copies (clones) functors; shallow copies any System reference
Definition at line 179 of file dirichlet_boundary.C.
References f, f_fem, f_system, g, g_fem, and libMesh::libmesh_assert().
|
default |
This class is default move-assignable and move-constructible.
|
default |
Standard destructor.
DirichletBoundary & libMesh::DirichletBoundary::operator= | ( | const DirichletBoundary & | rhs | ) |
Definition at line 201 of file dirichlet_boundary.C.
|
default |
std::set<boundary_id_type> libMesh::DirichletBoundary::b |
Definition at line 180 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 183 of file dirichlet_boundaries.h.
Referenced by DirichletBoundary().
std::unique_ptr<FEMFunctionBase<Number> > libMesh::DirichletBoundary::f_fem |
Definition at line 186 of file dirichlet_boundaries.h.
Referenced by DirichletBoundary().
const System* libMesh::DirichletBoundary::f_system |
Definition at line 189 of file dirichlet_boundaries.h.
Referenced by DirichletBoundary().
std::unique_ptr<FunctionBase<Gradient> > libMesh::DirichletBoundary::g |
Definition at line 184 of file dirichlet_boundaries.h.
Referenced by DirichletBoundary().
std::unique_ptr<FEMFunctionBase<Gradient> > libMesh::DirichletBoundary::g_fem |
Definition at line 187 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 203 of file dirichlet_boundaries.h.
std::vector<unsigned int> libMesh::DirichletBoundary::variables |
Definition at line 181 of file dirichlet_boundaries.h.
Referenced by DirichletBoundary(), libMesh::DofMap::remove_adjoint_dirichlet_boundary(), and libMesh::DofMap::remove_dirichlet_boundary().