6#include <range/v3/range/conversion.hpp>
19 int const variable_id,
20 int const component_id)
28 "Variable id or component id too high. Actual values: ({:d}, "
29 "{:d}), maximum values: ({:d}, {:d}).",
38 "The required bulk node ids map does not exist in the boundary "
47 "The required bulk node ids map exists in the boundary mesh '{:s}' "
48 "but has wrong data type (should be equivalent to C++ data type "
49 "std::size_t which is an unsigned integer of size {:d} or UInt64 "
50 "in vtk terminology).",
51 bc_mesh.
getName(),
sizeof(std::size_t));
55 "Found {:d} nodes for Dirichlet BCs for the variable {:d} and "
63 std::vector<std::size_t>
const& nodes_in_bc_mesh,
65 int const variable_id,
int const component_id,
const double t,
71 bc_values.
ids.clear();
75 bc_values.
ids.reserve(nodes_in_bc_mesh.size());
76 bc_values.
values.reserve(nodes_in_bc_mesh.size());
77 for (
auto const node_id : nodes_in_bc_mesh)
82 variable_id, component_id);
94 if (global_index >= 0)
98 bc_values.
ids.emplace_back(global_index);
99 bc_values.
values.emplace_back(parameter(t, pos).front());
108 int const variable_id,
int const component_id,
const double t,
114 dof_table_boundary, variable_id, component_id, t, x, bc_values);
MathLib::EigenVector GlobalVector
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
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.
std::size_t getNumberOfNodes() const
Get the number of nodes.
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