MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver Class Reference

Detailed Description

This solver implements the stabilized sensitivity analysis solver for chaotic systems where the linearized system can be unstable.

Definition at line 36 of file stabilized_first_order_transient_sensitivity_solver.h.

#include <stabilized_first_order_transient_sensitivity_solver.h>

Inheritance diagram for MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver:
Collaboration diagram for MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver:

Public Member Functions

 StabilizedFirstOrderNewmarkTransientSensitivitySolver ()
 
virtual ~StabilizedFirstOrderNewmarkTransientSensitivitySolver ()
 
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 mat and vec, respectively. More...
 
virtual void elem_linearized_jacobian_solution_product (RealVectorX &vec)
 performs the element calculations over elem, and returns the element vector quantity in vec. More...
 
virtual void elem_second_derivative_dot_solution_assembly (RealMatrixX &mat)
 calculates $ d ([J] \{\Delta X\})/ dX $ over elem, and returns the matrix in vec . More...
 
virtual void elem_sensitivity_calculations (const MAST::FunctionBase &f, RealVectorX &vec)
 performs the element sensitivity calculations over elem, and returns the element residual sensitivity in vec . More...
 
virtual void elem_sensitivity_contribution_previous_timestep (const std::vector< RealVectorX > &prev_sols, RealVectorX &vec)
 
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 sensitivity in vec . More...
 
virtual void elem_topology_sensitivity_calculations (const MAST::FunctionBase &f, RealVectorX &vec)
 performs the element topology sensitivity calculations over elem, and returns the element residual sensitivity in vec . More...
 
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 sensitivity in vec . More...
 
virtual Real evaluate_q_sens_for_previous_interval (MAST::AssemblyBase &assembly, const MAST::FunctionBase &p, MAST::OutputAssemblyElemOperations &output)
 
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)
 
virtual void sensitivity_solve (MAST::AssemblyBase &assembly, const MAST::FunctionBase &f)
 solvers the current time step for sensitivity wrt f More...
 
void set_eigenvalue_stabilization (bool f)
 sets if the eigenvalue-based stabilization will be used. More...
 
virtual void set_element_data (const std::vector< libMesh::dof_id_type > &dof_indices, const std::vector< libMesh::NumericVector< Real > *> &sols)
 
virtual void set_element_perturbed_data (const std::vector< libMesh::dof_id_type > &dof_indices, const std::vector< libMesh::NumericVector< Real > *> &sols)
 
void set_nolinear_solution_location (std::string &file_root, std::string &dir)
 sets the directory where the nonlinear solutions are stored. More...
 
virtual void update_acceleration (libMesh::NumericVector< Real > &acc, const libMesh::NumericVector< Real > &sol)
 update the transient acceleration based on the current solution More...
 
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 More...
 
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 More...
 
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 More...
 
virtual void update_sensitivity_velocity (libMesh::NumericVector< Real > &vec, const libMesh::NumericVector< Real > &sol)
 update the transient sensitivity velocity based on the current sensitivity solution More...
 
virtual void update_velocity (libMesh::NumericVector< Real > &vel, const libMesh::NumericVector< Real > &sol)
 update the transient velocity based on the current solution More...
 
- Public Member Functions inherited from MAST::TransientSolverBase
 TransientSolverBase (unsigned int o, unsigned int n)
 constructor requires the number of iterations to store for the derived solver. More...
 
virtual ~TransientSolverBase ()
 
libMesh::NumericVector< Real > & acceleration (unsigned int prev_iter=0) const
 
libMesh::NumericVector< Real > & acceleration_sensitivity (unsigned int prev_iter=0) const
 
virtual void advance_time_step (bool increment_time=true)
 advances the time step and copies the current solution to old solution, and so on. More...
 
virtual void advance_time_step_with_sensitivity ()
 advances the time step and copies the current sensitivity solution to old sensitivity solution, and so on. More...
 
virtual void build_local_quantities (const libMesh::NumericVector< Real > &current_sol, std::vector< libMesh::NumericVector< Real > *> &qtys)
 localizes the relevant solutions for system assembly. More...
 
virtual void build_sensitivity_local_quantities (unsigned int prev_iter, std::vector< libMesh::NumericVector< Real > *> &qtys)
 localizes the relevant solutions for system assembly. More...
 
virtual void clear_assembly ()
 clears the assembly object More...
 
virtual void clear_elem_operation_object ()
 Clears the assembly elem operations object. More...
 
virtual MAST::TransientAssemblyElemOperationsget_elem_operation_object ()
 
virtual void set_assembly (MAST::AssemblyBase &assembly)
 sets the assembly object More...
 
virtual void set_elem_operation_object (MAST::TransientAssemblyElemOperations &elem_ops)
 Attaches the assembly elem operations object that provides the x_dot, M and J quantities for the element. More...
 
