Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

MODEL::NormFunction Class Template Reference

#include <normfunction.h>

Inheritance diagram for MODEL::NormFunction:

Inheritance graph
Collaboration diagram for MODEL::NormFunction:

Collaboration graph
List of all members.

Public Types

typedef ScalarFunction<dims,
typedef NT::vf vf

Public Methods

 NormFunction (vf &vfu, bool own=false, numT scale=1.0)
 NormFunction (const NormFunction &vfu)
const NormFunction& operator= (const NormFunction &vfu)
virtual ~NormFunction ()
virtual NormFunction* clone (void) const
virtual const numT& function (numT &fu, const vect &u)
const vect& function_value (void)

Private Attributes

bool owned
vf* func
vect values
numT sc

Detailed Description

template<integer dims, class NT = NumericTraits<number,dims>> class MODEL::NormFunction

Takes a vectorfunction and returns its norm instead

Definition at line 29 of file normfunction.h.

Constructor & Destructor Documentation

NormFunction ( vf & vfu,
bool own = false,
numT scale = 1.0 ) [inline]

Contructor which takes a copy

own   tells the const. if it is OK to take a copy
scale   scales the norm (handy in some cases)

Definition at line 38 of file normfunction.h.

Referenced by clone().

NormFunction ( const NormFunction<dims, NT> & vfu ) [inline]

Copy constructor. Design decision: a copy off a Normfunction is NEVER owned (which is sort of logical, as we cannot access the original anymore anyway - no accessor for the moment)

Definition at line 44 of file normfunction.h.

Member Function Documentation

NormFunction * clone ( void ) const [inline, virtual]

Virtual Copy Constructor

Reimplemented from MODEL::ScalarFunction.

Definition at line 64 of file normfunction.h.

const numT & function ( numT & fu,
const vect & u ) [inline, virtual]

Implement this function to create the return vector. fu is a reference to where the values should be stored. This is for efficiency in internal routines. Inherited classes should return fu too.

Reimplemented from MODEL::ScalarFunction.

Definition at line 72 of file normfunction.h.

const vect & function_value ( void ) [inline]

Return the value of the function during the last call

Definition at line 77 of file normfunction.h.

const NormFunction & operator= ( const NormFunction<dims, NT> & vfu ) [inline]

Assignment operator. Actually not sure if this is useful. Same strategy applies as for copy constructor

Definition at line 50 of file normfunction.h.

Member Data Documentation

vect values [private]

Keeps the result of the last function call, so we do not have to call the function twice to get the values and the norm

Definition at line 85 of file normfunction.h.

The documentation for this class was generated from the following file:
To get the sources or tarballs, please go to SourceForge or you can use the CVS repository.

More Info? Michael Peeters. Also, check our research website:

Last update: June 2002.

Looking for Open Source? Check out SourceForge Logo !