28 std::string property_name,
32 int const variable_id,
int const component_id)
33 : _bc_mesh(bc_mesh), _variable_id(variable_id), _component_id(component_id)
38 std::vector<MeshLib::Node*>
const& bc_nodes = bc_mesh.
getNodes();
44 variable_id, {component_id}, std::move(bc_mesh_subset));
49 "Found mesh property '{:s}' in the mesh '{:s}' which is for "
50 "boundary assignment. This mesh property is the built-in property "
51 "of the class SolutionDependentDirichletBoundaryCondition.",
52 property_name, bc_mesh.
getName());
62 auto const& nodes = bc_mesh.
getNodes();
65 auto const id = nodes[i]->getID();
67 (*_solution_dependent_bc)[i] = parameter(0, pos)[0];
70 _parameter = std::make_unique<ParameterLib::MeshNodeParameter<double>>(
83 double const , std::vector<GlobalVector*>
const& x,
89 auto const id = nodes[i]->getID();
94 assert(global_index >= 0);
95 (*_solution_dependent_bc)[i] = x[process_id]->get(global_index);
99std::unique_ptr<SolutionDependentDirichletBoundaryCondition>
103 int const component_id,
104 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters)
107 "Constructing SolutionDependentDirichletBoundaryCondition from "
119 parameters, 1, &bc_mesh);
135 return std::make_unique<SolutionDependentDirichletBoundaryCondition>(
136 std::move(property_name), initial_value_parameter, bc_mesh,
137 dof_table_bulk, variable_id, component_id);
Defines functions that are shared by DirichletBoundaryCondition and DirichletBoundaryConditionWithinT...
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition of the Mesh class.
T getConfigParameter(std::string const ¶m) const
void checkConfigParameter(std::string const ¶m, std::string_view const value) const
Global vector based on Eigen vector.
A subset of nodes on a single mesh.
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
unsigned getDimension() const
Returns the dimension of the mesh (determined by the maximum dimension over all elements).
std::size_t getID() const
Get id of the mesh.
Properties & getProperties()
const std::string getName() const
Get name of the mesh.
std::size_t getNumberOfNodes() const
Get the number of nodes.
std::size_t getNumberOfElements() const
Get the number of elements.
bool existsPropertyVector(std::string_view name) const
std::unique_ptr< LocalToGlobalIndexMap > deriveBoundaryConstrainedMap(int const variable_id, std::vector< int > const &component_ids, MeshLib::MeshSubset &&new_mesh_subset) const
void setNodeID(std::size_t node_id)
MeshLib::Mesh const & _bc_mesh
void getEssentialBCValues(double const t, GlobalVector const &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override
Writes the values of essential BCs to bc_values.
std::unique_ptr< NumLib::LocalToGlobalIndexMap const > _dof_table_boundary
std::unique_ptr< ParameterLib::MeshNodeParameter< double > > _parameter
MeshLib::PropertyVector< double > * _solution_dependent_bc
SolutionDependentDirichletBoundaryCondition(std::string property_name, ParameterLib::Parameter< double > const ¶meter, MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id)
void postTimestep(double const, std::vector< GlobalVector * > const &x, int const process_id) override
PropertyVector< T > * getOrCreateMeshProperty(Mesh &mesh, std::string const &property_name, MeshItemType const item_type, int const number_of_components)
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const ¶meter_name, std::vector< std::unique_ptr< ParameterBase > > const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
void getEssentialBCValuesLocal(ParameterLib::Parameter< double > const ¶meter, MeshLib::Mesh const &bc_mesh, std::vector< std::size_t > const &nodes_in_bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_boundary, int const variable_id, int const component_id, const double t, GlobalVector const &, NumLib::IndexValueVector< GlobalIndexType > &bc_values)
std::unique_ptr< SolutionDependentDirichletBoundaryCondition > createSolutionDependentDirichletBoundaryCondition(BaseLib::ConfigTree const &config, MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters)
void checkParametersOfDirichletBoundaryCondition(MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id)