Commit 76f1ac2c authored by renchao.lu's avatar renchao.lu

[PL/BC] Tackle boundary condition in the postTimeStep.

parent 86e72910
......@@ -62,6 +62,13 @@ public:
// A hook added for solution dependent dirichlet
}
virtual void postTimestep(const double /*t*/,
std::vector<GlobalVector*> const& /*x*/,
int const /*process_id*/)
{
// A hook added for solution dependent dirichlet
}
virtual ~BoundaryCondition() = default;
};
......
......@@ -63,6 +63,15 @@ public:
}
}
void postTimestep(const double t, std::vector<GlobalVector*> const& x,
int const process_id)
{
for (auto const& bc_ptr : _boundary_conditions)
{
bc_ptr->postTimestep(t, x, process_id);
}
}
private:
mutable std::vector<NumLib::IndexValueVector<GlobalIndexType>> _dirichlet_bcs;
std::vector<std::unique_ptr<BoundaryCondition>> _boundary_conditions;
......
......@@ -384,6 +384,8 @@ void Process::postTimestep(std::vector<GlobalVector*> const& x, const double t,
for (auto* const solution : x)
MathLib::LinAlg::setLocalAccessibleVector(*solution);
postTimestepConcreteProcess(x, t, delta_t, process_id);
_boundary_conditions[process_id].postTimestep(t, x, process_id);
}
void Process::postNonLinearSolver(GlobalVector const& x, const double t,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment