IFEM  90A354
NewmarkMats.h
Go to the documentation of this file.
1 // $Id$
2 //==============================================================================
12 //==============================================================================
13 
14 #ifndef _NEWMARK_MATS_H
15 #define _NEWMARK_MATS_H
16 
17 #include "ElmMats.h"
18 
19 
25 class NewmarkMats : public ElmMats
26 {
27 public:
36  NewmarkMats(double a1, double a2, double b = 0.0, double c = 0.0,
37  bool generalizedAlpha = false);
39  virtual ~NewmarkMats() {}
40 
44  virtual void setStepSize(double dt, int it) { h = dt; isPredictor = it == 0; }
45 
47  virtual const Matrix& getNewtonMatrix() const;
49  virtual const Vector& getRHSVector() const;
50 
52  const Vector& dis(bool prev = false) const { return vec[prev ? 3 : 0]; }
54  const Vector& vel(bool prev = false) const { return vec[prev ? 4 : 1]; }
56  const Vector& acc(bool prev = false) const { return vec[prev ? 5 : 2]; }
57 
58 protected:
59  bool isPredictor;
60  double h;
61 
62  double alpha1;
63  double alpha2;
64  double beta;
65  double gamma;
66 
67 private:
68  double alpha_m;
69  double alpha_f;
70  bool slvDisp;
71 };
72 
73 #endif
Representation of the element matrices for a FEM problem.
Class collecting the element matrices associated with a FEM problem.
Definition: ElmMats.h:34
std::vector< Vector > b
The element right-hand-side vectors.
Definition: ElmMats.h:73
std::vector< double > c
The scalar quantities.
Definition: ElmMats.h:74
Vectors vec
Element-level primary solution vectors.
Definition: LocalIntegral.h:69
Class representing the element matrices for a dynamic FEM problem based on Newmark time integration.
Definition: NewmarkMats.h:26
double alpha2
Stiffness-proportional damping coefficient.
Definition: NewmarkMats.h:63
virtual void setStepSize(double dt, int it)
Updates the time step size and the isPredictor flag.
Definition: NewmarkMats.h:44
const Vector & vel(bool prev=false) const
Returns a const reference to current/previous velocity vector.
Definition: NewmarkMats.h:54
virtual ~NewmarkMats()
Empty destructor.
Definition: NewmarkMats.h:39
NewmarkMats(double a1, double a2, double b=0.0, double c=0.0, bool generalizedAlpha=false)
The constructor initializes the time integration parameters.
Definition: NewmarkMats.C:18
double alpha_f
Generalized-alpha parameter, αf
Definition: NewmarkMats.h:69
virtual const Vector & getRHSVector() const
Returns the element-level right-hand-side vector.
Definition: NewmarkMats.C:82
const Vector & acc(bool prev=false) const
Returns a const reference to current/previous velocity vector.
Definition: NewmarkMats.h:56
double alpha_m
Generalized-alpha parameter, αm
Definition: NewmarkMats.h:68
double gamma
Newmark time integration parameter, γ.
Definition: NewmarkMats.h:65
const Vector & dis(bool prev=false) const
Returns a const reference to current/previous displacement vector.
Definition: NewmarkMats.h:52
double h
Time step size.
Definition: NewmarkMats.h:60
bool isPredictor
If true, we are in the predictor step.
Definition: NewmarkMats.h:59
virtual const Matrix & getNewtonMatrix() const
Returns the element-level Newton matrix.
Definition: NewmarkMats.C:43
double beta
Newmark time integration parameter, β.
Definition: NewmarkMats.h:64
double alpha1
Mass-proportional damping coefficient.
Definition: NewmarkMats.h:62
bool slvDisp
If true, solve for displacement increments.
Definition: NewmarkMats.h:70
A vector class with some added algebraic operations.
Definition: matrix.h:64