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

Detailed Description

Assembles the system of equations for an eigenproblem of type $ {\bf A} {\bf x} = \lambda {\bf B} {\bf x} $.

If the

Definition at line 40 of file eigenproblem_assembly.h.

#include <eigenproblem_assembly.h>

Inheritance diagram for MAST::EigenproblemAssembly:
Collaboration diagram for MAST::EigenproblemAssembly:

Public Member Functions

 EigenproblemAssembly ()
 constructor associates the eigen system with this assembly object More...
 
virtual ~EigenproblemAssembly ()
 destructor resets the association with the eigen system from this assembly object More...
 
libMesh::SparseMatrix< Real > & A_matrix ()
 
libMesh::SparseMatrix< Real > & B_matrix ()
 
const libMesh::NumericVector< Real > & base_sol (bool if_sens=false) const
 
libMesh::NumericVector< Real > & base_sol (bool if_sens=false)
 
void clear_base_solution (bool if_sens=false)
 Clears the pointer to the solution. More...
 
virtual void eigenproblem_assemble (libMesh::SparseMatrix< Real > *A, libMesh::SparseMatrix< Real > *B)
 assembles the matrices for eigenproblem depending on the analysis type More...
 
virtual bool eigenproblem_sensitivity_assemble (const MAST::FunctionBase &f, libMesh::SparseMatrix< Real > *sensitivity_A, libMesh::SparseMatrix< Real > *sensitivity_B)
 Assembly function. More...
 
bool if_linearized_about_nonzero_solution () const
 
void set_base_solution (const libMesh::NumericVector< Real > &sol, bool if_sens=false)
 if the eigenproblem is defined about a non-zero base solution, then this method provides the object with the base solution. More...
 
- Public Member Functions inherited from MAST::AssemblyBase
 AssemblyBase ()
 constructor takes a reference to the discipline that provides the boundary conditions, volume loads, properties, etc. More...
 
virtual ~AssemblyBase ()
 virtual destructor More...
 
void attach_elem_parameter_dependence_object (MAST::AssemblyBase::ElemParameterDependence &dep)
 This object, if provided by user, will be used to reduce unnecessary computations in sensitivity analysis assembly operations. More...
 
void attach_solution_function (MAST::MeshFieldFunction &f)
 tells the assembly object that this function is will need to be initialized before each residual evaluation More...
 
std::unique_ptr< libMesh::NumericVector< Real > > build_localized_vector (const libMesh::System &sys, const libMesh::NumericVector< Real > &global) const
 localizes the parallel vector so that the local copy stores all values necessary for calculation of the element quantities More...
 
virtual void calculate_output (const libMesh::NumericVector< Real > &X, bool if_localize_sol, MAST::OutputAssemblyElemOperations &output)
 calculates the value of quantity $ q(X,p) $. More...
 
virtual Real calculate_output_adjoint_sensitivity (const libMesh::NumericVector< Real > &X, bool if_localize_sol, const libMesh::NumericVector< Real > &adj_sol, const MAST::FunctionBase &p, MAST::AssemblyElemOperations &elem_ops, MAST::OutputAssemblyElemOperations &output, const bool include_partial_sens=true)
 Evaluates the total sensitivity of output wrt p using the adjoint solution provided in adj_sol for a linearization about solution X. More...
 
virtual void calculate_output_adjoint_sensitivity_multiple_parameters_no_direct (const libMesh::NumericVector< Real > &X, bool if_localize_sol, const libMesh::NumericVector< Real > &adj_sol, const std::vector< const MAST::FunctionBase *> &p_vec, MAST::AssemblyElemOperations &elem_ops, MAST::OutputAssemblyElemOperations &output, std::vector< Real > &sens)
 Evaluates the dot product between adj_sol and sensitivity of residual about X for multiple parameter_vectors p_vec and returns the results in sens. More...
 
virtual void calculate_output_derivative (const libMesh::NumericVector< Real > &X, bool if_localize_sol, MAST::OutputAssemblyElemOperations &output, libMesh::NumericVector< Real > &dq_dX)
 calculates $ \frac{\partial q(X, p)}{\partial X} $ More...
 
