File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 2525#include <cstdio>
2626
2727
28+ /*!
29+ The default implementation of this method allocates for one solution vector
30+ in \ref primsol when the \a mode is set to SIM::RECOVERY or SIM::NORMS.
31+ This is sufficient for most linear problems with a single right-hand side.
32+ */
33+
34+ void IntegrandBase ::setMode (SIM ::SolutionMode mode )
35+ {
36+ primsol .resize ((m_mode = mode ) >= SIM ::RECOVERY ? 1 : 0 );
37+ }
38+
39+
2840/*!
2941 Override this method if the integrand needs some patch-specific data
3042 to be initialized before performing the numerical integration.
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class IntegrandBase : public Integrand
5757 // ===============================
5858
5959 // ! \brief Defines the solution mode before the element assembly is started.
60- virtual void setMode (SIM::SolutionMode mode) { m_mode = mode; }
60+ virtual void setMode (SIM::SolutionMode mode);
6161 // ! \brief Returns current solution mode.
6262 SIM::SolutionMode getMode () const override { return m_mode; }
6363 // ! \brief Initializes an integration parameter for the integrand.
You can’t perform that action at this time.
0 commit comments