PFASST++
pfasst::encap::VectorEncapsulation< scalar, time > Class Template Reference

#include <vector.hpp>

+ Inheritance diagram for pfasst::encap::VectorEncapsulation< scalar, time >:
+ Collaboration diagram for pfasst::encap::VectorEncapsulation< scalar, time >:

Public Member Functions

 VectorEncapsulation (const size_t size)
 
 VectorEncapsulation (const VectorEncapsulation< scalar, time > &other)
 Copy constuctor. More...
 
 VectorEncapsulation (const Encapsulation< time > &other)
 
 VectorEncapsulation (VectorEncapsulation< scalar, time > &&other)
 Move constructor. More...
 
 VectorEncapsulation (Encapsulation< time > &&other)
 
virtual ~VectorEncapsulation ()
 
virtual void zero () override
 Zeroes out all values of this data structure. More...
 
virtual void copy (shared_ptr< const Encapsulation< time >> x) override
 Copies values from other into this data structure. More...
 
virtual void copy (shared_ptr< const VectorEncapsulation< scalar, time >> x)
 
virtual void saxpy (time a, shared_ptr< const Encapsulation< time >> x) override
 Provides basic mathematical operation \( y+=ax \). More...
 
virtual void saxpy (time a, shared_ptr< const VectorEncapsulation< scalar, time >> x)
 
virtual void mat_apply (vector< shared_ptr< Encapsulation< time >>> dst, time a, Matrix< time > mat, vector< shared_ptr< Encapsulation< time >>> src, bool zero=true) override
 
virtual void mat_apply (vector< shared_ptr< VectorEncapsulation< scalar, time >>> dst, time a, Matrix< time > mat, vector< shared_ptr< VectorEncapsulation< scalar, time >>> src, bool zero=true)
 
virtual time norm0 () const override
 Maximum norm of contained elements. More...
 
- Public Member Functions inherited from pfasst::encap::Encapsulation< time >
virtual ~Encapsulation ()
 
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...
 

Detailed Description

template<typename scalar, typename time = time_precision>
class pfasst::encap::VectorEncapsulation< scalar, time >

Template Parameters
scalarprecision and numerical type of the data values
timeprecision of the time points; defaults to pfasst::time_precision

Definition at line 27 of file vector.hpp.

Constructor & Destructor Documentation

template<typename scalar , typename time >
pfasst::encap::VectorEncapsulation< scalar, time >::VectorEncapsulation ( const size_t  size)

Definition at line 11 of file vector_impl.hpp.

References pfasst::encap::VectorEncapsulation< scalar, time >::zero().

+ Here is the call graph for this function:

template<typename scalar , typename time >
pfasst::encap::VectorEncapsulation< scalar, time >::VectorEncapsulation ( const VectorEncapsulation< scalar, time > &  other)

Copy constuctor.

Note
delegated to sdt::vector<scalar>

Definition at line 18 of file vector_impl.hpp.

template<typename scalar , typename time >
pfasst::encap::VectorEncapsulation< scalar, time >::VectorEncapsulation ( const Encapsulation< time > &  other)
Exceptions
std::bad_castif other can not be transformed into pfasst::encap::VectorEncapsulation via dynamic_cast

Definition at line 23 of file vector_impl.hpp.

template<typename scalar , typename time >
pfasst::encap::VectorEncapsulation< scalar, time >::VectorEncapsulation ( VectorEncapsulation< scalar, time > &&  other)

Move constructor.

Note
delegated to std::vector<scalar>

Definition at line 28 of file vector_impl.hpp.

template<typename scalar , typename time >
pfasst::encap::VectorEncapsulation< scalar, time >::VectorEncapsulation ( Encapsulation< time > &&  other)
Exceptions
std::bad_castif other can not be transformed into pfasst::encap::VectorEncapsulation via dynamic_cast

Definition at line 33 of file vector_impl.hpp.

template<typename scalar , typename time >
pfasst::encap::VectorEncapsulation< scalar, time >::~VectorEncapsulation ( )
virtual

Definition at line 38 of file vector_impl.hpp.

References pfasst::mpi::check_mpi_error(), ML_CLOG, and MPI_Status_factory().

+ Here is the call graph for this function:

Member Function Documentation

template<typename scalar , typename time >
void pfasst::encap::VectorEncapsulation< scalar, time >::copy ( shared_ptr< const Encapsulation< time >>  other)
overridevirtual

Copies values from other into this data structure.

Parameters
[in]otherother data structure to copy data from
Exceptions
NotImplementedYetThis function is required by Encapsulation

Reimplemented from pfasst::encap::Encapsulation< time >.

Definition at line 60 of file vector_impl.hpp.

template<typename scalar , typename time >
void pfasst::encap::VectorEncapsulation< scalar, time >::copy ( shared_ptr< const VectorEncapsulation< scalar, time >>  x)
virtual

Definition at line 69 of file vector_impl.hpp.

template<typename scalar , typename time >
void pfasst::encap::VectorEncapsulation< scalar, time >::mat_apply ( vector< shared_ptr< Encapsulation< time >>>  dst,
time  a,
Matrix< time >  mat,
vector< shared_ptr< Encapsulation< time >>>  src,
bool  zero = true 
)
overridevirtual
Note
In case any of the elements of dst or src can not be transformed via dynamic_cast into pfasst::encap::VectorEncapsulation std::abort is called.

Reimplemented from pfasst::encap::Encapsulation< time >.

Definition at line 94 of file vector_impl.hpp.

template<typename scalar , typename time >
void pfasst::encap::VectorEncapsulation< scalar, time >::mat_apply ( vector< shared_ptr< VectorEncapsulation< scalar, time >>>  dst,
time  a,
Matrix< time >  mat,
vector< shared_ptr< VectorEncapsulation< scalar, time >>>  src,
bool  zero = true 
)
virtual

Definition at line 117 of file vector_impl.hpp.

template<typename scalar , typename time >
time pfasst::encap::VectorEncapsulation< scalar, time >::norm0 ( ) const
overridevirtual

Maximum norm of contained elements.

This uses std::max with custom comparison function.

Reimplemented from pfasst::encap::Encapsulation< time >.

Definition at line 140 of file vector_impl.hpp.

template<typename scalar , typename time >
void pfasst::encap::VectorEncapsulation< scalar, time >::saxpy ( time  a,
shared_ptr< const Encapsulation< time >>  x 
)
overridevirtual

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.

Parameters
[in]atime point to multiply
[in]xanother data structure to scale-add onto this one
Exceptions
NotImplementedYetThis function is required by Encapsulation

Reimplemented from pfasst::encap::Encapsulation< time >.

Definition at line 75 of file vector_impl.hpp.

template<typename scalar , typename time >
void pfasst::encap::VectorEncapsulation< scalar, time >::saxpy ( time  a,
shared_ptr< const VectorEncapsulation< scalar, time >>  x 
)
virtual

Definition at line 85 of file vector_impl.hpp.

References plot::data.

template<typename scalar , typename time >
void pfasst::encap::VectorEncapsulation< scalar, time >::zero ( )
overridevirtual

Zeroes out all values of this data structure.

Exceptions
NotImplementedYetThis function is required by Encapsulation

Reimplemented from pfasst::encap::Encapsulation< time >.

Definition at line 54 of file vector_impl.hpp.

Referenced by pfasst::encap::VectorEncapsulation< scalar, time >::VectorEncapsulation().

+ Here is the caller graph for this function:


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