preCICE v3.1.1
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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)
 
void getValue (double &value, mesh::PtrData &data)
 

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 23 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.

Here is the call graph for this function:

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 )
private

Definition at line 145 of file WatchPoint.cpp.

◆ getValue() [2/2]

void precice::impl::WatchPoint::getValue ( Eigen::VectorXd & value,
mesh::PtrData & data )
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 48 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 66 of file WatchPoint.hpp.

◆ _interpolation

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

Definition at line 64 of file WatchPoint.hpp.

◆ _isClosest

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

Holds the information if this processor is the closest.

Definition at line 69 of file WatchPoint.hpp.

◆ _log

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

Definition at line 54 of file WatchPoint.hpp.

◆ _mesh

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

Definition at line 58 of file WatchPoint.hpp.

◆ _point

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

Definition at line 56 of file WatchPoint.hpp.

◆ _shortestDistance

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

Definition at line 62 of file WatchPoint.hpp.

◆ _txtWriter

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

Definition at line 60 of file WatchPoint.hpp.


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