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

[Extend] Implement extractOldVelocity()

parent 3714cd81
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ class TimeSteppingScheme { ...@@ -14,6 +14,7 @@ class TimeSteppingScheme {
void virtual postProcess(Vector const &iterate) = 0; void virtual postProcess(Vector const &iterate) = 0;
void virtual extractDisplacement(Vector &displacement) const = 0; void virtual extractDisplacement(Vector &displacement) const = 0;
void virtual extractVelocity(Vector &velocity) const = 0; void virtual extractVelocity(Vector &velocity) const = 0;
void virtual extractOldVelocity(Vector &velocity) const = 0;
}; };
#include "timestepping/newmark.hh" #include "timestepping/newmark.hh"
......
...@@ -108,3 +108,9 @@ void BackwardEuler<Vector, Matrix, Function, dim>::extractVelocity( ...@@ -108,3 +108,9 @@ void BackwardEuler<Vector, Matrix, Function, dim>::extractVelocity(
velocity = v; velocity = v;
} }
template <class Vector, class MatrixType, class FunctionType, size_t dim>
void BackwardEuler<Vector, MatrixType, FunctionType, dim>::extractOldVelocity(
Vector &velocity) const {
velocity = v_o;
}
...@@ -15,6 +15,7 @@ class BackwardEuler : public TimeSteppingScheme<Vector, Matrix, Function, dim> { ...@@ -15,6 +15,7 @@ class BackwardEuler : public TimeSteppingScheme<Vector, Matrix, Function, dim> {
void postProcess(Vector const &) override; void postProcess(Vector const &) override;
void extractDisplacement(Vector &) const override; void extractDisplacement(Vector &) const override;
void extractVelocity(Vector &) const override; void extractVelocity(Vector &) const override;
void extractOldVelocity(Vector &) const override;
private: private:
Matrix const &A; Matrix const &A;
......
...@@ -123,3 +123,9 @@ void Newmark<Vector, Matrix, Function, dim>::extractVelocity(Vector &velocity) ...@@ -123,3 +123,9 @@ void Newmark<Vector, Matrix, Function, dim>::extractVelocity(Vector &velocity)
velocity = v; velocity = v;
} }
template <class Vector, class MatrixType, class FunctionType, size_t dim>
void Newmark<Vector, MatrixType, FunctionType, dim>::extractOldVelocity(
Vector &velocity) const {
velocity = v_o;
}
...@@ -16,6 +16,7 @@ class Newmark : public TimeSteppingScheme<Vector, Matrix, Function, dim> { ...@@ -16,6 +16,7 @@ class Newmark : public TimeSteppingScheme<Vector, Matrix, Function, dim> {
void postProcess(Vector const &) override; void postProcess(Vector const &) override;
void extractDisplacement(Vector &) const override; void extractDisplacement(Vector &) const override;
void extractVelocity(Vector &) const override; void extractVelocity(Vector &) const override;
void extractOldVelocity(Vector &) const override;
private: private:
Matrix const &A; Matrix const &A;
......
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