svFSIplus
Simulation.h
1 /* Copyright (c) Stanford University, The Regents of the University of California, and others.
2  *
3  * All Rights Reserved.
4  *
5  * See Copyright-SimVascular.txt for additional details.
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining
8  * a copy of this software and associated documentation files (the
9  * "Software"), to deal in the Software without restriction, including
10  * without limitation the rights to use, copy, modify, merge, publish,
11  * distribute, sublicense, and/or sell copies of the Software, and to
12  * permit persons to whom the Software is furnished to do so, subject
13  * to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be included
16  * in all copies or substantial portions of the Software.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
19  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
22  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #ifndef SIMULATION_H
32 #define SIMULATION_H
33 
34 #include "ComMod.h"
35 #include "Parameters.h"
36 #include "SimulationLogger.h"
37 #include "LinearAlgebra.h"
38 
39 #include <string>
40 
41 class Simulation {
42 
43  public:
44  Simulation();
45  ~Simulation();
46 
47  const mshType& get_msh(const std::string& name);
48 
49  CepMod& get_cep_mod() { return cep_mod; };
50  ChnlMod& get_chnl_mod() { return chnl_mod; };
51  ComMod& get_com_mod() { return com_mod; };
52 
53  // Read a solver paramerer input XML file.
54  void read_parameters(const std::string& fileName);
55 
56  // Set simulation and module member data from Parameters.
57  void set_module_parameters();
58 
59  //----- Fortran subroutines -----//
60  //void read_msh();
61 
62  //----- Fortran modules -----//
63  CepMod cep_mod;
64  ChnlMod chnl_mod;
65  CmMod cm_mod;
66  ComMod com_mod;
67 
68  // Solver parameters read in from solver input XML file.
69  Parameters parameters;
70 
71  // Log solution information.
72  SimulationLogger logger;
73 
74  // Number of time steps
75  int nTs;
76 
77  // Simulation initialization file path
78  std::string fTmp;
79 
80  // Spectral radius of infinite time step; this is later used in equations.
81  double roInf;
82 
83  // Simulation requires remeshing
84 
85  bool isReqd;
86 
87  // Name of the history file.
88  std::string history_file_name;
89 
90  LinearAlgebra* linear_algebra = nullptr;
91 };
92 
93 #endif
94 
Definition: CepMod.h:220
Definition: ChnlMod.h:101
The CmMod class duplicates the data structures in the Fortran CMMOD module defined in COMU....
Definition: CmMod.h:62
The ComMod class duplicates the data structures in the Fortran COMMOD module defined in MOD....
Definition: ComMod.h:1332
The LinearAlgebra class provides an abstract interface to linear algebra frameworks: FSILS,...
Definition: LinearAlgebra.h:40
The Parameters class stores parameter values read in from a solver input file.
Definition: Parameters.h:1414
Definition: Simulation.h:41
void set_module_parameters()
Set the simulation and module member data.
Definition: Simulation.cpp:74
void read_parameters(const std::string &fileName)
Read solver parameters.
Definition: Simulation.cpp:63
The SimulationLogger class is used to write information to a text file and optionally to cout.
Definition: SimulationLogger.h:40
This is the container for a mesh or NURBS patch, those specific to NURBS are noted.
Definition: ComMod.h:810