preCICE v3.1.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
precice::cplscheme::CouplingData Class Reference

#include <CouplingData.hpp>

Collaboration diagram for precice::cplscheme::CouplingData:
[legend]

Public Types

enum struct  Direction : bool { Send , Receive }
 

Public Member Functions

 CouplingData (mesh::PtrData data, mesh::PtrMesh mesh, bool requiresInitialization, bool exchangeSubsteps, Direction direction)
 
int getDimensions () const
 
int getSize () const
 
Eigen::VectorXd & values ()
 Returns a reference to the data values.
 
const Eigen::VectorXd & values () const
 Returns a const reference to the data values.
 
Eigen::MatrixXd & gradients ()
 Returns a reference to the gradient data values.
 
const Eigen::MatrixXd & gradients () const
 Returns a const reference to the gradient data values.
 
time::Samplesample ()
 Returns a reference to the gradient data Sample.
 
const time::Samplesample () const
 Returns a const reference to the data Sample.
 
time::StoragetimeStepsStorage ()
 Returns a reference to the time step storage of the data.
 
Eigen::VectorXd getPreviousValuesAtTime (double relativeDt)
 returns previous data interpolated to the relativeDt time
 
Eigen::MatrixXd getPreviousGradientsAtTime (double relativeDt)
 
const time::StoragetimeStepsStorage () const
 Returns a const reference to the time step storage of the data.
 
auto stamples () const
 Returns the stamples in _timeStepsStorage.
 
void setSampleAtTime (double time, time::Sample sample)
 Add sample at given time to _timeStepsStorage.
 
bool hasGradient () const
 Returns if the data contains gradient data.
 
int meshDimensions () const
 Returns the dimensions of the current mesh (2D or 3D)
 
void storeIteration ()
 store _data->values() in read-only variable _previousIteration for convergence checks etc.
 
const Eigen::VectorXd & previousIteration () const
 returns data value from previous iteration
 
const Eigen::MatrixXd & previousIterationGradients () const
 returns gradient data from previous iteration
 
int getPreviousIterationSize () const
 returns size of previous iteration
 
int getMeshID ()
 get ID of this CouplingData's mesh. See Mesh::getID().
 
int getDataID ()
 get ID of this CouplingData's data. See Data::getID().
 
std::string getDataName ()
 get name of this CouplingData's data. See Data::getName().
 
std::vector< int > getVertexOffsets ()
 get vertex offsets of this CouplingData's mesh. See Mesh::getVertexOffsets().
 
Direction getDirection () const
 get direction of this coupling data
 
void moveToNextWindow ()
 move to next window and initialize data via extrapolation
 
bool exchangeSubsteps () const
 

Public Attributes

const bool requiresInitialization
 True, if the data values of this CouplingData require to be initialized by this participant.
 

Private Attributes

logging::Logger _log {"cplscheme::CouplingData"}
 
mesh::PtrMesh _mesh
 Mesh associated with this CouplingData.
 
mesh::PtrData _data
 Data associated with this CouplingData.
 
time::Storage _previousTimeStepsStorage
 Sample values of previous iteration (end of time window).
 
bool _exchangeSubsteps
 If true, all substeps will be sent / received for this coupling data.
 
Direction _direction
 

Detailed Description

Definition at line 13 of file CouplingData.hpp.

Member Enumeration Documentation

◆ Direction

Enumerator
Send 
Receive 

Definition at line 15 of file CouplingData.hpp.

Constructor & Destructor Documentation

◆ CouplingData()

precice::cplscheme::CouplingData::CouplingData ( mesh::PtrData data,
mesh::PtrMesh mesh,
bool requiresInitialization,
bool exchangeSubsteps,
Direction direction )

Definition at line 11 of file CouplingData.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ exchangeSubsteps()

bool precice::cplscheme::CouplingData::exchangeSubsteps ( ) const

Definition at line 175 of file CouplingData.cpp.

◆ getDataID()

int precice::cplscheme::CouplingData::getDataID ( )

get ID of this CouplingData's data. See Data::getID().

Definition at line 133 of file CouplingData.cpp.

◆ getDataName()

std::string precice::cplscheme::CouplingData::getDataName ( )

get name of this CouplingData's data. See Data::getName().

Definition at line 138 of file CouplingData.cpp.

◆ getDimensions()

int precice::cplscheme::CouplingData::getDimensions ( ) const

Definition at line 31 of file CouplingData.cpp.

◆ getDirection()

CouplingData::Direction precice::cplscheme::CouplingData::getDirection ( ) const

get direction of this coupling data

Definition at line 148 of file CouplingData.cpp.

◆ getMeshID()

int precice::cplscheme::CouplingData::getMeshID ( )

get ID of this CouplingData's mesh. See Mesh::getID().

Definition at line 128 of file CouplingData.cpp.

◆ getPreviousGradientsAtTime()

Eigen::MatrixXd precice::cplscheme::CouplingData::getPreviousGradientsAtTime ( double relativeDt)

Definition at line 79 of file CouplingData.cpp.

Here is the call graph for this function:

◆ getPreviousIterationSize()

int precice::cplscheme::CouplingData::getPreviousIterationSize ( ) const

returns size of previous iteration

Definition at line 122 of file CouplingData.cpp.

Here is the call graph for this function:

◆ getPreviousValuesAtTime()

Eigen::VectorXd precice::cplscheme::CouplingData::getPreviousValuesAtTime ( double relativeDt)

