Skip to content
Snippets Groups Projects
Commit af042afd authored by Elias Pipping's avatar Elias Pipping
Browse files

[Cleanup] Add and use extractAcceleration

parent 294dac77
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,15 @@ void RateUpdater<Vector, Matrix, Function, dim>::extractOldVelocity(
oldVelocity = v_o;
}
template <class Vector, class Matrix, class Function, size_t dim>
void RateUpdater<Vector, Matrix, Function, dim>::extractAcceleration(
Vector &acceleration) const {
if (!postProcessCalled)
DUNE_THROW(Dune::Exception, "It seems you forgot to call postProcess!");
acceleration = a;
}
#include "backward_euler.cc"
#include "newmark.cc"
#include "rateupdater_tmpl.cc"
......@@ -24,6 +24,7 @@ class RateUpdater {
void extractDisplacement(Vector &displacement) const;
void extractVelocity(Vector &velocity) const;
void extractOldVelocity(Vector &velocity) const;
void extractAcceleration(Vector &acceleration) const;
std::shared_ptr<RateUpdater<Vector, Matrix, Function, dim>> virtual clone()
const = 0;
......
......@@ -331,6 +331,7 @@ int main(int argc, char *argv[]) {
programState.relativeTau = adaptiveTimeStepper.getRelativeTau();
current.second->extractDisplacement(programState.u);
current.second->extractVelocity(programState.v);
current.second->extractAcceleration(programState.a);
current.first->extractAlpha(programState.alpha);
report();
......
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