Alsvinn  0.5.3
The fast FVM simulator with UQ support
ConservedSystem.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 namespace alsfvm {
22 namespace simulator {
23 
26 public:
27  ConservedSystem(alsfvm::shared_ptr<numflux::NumericalFlux> numericalFlux,
28  alsfvm::shared_ptr<diffusion::DiffusionOperator> diffusionOperator);
29 
40  virtual void operator()( volume::Volume& conservedVariables,
41  rvec3& waveSpeed, bool computeWaveSpeed,
42  volume::Volume& output);
43 
49  virtual size_t getNumberOfGhostCells() const ;
50 
51  void setCellExchanger(mpi::CellExchangerPtr cellExchanger);
52 private:
53  alsfvm::shared_ptr<numflux::NumericalFlux> numericalFlux;
54  alsfvm::shared_ptr<diffusion::DiffusionOperator> diffusionOperator;
55 
56  mpi::CellExchangerPtr cellExchanger{nullptr};
57 };
58 } // namespace alsfvm
59 } // namespace simulator
virtual void operator()(volume::Volume &conservedVariables, rvec3 &waveSpeed, bool computeWaveSpeed, volume::Volume &output)
operator () computes the right hand side of the ODE. (see class definition)
Definition: ConservedSystem.cpp:31
alsfvm::shared_ptr< CellExchanger > CellExchangerPtr
Definition: CellExchanger.hpp:43
void setCellExchanger(mpi::CellExchangerPtr cellExchanger)
Definition: ConservedSystem.cpp:116
The Volume class represents a volume (a collection of cells with values for each cell (eg...
Definition: Volume.hpp:30
ConservedSystem(alsfvm::shared_ptr< numflux::NumericalFlux > numericalFlux, alsfvm::shared_ptr< diffusion::DiffusionOperator > diffusionOperator)
Definition: ConservedSystem.cpp:24
Definition: System.hpp:33
Definition: ConservedSystem.hpp:25
virtual size_t getNumberOfGhostCells() const
Definition: ConservedSystem.cpp:111
Various utility functions to implement the tecno flux.
Definition: types.hpp:30