preCICE v3.2.0
|
#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 |
int | nVertices () const |
const Eigen::VectorXd & | values () const |
Returns a const reference to the data values. | |
const Eigen::MatrixXd & | gradients () const |
Returns a const reference to the gradient data values. | |
int | gradientsRows () const |
Returns number of rows of the stored gradients. | |
int | gradientsCols () const |
Returns number of columns of the stored gradients. | |
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. | |
time::SampleResult | 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. | |
void | setGlobalSample (const time::Sample &sample) |
Set _data::_sample. | |
void | initializeWithZeroAtTime (double time) |
Add sample with zero values at given time to _timeStepsStorage. | |
void | emplaceSampleAtTime (double time) |
Creates an empty sample at given time. | |
void | emplaceSampleAtTime (double time, std::initializer_list< double > values) |
Creates a sample at given time with given values. | |
void | emplaceSampleAtTime (double time, std::initializer_list< double > values, std::initializer_list< double > gradients) |
Creates a sample at given time with given values and gradients. | |
bool | hasGradient () const |
Returns if the data contains gradient data. | |
int | meshDimensions () const |
Returns the dimensions of the current mesh (2D or 3D) | |
void | reinitialize () |
Reshape the past iterations and initial sample during remeshing. | |
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 () const |
get name of this CouplingData's data. See Data::getName(). | |
std::string | getMeshName () const |
get name of this CouplingData's mesh. See Mesh::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 12 of file CouplingData.hpp.
|
strong |
Enumerator | |
---|---|
Send | |
Receive |
Definition at line 14 of file CouplingData.hpp.
precice::cplscheme::CouplingData::CouplingData | ( | mesh::PtrData | data, |
mesh::PtrMesh | mesh, | ||
bool | requiresInitialization, | ||
bool | exchangeSubsteps, | ||
Direction | direction ) |
void precice::cplscheme::CouplingData::emplaceSampleAtTime | ( | double | time | ) |
Creates an empty sample at given time.
Definition at line 124 of file CouplingData.cpp.
void precice::cplscheme::CouplingData::emplaceSampleAtTime | ( | double | time, |
std::initializer_list< double > | values ) |
Creates a sample at given time with given values.
Definition at line 129 of file CouplingData.cpp.
void precice::cplscheme::CouplingData::emplaceSampleAtTime | ( | double | time, |
std::initializer_list< double > | values, | ||
std::initializer_list< double > | gradients ) |
Creates a sample at given time with given values and gradients.
Definition at line 134 of file CouplingData.cpp.
bool precice::cplscheme::CouplingData::exchangeSubsteps | ( | ) | const |
Definition at line 230 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::getDataID | ( | ) |
get ID of this CouplingData's data. See Data::getID().
Definition at line 195 of file CouplingData.cpp.
std::string precice::cplscheme::CouplingData::getDataName | ( | ) | const |
get name of this CouplingData's data. See Data::getName().
Definition at line 200 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 215 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::getMeshID | ( | ) |
get ID of this CouplingData's mesh. See Mesh::getID().
Definition at line 190 of file CouplingData.cpp.
std::string precice::cplscheme::CouplingData::getMeshName | ( | ) | const |
get name of this CouplingData's mesh. See Mesh::getName().
Definition at line 205 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 184 of file CouplingData.cpp.
time::SampleResult precice::cplscheme::CouplingData::getPreviousValuesAtTime | ( | double | relativeDt | ) |
returns previous data interpolated to the relativeDt time
Definition at line 89 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 210 of file CouplingData.cpp.
const Eigen::MatrixXd & precice::cplscheme::CouplingData::gradients | ( | ) | const |
Returns a const reference to the gradient data values.
Definition at line 52 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::gradientsCols | ( | ) | const |
Returns number of columns of the stored gradients.
Definition at line 64 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::gradientsRows | ( | ) | const |
Returns number of rows of the stored gradients.
Definition at line 57 of file CouplingData.cpp.
bool precice::cplscheme::CouplingData::hasGradient | ( | ) | const |
Returns if the data contains gradient data.
Definition at line 139 of file CouplingData.cpp.
void precice::cplscheme::CouplingData::initializeWithZeroAtTime | ( | double | time | ) |
Add sample with zero values at given time to _timeStepsStorage.
Definition at line 111 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::meshDimensions | ( | ) | const |
Returns the dimensions of the current mesh (2D or 3D)
Definition at line 145 of file CouplingData.cpp.
void precice::cplscheme::CouplingData::moveToNextWindow | ( | ) |
move to next window and initialize data via extrapolation
Definition at line 220 of file CouplingData.cpp.
int precice::cplscheme::CouplingData::nVertices | ( | ) | const |
Definition at line 42 of file CouplingData.cpp.
const Eigen::VectorXd & precice::cplscheme::CouplingData::previousIteration | ( | ) | const |
returns data value from previous iteration
Definition at line 172 of file CouplingData.cpp.
const Eigen::MatrixXd & precice::cplscheme::CouplingData::previousIterationGradients | ( | ) | const |
returns gradient data from previous iteration
Definition at line 178 of file CouplingData.cpp.
void precice::cplscheme::CouplingData::reinitialize | ( | ) |
Reshape the past iterations and initial sample during remeshing.
Definition at line 150 of file CouplingData.cpp.
const time::Sample & precice::cplscheme::CouplingData::sample | ( | ) | const |
Returns a const reference to the data Sample.
Definition at line 71 of file CouplingData.cpp.
void precice::cplscheme::CouplingData::setGlobalSample | ( | const time::Sample & | sample | ) |
Set _data::_sample.
Definition at line 105 of file CouplingData.cpp.
void precice::cplscheme::CouplingData::setSampleAtTime | ( | double | time, |
time::Sample | sample ) |
Add sample at given time to _timeStepsStorage.
Definition at line 99 of file CouplingData.cpp.
|
inline |
Returns the stamples in _timeStepsStorage.
Definition at line 57 of file CouplingData.hpp.
void precice::cplscheme::CouplingData::storeIteration | ( | ) |
store _data->values() in read-only variable _previousIteration for convergence checks etc.
Definition at line 165 of file CouplingData.cpp.
time::Storage & precice::cplscheme::CouplingData::timeStepsStorage | ( | ) |
Returns a reference to the time step storage of the data.
Definition at line 77 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 83 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 134 of file CouplingData.hpp.
|
private |
Definition at line 142 of file CouplingData.hpp.
|
private |
If true, all substeps will be sent / received for this coupling data.
Definition at line 140 of file CouplingData.hpp.
|
private |
Definition at line 128 of file CouplingData.hpp.
|
private |
Mesh associated with this CouplingData.
Definition at line 131 of file CouplingData.hpp.
|
private |
Sample values of previous iteration (end of time window).
Definition at line 137 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 120 of file CouplingData.hpp.