Alsvinn  0.5.3
The fast FVM simulator with UQ support
FiniteVolumeSimulatorCreator.hpp
Go to the documentation of this file.
1 /* Copyright (c) 2018 ETH Zurich, Kjetil Olsen Lye
2  * This program is free software: you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation, either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program. If not, see <http://www.gnu.org/licenses/>.
14  */
15 
16 #pragma once
21 #include <mpi.h>
22 #include "alsuq/types.hpp"
23 
24 namespace alsuq {
25 namespace run {
30 public:
31  FiniteVolumeSimulatorCreator(const std::string& configurationFile,
32  mpi::ConfigurationPtr mpiConfigurationSpatial,
33  mpi::ConfigurationPtr mpiConfigurationStatistical,
34  mpi::ConfigurationPtr mpiConfigurationWorld,
35  ivec3 multiSpatial
36  );
37 
38  alsfvm::shared_ptr<alsfvm::simulator::AbstractSimulator>
39  createSimulator(const alsfvm::init::Parameters& initialDataParameters,
40  size_t sampleNumber) override;
41 
42 private:
43  mpi::ConfigurationPtr mpiConfigurationSpatial;
44  mpi::ConfigurationPtr mpiConfigurationStatistical;
45  mpi::ConfigurationPtr mpiConfigurationWorld;
46 
47  ivec3 multiSpatial;
48 
51  std::vector<std::string> makeGroupNames(size_t sampleNumber);
52 
53  bool firstCall{true};
54  const std::string filename;
55 
56 
57 
58 };
59 } // namespace run
60 } // namespace alsuq
The FiniteVolumeSimulatorCreator class creates a new instance of the FVM simulator.
Definition: FiniteVolumeSimulatorCreator.hpp:29
FiniteVolumeSimulatorCreator(const std::string &configurationFile, mpi::ConfigurationPtr mpiConfigurationSpatial, mpi::ConfigurationPtr mpiConfigurationStatistical, mpi::ConfigurationPtr mpiConfigurationWorld, ivec3 multiSpatial)
Definition: FiniteVolumeSimulatorCreator.cpp:25
alsfvm::shared_ptr< alsfvm::simulator::AbstractSimulator > createSimulator(const alsfvm::init::Parameters &initialDataParameters, size_t sampleNumber) override
Definition: FiniteVolumeSimulatorCreator.cpp:39
Definition: Parameters.hpp:27
alsfvm::shared_ptr< Configuration > ConfigurationPtr
Definition: Configuration.hpp:53
The SimulatorCreator is an abstract interface for creating new simulators.
Definition: SimulatorCreator.hpp:29
Definition: Setup.hpp:22