preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
precice::com::serialize::SerializedStamples Class Reference

serialized representation of CouplingData More...

#include <SerializedStamples.hpp>

Public Member Functions

void deserializeInto (const Eigen::VectorXd &timeStamps, const cplscheme::PtrCouplingData data)
 Deserialize data from this SerializedStamples into provided CouplingData.
 
const Eigen::VectorXd & values () const
 const reference to serialized values. Used for sending serialized values.
 
Eigen::VectorXd & values ()
 Reference to serialized gradients. Used for storing received serialized values into.
 
const Eigen::VectorXd & gradients () const
 const reference to serialized gradients. Used for sending serialized gradients.
 
Eigen::VectorXd & gradients ()
 Reference to serialized gradients. Used for storing received serialized values into.
 
int nTimeSteps () const
 Returns number of timeSteps.
 

Static Public Member Functions

static SerializedStamples serialize (const cplscheme::PtrCouplingData data)
 Serializes a given CouplingData into SerializedStamples.
 
static SerializedStamples empty (Eigen::VectorXd timeStamps, const cplscheme::PtrCouplingData data)
 Create SerializedStamples with allocated buffers according to size of CouplingData.
 

Private Member Functions

 SerializedStamples ()=default
 
void allocate (const cplscheme::PtrCouplingData data)
 
void serializeValues (const cplscheme::PtrCouplingData data)
 Serialize values from timeStepsStorage of data into _values.
 
void serializeGradients (const cplscheme::PtrCouplingData data)
 Serialize gradients from timeStepsStorage of data into _gradients.
 
void deserialize (const Eigen::VectorXd timeStamps, cplscheme::PtrCouplingData data) const
 Deserialize _values and (if required by data) _gradients into timeStepsStorage of data. Use provided timeStamps.
 

Private Attributes

Eigen::VectorXd _values
 Buffer for serialized values of stamples.
 
Eigen::VectorXd _gradients
 Buffer for serialized gradients of stamples.
 
int _timeSteps = 0
 number of timesteps stored in SerializedStamples
 

Detailed Description

serialized representation of CouplingData

Definition at line 14 of file SerializedStamples.hpp.

Constructor & Destructor Documentation

◆ SerializedStamples()

precice::com::serialize::SerializedStamples::SerializedStamples ( )
privatedefault

Member Function Documentation

◆ allocate()

void precice::com::serialize::SerializedStamples::allocate ( const cplscheme::PtrCouplingData data)
private

Definition at line 38 of file SerializedStamples.cpp.

◆ deserialize()

void precice::com::serialize::SerializedStamples::deserialize ( const Eigen::VectorXd timeStamps,
cplscheme::PtrCouplingData data ) const
private

Deserialize _values and (if required by data) _gradients into timeStepsStorage of data. Use provided timeStamps.

Parameters
timeStamps
data

Definition at line 74 of file SerializedStamples.cpp.

◆ deserializeInto()

void precice::com::serialize::SerializedStamples::deserializeInto ( const Eigen::VectorXd & timeStamps,
const cplscheme::PtrCouplingData data )

Deserialize data from this SerializedStamples into provided CouplingData.

Parameters
timeStampsCorresponding time stamps for deserialized data
datapointer to CouplingData the SerializedStampes will be deserialized into

Definition at line 31 of file SerializedStamples.cpp.

Here is the call graph for this function:

◆ empty()

SerializedStamples precice::com::serialize::SerializedStamples::empty ( Eigen::VectorXd timeStamps,
const cplscheme::PtrCouplingData data )
static

Create SerializedStamples with allocated buffers according to size of CouplingData.

Parameters
timeStampsCorresponding time stamps that will be stored in SerializedSamples
datapointer to CouplingData defining size of buffer and whether gradient data exists
Returns
SerializedStamples has allocated data buffers for serialized data

Definition at line 20 of file SerializedStamples.cpp.

Here is the call graph for this function:

◆ gradients() [1/2]

Eigen::VectorXd & precice::com::serialize::SerializedStamples::gradients ( )

Reference to serialized gradients. Used for storing received serialized values into.

Returns
const Eigen::VectorXd&

Definition at line 119 of file SerializedStamples.cpp.

◆ gradients() [2/2]

const Eigen::VectorXd & precice::com::serialize::SerializedStamples::gradients ( ) const

const reference to serialized gradients. Used for sending serialized gradients.

Returns
const Eigen::VectorXd&

Definition at line 114 of file SerializedStamples.cpp.

◆ nTimeSteps()

int precice::com::serialize::SerializedStamples::nTimeSteps ( ) const

Returns number of timeSteps.

Returns
int number of time steps

Definition at line 124 of file SerializedStamples.cpp.

◆ serialize()

SerializedStamples precice::com::serialize::SerializedStamples::serialize ( const cplscheme::PtrCouplingData data)
static

Serializes a given CouplingData into SerializedStamples.

Parameters
datapointer to CouplingData to be serialized
Returns
SerializedStamples contains the serialized data

Definition at line 7 of file SerializedStamples.cpp.

Here is the call graph for this function:

◆ serializeGradients()

void precice::com::serialize::SerializedStamples::serializeGradients ( const cplscheme::PtrCouplingData data)
private

Serialize gradients from timeStepsStorage of data into _gradients.

Parameters
datathe data that is serialized

Definition at line 60 of file SerializedStamples.cpp.

◆ serializeValues()

void precice::com::serialize::SerializedStamples::serializeValues ( const cplscheme::PtrCouplingData data)
private

Serialize values from timeStepsStorage of data into _values.

Parameters
datathe data that is serialized

Definition at line 47 of file SerializedStamples.cpp.

◆ values() [1/2]

Eigen::VectorXd & precice::com::serialize::SerializedStamples::values ( )

Reference to serialized gradients. Used for storing received serialized values into.

Returns
const Eigen::VectorXd&

Definition at line 109 of file SerializedStamples.cpp.

◆ values() [2/2]

const Eigen::VectorXd & precice::com::serialize::SerializedStamples::values ( ) const

const reference to serialized values. Used for sending serialized values.

Returns
const Eigen::VectorXd&

Definition at line 104 of file SerializedStamples.cpp.

Member Data Documentation

◆ _gradients

Eigen::VectorXd precice::com::serialize::SerializedStamples::_gradients
private

Buffer for serialized gradients of stamples.

Definition at line 108 of file SerializedStamples.hpp.

◆ _timeSteps

int precice::com::serialize::SerializedStamples::_timeSteps = 0
private

number of timesteps stored in SerializedStamples

Definition at line 111 of file SerializedStamples.hpp.

◆ _values

Eigen::VectorXd precice::com::serialize::SerializedStamples::_values
private

Buffer for serialized values of stamples.

Definition at line 105 of file SerializedStamples.hpp.


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