returns previous data interpolated to the relativeDt time

Definition at line 74 of file CouplingData.cpp.

Here is the call graph for this function:

◆ getSize()

int precice::cplscheme::CouplingData::getSize ( ) const

Definition at line 37 of file CouplingData.cpp.

Here is the call graph for this function:

◆ getVertexOffsets()

std::vector< int > precice::cplscheme::CouplingData::getVertexOffsets ( )

get vertex offsets of this CouplingData's mesh. See Mesh::getVertexOffsets().

Definition at line 143 of file CouplingData.cpp.

◆ gradients() [1/2]

Eigen::MatrixXd & precice::cplscheme::CouplingData::gradients ( )

Returns a reference to the gradient data values.

Definition at line 52 of file CouplingData.cpp.

Here is the call graph for this function:

◆ gradients() [2/2]

const Eigen::MatrixXd & precice::cplscheme::CouplingData::gradients ( ) const

Returns a const reference to the gradient data values.

Definition at line 57 of file CouplingData.cpp.

Here is the call graph for this function:

◆ hasGradient()

bool precice::cplscheme::CouplingData::hasGradient ( ) const

Returns if the data contains gradient data.

Definition at line 91 of file CouplingData.cpp.

◆ meshDimensions()

int precice::cplscheme::CouplingData::meshDimensions ( ) const

Returns the dimensions of the current mesh (2D or 3D)

Definition at line 97 of file CouplingData.cpp.

◆ moveToNextWindow()

void precice::cplscheme::CouplingData::moveToNextWindow ( )

move to next window and initialize data via extrapolation

Definition at line 153 of file CouplingData.cpp.

◆ previousIteration()

const Eigen::VectorXd & precice::cplscheme::CouplingData::previousIteration ( ) const

returns data value from previous iteration

Definition at line 110 of file CouplingData.cpp.

Here is the call graph for this function:

◆ previousIterationGradients()

const Eigen::MatrixXd & precice::cplscheme::CouplingData::previousIterationGradients ( ) const

returns gradient data from previous iteration

Definition at line 116 of file CouplingData.cpp.

Here is the call graph for this function:

◆ sample() [1/2]

time::Sample & precice::cplscheme::CouplingData::sample ( )

Returns a reference to the gradient data Sample.

Definition at line 163 of file CouplingData.cpp.

◆ sample() [2/2]

const time::Sample & precice::cplscheme::CouplingData::sample ( ) const

Returns a const reference to the data Sample.

Definition at line 169 of file CouplingData.cpp.

◆ setSampleAtTime()

void precice::cplscheme::CouplingData::setSampleAtTime ( double time,
time::Sample sample )

Add sample at given time to _timeStepsStorage.

Definition at line 84 of file CouplingData.cpp.

Here is the call graph for this function:

◆ stamples()

auto precice::cplscheme::CouplingData::stamples ( ) const
inline

Returns the stamples in _timeStepsStorage.

Definition at line 59 of file CouplingData.hpp.

Here is the call graph for this function:

◆ storeIteration()

void precice::cplscheme::CouplingData::storeIteration ( )

store _data->values() in read-only variable _previousIteration for convergence checks etc.

Definition at line 102 of file CouplingData.cpp.

Here is the call graph for this function:

◆ timeStepsStorage() [1/2]

time::Storage & precice::cplscheme::CouplingData::timeStepsStorage ( )

Returns a reference to the time step storage of the data.

Definition at line 62 of file CouplingData.cpp.

◆ timeStepsStorage() [2/2]

const time::Storage & precice::cplscheme::CouplingData::timeStepsStorage ( ) const

Returns a const reference to the time step storage of the data.

Definition at line 68 of file CouplingData.cpp.

◆ values() [1/2]

Eigen::VectorXd & precice::cplscheme::CouplingData::values ( )

Returns a reference to the data values.

Definition at line 42 of file CouplingData.cpp.

Here is the call graph for this function:

◆ values() [2/2]

const Eigen::VectorXd & precice::cplscheme::CouplingData::values ( ) const

Returns a const reference to the data values.

Definition at line 47 of file CouplingData.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _data

mesh::PtrData precice::cplscheme::CouplingData::_data
private

Data associated with this CouplingData.

Definition at line 115 of file CouplingData.hpp.

◆ _direction

Direction precice::cplscheme::CouplingData::_direction
private

Definition at line 123 of file CouplingData.hpp.

◆ _exchangeSubsteps

bool precice::cplscheme::CouplingData::_exchangeSubsteps
private

If true, all substeps will be sent / received for this coupling data.

Definition at line 121 of file CouplingData.hpp.

◆ _log

logging::Logger precice::cplscheme::CouplingData::_log {"cplscheme::CouplingData"}
private

Definition at line 109 of file CouplingData.hpp.

◆ _mesh

mesh::PtrMesh precice::cplscheme::CouplingData::_mesh
private

Mesh associated with this CouplingData.

Definition at line 112 of file CouplingData.hpp.

◆ _previousTimeStepsStorage

time::Storage precice::cplscheme::CouplingData::_previousTimeStepsStorage
private

Sample values of previous iteration (end of time window).

Definition at line 118 of file CouplingData.hpp.

◆ requiresInitialization

const bool precice::cplscheme::CouplingData::requiresInitialization

True, if the data values of this CouplingData require to be initialized by this participant.

Definition at line 101 of file CouplingData.hpp.


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