Alsvinn  0.5.3
The fast FVM simulator with UQ support
TecnoDiffusionCUDA.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
17 #include "alsfvm/types.hpp"
23 namespace alsfvm {
24 namespace diffusion {
39 template<class Equation, template<typename, int> class DiffusionMatrix>
41 public:
43  alsfvm::shared_ptr<reconstruction::tecno::TecnoReconstruction> reconstruction,
45 
55  virtual void applyDiffusion(volume::Volume& outputVolume,
56  const volume::Volume& conservedVolume);
57 
62  virtual size_t getNumberOfGhostCells() const;
63 
64 private:
65  alsfvm::volume::VolumeFactory volumeFactory;
66  alsfvm::shared_ptr<reconstruction::tecno::TecnoReconstruction> reconstruction;
67 
68  // Reconstructed values (these are basically R^{-1}v,
69  // where v is the entropy variables and R^{-1} is the inverse of the
70  // eigenvalues of the flux.
71  alsfvm::shared_ptr<volume::Volume> left;
72  alsfvm::shared_ptr<volume::Volume> right;
73 
74  alsfvm::shared_ptr<volume::Volume> entropyVariablesLeft;
75  alsfvm::shared_ptr<volume::Volume> entropyVariablesRight;
76 
77  Equation equation;
78 };
79 } // namespace diffusion
80 } // 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
Definition: TecnoDiffusionCUDA.hpp:40
virtual void applyDiffusion(volume::Volume &outputVolume, const volume::Volume &conservedVolume)
TecnoDiffusionCUDA(volume::VolumeFactory &volumeFactory, alsfvm::shared_ptr< reconstruction::tecno::TecnoReconstruction > reconstruction, const simulator::SimulatorParameters &simulatorParameters)
Various utility functions to implement the tecno flux.
Definition: types.hpp:30
virtual size_t getNumberOfGhostCells() const
Definition: SimulatorParameters.hpp:22