Alsvinn  0.5.3
The fast FVM simulator with UQ support
TecnoDiffusionCPU.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 
22 namespace alsfvm {
23 namespace diffusion {
24 
25 
39 template<class Equation, template<class, int> class DiffusionMatrix>
41 public:
42 
44  alsfvm::shared_ptr<reconstruction::tecno::TecnoReconstruction> reconstruction,
46 
58  virtual void applyDiffusion(volume::Volume& outputVolume,
59  const volume::Volume& conservedVolume);
60 
65  virtual size_t getNumberOfGhostCells() const;
66 
67 private:
68  alsfvm::volume::VolumeFactory volumeFactory;
69  alsfvm::shared_ptr<reconstruction::tecno::TecnoReconstruction> reconstruction;
70 
71  // Reconstructed values (these are basically R^{-1}v,
72  // where v is the entropy variables and R^{-1} is the inverse of the
73  // eigenvalues of the flux.
74  alsfvm::shared_ptr<volume::Volume> left;
75  alsfvm::shared_ptr<volume::Volume> right;
76 
77  alsfvm::shared_ptr<volume::Volume> entropyVariablesLeft;
78  alsfvm::shared_ptr<volume::Volume> entropyVariablesRight;
79 
80  Equation equation;
81 };
82 } // namespace diffusion
83 } // namespace alsfvm
Definition: DiffusionOperator.hpp:26
const alsfvm::shared_ptr< simulator::SimulatorParameters > & simulatorParameters
Definition: NumericalFluxFactory.cpp:102
Definition: VolumeFactory.hpp:29
The Volume class represents a volume (a collection of cells with values for each cell (eg...
Definition: Volume.hpp:30
virtual void applyDiffusion(volume::Volume &outputVolume, const volume::Volume &conservedVolume)
Definition: TecnoDiffusionCPU.cpp:116
virtual size_t getNumberOfGhostCells() const
Definition: TecnoDiffusionCPU.cpp:171
Definition: TecnoDiffusionCPU.hpp:40
Various utility functions to implement the tecno flux.
Definition: types.hpp:30
TecnoDiffusionCPU(volume::VolumeFactory &volumeFactory, alsfvm::shared_ptr< reconstruction::tecno::TecnoReconstruction > reconstruction, const simulator::SimulatorParameters &simulatorParameters)
Definition: TecnoDiffusionCPU.cpp:102
Definition: SimulatorParameters.hpp:22