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

Public Member Functions | Protected Attributes
concepts::ArrayCoord< 2 > Class Template Reference

Array with coordinates in 2D. More...

#include <arrays.hh>

Inheritance diagram for concepts::ArrayCoord< 2 >:
Inheritance graph
[legend]
Collaboration diagram for concepts::ArrayCoord< 2 >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Array< Real2d > & apply (Real2d &fnc(Real2d &))
 Application operator to each component, e.g.
Array< Real2d > & apply (const Array< H > &a, Real2dfnc(const H &))
 Application operator to each component.
Array< Real2d > & apply (const Array< H > &a, Real2dfnc(const H &, const Real2d &))
 Application operator to each component.
 ArrayCoord (const Quad2d &quad, const Array< Real > &qX, const Array< Real > &qY)
 Constructor for a Quad2d.
 ArrayCoord (const Edge2d &edge, const Array< Real > &p)
 Constructor for a Edge2d.
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 Real2d * () const
 Returns a pointer to the array.
 operator Real2d * ()
 Returns a pointer to the array.
Array< Real2d > & operator*= (const Array< H > &a)
 Multiplication operator.
Array< Real2d > & operator*= (const G n)
 Scaling operator.
Array< Real2d > & operator+= (const Real2dn)
 Addition operator.
Array< Real2d > & operator+= (const Array< H > &a)
 Addition operator.
Array< Real2doperator- () const
 Negation operator.
Array< Real2d > & operator-= (const Array< H > &a)
 Subtraction operator.
Array< Real2d > & operator-= (const Real2dn)
 Subtraction operator.
const Real2doperator[] (const int i) const
 Index operator.
Real2doperator[] (const int i)
 Index operator.
void resize (const uint sz)
 Resizes the array.
void resizePreserve (const uint sz)
 Resizes the array.
Array< Real2d > & 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

Real2ddata_
 Data.
uint n_
 Requested size of the array.
uint size_
 Current real size of the array.

Detailed Description

template<>
class concepts::ArrayCoord< 2 >

Array with coordinates in 2D.

Author:
Kersten Schmidt, 2005

Definition at line 95 of file arrays.hh.


Constructor & Destructor Documentation

concepts::ArrayCoord< 2 >::ArrayCoord ( const Quad2d quad,
const Array< Real > &  qX,
const Array< Real > &  qY 
)

Constructor for a Quad2d.

Parameters:
quadcell
qX,qYarrays of quadrature points in [0,1]
concepts::ArrayCoord< 2 >::ArrayCoord ( const Edge2d edge,
const Array< Real > &  p 
)

Constructor for a Edge2d.

Parameters:
edgecell
qarray of quadrature points in [0,1]

Member Function Documentation

Array<Real2d >& concepts::Array< Real2d >::apply ( Real2d fncF &) [inline, inherited]

Application operator to each component, e.g.

std::sin or std::conj

Definition at line 215 of file array.hh.

Array<Real2d >& concepts::Array< Real2d >::apply ( const Array< H > &  a,
Real2d  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.

Array<Real2d >& concepts::Array< Real2d >::apply ( const Array< H > &  a,
Real2d  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.

uint concepts::Array< Real2d >::cursize ( ) const [inline, inherited]

Returns the size of the allocated memory.

Definition at line 258 of file array.hh.

std::ostream& concepts::Array< Real2d >::info ( std::ostream &  os) const [inherited]
int concepts::Array< Real2d >::memory ( ) const [inline, inherited]

Returns the memory usage in bytes.

Definition at line 261 of file array.hh.

concepts::Array< Real2d >::operator const Real2d * ( ) const [inline, inherited]

Returns a pointer to the array.

Definition at line 129 of file array.hh.

concepts::Array< Real2d >::operator Real2d * ( ) [inline, inherited]

Returns a pointer to the array.

Definition at line 127 of file array.hh.

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

Scaling operator.

Definition at line 146 of file array.hh.

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

Multiplication operator.

Definition at line 154 of file array.hh.

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

Addition operator.

Definition at line 187 of file array.hh.

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

Addition operator.

Definition at line 181 of file array.hh.

Array<Real2d > concepts::Array< Real2d >::operator- ( ) const [inline, inherited]

Negation operator.

Definition at line 207 of file array.hh.

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

Subtraction operator.

Definition at line 200 of file array.hh.

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

Subtraction operator.

Definition at line 194 of file array.hh.

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

Index operator.

Definition at line 132 of file array.hh.

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

Index operator.

Definition at line 138 of file array.hh.

void concepts::Array< Real2d >::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.

void concepts::Array< Real2d >::resizePreserve ( const uint  sz) [inherited]

Resizes the array.

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

Array<Real2d >& concepts::Array< Real2d >::reverse ( ) [inherited]

Reverse the order of the entries.

uint concepts::Array< Real2d >::size ( ) const [inline, inherited]

Returns the requested size of the array.

Definition at line 255 of file array.hh.

void concepts::Array< Real2d >::zeros ( ) [inline, inherited]

Fills the memory with zeros.

Definition at line 124 of file array.hh.


Member Data Documentation

Real2d * concepts::Array< Real2d >::data_ [protected, inherited]

Data.

Definition at line 269 of file array.hh.

uint concepts::Array< Real2d >::n_ [protected, inherited]

Requested size of the array.

Definition at line 273 of file array.hh.

uint concepts::Array< Real2d >::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)