-
Elias Pipping authoredElias Pipping authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
newmark.hh 1.25 KiB
#ifndef DUNE_TECTONIC_TIMESTEPPING_NEWMARK_HH
#define DUNE_TECTONIC_TIMESTEPPING_NEWMARK_HH
template <class VectorType, class MatrixType, class FunctionType, size_t dim>
class Newmark
: public TimeSteppingScheme<VectorType, MatrixType, FunctionType, dim> {
public:
Newmark(MatrixType const &_A, MatrixType const &_M, MatrixType const &_C,
double _wc, VectorType const &_u_initial,
VectorType const &_v_initial, VectorType const &_a_initial,
Dune::BitSetVector<dim> const &_dirichletNodes,
FunctionType const &_dirichletFunction);
void virtual nextTimeStep() override;
void virtual setup(VectorType const &, double, double, VectorType &,
VectorType &, MatrixType &) override;
void virtual postProcess(VectorType const &) override;
void virtual extractDisplacement(VectorType &) const override;
void virtual extractVelocity(VectorType &) const override;
private:
MatrixType const &A;
MatrixType const &M;
MatrixType const &C;
double wc;
VectorType u;
VectorType v;
VectorType a;
Dune::BitSetVector<dim> const &dirichletNodes;
FunctionType const &dirichletFunction;
VectorType u_o;
VectorType v_o;
VectorType a_o;
double tau;
bool postProcessCalled = false;
};
#endif