libMesh::NumericVector< Real > & solution (unsigned int prev_iter=0) const
 
libMesh::NumericVector< Real > & solution_sensitivity (unsigned int prev_iter=0) const
 
virtual void solve (MAST::AssemblyBase &assembly)
 solves the current time step for solution and velocity More...
 
void solve_highest_derivative_and_advance_time_step (MAST::AssemblyBase &assembly, bool increment_time=true)
 To be used only for initial conditions. More...
 
void solve_highest_derivative_and_advance_time_step_with_sensitivity (MAST::AssemblyBase &assembly, const MAST::FunctionBase &f)
 solves for the sensitivity of highest derivative and advances the time-step. More...
 
libMesh::NumericVector< Real > & velocity (unsigned int prev_iter=0) const
 
libMesh::NumericVector< Real > & velocity_sensitivity (unsigned int prev_iter=0) const
 
- Public Member Functions inherited from MAST::NonlinearImplicitAssemblyElemOperations
 NonlinearImplicitAssemblyElemOperations ()
 
virtual ~NonlinearImplicitAssemblyElemOperations ()
 
void check_element_numerical_jacobian (RealVectorX &sol)
 a helper function to evaluate the numerical Jacobian and compare it with the analytical Jacobian. More...
 
- Public Member Functions inherited from MAST::AssemblyElemOperations
 AssemblyElemOperations ()
 
virtual ~AssemblyElemOperations ()
 
virtual void clear_discipline_and_system ()
 clears association with a system to this discipline More...
 
virtual void clear_elem ()
 clears the element initialization More...
 
virtual MAST::AssemblyBaseget_assembly ()
 
MAST::PhysicsDisciplineBaseget_discipline ()
 
virtual std::pair< const MAST::FieldFunction< RealVectorX > *, unsigned int > get_elem_boundary_velocity_data ()
 searches through the side load data and populates the data with the boundary id and velocity function on the boundary. More...
 
MAST::ElementBaseget_physics_elem ()
 
MAST::SystemInitializationget_system_initialization ()
 
virtual void init (const MAST::GeomElem &elem)=0
 initializes the object for calculation of element quantities for the specified elem. More...
 
virtual void set_discipline_and_system (MAST::PhysicsDisciplineBase &discipline, MAST::SystemInitialization &system)
 attaches a system to this discipline More...
 
virtual void set_elem_acceleration (const RealVectorX &accel)
 sets the element acceleration More...
 
virtual void set_elem_acceleration_sensitivity (const RealVectorX &accel)
 sets the element acceleration More...
 
virtual void set_elem_data (unsigned int dim, const libMesh::Elem &ref_elem, MAST::GeomElem &elem) const =0
 some analyses may want to set additional element data before initialization of the GeomElem. More...
 
virtual void set_elem_perturbed_acceleration (const RealVectorX &accel)
 sets the element perturbed acceleration More...
 
virtual void set_elem_perturbed_solution (const RealVectorX &sol)
 sets the element perturbed solution More...
 
virtual void set_elem_perturbed_velocity (const RealVectorX &vel)
 sets the element perturbed velocity More...
 
virtual void set_elem_solution (const RealVectorX &sol)
 sets the element solution More...
 
virtual void set_elem_solution_sensitivity (const RealVectorX &sol)
 sets the element solution sensitivity More...
 
virtual void set_elem_velocity (const RealVectorX &vel)
 sets the element velocity More...
 
virtual void set_elem_velocity_sensitivity (const RealVectorX &vel)
 sets the element velocity sensitivity More...
 
void set_skip_comm_sum (bool skip)
 If an output has contrinutions only from local processor then the user can request that the global comm().sum() calls be skipped to avoid blocking MPI calls. More...
 

Public Attributes

Real beta
 
Real max_amp
 $ \bar{a} $ parameter used by this solver. More...
 
unsigned int max_index
 index of solution that is used for current linearization More...
 
- Public Attributes inherited from MAST::TransientSolverBase
Real dt
 time step More...
 

Protected Member Functions

Real _compute_eig_amplification_factor (libMesh::SparseMatrix< Real > &A, libMesh::SparseMatrix< Real > &B)
 
Real _compute_norm_amplification_factor (const libMesh::NumericVector< Real > &sol0, const libMesh::NumericVector< Real > &sol1)
 

Protected Attributes

bool _assemble_mass
 
unsigned int _index0
 
unsigned int _index1
 
std::string _sol_dir
 
std::string _sol_name_root
 
Real _t0
 
bool _use_eigenvalue_stabilization
 
- Protected Attributes inherited from MAST::AssemblyElemOperations
MAST::AssemblyBase_assembly
 
MAST::PhysicsDisciplineBase_discipline
 
