MAST
second_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__second_order_newmark_transient_solver__
21 #define __mast__second_order_newmark_transient_solver__
22 
23 // MAST includes
25 
26 
27 namespace MAST {
28 
29 
37  public:
39 
41 
46 
51 
55  virtual void update_velocity(libMesh::NumericVector<Real>& vec,
56  const libMesh::NumericVector<Real>& sol);
57 
61  virtual void update_acceleration(libMesh::NumericVector<Real>& vec,
62  const libMesh::NumericVector<Real>& sol);
63 
68  virtual void update_sensitivity_velocity(libMesh::NumericVector<Real>& vel,
69  const libMesh::NumericVector<Real>& sol);
70 
75  virtual void update_sensitivity_acceleration(libMesh::NumericVector<Real>& acc,
76  const libMesh::NumericVector<Real>& sol);
77 
78 
83  virtual void
84  update_delta_velocity(libMesh::NumericVector<Real>& vel,
85  const libMesh::NumericVector<Real>& sol);
86 
91  virtual void
92  update_delta_acceleration(libMesh::NumericVector<Real>& acc,
93  const libMesh::NumericVector<Real>& sol);
94 
95 
99  virtual void
100  set_element_data(const std::vector<libMesh::dof_id_type>& dof_indices,
101  const std::vector<libMesh::NumericVector<Real>*>& sols);
102 
107  virtual void
108  extract_element_sensitivity_data(const std::vector<libMesh::dof_id_type>& dof_indices,
109  const std::vector<libMesh::NumericVector<Real>*>& sols,
110  std::vector<RealVectorX>& local_sols);
111 
115  virtual void
117  (const std::vector<libMesh::dof_id_type>& dof_indices,
118  const std::vector<libMesh::NumericVector<Real>*>& sols);
119 
120 
127  virtual void
128  elem_calculations(bool if_jac,
129  RealVectorX& vec,
130  RealMatrixX& mat);
131 
139  virtual void
141 
146  virtual void
148  RealVectorX& vec);
149 
150 
155  virtual void
156  elem_sensitivity_contribution_previous_timestep(const std::vector<RealVectorX>& prev_sols,
157  RealVectorX& vec);
158 
163  virtual void
165  RealVectorX& vec);
166 
171  virtual void
174  RealVectorX& vec);
175 
180  virtual void
182  libmesh_assert(false); // to be implemented
183  }
184 
185  protected:
186 
187  };
188 
189 }
190 
191 #endif // __mast__second_order_newmark_transient_solver__
virtual void set_element_data(const std::vector< libMesh::dof_id_type > &dof_indices, const std::vector< libMesh::NumericVector< Real > * > &sols)
provides the element with the transient data for calculations
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
This class implements the Newmark solver for solution of a second-order ODE.
virtual void update_delta_acceleration(libMesh::NumericVector< Real > &acc, const libMesh::NumericVector< Real > &sol)
update the perturbation in transient acceleration based on the current perturbed solution ...
virtual void update_acceleration(libMesh::NumericVector< Real > &vec, const libMesh::NumericVector< Real > &sol)
update the transient acceleration based on the current solution
virtual void update_sensitivity_velocity(libMesh::NumericVector< Real > &vel, const libMesh::NumericVector< Real > &sol)
update the transient sensitivity velocity based on the current sensitivity solution ...
virtual void elem_calculations(bool if_jac, RealVectorX &vec, RealMatrixX &mat)
performs the element calculations over elem, and returns the element vector and matrix quantities in ...
libMesh::Real Real
virtual void elem_sensitivity_calculations(const MAST::FunctionBase &f, RealVectorX &vec)=0
performs the element sensitivity calculations over elem, and returns the element residual sensitivity...
virtual void elem_second_derivative_dot_solution_assembly(RealMatrixX &mat)=0
calculates over elem, and returns the matrix in vec .
virtual void update_delta_velocity(libMesh::NumericVector< Real > &vel, const libMesh::NumericVector< Real > &sol)
update the perturbation in transient velocity based on the current perturbed solution ...
Matrix< Real, Dynamic, Dynamic > RealMatrixX
virtual void elem_shape_sensitivity_calculations(const MAST::FunctionBase &f, RealVectorX &vec)=0
performs the element shape sensitivity calculations over elem, and returns the element residual sensi...
Matrix< Real, Dynamic, 1 > RealVectorX
virtual void elem_topology_sensitivity_calculations(const MAST::FunctionBase &f, const MAST::FieldFunction< RealVectorX > &vel, RealVectorX &vec)=0
performs the element topology sensitivity calculations over elem, and returns the element residual se...
virtual void update_sensitivity_acceleration(libMesh::NumericVector< Real > &acc, const libMesh::NumericVector< Real > &sol)
update the transient sensitivity acceleration based on the current sensitivity solution ...
virtual void update_velocity(libMesh::NumericVector< Real > &vec, const libMesh::NumericVector< Real > &sol)
update the transient velocity based on the current solution
virtual void set_element_perturbed_data(const std::vector< libMesh::dof_id_type > &dof_indices, const std::vector< libMesh::NumericVector< Real > * > &sols)
provides the element with the transient data for calculations
virtual void extract_element_sensitivity_data(const std::vector< libMesh::dof_id_type > &dof_indices, const std::vector< libMesh::NumericVector< Real > * > &sols, std::vector< RealVectorX > &local_sols)
provides the element with the sensitivity of transient data for calculations
virtual void elem_linearized_jacobian_solution_product(RealVectorX &vec)=0
performs the element calculations over elem, and returns the element vector quantity in vec...