34 #include "libmesh/dof_map.h" 35 #include "libmesh/numeric_vector.h" 41 _use_linearized_formulation(true),
66 libMesh::NumericVector<Real>& x1,
67 libMesh::NumericVector<Real>& x2) {
96 libMesh::SparseMatrix<Real> *B) {
106 std::unique_ptr<libMesh::NumericVector<Real> >
115 libMesh::SparseMatrix<Real>
126 std::vector<libMesh::dof_id_type> dof_indices;
127 const libMesh::DofMap& dof_map = eigen_sys.get_dof_map();
130 libMesh::MeshBase::const_element_iterator el =
131 eigen_sys.get_mesh().active_local_elements_begin();
132 const libMesh::MeshBase::const_element_iterator end_el =
133 eigen_sys.get_mesh().active_local_elements_end();
138 for ( ; el != end_el; ++el) {
140 const libMesh::Elem* elem = *el;
142 dof_map.dof_indices (elem, dof_indices);
145 unsigned int ndofs = (
unsigned int)dof_indices.size();
147 dummy.setZero(ndofs, ndofs);
148 mat_A.setZero(ndofs, ndofs);
149 mat_B.setZero(ndofs, ndofs);
156 for (
unsigned int i=0; i<dof_indices.size(); i++)
157 sol(i) = (*localized_solution1)(dof_indices[i]);
161 geom_elem.init(*elem, *
_system);
169 dof_map.constrain_element_matrix(AA, dof_indices);
170 matrix_A.add_matrix (AA, dof_indices);
178 for (
unsigned int i=0; i<dof_indices.size(); i++)
179 sol(i) = (*localized_solution2)(dof_indices[i]);
188 dof_map.constrain_element_matrix(BB, dof_indices);
189 matrix_B.add_matrix (BB, dof_indices);
libMesh::NumericVector< Real > * _sol2
MAST::AssemblyElemOperations * _elem_ops
provides assembly elem operations for use by this class
MAST::NonlinearSystem & system()
libMesh::DenseMatrix< Real > DenseRealMatrix
StructuralBucklingEigenproblemAssembly()
constructor associates the eigen system with this assembly object
Real critical_point_estimate_from_eigenproblem(Real v) const
calculates the critical load factor based on the eigensolution
This class implements a system for solution of nonlinear systems.
This is a scalar function whose value can be changed and one that can be used as a design variable in...
virtual void elem_calculations(RealMatrixX &mat_A, RealMatrixX &mat_B)=0
performs the element calculations over elem, and returns the element matrices for the eigenproblem ...
virtual void set_elem_solution(const RealVectorX &sol)
sets the element solution
MAST::SystemInitialization * _system
System for which this assembly is performed.
virtual void clear_discipline_and_system()
clears the states and load factors for buckling eigenproblem
MAST::PhysicsDisciplineBase * _discipline
PhysicsDisciplineBase object for which this class is assembling.
bool _use_linearized_formulation
whether or not to use the linearized formulation
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...
virtual void clear_discipline_and_system()
clears association with a system to this discipline
Assembles the system of equations for an eigenproblem of type .
Real _lambda1
values of load factors for which the two stiffness matrices are calculated for the buckling eigenvalu...
Matrix< Real, Dynamic, Dynamic > RealMatrixX
virtual ~StructuralBucklingEigenproblemAssembly()
destructor resets the association with the eigen system from this assembly object ...
void copy(DenseRealMatrix &m1, const RealMatrixX &m2)
Matrix< Real, Dynamic, 1 > RealVectorX
virtual void init(const MAST::GeomElem &elem)=0
initializes the object for calculation of element quantities for the specified elem.
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 t...
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
void set_buckling_data(bool use_linearized_approach, MAST::Parameter &p, const Real lambda1, const Real lambda2, libMesh::NumericVector< Real > &x1, libMesh::NumericVector< Real > &x2)
set the states and load factors for buckling eigenproblem.
virtual void eigenproblem_assemble(libMesh::SparseMatrix< Real > *A, libMesh::SparseMatrix< Real > *B)
assembles the global A and B matrices for the modal eigenvalue problem
MAST::Parameter * _load_param
load parameter used to define the two stiffness matrices
libMesh::NumericVector< Real > * _sol1
the equilibrium solutions associated with _lambda1 and _lambda2 load factors.