virtual void calculate_output_direct_sensitivity (const libMesh::NumericVector< Real > &X, bool if_localize_sol, const libMesh::NumericVector< Real > *dXdp, bool if_localize_sol_sens, const MAST::FunctionBase &p, MAST::OutputAssemblyElemOperations &output)
 evaluates the sensitivity of the outputs in the attached discipline with respect to the parametrs in params. More...
 
virtual void clear_discipline_and_system ()
 clears association with a system to this discipline More...
 
virtual void clear_elem_operation_object ()
 clears the association of this object with the assembly element operation object. More...
 
void clear_elem_parameter_dependence_object ()
 
void clear_solver_monitor ()
 clears the monitor object More...
 
void detach_solution_function ()
 removes the attachment of the solution function More...
 
const MAST::PhysicsDisciplineBasediscipline () const
 
MAST::PhysicsDisciplineBasediscipline ()
 
MAST::AssemblyElemOperationsget_elem_ops ()
 
MAST::AssemblyBase::SolverMonitorget_solver_monitor ()
 
virtual void residual_and_jacobian (const libMesh::NumericVector< Real > &X, libMesh::NumericVector< Real > *R, libMesh::SparseMatrix< Real > *J, libMesh::NonlinearImplicitSystem &S)
 function that assembles the matrices and vectors quantities for nonlinear solution More...
 
virtual bool sensitivity_assemble (const libMesh::NumericVector< Real > &X, bool if_localize_sol, const MAST::FunctionBase &f, libMesh::NumericVector< Real > &sensitivity_rhs, bool close_vector=true)
 Assembly function. More...
 
virtual void set_discipline_and_system (MAST::PhysicsDisciplineBase &discipline, MAST::SystemInitialization &system)
 attaches a system to this discipline More...
 
virtual void set_elem_operation_object (MAST::AssemblyElemOperations &elem_ops)
 attaches a element operation to this object, and associated this with the element operation object. More...
 
void set_solver_monitor (MAST::AssemblyBase::SolverMonitor &monitor)
 attaches the solver monitor, which is a user provided routine that is called each time More...
 
const MAST::NonlinearSystemsystem () const
 
MAST::NonlinearSystemsystem ()
 
MAST::SystemInitializationsystem_init ()
 

Protected Attributes

const libMesh::NumericVector< Real > * _base_sol
 base solution about which this eigenproblem is defined. More...
 
const libMesh::NumericVector< Real > * _base_sol_sensitivity
 sensitivity of base solution may be needed for sensitivity analysis. More...
 
- Protected Attributes inherited from MAST::AssemblyBase
MAST::PhysicsDisciplineBase_discipline
 PhysicsDisciplineBase object for which this class is assembling. More...
 
MAST::AssemblyElemOperations_elem_ops
 provides assembly elem operations for use by this class More...
 
MAST::AssemblyBase::ElemParameterDependence_param_dependence
 If provided by user, this object is used by sensitiivty analysis to check for whether or the current design parameter influences an element. More...
 
MAST::MeshFieldFunction_sol_function
 system solution that will be initialized before each solution More...
 
MAST::AssemblyBase::SolverMonitor_solver_monitor
 User provided solver monitor is attached to the linear nonlinear solvers, if provided. More...
 
MAST::SystemInitialization_system
 System for which this assembly is performed. More...
 

Additional Inherited Members

- Public Attributes inherited from MAST::AssemblyBase
bool close_matrix
 flag to control the closing fo the Jacobian after assembly More...
 
std::set< unsigned int > diagonal_elem_subdomain_id
 subdomain ids for which residuakl and Jacobian contributions will not be computed. More...
 

Constructor & Destructor Documentation

◆ EigenproblemAssembly()

MAST::EigenproblemAssembly::EigenproblemAssembly ( )

constructor associates the eigen system with this assembly object

Definition at line 38 of file eigenproblem_assembly.cpp.