MAST::ElementBase_physics_elem
 
bool _skip_comm_sum
 If an output has contrinutions only from local processor then the user can request that the global comm().sum() calls be skipped to avoid blocking MPI calls. More...
 
MAST::SystemInitialization_system
 

Constructor & Destructor Documentation

◆ StabilizedFirstOrderNewmarkTransientSensitivitySolver()

MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::StabilizedFirstOrderNewmarkTransientSensitivitySolver ( )

◆ ~StabilizedFirstOrderNewmarkTransientSensitivitySolver()

MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::~StabilizedFirstOrderNewmarkTransientSensitivitySolver ( )
virtual

Member Function Documentation

◆ _compute_eig_amplification_factor()

Real MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::_compute_eig_amplification_factor ( libMesh::SparseMatrix< Real > &  A,
libMesh::SparseMatrix< Real > &  B 
)
protected

◆ _compute_norm_amplification_factor()

Real MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::_compute_norm_amplification_factor ( const libMesh::NumericVector< Real > &  sol0,
const libMesh::NumericVector< Real > &  sol1 
)
protected

◆ elem_calculations()

void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::elem_calculations ( bool  if_jac,
RealVectorX vec,
RealMatrixX mat 
)
virtual

performs the element calculations over elem, and returns the element vector and matrix quantities in mat and vec, respectively.

if_jac tells the method to also assemble the Jacobian, in addition to the residual vector.

Implements MAST::NonlinearImplicitAssemblyElemOperations.

Definition at line 422 of file stabilized_first_order_transient_sensitivity_solver.cpp.

◆ elem_linearized_jacobian_solution_product()

virtual void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::elem_linearized_jacobian_solution_product ( RealVectorX vec)
inlinevirtual

performs the element calculations over elem, and returns the element vector quantity in vec.

The vector quantity only include the $ [J] \{dX\} $ components, so the inherited classes must ensure that no component of constant forces (traction/body forces/etc.) are added to this vector.

Implements MAST::NonlinearImplicitAssemblyElemOperations.

Definition at line 135 of file stabilized_first_order_transient_sensitivity_solver.h.

◆ elem_second_derivative_dot_solution_assembly()

virtual void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::elem_second_derivative_dot_solution_assembly ( RealMatrixX mat)
inlinevirtual

calculates $ d ([J] \{\Delta X\})/ dX $ over elem, and returns the matrix in vec .

Implements MAST::NonlinearImplicitAssemblyElemOperations.

Definition at line 160 of file stabilized_first_order_transient_sensitivity_solver.h.

◆ elem_sensitivity_calculations()

void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::elem_sensitivity_calculations ( const MAST::FunctionBase f,
RealVectorX vec 
)
virtual

performs the element sensitivity calculations over elem, and returns the element residual sensitivity in vec .

Implements MAST::NonlinearImplicitAssemblyElemOperations.

Definition at line 456 of file stabilized_first_order_transient_sensitivity_solver.cpp.

◆ elem_sensitivity_contribution_previous_timestep()

void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::elem_sensitivity_contribution_previous_timestep ( const std::vector< RealVectorX > &  prev_sols,
RealVectorX vec 
)
virtual

◆ elem_shape_sensitivity_calculations()

virtual void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::elem_shape_sensitivity_calculations ( const MAST::FunctionBase f,
RealVectorX vec 
)
inlinevirtual

performs the element shape sensitivity calculations over elem, and returns the element residual sensitivity in vec .

Implements MAST::NonlinearImplicitAssemblyElemOperations.

Definition at line 140 of file stabilized_first_order_transient_sensitivity_solver.h.

◆ elem_topology_sensitivity_calculations() [1/2]

virtual void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::elem_topology_sensitivity_calculations ( const MAST::FunctionBase f,
RealVectorX vec 
)
inlinevirtual

performs the element topology sensitivity calculations over elem, and returns the element residual sensitivity in vec .

Implements MAST::NonlinearImplicitAssemblyElemOperations.

Definition at line 146 of file stabilized_first_order_transient_sensitivity_solver.h.

◆ elem_topology_sensitivity_calculations() [2/2]

virtual void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::elem_topology_sensitivity_calculations ( const MAST::FunctionBase f,
const MAST::FieldFunction< RealVectorX > &  vel,
RealVectorX vec 
)
inlinevirtual

performs the element topology sensitivity calculations over elem, and returns the element residual sensitivity in vec .

Implements MAST::NonlinearImplicitAssemblyElemOperations.

Definition at line 153 of file stabilized_first_order_transient_sensitivity_solver.h.

◆ evaluate_q_sens_for_previous_interval()

Real MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::evaluate_q_sens_for_previous_interval ( MAST::AssemblyBase assembly,
const MAST::FunctionBase p,
MAST::OutputAssemblyElemOperations output 
)
virtual

