svMultiPhysics
Loading...
Searching...
No Matches
Simulation.h
1// SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the University of California, and others.
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef SIMULATION_H
5#define SIMULATION_H
6
7#include "ComMod.h"
8#include "SolutionStates.h"
9#include "Parameters.h"
10#include "SimulationLogger.h"
11#include "LinearAlgebra.h"
12
13#include <string>
14#include <memory>
15
16// Forward declaration
17class Integrator;
18
20
21 public:
22 Simulation();
24
25 const mshType& get_msh(const std::string& name);
26
27 CepMod& get_cep_mod() { return cep_mod; };
28 ChnlMod& get_chnl_mod() { return chnl_mod; };
29 ComMod& get_com_mod() { return com_mod; };
31
32 // Initialize the Integrator object after simulation setup is complete
33 // Takes ownership of solution states via move semantics
34 void initialize_integrator(SolutionStates&& solutions);
35
36 // Read a solver paramerer input XML file.
37 void read_parameters(const std::string& fileName);
38
39 // Set simulation and module member data from Parameters.
41
42 //----- Fortran subroutines -----//
43 //void read_msh();
44
45 //----- Fortran modules -----//
46 CepMod cep_mod;
47 ChnlMod chnl_mod;
48 CmMod cm_mod;
49 ComMod com_mod;
50
51 // Solver parameters read in from solver input XML file.
52 Parameters parameters;
53
54 // Log solution information.
55 SimulationLogger logger;
56
57 // Number of time steps
58 int nTs;
59
60 // Simulation initialization file path
61 std::string fTmp;
62
63 // Spectral radius of infinite time step; this is later used in equations.
64 double roInf;
65
66 // Simulation requires remeshing
67
68 bool isReqd;
69
70 // Name of the history file.
71 std::string history_file_name;
72
73 LinearAlgebra* linear_algebra = nullptr;
74
75 private:
76 // Time integrator for Newton iteration loop
77 std::unique_ptr<Integrator> integrator_;
78};
79
80#endif
81
Definition CepMod.h:205
Definition ChnlMod.h:74
The CmMod class duplicates the data structures in the Fortran CMMOD module defined in COMU....
Definition CmMod.h:35
The ComMod class duplicates the data structures in the Fortran COMMOD module defined in MOD....
Definition ComMod.h:1525
Integrator class encapsulates the Newton iteration loop for time integration.
Definition Integrator.h:24
The LinearAlgebra class provides an abstract interface to linear algebra frameworks: FSILS,...
Definition LinearAlgebra.h:13
The Parameters class stores parameter values read in from a solver input file.
Definition Parameters.h:1740
Definition Simulation.h:19
void set_module_parameters()
Set the simulation and module member data.
Definition Simulation.cpp:49
void initialize_integrator(SolutionStates &&solutions)
Initialize the Integrator object after simulation setup is complete.
Definition Simulation.cpp:100
Integrator & get_integrator()
Get reference to the Integrator object.
Definition Simulation.cpp:108
void read_parameters(const std::string &fileName)
Read solver parameters.
Definition Simulation.cpp:38
The SimulationLogger class is used to write information to a text file and optionally to cout.
Definition SimulationLogger.h:13
This is the container for a mesh or NURBS patch, those specific to NURBS are noted.
Definition ComMod.h:871
Holds solution state at old, current, and intermediate time levels.
Definition SolutionStates.h:39