preCICE v3.1.2
|
#include <CouplingData.hpp>
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::Sample & | sample () |
Returns a reference to the gradient data Sample. | |
const time::Sample & | sample () const |
Returns a const reference to the data Sample. | |
time::Storage & | timeStepsStorage () |
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::Storage & | timeStepsStorage () 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 |
Definition at line 13 of file CouplingData.hpp.
|
strong |
Enumerator | |
---|---|
Send | |
Receive |
Definition at line 15 of file CouplingData.hpp.
precice::cplscheme::CouplingData::CouplingData | ( | mesh::PtrData | data, |
mesh::PtrMesh | mesh, | ||
bool | requiresInitialization, | ||
bool | exchangeSubsteps, | ||
Direction | direction ) |
bool precice::cplscheme::CouplingData::exchangeSubsteps | ( | ) | const |
Definition at line 175 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::getDataID | ( | ) |
get ID of this CouplingData's data. See Data::getID().
Definition at line 133 of file CouplingData.cpp.
std::string precice::cplscheme::CouplingData::getDataName | ( | ) |
get name of this CouplingData's data. See Data::getName().
Definition at line 138 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::getDimensions | ( | ) | const |
Definition at line 31 of file CouplingData.cpp.
CouplingData::Direction precice::cplscheme::CouplingData::getDirection | ( | ) | const |
get direction of this coupling data
Definition at line 148 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::getMeshID | ( | ) |
get ID of this CouplingData's mesh. See Mesh::getID().
Definition at line 128 of file CouplingData.cpp.
Eigen::MatrixXd precice::cplscheme::CouplingData::getPreviousGradientsAtTime | ( | double | relativeDt | ) |
int precice::cplscheme::CouplingData::getPreviousIterationSize | ( | ) | const |
returns size of previous iteration
Definition at line 122 of file CouplingData.cpp.
Eigen::VectorXd precice::cplscheme::CouplingData::getPreviousValuesAtTime | ( | double | relativeDt | ) |
returns previous data interpolated to the relativeDt time
Definition at line 74 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::getSize | ( | ) | const |
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.
Eigen::MatrixXd & precice::cplscheme::CouplingData::gradients | ( | ) |
Returns a reference to the gradient data values.
Definition at line 52 of file CouplingData.cpp.
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.
bool precice::cplscheme::CouplingData::hasGradient | ( | ) | const |
Returns if the data contains gradient data.
Definition at line 91 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::meshDimensions | ( | ) | const |
Returns the dimensions of the current mesh (2D or 3D)
Definition at line 97 of file CouplingData.cpp.
void precice::cplscheme::CouplingData::moveToNextWindow | ( | ) |
move to next window and initialize data via extrapolation
Definition at line 153 of file CouplingData.cpp.
const Eigen::VectorXd & precice::cplscheme::CouplingData::previousIteration | ( | ) | const |
returns data value from previous iteration
Definition at line 110 of file CouplingData.cpp.
const Eigen::MatrixXd & precice::cplscheme::CouplingData::previousIterationGradients | ( | ) | const |
returns gradient data from previous iteration
Definition at line 116 of file CouplingData.cpp.
time::Sample & precice::cplscheme::CouplingData::sample | ( | ) |
Returns a reference to the gradient data Sample.
Definition at line 163 of file CouplingData.cpp.
const time::Sample & precice::cplscheme::CouplingData::sample | ( | ) | const |
Returns a const reference to the data Sample.
Definition at line 169 of file CouplingData.cpp.
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.
|
inline |
Returns the stamples in _timeStepsStorage.
Definition at line 59 of file CouplingData.hpp.
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.
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.
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.
Eigen::VectorXd & precice::cplscheme::CouplingData::values | ( | ) |
Returns a reference to the data values.
Definition at line 42 of file CouplingData.cpp.
const Eigen::VectorXd & precice::cplscheme::CouplingData::values | ( | ) | const |
Returns a const reference to the data values.
Definition at line 47 of file CouplingData.cpp.
|
private |
Data associated with this CouplingData.
Definition at line 115 of file CouplingData.hpp.
|
private |
Definition at line 123 of file CouplingData.hpp.
|
private |
If true, all substeps will be sent / received for this coupling data.
Definition at line 121 of file CouplingData.hpp.
|
private |
Definition at line 109 of file CouplingData.hpp.
|
private |
Mesh associated with this CouplingData.
Definition at line 112 of file CouplingData.hpp.
|
private |
Sample values of previous iteration (end of time window).
Definition at line 118 of file CouplingData.hpp.
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.