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

Make timeSteppingScheme cloneable

parent 82675edb
Branches
No related tags found
No related merge requests found
......@@ -26,6 +26,9 @@
void virtual postProcess(VectorType const &);
void virtual extractDisplacement(VectorType &) const;
void virtual extractVelocity(VectorType &) const;
virtual TimeSteppingScheme<VectorType, MatrixType, FunctionType, dim> *
clone();
#+end_src
#+name: dirichletCondition
#+begin_src c++
......@@ -70,6 +73,9 @@
void virtual postProcess(VectorType const &problem_iterate) = 0;
void virtual extractDisplacement(VectorType &displacement) const = 0;
void virtual extractVelocity(VectorType &velocity) const = 0;
virtual TimeSteppingScheme<VectorType, MatrixType, FunctionType, dim> *
clone() = 0;
};
#+end_src
* TimeSteppingScheme: Implicit Euler
......@@ -184,6 +190,12 @@
velocity = ud;
}
template <class VectorType, class MatrixType, class FunctionType, int dim>
TimeSteppingScheme<VectorType, MatrixType, FunctionType, dim> *
ImplicitEuler<VectorType, MatrixType, FunctionType, dim>::
clone() {
return new ImplicitEuler<VectorType, MatrixType, FunctionType, dim>(*this);
}
#+end_src
* TimeSteppingScheme: Implicit Two-Step
#+begin_src latex :tangle twostep.tex :noweb yes
......@@ -357,6 +369,13 @@
velocity = ud;
}
template <class VectorType, class MatrixType, class FunctionType, int dim>
TimeSteppingScheme<VectorType, MatrixType, FunctionType, dim> *
ImplicitTwoStep<VectorType, MatrixType, FunctionType, dim>::
clone() {
return new ImplicitTwoStep<VectorType, MatrixType, FunctionType, dim>(*this);
}
#+end_src
* TimeSteppingScheme: Newmark
#+begin_src latex :tangle newmark.tex :noweb yes
......@@ -527,6 +546,13 @@
velocity = ud;
}
template <class VectorType, class MatrixType, class FunctionType, int dim>
TimeSteppingScheme<VectorType, MatrixType, FunctionType, dim> *
Newmark<VectorType, MatrixType, FunctionType, dim>::
clone() {
return new Newmark<VectorType, MatrixType, FunctionType, dim>(*this);
}
#+end_src
* C++ code generation
#+begin_src c++ :tangle timestepping.hh :noweb yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment