Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Public Member Functions | Protected Attributes
hp1D::ArrayElementFormula< F > Class Template Reference

Array of formula values on quadrature points. More...

#include <formula.hh>

Inheritance diagram for hp1D::ArrayElementFormula< F >:
Inheritance graph
[legend]
Collaboration diagram for hp1D::ArrayElementFormula< F >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Array< F > & apply (F &fnc(F &))
 Application operator to each component, e.g.
template<class H >
Array< F > & apply (const Array< H > &a, F fnc(const H &))
 Application operator to each component.
template<class H >
Array< F > & apply (const Array< H > &a, F fnc(const H &, const F &))
 Application operator to each component.
 ArrayElementFormula ()
 Constructor.
 ArrayElementFormula (const Element< Real > &elm, const concepts::ElementFormulaContainer< F > frm)
 Constructor with calling of compute.
void compute (const Element< Real > &elm, const concepts::ElementFormulaContainer< F > frm)
 Evaluates the formula frm on all quadrature points of element elm.
uint cursize () const
 Returns the size of the allocated memory.
std::ostream & info (std::ostream &os) const
int memory () const
 Returns the memory usage in bytes.
 operator const F * () const
 Returns a pointer to the array.
 operator F * ()
 Returns a pointer to the array.
template<class G >
Array< F > & operator*= (const G n)
 Scaling operator.
template<class H >
Array< F > & operator*= (const Array< H > &a)
 Multiplication operator.
Array< F > & operator+= (const F n)
 Addition operator.
template<class H >
Array< F > & operator+= (const Array< H > &a)
 Addition operator.
Array< F > operator- () const
 Negation operator.
Array< F > & operator-= (const F n)
 Subtraction operator.
template<class H >
Array< F > & operator-= (const Array< H > &a)
 Subtraction operator.
const F & operator[] (const int i) const
 Index operator.
F & operator[] (const int i)
 Index operator.
void resize (const uint sz)
 Resizes the array.
void resizePreserve (const uint sz)
 Resizes the array.
Array< F > & reverse ()
 Reverse the order of the entries.
uint size () const
 Returns the requested size of the array.
void zeros ()
 Fills the memory with zeros.

Protected Attributes

F * data_
 Data.
uint n_
 Requested size of the array.
uint size_
 Current real size of the array.

Detailed Description

template<class F = Real>
class hp1D::ArrayElementFormula< F >

Array of formula values on quadrature points.

Definition at line 58 of file formula.hh.


Constructor & Destructor Documentation

template<class F >
hp1D::ArrayElementFormula< F >::ArrayElementFormula ( )

Constructor.

The array is empty at the beginning.

Definition at line 76 of file formula.hh.

template<class F >
hp1D::ArrayElementFormula< F >::ArrayElementFormula ( const Element< Real > &  elm,
const concepts::ElementFormulaContainer< F >  frm 
)

Constructor with calling of compute.

Definition at line 80 of file formula.hh.


Member Function Documentation

template<class F>
Array<F>& concepts::Array< F >::apply ( F &  fncF &) [inline, inherited]

Application operator to each component, e.g.

std::sin or std::conj

Definition at line 215 of file array.hh.

template<class F>
template<class H >
Array<F>& concepts::Array< F >::apply ( const Array< H > &  a,
F   fncconst H & 
) [inline, inherited]

Application operator to each component.

Each array value is the function applied to the appropiate array value in a.

Parameters:
aArray with elements of type H
fncFunction which maps from H to F

Definition at line 229 of file array.hh.

template<class F>
template<class H >
Array<F>& concepts::Array< F >::apply ( const Array< H > &  a,
F   fncconst H &, const F & 
) [inline, inherited]

Application operator to each component.

Each array value is the function applied to the appropiate array value in a and to the old array value.

Parameters:
aArray with elements of type H
fncFunction which maps from (H,F) to F

Definition at line 245 of file array.hh.

template<class F = Real>
void hp1D::ArrayElementFormula< F >::compute ( const Element< Real > &  elm,
const concepts::ElementFormulaContainer< F >  frm 
)

Evaluates the formula frm on all quadrature points of element elm.

template<class F>
uint concepts::Array< F >::cursize ( ) const [inline, inherited]

Returns the size of the allocated memory.

Definition at line 258 of file array.hh.

template<class F >
std::ostream & concepts::Array< F >::info ( std::ostream &  os) const [inherited]

Definition at line 298 of file array.hh.

template<class F>
int concepts::Array< F >::memory ( ) const [inline, inherited]

Returns the memory usage in bytes.

Definition at line 261 of file array.hh.

template<class F>
concepts::Array< F >::operator const F * ( ) const [inline, inherited]

Returns a pointer to the array.

Definition at line 129 of file array.hh.

template<class F>
concepts::Array< F >::operator F * ( ) [inline, inherited]

Returns a pointer to the array.

Definition at line 127 of file array.hh.

template<class F>
template<class G >
Array<F>& concepts::Array< F >::operator*= ( const G  n) [inline, inherited]

Scaling operator.

Definition at line 146 of file array.hh.

template<class F>
template<class H >
Array<F>& concepts::Array< F >::operator*= ( const Array< H > &  a) [inline, inherited]

Multiplication operator.

Definition at line 154 of file array.hh.

template<class F>
Array<F>& concepts::Array< F >::operator+= ( const F  n) [inline, inherited]

Addition operator.

Definition at line 181 of file array.hh.

template<class F>
template<class H >
Array<F>& concepts::Array< F >::operator+= ( const Array< H > &  a) [inline, inherited]

Addition operator.

Definition at line 187 of file array.hh.

template<class F>
Array<F> concepts::Array< F >::operator- ( ) const [inline, inherited]

Negation operator.

Definition at line 207 of file array.hh.

template<class F>
template<class H >
Array<F>& concepts::Array< F >::operator-= ( const Array< H > &  a) [inline, inherited]

Subtraction operator.

Definition at line 200 of file array.hh.

template<class F>
Array<F>& concepts::Array< F >::operator-= ( const F  n) [inline, inherited]

Subtraction operator.

Definition at line 194 of file array.hh.

template<class F>
const F& concepts::Array< F >::operator[] ( const int  i) const [inline, inherited]

Index operator.

Definition at line 132 of file array.hh.

template<class F>
F& concepts::Array< F >::operator[] ( const int  i) [inline, inherited]

Index operator.

Definition at line 138 of file array.hh.

template<class F >
void concepts::Array< F >::resize ( const uint  sz) [inherited]

Resizes the array.

A reallocation occurs only if the requested space is not available, ie. making the array smaller does not result in a reallocation. If a reallocation occurs, the data is not preserved.

Definition at line 277 of file array.hh.

template<class F >
void concepts::Array< F >::resizePreserve ( const uint  sz) [inherited]

Resizes the array.

Basically, it does the same as resize. But, if a reallocation occurs, the data is preserved.

Definition at line 286 of file array.hh.

template<class F >
Array< F > & concepts::Array< F >::reverse ( ) [inherited]

Reverse the order of the entries.

Definition at line 307 of file array.hh.

template<class F>
uint concepts::Array< F >::size ( ) const [inline, inherited]

Returns the requested size of the array.

Definition at line 255 of file array.hh.

template<class F>
void concepts::Array< F >::zeros ( ) [inline, inherited]

Fills the memory with zeros.

Definition at line 124 of file array.hh.


Member Data Documentation

template<class F>
F* concepts::Array< F >::data_ [protected, inherited]

Data.

Definition at line 269 of file array.hh.

template<class F>
uint concepts::Array< F >::n_ [protected, inherited]

Requested size of the array.

Definition at line 273 of file array.hh.

template<class F>
uint concepts::Array< F >::size_ [protected, inherited]

Current real size of the array.

Definition at line 271 of file array.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)