◆ extract_element_sensitivity_data()

void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::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 
)
virtual

◆ sensitivity_solve()

void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::sensitivity_solve ( MAST::AssemblyBase assembly,
const MAST::FunctionBase f 
)
virtual

solvers the current time step for sensitivity wrt f

Reimplemented from MAST::TransientSolverBase.

Definition at line 82 of file stabilized_first_order_transient_sensitivity_solver.cpp.

◆ set_eigenvalue_stabilization()

void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::set_eigenvalue_stabilization ( bool  f)

sets if the eigenvalue-based stabilization will be used.

Definition at line 64 of file stabilized_first_order_transient_sensitivity_solver.cpp.

◆ set_element_data()

void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::set_element_data ( const std::vector< libMesh::dof_id_type > &  dof_indices,
const std::vector< libMesh::NumericVector< Real > *> &  sols 
)
virtual

◆ set_element_perturbed_data()

virtual void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::set_element_perturbed_data ( const std::vector< libMesh::dof_id_type > &  dof_indices,
const std::vector< libMesh::NumericVector< Real > *> &  sols 
)
inlinevirtual

◆ set_nolinear_solution_location()

void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::set_nolinear_solution_location ( std::string &  file_root,
std::string &  dir 
)

sets the directory where the nonlinear solutions are stored.

The name of the solution is assumed to be file_root + std::string(index)

Definition at line 72 of file stabilized_first_order_transient_sensitivity_solver.cpp.

◆ update_acceleration()

virtual void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::update_acceleration ( libMesh::NumericVector< Real > &  acc,
const libMesh::NumericVector< Real > &  sol 
)
inlinevirtual

update the transient acceleration based on the current solution

Implements MAST::TransientSolverBase.

Definition at line 111 of file stabilized_first_order_transient_sensitivity_solver.h.

◆ update_delta_acceleration()

virtual void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::update_delta_acceleration ( libMesh::NumericVector< Real > &  acc,
const libMesh::NumericVector< Real > &  sol 
)
inlinevirtual

update the perturbation in transient acceleration based on the current perturbed solution

Implements MAST::TransientSolverBase.

Definition at line 129 of file stabilized_first_order_transient_sensitivity_solver.h.

◆ update_delta_velocity()

virtual void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::update_delta_velocity ( libMesh::NumericVector< Real > &  vel,
const libMesh::NumericVector< Real > &  sol 
)
inlinevirtual

update the perturbation in transient velocity based on the current perturbed solution

Implements MAST::TransientSolverBase.

Definition at line 123 of file stabilized_first_order_transient_sensitivity_solver.h.

◆ update_sensitivity_acceleration()

virtual void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::update_sensitivity_acceleration ( libMesh::NumericVector< Real > &  acc,
const libMesh::NumericVector< Real > &  sol 
)
inlinevirtual

update the transient sensitivity acceleration based on the current sensitivity solution

Implements MAST::TransientSolverBase.

Definition at line 117 of file stabilized_first_order_transient_sensitivity_solver.h.

◆ update_sensitivity_velocity()

void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::update_sensitivity_velocity ( libMesh::NumericVector< Real > &  vel,
const libMesh::NumericVector< Real > &  sol 
)
virtual

update the transient sensitivity velocity based on the current sensitivity solution

Implements MAST::TransientSolverBase.

Definition at line 401 of file stabilized_first_order_transient_sensitivity_solver.cpp.

◆ update_velocity()

void MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::update_velocity ( libMesh::NumericVector< Real > &  vel,
const libMesh::NumericVector< Real > &  sol 
)
virtual

update the transient velocity based on the current solution

Implements MAST::TransientSolverBase.

Definition at line 381 of file stabilized_first_order_transient_sensitivity_solver.cpp.

Member Data Documentation

◆ _assemble_mass

bool MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::_assemble_mass
protected

◆ _index0

unsigned int MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::_index0
protected

◆ _index1

unsigned int MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::_index1
protected

◆ _sol_dir

std::string MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::_sol_dir
protected

◆ _sol_name_root

std::string MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::_sol_name_root
protected

◆ _t0

Real MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::_t0
protected

◆ _use_eigenvalue_stabilization

bool MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::_use_eigenvalue_stabilization
protected

◆ beta

Real MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::beta

◆ max_amp

Real MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::max_amp

$ \bar{a} $ parameter used by this solver.

Definition at line 46 of file stabilized_first_order_transient_sensitivity_solver.h.

◆ max_index

unsigned int MAST::StabilizedFirstOrderNewmarkTransientSensitivitySolver::max_index

index of solution that is used for current linearization

Definition at line 53 of file stabilized_first_order_transient_sensitivity_solver.h.


The documentation for this class was generated from the following files: