preCICE v3.2.0
Loading...
Searching...
No Matches
precice::impl::WatchPoint Class Reference

Observes and exports coordinates of a point on the geometry. More...

#include <WatchPoint.hpp>

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

Public Member Functions

 WatchPoint (Eigen::VectorXd pointCoords, mesh::PtrMesh meshToWatch, const std::string &exportFilename)
 Constructor.
const mesh::PtrMeshmesh () const
const std::stringfilename () const
void initialize ()
void exportPointData (double time)
 Writes one line with data of the watchpoint into the output file.
bool isClosest () const

Private Member Functions

void getValue (Eigen::VectorXd &value, mesh::PtrData &data, double time)
void getValue (double &value, mesh::PtrData &data, double time)

Private Attributes

logging::Logger _log {"impl::WatchPoint"}
Eigen::VectorXd _point
mesh::PtrMesh _mesh
io::TXTTableWriter _txtWriter
double _shortestDistance = std::numeric_limits<double>::max()
std::unique_ptr< mapping::Polation_interpolation
std::vector< mesh::PtrData_dataToExport
bool _isClosest = true
 Holds the information if this processor is the closest.

Detailed Description

Observes and exports coordinates of a point on the geometry.

Definition at line 20 of file WatchPoint.hpp.

Constructor & Destructor Documentation

◆ WatchPoint()

precice::impl::WatchPoint::WatchPoint ( Eigen::VectorXd pointCoords,
mesh::PtrMesh meshToWatch,
const std::string & exportFilename )

Constructor.

Parameters
[in]meshToWatchMesh to be watched, can be empty on construction.

Definition at line 24 of file WatchPoint.cpp.

Member Function Documentation

◆ exportPointData()

void precice::impl::WatchPoint::exportPointData ( double time)

Writes one line with data of the watchpoint into the output file.

Definition at line 91 of file WatchPoint.cpp.

Here is the call graph for this function:

◆ filename()

const std::string & precice::impl::WatchPoint::filename ( ) const

◆ getValue() [1/2]

void precice::impl::WatchPoint::getValue ( double & value,
mesh::PtrData & data,
double time )
private

Definition at line 146 of file WatchPoint.cpp.

◆ getValue() [2/2]

void precice::impl::WatchPoint::getValue ( Eigen::VectorXd & value,
mesh::PtrData & data,
double time )
private

Definition at line 128 of file WatchPoint.cpp.

◆ initialize()

void precice::impl::WatchPoint::initialize ( )

Initializes the watch point for exporting point data.

This can be called repeatedly to reinitialize the WatchPoint.

Definition at line 56 of file WatchPoint.cpp.

Here is the call graph for this function:

◆ isClosest()

bool precice::impl::WatchPoint::isClosest ( ) const
inline

Definition at line 45 of file WatchPoint.hpp.

◆ mesh()

const mesh::PtrMesh & precice::impl::WatchPoint::mesh ( ) const

Definition at line 51 of file WatchPoint.cpp.

Member Data Documentation

◆ _dataToExport

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

Definition at line 63 of file WatchPoint.hpp.

◆ _interpolation

std::unique_ptr<mapping::Polation> precice::impl::WatchPoint::_interpolation
private

Definition at line 61 of file WatchPoint.hpp.

◆ _isClosest

bool precice::impl::WatchPoint::_isClosest = true
private

Holds the information if this processor is the closest.

Definition at line 66 of file WatchPoint.hpp.

◆ _log

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

Definition at line 51 of file WatchPoint.hpp.

◆ _mesh

mesh::PtrMesh precice::impl::WatchPoint::_mesh
private

Definition at line 55 of file WatchPoint.hpp.

◆ _point

Eigen::VectorXd precice::impl::WatchPoint::_point
private

Definition at line 53 of file WatchPoint.hpp.

◆ _shortestDistance

double precice::impl::WatchPoint::_shortestDistance = std::numeric_limits<double>::max()
private

Definition at line 59 of file WatchPoint.hpp.

◆ _txtWriter

io::TXTTableWriter precice::impl::WatchPoint::_txtWriter
private

Definition at line 57 of file WatchPoint.hpp.


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