preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
precice::impl::WatchIntegral Class Reference

Track and output transient integral data on a mesh. More...

#include <WatchIntegral.hpp>

Collaboration diagram for precice::impl::WatchIntegral:
[legend]

Public Member Functions

 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.
 
void initialize ()
 Adds surface area information based on mesh connectivity.
 

Private Member Functions

Eigen::VectorXd calculateIntegral (const mesh::PtrData &data) const
 
double calculateSurfaceArea () const
 

Private Attributes

logging::Logger _log {"impl::WatchIntegral"}
 
mesh::PtrMesh _mesh
 
io::TXTTableWriter _txtWriter
 
std::vector< mesh::PtrData_dataToExport
 
bool _isScalingOn
 

Detailed Description

Track and output transient integral data on a mesh.

Calculation of integral depends on connectivity information of mesh and given scaling option. If scale with area option is true, vertex data is weighted by area and summed up, otherwise, vertex data is directly summed up.

Definition at line 27 of file WatchIntegral.hpp.

Constructor & Destructor Documentation

◆ WatchIntegral()

precice::impl::WatchIntegral::WatchIntegral ( mesh::PtrMesh meshToWatch,
const std::string & exportFilename,
bool isScalingOn )

Constructor.

Parameters
[in]meshToWatchMesh to be watched.
[in]exportFilenameoutput file name
[in]isScalingOnwhether the data will be scaled with area or not

Definition at line 15 of file WatchIntegral.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ calculateIntegral()

Eigen::VectorXd precice::impl::WatchIntegral::calculateIntegral ( const mesh::PtrData & data) const
private

Definition at line 108 of file WatchIntegral.cpp.

Here is the call graph for this function:

◆ calculateSurfaceArea()

double precice::impl::WatchIntegral::calculateSurfaceArea ( ) const
private

Definition at line 127 of file WatchIntegral.cpp.

◆ exportIntegralData()

void precice::impl::WatchIntegral::exportIntegralData ( double time)

Writes one line with data of the integral over the mesh into the output file.

Definition at line 59 of file WatchIntegral.cpp.

Here is the call graph for this function:

◆ initialize()

void precice::impl::WatchIntegral::initialize ( )

Adds surface area information based on mesh connectivity.

Definition at line 46 of file WatchIntegral.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _dataToExport

std::vector<mesh::PtrData> precice::impl::WatchIntegral::_dataToExport
private

Definition at line 54 of file WatchIntegral.hpp.

◆ _isScalingOn

bool precice::impl::WatchIntegral::_isScalingOn
private

Definition at line 56 of file WatchIntegral.hpp.

◆ _log

logging::Logger precice::impl::WatchIntegral::_log {"impl::WatchIntegral"}
private

Definition at line 48 of file WatchIntegral.hpp.

◆ _mesh

mesh::PtrMesh precice::impl::WatchIntegral::_mesh
private

Definition at line 50 of file WatchIntegral.hpp.

◆ _txtWriter

io::TXTTableWriter precice::impl::WatchIntegral::_txtWriter
private

Definition at line 52 of file WatchIntegral.hpp.


The documentation for this class was generated from the following files: