MAST
flutter_solution_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 
21 // MAST includes
24 
25 
27 
28  std::vector<MAST::FlutterRootBase*>::iterator
29  it = _roots.begin();
30  for ( ; it != _roots.end(); it++)
31  delete *it;
32 }
33 
34 
35 
36 
37 void
39  unsigned int root_num) {
40 
41  libmesh_assert(root_num < _roots.size());
42  libmesh_assert(root_num < sol._roots.size());
43 
44  std::swap(_roots[root_num], sol._roots[root_num]);
45 }
46 
47 
std::vector< MAST::FlutterRootBase * > _roots
virtual ~FlutterSolutionBase()
delete the flutter root objects
void swap_root(MAST::FlutterSolutionBase &sol, unsigned int root_num)