15#include <range/v3/range/conversion.hpp>
28 int const variable_id,
29 int const component_id)
37 "Variable id or component id too high. Actual values: ({:d}, "
38 "{:d}), maximum values: ({:d}, {:d}).",
47 "The required bulk node ids map does not exist in the boundary "
56 "The required bulk node ids map exists in the boundary mesh '{:s}' "
57 "but has wrong data type (should be equivalent to C++ data type "
58 "std::size_t which is an unsigned integer of size {:d} or UInt64 "
59 "in vtk terminology).",
60 bc_mesh.
getName(),
sizeof(std::size_t));
64 "Found {:d} nodes for Dirichlet BCs for the variable {:d} and "
66 bc_mesh.
getNodes().size(), variable_id, component_id);
72 std::vector<std::size_t>
const& nodes_in_bc_mesh,
74 int const variable_id,
int const component_id,
const double t,
80 bc_values.
ids.clear();
84 bc_values.
ids.reserve(nodes_in_bc_mesh.size());
85 bc_values.
values.reserve(nodes_in_bc_mesh.size());
86 for (
auto const node_id : nodes_in_bc_mesh)
91 variable_id, component_id);
103 if (global_index >= 0)
107 bc_values.
ids.emplace_back(global_index);
108 bc_values.
values.emplace_back(parameter(t, pos).front());
117 int const variable_id,
int const component_id,
const double t,
123 dof_table_boundary, variable_id, component_id, t, x, bc_values);
Defines functions that are shared by DirichletBoundaryCondition and DirichletBoundaryConditionWithinT...
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition of the Mesh class.
Definition of the Node class.
Global vector based on Eigen vector.
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
std::size_t getID() const
Get id of the mesh.
const Node * getNode(std::size_t idx) const
Get the node with the given index.
Properties & getProperties()
const std::string getName() const
Get name of the mesh.
bool hasPropertyVector(std::string_view name) const
bool existsPropertyVector(std::string_view name) const
int getNumberOfVariables() const
GlobalIndexType getGlobalIndex(MeshLib::Location const &l, int const variable_id, int const component_id) const
int getNumberOfVariableComponents(int variable_id) const
static constexpr NUMLIB_EXPORT GlobalIndexType const nop
void setNodeID(std::size_t node_id)
void setCoordinates(MathLib::Point3d const &coordinates)
constexpr ranges::views::view_closure ids
For an element of a range view return its id.
constexpr std::string_view getBulkIDString(MeshItemType mesh_item_type)
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)
void checkParametersOfDirichletBoundaryCondition(MeshLib::Mesh const &bc_mesh, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id)
std::vector< IndexType > ids
std::vector< double > values