MAST
flutter_solver_base.cpp
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 // MAST includes
30 #include "base/parameter.h"
31 
32 
34 _assembly(nullptr),
35 _basis_vectors(nullptr),
36 _output(nullptr),
37 _steady_solver(nullptr) {
38 
39 }
40 
41 
42 
44 
45  _assembly = nullptr;
46  _basis_vectors = nullptr;
47  if (_output)
48  delete _output;
49 }
50 
51 
52 
53 
54 void
57 
58  // make sure that the assembly is not already set
59  libmesh_assert(!_assembly);
60 
61  _assembly = &assembly;
62 }
63 
64 
65 
66 
67 void
69 
70  _assembly = nullptr;
71  _basis_vectors = nullptr;
72  if (_output) {
73  delete _output;
74  _output = nullptr;
75  }
76 }
77 
78 
79 
80 void
82 
83  _steady_solver = &solver;
84 }
85 
86 
87 
88 void
90 
91  _assembly = nullptr;
92  _steady_solver = nullptr;
93 }
94 
95 
96 
97 
98 void
100 initialize(std::vector<libMesh::NumericVector<Real> *>& basis) {
101 
102 
103  _basis_vectors = &basis;
104 }
105 
106 
107 
108 
std::vector< libMesh::NumericVector< Real > * > * _basis_vectors
basis vector used to define the reduced order model
void attach_steady_solver(MAST::FlutterSolverBase::SteadySolver &solver)
attaches the steady solution object
MAST::FlutterSolverBase::SteadySolver * _steady_solver
object provides the steady state solution.
void attach_assembly(MAST::StructuralFluidInteractionAssembly &assembly)
attaches the assembly object to this solver.
abstract class defines the interface to provide the steady-state solution
std::ofstream * _output
file to which the result will be written
FlutterSolverBase()
defalut constructor
void initialize(std::vector< libMesh::NumericVector< Real > * > &basis)
initializes the data structres for a flutter solution.
virtual void clear_assembly_object()
clears the assembly object
MAST::StructuralFluidInteractionAssembly * _assembly
structural assembly that provides the assembly of the system matrices.
virtual void clear()
clears the solution and other data from this solver