diff --git a/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.cpp index cf5bb499a275de7e8f784dac6ff0ce4badac96ac..089b58f92b270dbb9e4a21bedc0a833312106f61 100644 --- a/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.cpp +++ b/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.cpp @@ -19,6 +19,7 @@ namespace ProcessLib { DeactivatedSubdomainDirichlet::DeactivatedSubdomainDirichlet( std::vector<std::size_t> const* const active_element_ids, + MeshLib::PropertyVector<unsigned char> const& is_active, MathLib::PiecewiseLinearInterpolation time_interval, ParameterLib::Parameter<double> const& parameter, bool const set_outer_nodes_dirichlet_values, @@ -31,6 +32,7 @@ DeactivatedSubdomainDirichlet::DeactivatedSubdomainDirichlet( _component_id(component_id), _time_interval(std::move(time_interval)), _active_element_ids(active_element_ids), + _is_active(is_active), _set_outer_nodes_dirichlet_values(set_outer_nodes_dirichlet_values) { config(dof_table_bulk); diff --git a/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.h b/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.h index ebe04fa6632182c515a47f0652d7c8e28f70ad42..39ba13f6145a2798f4dfbd22c371d8fcdf81c71e 100644 --- a/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.h +++ b/ProcessLib/BoundaryConditionAndSourceTerm/DeactivatedSubdomainDirichlet.h @@ -22,6 +22,8 @@ class ConfigTree; namespace MeshLib { class Node; +template <typename T> +class PropertyVector; } namespace ParameterLib @@ -39,6 +41,7 @@ class DeactivatedSubdomainDirichlet final : public BoundaryCondition public: DeactivatedSubdomainDirichlet( std::vector<std::size_t> const* active_element_ids, + MeshLib::PropertyVector<unsigned char> const& is_active, MathLib::PiecewiseLinearInterpolation time_interval, ParameterLib::Parameter<double> const& parameter, bool const set_outer_nodes_dirichlet_values, @@ -64,6 +67,7 @@ private: MathLib::PiecewiseLinearInterpolation const _time_interval; std::vector<std::size_t> const* _active_element_ids = nullptr; + MeshLib::PropertyVector<unsigned char> const& _is_active; bool const _set_outer_nodes_dirichlet_values; }; diff --git a/ProcessLib/ProcessVariable.cpp b/ProcessLib/ProcessVariable.cpp index c0dae30d4601a77e491df8071a2af91bb2652c0a..ecb4565fb7ede81eeb9a1cd3b22d1cd35d931d81 100644 --- a/ProcessLib/ProcessVariable.cpp +++ b/ProcessLib/ProcessVariable.cpp @@ -269,10 +269,10 @@ void ProcessVariable::createBoundaryConditionsForDeactivatedSubDomains( component_id++) { auto bc = std::make_unique<DeactivatedSubdomainDirichlet>( - &_ids_of_active_elements, deactivated_subdomain.time_interval, - *parameter, set_outer_nodes_dirichlet_values, - deactivated_subdomain_mesh, dof_table, variable_id, - component_id); + &_ids_of_active_elements, *_is_active, + deactivated_subdomain.time_interval, *parameter, + set_outer_nodes_dirichlet_values, deactivated_subdomain_mesh, + dof_table, variable_id, component_id); #ifdef USE_PETSC // TODO: make it work under PETSc too.