Skip to content
Snippets Groups Projects
Commit 6e6d7964 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[PL] Add preTimestep call to boundary conditions.

parent 12f34922
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,11 @@ public:
// Therefore there is nothing to do here.
}
virtual void preTimestep(const double /*t*/, GlobalVector const& /*x*/)
{
// A hook added for solution dependent dirichlet
}
virtual ~BoundaryCondition() = default;
};
......
......@@ -44,6 +44,14 @@ public:
NumLib::LocalToGlobalIndexMap const& dof_table,
unsigned const integration_order);
void preTimestep(const double t, GlobalVector const& x)
{
for (auto const& bc_ptr : _boundary_conditions)
{
bc_ptr->preTimestep(t, x);
}
}
private:
mutable std::vector<NumLib::IndexValueVector<GlobalIndexType>> _dirichlet_bcs;
std::vector<std::unique_ptr<BoundaryCondition>> _boundary_conditions;
......
......@@ -346,6 +346,8 @@ void Process::preTimestep(GlobalVector const& x, const double t,
MathLib::LinAlg::setLocalAccessibleVector(x);
preTimestepConcreteProcess(x, t, delta_t, process_id);
_boundary_conditions[process_id].preTimestep(t, x);
}
void Process::postTimestep(GlobalVector const& x, int const process_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment