24 bool const set_outer_nodes_dirichlet_values,
27 int const component_id)
28 : _parameter(parameter),
29 _subdomain(subdomain),
30 _variable_id(variable_id),
31 _component_id(component_id),
32 _time_interval(std::move(time_interval)),
33 _is_active(is_active),
34 _set_outer_nodes_dirichlet_values(set_outer_nodes_dirichlet_values)
58 [[maybe_unused]]
auto const& bulk_node_ids =
60 [[maybe_unused]]
auto const& bulk_element_ids =
63 auto is_inactive_id = [&](std::size_t
const bulk_element_id)
67 {
return is_inactive_id(bulk_element_ids[e->getID()]); };
69 std::vector<std::size_t> inactive_nodes_in_bc_mesh;
71 back_inserter(inactive_nodes_in_bc_mesh),
72 [&](std::size_t
const n)
74 const auto& connected_elements =
77 return std::all_of(begin(connected_elements),
78 end(connected_elements),
85 back_inserter(inactive_nodes_in_bc_mesh),
86 [&](std::size_t
const n)
88 const auto& connected_elements =
91 return std::all_of(begin(connected_elements),
92 end(connected_elements),
101 if (std::all_of(begin(connected_elements), end(connected_elements),
109 auto time_interval_contains = [&](
double const t)
114 if (time_interval_contains(t))
122 bc_values.
ids.clear();
Defines functions that are shared by DirichletBoundaryCondition and DirichletBoundaryConditionWithinT...
Global vector based on Eigen vector.
double getSupportMin() const
double getSupportMax() const
A subset of nodes on a single mesh.
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
std::vector< Element const * > const & getElementsConnectedToNode(std::size_t node_id) const
std::unique_ptr< LocalToGlobalIndexMap > deriveBoundaryConstrainedMap(int const variable_id, std::vector< int > const &component_ids, MeshLib::MeshSubset &&new_mesh_subset) const
DeactivatedSubdomainDirichlet(MeshLib::PropertyVector< unsigned char > const &is_active, MathLib::PiecewiseLinearInterpolation time_interval, ParameterLib::Parameter< double > const ¶meter, bool const set_outer_nodes_dirichlet_values, DeactivatedSubdomainMesh const &subdomain, NumLib::LocalToGlobalIndexMap const &dof_table_bulk, int const variable_id, int const component_id)
MathLib::PiecewiseLinearInterpolation const _time_interval
void getEssentialBCValues(const double t, GlobalVector const &x, NumLib::IndexValueVector< GlobalIndexType > &bc_values) const override
Writes the values of essential BCs to bc_values.
ParameterLib::Parameter< double > const & _parameter
MeshLib::PropertyVector< unsigned char > const & _is_active
bool const _set_outer_nodes_dirichlet_values
void config(NumLib::LocalToGlobalIndexMap const &dof_table_bulk)
std::unique_ptr< NumLib::LocalToGlobalIndexMap const > _dof_table_boundary
DeactivatedSubdomainMesh const & _subdomain
PropertyVector< std::size_t > const * bulkElementIDs(Mesh const &mesh)
PropertyVector< std::size_t > const * bulkNodeIDs(Mesh const &mesh)
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
std::vector< std::vector< std::size_t > > outer_nodes_elements
std::vector< std::size_t > inner_nodes
std::vector< std::size_t > outer_nodes