MAST
MAST::ComplexAssemblyBase Class Reference

#include <complex_assembly_base.h>

Inheritance diagram for MAST::ComplexAssemblyBase:
Collaboration diagram for MAST::ComplexAssemblyBase:

Public Member Functions

 ComplexAssemblyBase ()
 constructor associates this assembly object with the system More...
 
virtual ~ComplexAssemblyBase ()
 destructor resets the association of this assembly object with the system More...
 
Real residual_l2_norm (const libMesh::NumericVector< Real > &real, const libMesh::NumericVector< Real > &imag)
 calculates the L2 norm of the residual complex system of equations. More...
 
void set_base_solution (const libMesh::NumericVector< Real > &sol, bool if_sens=false)
 if the problem is defined about a non-zero base solution, then this method provides the object with the base solution. More...
 
void clear_base_solution (bool if_sens=false)
 Clears pointer to the solution vector The flag if_sens tells the method to clear pointer of the solution sensitivity. More...
 
bool if_linearized_about_nonzero_solution () const
 
const libMesh::NumericVector< Real > & base_sol (bool if_sens=false) const
 
void residual_and_jacobian_field_split (const libMesh::NumericVector< Real > &X_R, const libMesh::NumericVector< Real > &X_I, libMesh::NumericVector< Real > &R_R, libMesh::NumericVector< Real > &R_I, libMesh::SparseMatrix< Real > &J_R, libMesh::SparseMatrix< Real > &J_I)
 
void residual_and_jacobian_blocked (const libMesh::NumericVector< Real > &X, libMesh::NumericVector< Real > &R, libMesh::SparseMatrix< Real > &J, MAST::Parameter *p=nullptr)
 Assembles the residual and Jacobian of the N complex system of equations split into 2N real system of equations. More...
 
virtual bool sensitivity_assemble (const MAST::FunctionBase &f, libMesh::NumericVector< Real > &sensitivity_rhs)
 Assembly function. 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...
 
const MAST::PhysicsDisciplineBasediscipline () const
 
MAST::PhysicsDisciplineBasediscipline ()
 
MAST::AssemblyElemOperationsget_elem_ops ()
 
virtual void set_discipline_and_system (MAST::PhysicsDisciplineBase &discipline, MAST::SystemInitialization &system)
 attaches a system to this discipline 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 clear_elem_parameter_dependence_object ()
 
virtual void clear_discipline_and_system ()
 clears association with 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...
 
virtual void clear_elem_operation_object ()
 clears the association of this object with the assembly element operation object. More...
 
const MAST::NonlinearSystemsystem () const
 
MAST::NonlinearSystemsystem ()
 
MAST::SystemInitializationsystem_init ()
 
void set_solver_monitor (MAST::AssemblyBase::SolverMonitor &monitor)
 attaches the solver monitor, which is a user provided routine that is called each time More...
 
MAST::AssemblyBase::SolverMonitorget_solver_monitor ()
 
void clear_solver_monitor ()
 clears the monitor object 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...
 
void detach_solution_function ()
 removes the attachment of the solution function More...
 
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 void calculate_output (const libMesh::NumericVector< Real > &X, MAST::OutputAssemblyElemOperations &output)
 calculates the value of quantity $ q(X,p) $. More...
 
virtual void calculate_output_derivative (const libMesh::NumericVector< Real > &X, 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, const libMesh::NumericVector< Real > *dXdp, 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 Real calculate_output_adjoint_sensitivity (const libMesh::NumericVector< Real > &X, const libMesh::NumericVector< Real > &dq_dX, 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 dq_dX for a linearization about solution X. 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...
 

Protected Attributes

const libMesh::NumericVector< Real > * _base_sol
 base solution about which this problem 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::AssemblyElemOperations_elem_ops
 provides assembly elem operations for use by this class More...
 
MAST::PhysicsDisciplineBase_discipline
 PhysicsDisciplineBase object for which this class is assembling. More...
 
MAST::SystemInitialization_system
 System for which this assembly is performed. 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::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...
 

Additional Inherited Members

- Public Attributes inherited from MAST::AssemblyBase
bool close_matrix
 flag to control the closing fo the Jacobian after assembly More...
 

Detailed Description

Definition at line 39 of file complex_assembly_base.h.

Constructor & Destructor Documentation

MAST::ComplexAssemblyBase::ComplexAssemblyBase ( )

constructor associates this assembly object with the system

Definition at line 44 of file complex_assembly_base.cpp.

MAST::ComplexAssemblyBase::~ComplexAssemblyBase ( )
virtual

destructor resets the association of this assembly object with the system

Definition at line 53 of file complex_assembly_base.cpp.

Member Function Documentation

const libMesh::NumericVector< Real > & MAST::ComplexAssemblyBase::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.

Definition at line 97 of file complex_assembly_base.cpp.

Here is the caller graph for this function:

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

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

Definition at line 85 of file complex_assembly_base.cpp.

bool MAST::ComplexAssemblyBase::if_linearized_about_nonzero_solution ( ) const
Returns
true if a nonzero base solution is used to linearize the Eigen problem, false otherwise
void MAST::ComplexAssemblyBase::residual_and_jacobian_blocked ( const libMesh::NumericVector< Real > &  X,
libMesh::NumericVector< Real > &  R,
libMesh::SparseMatrix< Real > &  J,
MAST::Parameter p = nullptr 
)

Assembles the residual and Jacobian of the N complex system of equations split into 2N real system of equations.

The solution vector X is the current complex solution with the real and imaginary parts of each element stored as adjacent entries. Likewise, the Jaacobian matrix has a 2x2 block storage. If p is provided, then R will return the sensitivity of the residual vector.

Definition at line 411 of file complex_assembly_base.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void MAST::ComplexAssemblyBase::residual_and_jacobian_field_split ( const libMesh::NumericVector< Real > &  X_R,
const libMesh::NumericVector< Real > &  X_I,
libMesh::NumericVector< Real > &  R_R,
libMesh::NumericVector< Real > &  R_I,
libMesh::SparseMatrix< Real > &  J_R,
libMesh::SparseMatrix< Real > &  J_I 
)

Definition at line 246 of file complex_assembly_base.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Real MAST::ComplexAssemblyBase::residual_l2_norm ( const libMesh::NumericVector< Real > &  real,
const libMesh::NumericVector< Real > &  imag 
)

calculates the L2 norm of the residual complex system of equations.

Definition at line 110 of file complex_assembly_base.cpp.

Here is the call graph for this function:

bool MAST::ComplexAssemblyBase::sensitivity_assemble ( const MAST::FunctionBase f,
libMesh::NumericVector< Real > &  sensitivity_rhs 
)
virtual

Assembly function.

This function will be called to assemble the RHS of the sensitivity equations (which is -1 times sensitivity of system residual) prior to a solve and must be provided by the user in a derived class. The method provides dR/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 from MAST::AssemblyBase.

Definition at line 615 of file complex_assembly_base.cpp.

Here is the caller graph for this function:

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

if the problem 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 62 of file complex_assembly_base.cpp.

Member Data Documentation

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

base solution about which this problem is defined.

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

Definition at line 141 of file complex_assembly_base.h.

const libMesh::NumericVector<Real>* MAST::ComplexAssemblyBase::_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 148 of file complex_assembly_base.h.


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