◆ ~EigenproblemAssembly()

MAST::EigenproblemAssembly::~EigenproblemAssembly ( )
virtual

destructor resets the association with the eigen system from this assembly object

Definition at line 47 of file eigenproblem_assembly.cpp.

Member Function Documentation

◆ A_matrix()

libMesh::SparseMatrix<Real>& MAST::EigenproblemAssembly::A_matrix ( )
Returns
a reference to the A matrix of the EigenSystem

◆ B_matrix()

libMesh::SparseMatrix<Real>& MAST::EigenproblemAssembly::B_matrix ( )
Returns
a reference to the B matrix of the EigenSystem. Note that this matrix exists only for the Generalized Eigen problem.

◆ base_sol() [1/2]

const libMesh::NumericVector<Real>& MAST::EigenproblemAssembly::base_sol ( bool  if_sens = false) const
Returns
a const reference to the base solution (or its sensitivity when if_sens is true) about which the Eigen problem was linearized.

◆ base_sol() [2/2]

libMesh::NumericVector<Real>& MAST::EigenproblemAssembly::base_sol ( bool  if_sens = false)
Returns
a non-const reference to the base solution (or its sensitivity when if_sens is true) about which the Eigen problem was linearized.

◆ clear_base_solution()

void MAST::EigenproblemAssembly::clear_base_solution ( bool  if_sens = false)

Clears the pointer to the solution.

The flag if_sens tells the method to clear the pointer the solution sensitivity vector.

Definition at line 77 of file eigenproblem_assembly.cpp.

◆ eigenproblem_assemble()

void MAST::EigenproblemAssembly::eigenproblem_assemble ( libMesh::SparseMatrix< Real > *  A,
libMesh::SparseMatrix< Real > *  B 
)
virtual

assembles the matrices for eigenproblem depending on the analysis type

Reimplemented in MAST::LevelSetEigenproblemAssembly, and MAST::StructuralBucklingEigenproblemAssembly.

Definition at line 90 of file eigenproblem_assembly.cpp.

◆ eigenproblem_sensitivity_assemble()

bool MAST::EigenproblemAssembly::eigenproblem_sensitivity_assemble ( const MAST::FunctionBase f,
libMesh::SparseMatrix< Real > *  sensitivity_A,
libMesh::SparseMatrix< Real > *  sensitivity_B 
)
virtual

Assembly function.

This function will be called to assemble the sensitivity of eigenproblem matrices. The method provides dA/dp and dB/dp for f parameter.

If the routine is not able to provide sensitivity for this parameter, then it should return false, and the system will attempt to use finite differencing.

Reimplemented in MAST::LevelSetEigenproblemAssembly.

Definition at line 185 of file eigenproblem_assembly.cpp.

◆ if_linearized_about_nonzero_solution()

bool MAST::EigenproblemAssembly::if_linearized_about_nonzero_solution ( ) const
Returns
true if a nonzero base solution is used to linearize the Eigen problem, false otherwise

◆ set_base_solution()

void MAST::EigenproblemAssembly::set_base_solution ( const libMesh::NumericVector< Real > &  sol,
bool  if_sens = false 
)

if the eigenproblem is defined about a non-zero base solution, then this method provides the object with the base solution.

The flag if_sens tells the method if sol is the sensitivity of the base solution for the current parameter being solved for

Definition at line 54 of file eigenproblem_assembly.cpp.

Member Data Documentation

◆ _base_sol

const libMesh::NumericVector<Real>* MAST::EigenproblemAssembly::_base_sol
protected

base solution about which this eigenproblem is defined.

This vector stores the localized values necessary to perform element calculations.

Definition at line 143 of file eigenproblem_assembly.h.

◆ _base_sol_sensitivity

const libMesh::NumericVector<Real>* MAST::EigenproblemAssembly::_base_sol_sensitivity
protected

sensitivity of base solution may be needed for sensitivity analysis.

This vector stores the localized values necessary to perform element calculations.

Definition at line 150 of file eigenproblem_assembly.h.


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