OGS
|
The ConstraintDirichletBoundaryCondition class describes a Dirichlet-type boundary condition that is constant in space and time where the domain can shrink and grow within the simulation. The expected parameter in the passed configuration is "value" which, when not present defaults to zero.
Definition at line 25 of file ConstraintDirichletBoundaryCondition.h.
#include <ConstraintDirichletBoundaryCondition.h>
Public Member Functions | |
ConstraintDirichletBoundaryCondition (ParameterLib::Parameter< double > const ¶meter, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id, MeshLib::Mesh const &bc_mesh, unsigned const integration_order, MeshLib::Mesh const &bulk_mesh, double const constraint_threshold, bool const lower, std::function< Eigen::Vector3d(std::size_t const, MathLib::Point3d const &, double const, std::vector< GlobalVector * > const &)> getFlux) | |
void | preTimestep (double const t, std::vector< GlobalVector * > const &x, int const process_id) override |
void | getEssentialBCValues (const double t, const GlobalVector &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override |
Writes the values of essential BCs to bc_values . | |
Public Member Functions inherited from ProcessLib::BoundaryCondition | |
virtual void | applyNaturalBC (const double, std::vector< GlobalVector * > const &, int const, GlobalMatrix *, GlobalVector &, GlobalMatrix *) |
virtual void | postTimestep (const double, std::vector< GlobalVector * > const &, int const) |
virtual | ~BoundaryCondition ()=default |
Private Attributes | |
ParameterLib::Parameter< double > const & | _parameter |
std::unique_ptr< NumLib::LocalToGlobalIndexMap > | _dof_table_boundary |
int const | _variable_id |
int const | _component_id |
MeshLib::Mesh const & | _bc_mesh |
unsigned const | _integration_order |
Integration order for integration over the lower-dimensional elements. | |
std::vector< std::pair< std::size_t, unsigned > > | _bulk_ids |
std::vector< double > | _flux_values |
Stores the results of the flux computations per boundary element. | |
std::vector< std::unique_ptr< ConstraintDirichletBoundaryConditionLocalAssemblerInterface > > | _local_assemblers |
Local assemblers for each boundary element. | |
double const | _constraint_threshold |
bool const | _lower |
MeshLib::Mesh const & | _bulk_mesh |
std::function< Eigen::Vector3d(std::size_t const, MathLib::Point3d const &, double const, std::vector< GlobalVector * > const &)> | _getFlux |
The function _getFlux calculates the flux through the boundary element. | |
ProcessLib::ConstraintDirichletBoundaryCondition::ConstraintDirichletBoundaryCondition | ( | ParameterLib::Parameter< double > const & | parameter, |
NumLib::LocalToGlobalIndexMap const & | dof_table_bulk, | ||
int const | variable_id, | ||
int const | component_id, | ||
MeshLib::Mesh const & | bc_mesh, | ||
unsigned const | integration_order, | ||
MeshLib::Mesh const & | bulk_mesh, | ||
double const | constraint_threshold, | ||
bool const | lower, | ||
std::function< Eigen::Vector3d(std::size_t const, MathLib::Point3d const &, double const, std::vector< GlobalVector * > const &)> | getFlux ) |
parameter | Used for setting the values for the boundary condition. |
dof_table_bulk | The bulk local to global index map is used to derive the local to global index map for the boundary. |
variable_id | The variable id is needed to determine the global index. |
component_id | The component id is needed to determine the global index. |
bc_mesh | Lower dimensional mesh the boundary condition is defined on. The bc_mesh must have the two PropertyVector objects 'bulk_element_ids' and 'bulk_node_ids' containing the corresponding information. |
integration_order | Order the order of integration used to compute the constraint. |
bulk_mesh | The FE mesh for the simulation. |
constraint_threshold | The threshold value used for the switch off/on decision. |
lower | Boolean value used for the calculation of the constraint criterion, i.e., if lower is set to true the criterion 'calculated_value < constraint_threshold' is evaluated to switch on/off the boundary condition, else 'calculated_value > constraint_threshold' is evaluated. |
getFlux | The function used for the flux calculation. |
Definition at line 24 of file ConstraintDirichletBoundaryCondition.cpp.
References _bc_mesh, _bulk_ids, _bulk_mesh, _dof_table_boundary, _flux_values, _integration_order, _local_assemblers, MeshLib::bulkElementIDs(), MeshLib::bulkNodeIDs(), ProcessLib::BoundaryConditionAndSourceTerm::createLocalAssemblers(), DBUG(), NumLib::LocalToGlobalIndexMap::deriveBoundaryConstrainedMap(), MeshLib::Mesh::getDimension(), MeshLib::Mesh::getElement(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getNodes(), NumLib::LocalToGlobalIndexMap::getNumberOfVariableComponents(), NumLib::LocalToGlobalIndexMap::getNumberOfVariables(), MeshLib::Element::identifyFace(), MeshLib::Mesh::isAxiallySymmetric(), and OGS_FATAL.
|
overridevirtual |
Writes the values of essential BCs to bc_values
.
Reimplemented from ProcessLib::BoundaryCondition.
Definition at line 127 of file ConstraintDirichletBoundaryCondition.cpp.
References _bc_mesh, _component_id, _constraint_threshold, _dof_table_boundary, _flux_values, _lower, _parameter, _variable_id, DBUG(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getID(), NumLib::IndexValueVector< typename >::ids, MeshLib::Node, NumLib::MeshComponentMap::nop, ParameterLib::SpatialPosition::setAll(), and NumLib::IndexValueVector< typename >::values.
|
overridevirtual |
Reimplemented from ProcessLib::BoundaryCondition.
Definition at line 110 of file ConstraintDirichletBoundaryCondition.cpp.
References _bc_mesh, _flux_values, _getFlux, _local_assemblers, DBUG(), MeshLib::Mesh::getElements(), and MeshLib::views::ids.
|
private |
Vector of (lower-dimensional) boundary elements on which the boundary condition is defined.
Definition at line 82 of file ConstraintDirichletBoundaryCondition.h.
Referenced by ConstraintDirichletBoundaryCondition(), getEssentialBCValues(), and preTimestep().
|
private |
The first item of the pair is the element id in the bulk mesh, the second item is the face id of the bulk element that is part of the boundary
Definition at line 90 of file ConstraintDirichletBoundaryCondition.h.
Referenced by ConstraintDirichletBoundaryCondition().
|
private |
The mesh _bulk_mesh is the discretized domain the process(es) are defined on. It is needed to get values for the constraint calculation.
Definition at line 112 of file ConstraintDirichletBoundaryCondition.h.
Referenced by ConstraintDirichletBoundaryCondition().
|
private |
Definition at line 78 of file ConstraintDirichletBoundaryCondition.h.
Referenced by getEssentialBCValues().
|
private |
The threshold value used to the switch off/on the Dirichlet-type boundary condition.
Definition at line 102 of file ConstraintDirichletBoundaryCondition.h.
Referenced by getEssentialBCValues().
|
private |
Local dof table, a subset of the global one restricted to the participating number of elements of the boundary condition.
Definition at line 75 of file ConstraintDirichletBoundaryCondition.h.
Referenced by ConstraintDirichletBoundaryCondition(), and getEssentialBCValues().
|
private |
Stores the results of the flux computations per boundary element.
Definition at line 93 of file ConstraintDirichletBoundaryCondition.h.
Referenced by ConstraintDirichletBoundaryCondition(), getEssentialBCValues(), and preTimestep().
|
private |
The function _getFlux calculates the flux through the boundary element.
Definition at line 118 of file ConstraintDirichletBoundaryCondition.h.
Referenced by preTimestep().
|
private |
Integration order for integration over the lower-dimensional elements.
Definition at line 85 of file ConstraintDirichletBoundaryCondition.h.
Referenced by ConstraintDirichletBoundaryCondition().
|
private |
Local assemblers for each boundary element.
Definition at line 98 of file ConstraintDirichletBoundaryCondition.h.
Referenced by ConstraintDirichletBoundaryCondition(), and preTimestep().
|
private |
The boolean value lower is used for the calculation of the constraint criterion, i.e., if lower is set to true the criterion 'calculated_value < constraint_threshold' is evaluated to switch on/off the boundary condition, else 'calculated_value > constraint_threshold' is evaluated.
Definition at line 108 of file ConstraintDirichletBoundaryCondition.h.
Referenced by getEssentialBCValues().
|
private |
Definition at line 71 of file ConstraintDirichletBoundaryCondition.h.
Referenced by getEssentialBCValues().
|
private |
Definition at line 77 of file ConstraintDirichletBoundaryCondition.h.
Referenced by getEssentialBCValues().