MAST
pk_flutter_root_crossover.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 // C++ includes
21 #include <iomanip>
22 
23 // MAST includes
27 
28 
29 
32 { }
33 
34 
35 void
36 MAST::PKFlutterRootCrossover::print(std::ostream &output) const {
37 
39  &lower = crossover_solutions.first->get_root(root_num),
40  &upper = crossover_solutions.second->get_root(root_num);
41 
42  output
43  << " Lower Root: " << std::endl
44  << " V : " << std::setw(15) << lower.V << std::endl
45  << " kr : " << std::setw(15) << lower.kr << std::endl
46  << " Re : " << std::setw(15) << std::real(lower.root) << std::endl
47  << " Im : " << std::setw(15) << std::imag(lower.omega) << std::endl
48  << " Upper Root: " << std::endl
49  << " V : " << std::setw(15) << upper.V << std::endl
50  << " kr : " << std::setw(15) << upper.kr << std::endl
51  << " Re : " << std::setw(15) << std::real(upper.root) << std::endl
52  << " Im : " << std::setw(15) << std::imag(upper.root) << std::endl;
53 
54  if (root)
55  output
56  << "Critical Root: " << std::endl
57  << " V : " << std::setw(15) << root->V << std::endl
58  << " kr : " << std::setw(15) << root->kr << std::endl
59  << " Re : " << std::setw(15) << std::real(root->root) << std::endl
60  << " Im : " << std::setw(15) << std::imag(root->root) << std::endl;
61  else
62  output << "Critical root not yet calculated." << std::endl;
63 }
virtual void print(std::ostream &output) const
std::pair< MAST::FlutterSolutionBase *, MAST::FlutterSolutionBase * > crossover_solutions