preCICE v3.2.0
Loading...
Searching...
No Matches
WatchIntegral.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4#include <string>
5#include <vector>
7#include "logging/Logger.hpp"
9
10namespace precice::mesh {
11class Vertex;
12}
13
14namespace precice::impl {
15
25public:
34 mesh::PtrMesh meshToWatch,
35 const std::string &exportFilename,
36 bool isScalingOn);
37
39 void exportIntegralData(double time);
40
42 void initialize();
43
44private:
45 logging::Logger _log{"impl::WatchIntegral"};
46
48
50
52
54
55 Eigen::VectorXd calculateIntegral(double time, const mesh::PtrData &data) const;
56
57 double calculateSurfaceArea() const;
58};
59
60} // namespace precice::impl
void initialize()
Adds surface area information based on mesh connectivity.
std::vector< mesh::PtrData > _dataToExport
WatchIntegral(mesh::PtrMesh meshToWatch, const std::string &exportFilename, bool isScalingOn)
Constructor.
void exportIntegralData(double time)
Writes one line with data of the integral over the mesh into the output file.
io::TXTTableWriter _txtWriter
Eigen::VectorXd calculateIntegral(double time, const mesh::PtrData &data) const
File writer for table-data in text-format.
This class provides a lightweight logger.
Definition Logger.hpp:17
Vertex of a mesh.
Definition Vertex.hpp:16
provides Mesh, Data and primitives.
std::shared_ptr< Data > PtrData
std::shared_ptr< Mesh > PtrMesh
contains the time interpolation logic.
Definition Sample.hpp:8