preCICE v3.1.1
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 {
11namespace mesh {
12class Vertex;
13}
14} // namespace precice
15
16namespace precice {
17namespace impl {
18
28public:
37 mesh::PtrMesh meshToWatch,
38 const std::string &exportFilename,
39 bool isScalingOn);
40
42 void exportIntegralData(double time);
43
45 void initialize();
46
47private:
48 logging::Logger _log{"impl::WatchIntegral"};
49
51
53
55
57
58 Eigen::VectorXd calculateIntegral(const mesh::PtrData &data) const;
59
60 double calculateSurfaceArea() const;
61};
62
63} // namespace impl
64} // namespace precice
Track and output transient integral data on a mesh.
void initialize()
Adds surface area information based on mesh connectivity.
std::vector< mesh::PtrData > _dataToExport
Eigen::VectorXd calculateIntegral(const mesh::PtrData &data) const
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
File writer for table-data in text-format.
This class provides a lightweight logger.
Definition Logger.hpp:16
Main namespace of the precice library.
static std::unique_ptr< precice::Participant > impl
Definition preciceC.cpp:21