Data/solution encapsulation. More...
#include <encapsulation.hpp>
Public Member Functions | |
virtual | ~Encapsulation () |
virtual void | zero () |
Zeroes out all values of this data structure. More... | |
virtual void | copy (shared_ptr< const Encapsulation< time >> other) |
Copies values from other into this data structure. More... | |
virtual time | norm0 () const |
Computes the \( 0 \)-norm of the data structure's values. More... | |
virtual void | saxpy (time a, shared_ptr< const Encapsulation< time >> x) |
Provides basic mathematical operation \( y+=ax \). More... | |
virtual void | mat_apply (vector< shared_ptr< Encapsulation< time >>> dst, time a, Matrix< time > mat, vector< shared_ptr< Encapsulation< time >>> src, bool zero=true) |
Defines matrix-vector multiplication for this data type. More... | |
virtual void | post (ICommunicator *comm, int tag) |
virtual void | send (ICommunicator *comm, int tag, bool blocking) |
Send values stored in this data structure. More... | |
virtual void | recv (ICommunicator *comm, int tag, bool blocking) |
Receive values to store in this data structure. More... | |
virtual void | broadcast (ICommunicator *comm) |
Broadcasting this data structure to all processes in comm . More... | |
Data/solution encapsulation.
An Encapsulation provides basic functionality of the user data used by PFASST such as mathematical operation axpy \( y=ax+y \) and packing/unpacking for message passing.
time | time precision; defaults to pfasst::time_precision |
Definition at line 41 of file encapsulation.hpp.
|
virtual |
Definition at line 11 of file encapsulation_impl.hpp.
|
virtual |
Broadcasting this data structure to all processes in comm
.
[in] | comm | communicator managing the processes to send this data structure to |
NotImplementedYet | This function is required by PFASST |
Definition at line 112 of file encapsulation_impl.hpp.
References UNUSED.
|
virtual |
Copies values from other
into this data structure.
[in] | other | other data structure to copy data from |
NotImplementedYet | This function is required by Encapsulation |
Reimplemented in pfasst::encap::VectorEncapsulation< scalar, time >.
Definition at line 27 of file encapsulation_impl.hpp.
|
virtual |
Defines matrix-vector multiplication for this data type.
This implements the matrix-vector multiplication of the form \( \vec{y}=a M \vec{x} \). Here, \( a \) is a time point to scale the matrix-vector multiplication with, \( M \) is a matrix and \( x \) another data structure usually of the same type as this one.
If zero
is true
, then dst
is zeroed out before applying the matrix-vector multiplication. Elsewise the result of the matrix-vector multiplication is added onto dst
.
[in,out] | dst | data structure to store the result in |
[in] | a | |
[in] | mat | |
[in] | src | |
[in] | zero |
Reimplemented in pfasst::encap::VectorEncapsulation< scalar, time >.
Definition at line 60 of file encapsulation_impl.hpp.
|
virtual |
Computes the \( 0 \)-norm of the data structure's values.
NotImplementedYet | This function is required by Encapsulation |
Reimplemented in pfasst::examples::boris::ParticleCloud< precision >, and pfasst::encap::VectorEncapsulation< scalar, time >.
Definition at line 36 of file encapsulation_impl.hpp.
|
virtual |
[in] | comm | communicator managing the processes to post ??? to/from ??? |
[in] | tag | tag to distinguish overlapping communication |
Definition at line 83 of file encapsulation_impl.hpp.
References UNUSED.
|
virtual |
Receive values to store in this data structure.
[in] | comm | communicator managing the processes to receive from |
[in] | tag | tag to distinguish overlapping communication |
[in] | blocking | whether to use blocking or non-blocking receive |
NotImplementedYet | This function is required by PFASST |
Definition at line 102 of file encapsulation_impl.hpp.
References UNUSED.
|
virtual |
Provides basic mathematical operation \( y+=ax \).
This is the main mathematical operation applied by PFASST on the data structures. Here, \( a \) is a time point and \( x \) another data structure (usually of the same type) and \( y \) is this data structure.
[in] | a | time point to multiply |
[in] | x | another data structure to scale-add onto this one |
NotImplementedYet | This function is required by Encapsulation |
Reimplemented in pfasst::encap::VectorEncapsulation< scalar, time >.
Definition at line 45 of file encapsulation_impl.hpp.
References UNUSED.
|
virtual |
Send values stored in this data structure.
[in] | comm | communicator managing the processes to send to |
[in] | tag | tag to distinguish overlapping communication |
[in] | blocking | whether to use blocking or non-blocking send |
NotImplementedYet | This function is required by PFASST |
Definition at line 92 of file encapsulation_impl.hpp.
References UNUSED.
|
virtual |
Zeroes out all values of this data structure.
NotImplementedYet | This function is required by Encapsulation |
Reimplemented in pfasst::examples::boris::ParticleCloud< precision >, and pfasst::encap::VectorEncapsulation< scalar, time >.
Definition at line 18 of file encapsulation_impl.hpp.