MAST
first_order_newmark_transient_solver.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2019 Manav Bhatia
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __mast__first_order_newmark_transient_solver__
21 #define __mast__first_order_newmark_transient_solver__
22 
23 // MAST includes
25 
26 
27 namespace MAST {
28 
29 
61  class FirstOrderNewmarkTransientSolver:
63  public:
64  FirstOrderNewmarkTransientSolver();
65 
66  virtual ~FirstOrderNewmarkTransientSolver();
67 
71  Real beta;
72 
73 
77  virtual void update_velocity(libMesh::NumericVector<Real>& vel,
78  const libMesh::NumericVector<Real>& sol);
79 
83  virtual void update_acceleration(libMesh::NumericVector<Real>& acc,
84  const libMesh::NumericVector<Real>& sol) {
85  // should not get here for first order ode
86  libmesh_error();
87  }
88 
93  virtual void update_sensitivity_velocity(libMesh::NumericVector<Real>& vel,
94  const libMesh::NumericVector<Real>& sol);
95 
100  virtual void update_sensitivity_acceleration(libMesh::NumericVector<Real>& acc,
101  const libMesh::NumericVector<Real>& sol) {
102  // should not get here for first order ode
103  libmesh_error();
104  }
105 
110  virtual void
111  update_delta_velocity(libMesh::NumericVector<Real>& vel,
112  const libMesh::NumericVector<Real>& sol);
113 
118  virtual void
119  update_delta_acceleration(libMesh::NumericVector<Real>& acc,
120  const libMesh::NumericVector<Real>& sol) {
121  // should not get here for first order ode
122  libmesh_error();
123  }
124 
128  virtual void
129  set_element_data(const std::vector<libMesh::dof_id_type>& dof_indices,
130  const std::vector<libMesh::NumericVector<Real>*>& sols);
131 
136  virtual void
137  extract_element_sensitivity_data(const std::vector<libMesh::dof_id_type>& dof_indices,
138  const std::vector<libMesh::NumericVector<Real>*>& sols,
139  std::vector<RealVectorX>& local_sols);
140 
144  virtual void
145  set_element_perturbed_data
146  (const std::vector<libMesh::dof_id_type>& dof_indices,
147  const std::vector<libMesh::NumericVector<Real>*>& sols);
148 
149 
156  virtual void
157  elem_calculations(bool if_jac,
158  RealVectorX& vec,
159  RealMatrixX& mat);
160 
168  virtual void
170 
175  virtual void
177  RealVectorX& vec);
178 
183  virtual void
184  elem_sensitivity_contribution_previous_timestep(const std::vector<RealVectorX>& prev_sols,
185  RealVectorX& vec);
186 
191  virtual void
193  RealVectorX& vec);
194 
199  virtual void
202  RealVectorX& vec);
203 
208  virtual void
210  libmesh_assert(false); // to be implemented
211  }
212 
213  protected:
214 
215  };
216 
217 }
218 
219 #endif // __mast__first_order_newmark_transient_solver__
virtual void elem_sensitivity_calculations(const MAST::FunctionBase &f, RealVectorX &vec)
performs the element sensitivity calculations over elem, and returns the element residual sensitivity...
virtual void elem_topology_sensitivity_calculations(const MAST::FunctionBase &f, const MAST::FieldFunction< RealVectorX > &vel, RealVectorX &vec)
performs the element topology sensitivity calculations over elem, and returns the element residual se...
virtual void elem_sensitivity_contribution_previous_timestep(const std::vector< RealVectorX > &prev_sols, RealVectorX &vec)
computes the contribution for this element from previous time step
libMesh::Real Real
virtual void elem_second_derivative_dot_solution_assembly(RealMatrixX &mat)
calculates over elem, and returns the matrix in vec .
Matrix< Real, Dynamic, Dynamic > RealMatrixX
Matrix< Real, Dynamic, 1 > RealVectorX
virtual void elem_linearized_jacobian_solution_product(RealVectorX &vec)
This class implements the Newmark solver for solution of a first-order ODE.
virtual void elem_shape_sensitivity_calculations(const MAST::FunctionBase &f, RealVectorX &vec)
performs the element shape sensitivity calculations over elem, and returns the element residual sensi...