queso-0.53.0
Protected Attributes | List of all members
QUESO::ConstantVectorFunction< P_V, P_M, Q_V, Q_M > Class Template Reference

A class for handling vector functions which image is constant. More...

#include <ConstantVectorFunction.h>

Inheritance diagram for QUESO::ConstantVectorFunction< P_V, P_M, Q_V, Q_M >:
Inheritance graph
[legend]
Collaboration diagram for QUESO::ConstantVectorFunction< P_V, P_M, Q_V, Q_M >:
Collaboration graph
[legend]

Public Member Functions

Constructor/Destructor methods
 ConstantVectorFunction (const char *prefix, const VectorSet< P_V, P_M > &domainSet, const VectorSet< Q_V, Q_M > &imageSet, const Q_V &constantImageVector)
 Default Constructor. More...
 
virtual ~ConstantVectorFunction ()
 Destructor. More...
 
Mathematical method
void compute (const P_V &domainVector, const P_V *domainDirection, Q_V &imageVector, DistArray< P_V * > *gradVectors, DistArray< P_M * > *hessianMatrices, DistArray< P_V * > *hessianEffects) const
 Calculates the image vector: assigns to the protected attribute m_constantImageVector the value of the constant vector imageVector. More...
 
- Public Member Functions inherited from QUESO::BaseVectorFunction< P_V, P_M, Q_V, Q_M >
 BaseVectorFunction (const char *prefix, const VectorSet< P_V, P_M > &domainSet, const VectorSet< Q_V, Q_M > &imageSet)
 Default Constructor. More...
 
virtual ~BaseVectorFunction ()
 Destructor. More...
 
const VectorSet< P_V, P_M > & domainSet () const
 Access to the protected attribute m_domainSet: domain set of the vector function. It is an instance of the class VectorSet. More...
 
const VectorSet< Q_V, Q_M > & imageSet () const
 Access to the protected attribute m_imageSet: image set of the vector function/ It is an instance of the class VectorSet. More...
 

Protected Attributes

const Q_V * m_constantImageVector
 
- Protected Attributes inherited from QUESO::BaseVectorFunction< P_V, P_M, Q_V, Q_M >
const BaseEnvironmentm_env
 
std::string m_prefix
 
const VectorSet< P_V, P_M > & m_domainSet
 Domain set of the vector function. More...
 
const VectorSet< Q_V, Q_M > & m_imageSet
 Image set of the vector function. More...
 

Detailed Description

template<class P_V = GslVector, class P_M = GslMatrix, class Q_V = GslVector, class Q_M = GslMatrix>
class QUESO::ConstantVectorFunction< P_V, P_M, Q_V, Q_M >

A class for handling vector functions which image is constant.

This class allows the mathematical definition of a vector-valued function which image set is constant vector.

Definition at line 49 of file ConstantVectorFunction.h.

Constructor & Destructor Documentation

template<class P_V , class P_M , class Q_V , class Q_M >
QUESO::ConstantVectorFunction< P_V, P_M, Q_V, Q_M >::ConstantVectorFunction ( const char *  prefix,
const VectorSet< P_V, P_M > &  domainSet,
const VectorSet< Q_V, Q_M > &  imageSet,
const Q_V &  constantImageVector 
)

Default Constructor.

Instantiates an object of the class, i.e. a vector function, given a prefix, its domain and constant image.

Definition at line 33 of file ConstantVectorFunction.C.

References QUESO::ConstantVectorFunction< P_V, P_M, Q_V, Q_M >::m_constantImageVector.

38  :
39  BaseVectorFunction<P_V,P_M,Q_V,Q_M>(((std::string)(prefix)+"gen").c_str(),
40  domainSet,
41  imageSet),
43 {
44  m_constantImageVector = new Q_V(constantImageVector);
45 }
const VectorSet< Q_V, Q_M > & imageSet() const
Access to the protected attribute m_imageSet: image set of the vector function/ It is an instance of ...
const VectorSet< P_V, P_M > & domainSet() const
Access to the protected attribute m_domainSet: domain set of the vector function. It is an instance o...
template<class P_V , class P_M , class Q_V , class Q_M >
QUESO::ConstantVectorFunction< P_V, P_M, Q_V, Q_M >::~ConstantVectorFunction ( )
virtual

Destructor.

Definition at line 49 of file ConstantVectorFunction.C.

50 {
51  delete m_constantImageVector;
52 }

Member Function Documentation

template<class P_V , class P_M , class Q_V , class Q_M >
void QUESO::ConstantVectorFunction< P_V, P_M, Q_V, Q_M >::compute ( const P_V &  domainVector,
const P_V *  domainDirection,
Q_V &  imageVector,
DistArray< P_V * > *  gradVectors,
DistArray< P_M * > *  hessianMatrices,
DistArray< P_V * > *  hessianEffects 
) const
virtual

Calculates the image vector: assigns to the protected attribute m_constantImageVector the value of the constant vector imageVector.

Implements QUESO::BaseVectorFunction< P_V, P_M, Q_V, Q_M >.

Definition at line 57 of file ConstantVectorFunction.C.

References queso_require_msg.

64 {
65  queso_require_msg(m_constantImageVector, "m_constantImageVector is NULL");
66 
67  imageVector = *m_constantImageVector;
68 
69  return;
70 }
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69

Member Data Documentation

template<class P_V = GslVector, class P_M = GslMatrix, class Q_V = GslVector, class Q_M = GslMatrix>
const Q_V* QUESO::ConstantVectorFunction< P_V, P_M, Q_V, Q_M >::m_constantImageVector
protected

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

Generated on Thu Jun 11 2015 13:52:33 for queso-0.53.0 by  doxygen 1.8.5