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

[NL] Pass time to ODESystem::getKnownSolutions();

parent 2f5915bc
No related branches found
No related tags found
No related merge requests found
...@@ -65,8 +65,12 @@ public: ...@@ -65,8 +65,12 @@ public:
using Index = typename MathLib::MatrixVectorTraits<Matrix>::Index; using Index = typename MathLib::MatrixVectorTraits<Matrix>::Index;
virtual std::vector<ProcessLib::DirichletBc<Index> > const* getKnownSolutions() const //! Provides known solutions (Dirichlet boundary conditions) vector for
//! the ode system at the given time \c t.
virtual std::vector<ProcessLib::DirichletBc<Index>> const*
getKnownSolutions(double const t) const
{ {
(void)t;
return nullptr; // by default there are no known solutions return nullptr; // by default there are no known solutions
} }
}; };
......
...@@ -310,7 +310,8 @@ public: ...@@ -310,7 +310,8 @@ public:
void applyKnownSolutionsPicard(Matrix& A, Vector& rhs, Vector& x) override void applyKnownSolutionsPicard(Matrix& A, Vector& rhs, Vector& x) override
{ {
auto const* known_solutions = _ode.getKnownSolutions(); auto const* known_solutions =
_ode.getKnownSolutions(_time_disc.getCurrentTime());
if (known_solutions) { if (known_solutions) {
for (auto const& bc : *known_solutions) { for (auto const& bc : *known_solutions) {
......
...@@ -213,8 +213,8 @@ public: ...@@ -213,8 +213,8 @@ public:
// VectoMatrixAssembler since that will work for all kinds of processes. // VectoMatrixAssembler since that will work for all kinds of processes.
} }
std::vector<DirichletBc<Index> > const* getKnownSolutions() std::vector<DirichletBc<Index>> const* getKnownSolutions(
const override final double const /*t*/) const override final
{ {
return &_dirichlet_bcs; return &_dirichlet_bcs;
} }
......
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