Alsvinn  0.5.3
The fast FVM simulator with UQ support
Moment.hpp
Go to the documentation of this file.
1 #pragma once
2 /* Copyright (c) 2018 ETH Zurich, Kjetil Olsen Lye
3  * This program is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
18 
19 namespace alsfvm {
20 namespace functional {
21 
27 class Moment : public Functional {
28 public:
35 
55  virtual void operator()(volume::Volume& conservedVolumeOut,
56  const volume::Volume& conservedVolumeIn,
57  const real weight,
58  const grid::Grid& grid
59  ) override;
60 
62  virtual ivec3 getFunctionalSize(const grid::Grid& grid) const override;
63 
64 
65 
66  virtual ivec3 getGhostCellSizes(const grid::Grid& grid,
67  const volume::Volume& volume) const override;
68 
69 private:
70  const int degree = 1;
71 };
72 } // namespace functional
73 } // namespace alsfvm
Definition: Grid.hpp:27
Definition: Moment.hpp:27
simulator::SimulatorParameters & parameters
Definition: CellComputerFactory.cpp:60
Holds general parameters based on a boost::property tree.
Definition: Parameters.hpp:24
The Volume class represents a volume (a collection of cells with values for each cell (eg...
Definition: Volume.hpp:30
virtual ivec3 getFunctionalSize(const grid::Grid &grid) const override
Returns grid.getDimensions()
Definition: Moment.cpp:47
double real
Definition: types.hpp:65
const grid::Grid & grid
Definition: NumericalFluxFactory.cpp:104
virtual ivec3 getGhostCellSizes(const grid::Grid &grid, const volume::Volume &volume) const override
Definition: Moment.cpp:51
virtual void operator()(volume::Volume &conservedVolumeOut, const volume::Volume &conservedVolumeIn, const real weight, const grid::Grid &grid) override
Definition: Moment.cpp:31
Various utility functions to implement the tecno flux.
Definition: types.hpp:30
Moment(const Parameters &parameters)
Definition: Moment.cpp:25
functional
Definition: FunctionalStatistics.cpp:76
Abstract base class to represent a functional.
Definition: Functional.hpp:29