preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
precice::time::Sample Struct Reference

#include <Sample.hpp>

Public Member Functions

 Sample (int dims) noexcept
 Constructs an empty Sample of a given data dimensionality.
 
 Sample (int dims, int dataCount)
 Constructs a Sample of given data dimensionality and size without gradients.
 
 Sample (int dims, Eigen::VectorXd inValues)
 Constructs a Sample of given data dimensionality and data values.
 
 Sample (int dims, Eigen::VectorXd inValues, Eigen::MatrixXd inGradients)
 Constructs a Sample of given data dimensionality, data values, and data gradients.
 
 Sample (const Sample &)=default
 
 Sample (Sample &&)=default
 
Sampleoperator= (const Sample &)=default
 
Sampleoperator= (Sample &&)=default
 
SamplesetZero ()
 Sets values and gradients to zero.
 

Public Attributes

int dataDims
 The dimensionality of the data.
 
Eigen::VectorXd values
 
Eigen::MatrixXd gradients
 The gradients of the data. Use gradients.col(i) to get the gradient at vertex i.
 

Detailed Description

Sample of a mesh::Data on a mesh::Mesh

A Sample encapsulates user-provided data of a mesh including values and gradients. It is also aware of the dimensionality of the data, which is important for empty meshes.

Definition at line 13 of file Sample.hpp.

Constructor & Destructor Documentation

◆ Sample() [1/6]

precice::time::Sample::Sample ( int dims)
inlineexplicitnoexcept

Constructs an empty Sample of a given data dimensionality.

Definition at line 15 of file Sample.hpp.

◆ Sample() [2/6]

precice::time::Sample::Sample ( int dims,
int dataCount )
inline

Constructs a Sample of given data dimensionality and size without gradients.

Definition at line 19 of file Sample.hpp.

◆ Sample() [3/6]

precice::time::Sample::Sample ( int dims,
Eigen::VectorXd inValues )
inline

Constructs a Sample of given data dimensionality and data values.

Definition at line 23 of file Sample.hpp.

◆ Sample() [4/6]

precice::time::Sample::Sample ( int dims,
Eigen::VectorXd inValues,
Eigen::MatrixXd inGradients )
inline

Constructs a Sample of given data dimensionality, data values, and data gradients.

Definition at line 27 of file Sample.hpp.

◆ Sample() [5/6]

precice::time::Sample::Sample ( const Sample & )
default

◆ Sample() [6/6]

precice::time::Sample::Sample ( Sample && )
default

Member Function Documentation

◆ operator=() [1/2]

Sample & precice::time::Sample::operator= ( const Sample & )
default

◆ operator=() [2/2]

Sample & precice::time::Sample::operator= ( Sample && )
default

◆ setZero()

Sample & precice::time::Sample::setZero ( )
inline

Sets values and gradients to zero.

Definition at line 37 of file Sample.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ dataDims

int precice::time::Sample::dataDims

The dimensionality of the data.

Definition at line 45 of file Sample.hpp.

◆ gradients

Eigen::MatrixXd precice::time::Sample::gradients

The gradients of the data. Use gradients.col(i) to get the gradient at vertex i.

Definition at line 52 of file Sample.hpp.

◆ values

Eigen::VectorXd precice::time::Sample::values

The data values linearised

Todo
Change to matrix so that values.col(i) gets the value at vertex i

Definition at line 49 of file Sample.hpp.


The documentation for this struct was generated from the following file: