MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
flutter_solution_base.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2020 Manav Bhatia and MAST authors
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__flutter_solution_base_h__
21 #define __mast__flutter_solution_base_h__
22 
23 // C++ includes
24 #include <vector>
25 
26 
27 // MAST includes
28 #include "base/mast_data_types.h"
29 
30 
31 namespace MAST {
32 
33  // Forward declerations
34  class FlutterSolverBase;
35  class FlutterRootBase;
36 
37 
39 
40  public:
42  _ref_val(0.)
43  {}
44 
48  virtual ~FlutterSolutionBase();
49 
50 
54  Real ref_val() const {
55  return _ref_val;
56  }
57 
61  unsigned int n_roots() const{
62  return (unsigned int)_roots.size();
63  }
64 
65 
70  get_root(const unsigned int i) const {
71 
72  libmesh_assert_less(i, _roots.size());
73  return *_roots[i];
74  }
75 
76 
81  get_root(const unsigned int i) {
82 
83  libmesh_assert_less(i, _roots.size());
84  return *_roots[i];
85  }
86 
87 
95  virtual void sort(const MAST::FlutterSolutionBase& sol) = 0;
96 
97 
102  unsigned int root_num);
103 
104 
108  virtual void print(std::ostream& output) = 0;
109 
110 
111  protected:
112 
120 
121  std::vector<MAST::FlutterRootBase*> _roots;
122  };
123 
124 }
125 
126 
127 #endif // __mast__flutter_solution_base_h__
MAST::FlutterRootBase & get_root(const unsigned int i)
std::vector< MAST::FlutterRootBase * > _roots
unsigned int n_roots() const
number of roots in this solution
virtual void print(std::ostream &output)=0
prints the data and modes from this solution
libMesh::Real Real
virtual ~FlutterSolutionBase()
delete the flutter root objects
Real ref_val() const
the reduced frequency for this solution
void swap_root(MAST::FlutterSolutionBase &sol, unsigned int root_num)
virtual void sort(const MAST::FlutterSolutionBase &sol)=0
sort this root with respect to the given solution from a previous eigen solution. ...
const MAST::FlutterRootBase & get_root(const unsigned int i) const
Real _ref_val
Reference value of the sweeping parameter for which this solution was obtained.