MAST
time_domain_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 
21 // C++ includes
22 #include <iomanip>
23 
24 
25 // MAST includes
29 
30 
31 
34 { }
35 
36 
37 void
38 MAST::TimeDomainFlutterRootCrossover::print(std::ostream &output) const {
39 
41  &lower = crossover_solutions.first->get_root(root_num),
42  &upper = crossover_solutions.second->get_root(root_num);
43 
44  output
45  << " Lower Root: " << std::endl
46  << " V : " << std::setw(15) << lower.V << std::endl
47  << " Re : " << std::setw(15) << std::real(lower.root) << std::endl
48  << " Im : " << std::setw(15) << std::imag(lower.omega) << std::endl
49  << " Upper Root: " << std::endl
50  << " V : " << std::setw(15) << upper.V << 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  << " Re : " << std::setw(15) << std::real(root->root) << std::endl
59  << " Im : " << std::setw(15) << std::imag(root->root) << std::endl;
60  else
61  output << "Critical root not yet calculated." << std::endl;
62 }
63 
std::pair< MAST::FlutterSolutionBase *, MAST::FlutterSolutionBase * > crossover_solutions
virtual void print(std::ostream &output) const