MAST
eigenproblem_assembly.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__eigenproblem_assembly__
21 #define __mast__eigenproblem_assembly__
22 
23 // MAST includes
24 #include "base/assembly_base.h"
25 
26 // libMesh includes
27 #include "libmesh/sparse_matrix.h"
28 
29 namespace MAST {
30 
31  // Forward declerations
32  class EigenproblemAssemblyElemOperations;
33 
34 
41  public MAST::AssemblyBase {
42 
43  public:
44 
49 
54  virtual ~EigenproblemAssembly();
55 
56 
60  libMesh::SparseMatrix<Real>& A_matrix();
61 
62 
68  libMesh::SparseMatrix<Real>& B_matrix();
69 
70 
74  virtual void
75  eigenproblem_assemble(libMesh::SparseMatrix<Real>* A,
76  libMesh::SparseMatrix<Real>* B);
77 
87  virtual bool
89  libMesh::SparseMatrix<Real>* sensitivity_A,
90  libMesh::SparseMatrix<Real>* sensitivity_B);
91 
92 
100  void set_base_solution(const libMesh::NumericVector<Real>& sol,
101  bool if_sens = false);
102 
103 
109  void clear_base_solution(bool if_sens = false);
110 
111 
117 
118 
124  const libMesh::NumericVector<Real>&
125  base_sol(bool if_sens = false) const;
126 
127 
133  libMesh::NumericVector<Real>& base_sol(bool if_sens = false);
134 
135 
136  protected:
137 
143  const libMesh::NumericVector<Real> * _base_sol;
144 
150  const libMesh::NumericVector<Real> * _base_sol_sensitivity;
151 
152  };
153 
154 }
155 
156 #endif // __mast__eigenproblem_assembly__
virtual void eigenproblem_assemble(libMesh::SparseMatrix< Real > *A, libMesh::SparseMatrix< Real > *B)
assembles the matrices for eigenproblem depending on the analysis type
const libMesh::NumericVector< Real > & base_sol(bool if_sens=false) const
virtual ~EigenproblemAssembly()
destructor resets the association with the eigen system from this assembly object ...
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 w...
void clear_base_solution(bool if_sens=false)
Clears the pointer to the solution.
virtual bool eigenproblem_sensitivity_assemble(const MAST::FunctionBase &f, libMesh::SparseMatrix< Real > *sensitivity_A, libMesh::SparseMatrix< Real > *sensitivity_B)
Assembly function.
Assembles the system of equations for an eigenproblem of type .
const libMesh::NumericVector< Real > * _base_sol
base solution about which this eigenproblem is defined.
const libMesh::NumericVector< Real > * _base_sol_sensitivity
sensitivity of base solution may be needed for sensitivity analysis.
libMesh::SparseMatrix< Real > & A_matrix()
EigenproblemAssembly()
constructor associates the eigen system with this assembly object
bool if_linearized_about_nonzero_solution() const
libMesh::SparseMatrix< Real > & B_matrix()