MAST
complex_solver_base.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__complex_solver_base_h__
21 #define __mast__complex_solver_base_h__
22 
23 // MAST includes
24 #include "base/mast_data_types.h"
25 
26 // libMesh includes
27 #include "libmesh/numeric_vector.h"
28 
29 
30 namespace MAST {
31 
32 
33  // Forward declerations
34  class ComplexAssemblyBase;
35  class ElementBase;
36  class Parameter;
37 
43 
44  public:
45 
50 
51 
55  virtual ~ComplexSolverBase();
56 
57 
62 
63 
67  void clear_assembly();
68 
69 
73  virtual void solve_pc_fieldsplit();
74 
75 
82  virtual void solve_block_matrix(MAST::Parameter* p = nullptr);
83 
84 
91  libMesh::NumericVector<Real>& real_solution(bool if_sens=false);
92 
93 
100  const libMesh::NumericVector<Real>& real_solution(bool if_sens=false) const;
101 
102 
109  libMesh::NumericVector<Real>& imag_solution(bool if_sens=false);
110 
111 
118  const libMesh::NumericVector<Real>& imag_solution(bool if_sens=false) const;
119 
120 
122 
123  unsigned int max_iters;
124 
125  protected:
126 
127 
133 
134  };
135 }
136 
137 
138 
139 
140 #endif // __mast__complex_solver_base_h__
141 
void set_assembly(MAST::ComplexAssemblyBase &assemble)
sets the assembly object for this solver
uses a Gauss-Siedel method to solve the complex system of equations for a system. ...
This is a scalar function whose value can be changed and one that can be used as a design variable in...
Definition: parameter.h:35
libMesh::NumericVector< Real > & imag_solution(bool if_sens=false)
libMesh::Real Real
void clear_assembly()
clears the assembly object from this solver
virtual void solve_pc_fieldsplit()
solves the complex system of equations using PCFieldSplit
virtual void solve_block_matrix(MAST::Parameter *p=nullptr)
solves the complex system of equations using block matrices.
virtual ~ComplexSolverBase()
destructor
ComplexSolverBase()
default constructor
libMesh::NumericVector< Real > & real_solution(bool if_sens=false)
MAST::ComplexAssemblyBase * _assembly
Associated ComplexAssembly object that provides the element level quantities.