Alsvinn  0.5.3
The fast FVM simulator with UQ support
IntervalFunctionalWriter.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 functional {
24 
25 
34 public:
35 
37  io::WriterPointer writer,
38  FunctionalPointer functional
39  );
40 
41  virtual void write(const volume::Volume& conservedVariables,
42  const grid::Grid& grid,
43  const simulator::TimestepInformation& timestepInformation) override;
44 
45 
46 private:
47  void makeVolumes(const grid::Grid& grid,
48  const volume::Volume& conservedVariables);
49  volume::VolumeFactory volumeFactory;
50  io::WriterPointer writer;
51  FunctionalPointer functional;
52 
53  volume::VolumePointer conservedVolume;
54 
55 
56 
57  ivec3 functionalSize;
58 
59 };
60 } // namespace functional
61 } // namespace alsfvm
Definition: Grid.hpp:27
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 write(const volume::Volume &conservedVariables, const grid::Grid &grid, const simulator::TimestepInformation &timestepInformation) override
write writes the data to disk
Definition: IntervalFunctionalWriter.cpp:31
The IntervalFunctionalWriter class is a decorator for another writer. Its purpose is to only call the...
Definition: IntervalFunctionalWriter.hpp:33
alsfvm::shared_ptr< Volume > VolumePointer
Definition: Volume.hpp:345
const grid::Grid & grid
Definition: NumericalFluxFactory.cpp:104
alsfvm::shared_ptr< Functional > FunctionalPointer
Definition: Functional.hpp:74
The Writer class is an abstract interface to represent output writers.
Definition: Writer.hpp:28
Various utility functions to implement the tecno flux.
Definition: types.hpp:30
functional
Definition: FunctionalStatistics.cpp:76
alsfvm::shared_ptr< Writer > WriterPointer
Definition: Writer.hpp:64
IntervalFunctionalWriter(volume::VolumeFactory volumeFactory, io::WriterPointer writer, FunctionalPointer functional)
Definition: IntervalFunctionalWriter.cpp:22
Definition: TimestepInformation.hpp:22