Class documentation of Concepts

Loading...
Searching...
No Matches
concepts::ArrayCoord< 2 > Class Reference

#include <arrays.hh>

Inheritance diagram for concepts::ArrayCoord< 2 >:
concepts::Array< Real2d >

Public Member Functions

 ArrayCoord (const Quad2d &quad, const Array< Real > &qX, const Array< Real > &qY, bool tensor=true)
 
 ArrayCoord (const Edge2d &edge, const Array< Real > &p)
 
void resize (const uint sz)
 
void resizePreserve (const uint sz)
 
void zeros ()
 Fills the memory with zeros.
 
 operator Real2d * ()
 Returns a pointer to the array.
 
 operator const Real2d * () const
 Returns a pointer to the array.
 
const Real2doperator[] (const int i) const
 Index operator.
 
Real2doperator[] (const int i)
 Index operator.
 
Array< Real2d > & operator*= (const G n)
 Scaling operator.
 
Array< Real2d > & operator*= (const Array< H > &a)
 Multiplication operator.
 
Array< Real2d > & operator+= (const Real2d n)
 Addition operator.
 
Array< Real2d > & operator+= (const Array< H > &a)
 Addition operator.
 
Array< Real2d > & operator-= (const Real2d n)
 Subtraction operator.
 
Array< Real2d > & operator-= (const Array< H > &a)
 Subtraction operator.
 
Array< Real2doperator- () const
 Negation operator.
 
Array< Real2d > & apply (Real2d &fnc(Real2d &))
 
Array< Real2d > & apply (const Array< H > &a, Real2d fnc(const H &))
 
Array< Real2d > & apply (const Array< H > &a, Real2d fnc(const H &, const Real2d &))
 
uint size () const
 Returns the requested size of the array.
 
uint cursize () const
 Returns the size of the allocated memory.
 
int memory () const
 Returns the memory usage in bytes.
 
Array< Real2d > & reverse ()
 Reverse the order of the entries.
 
std::ostream & info (std::ostream &os) const
 

Protected Attributes

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

Detailed Description

Array with coordinates in 2D.

Author
Kersten Schmidt, 2005

Definition at line 150 of file arrays.hh.

Constructor & Destructor Documentation

◆ ArrayCoord() [1/2]

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

Constructor for a Quad2d

Parameters
quadcell
qX,qYarrays of quadrature points in [0,1]

◆ ArrayCoord() [2/2]

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

◆ apply() [1/3]

Array< Real2d > & concepts::Array< Real2d >::apply ( const Array< H > &  a,
Real2d  fncconst H & 
)
inlineinherited

Application operator to each component

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

  @param a   Array with elements of type H
  @param fnc Function which maps from H to F

Definition at line 233 of file array.hh.

◆ apply() [2/3]

Array< Real2d > & concepts::Array< Real2d >::apply ( const Array< H > &  a,
Real2d  fncconst H &, const F & 
)
inlineinherited

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.

  @param a   Array with elements of type H
  @param fnc Function which maps from (H,F) to F

Definition at line 249 of file array.hh.

◆ apply() [3/3]

Array< Real2d > & concepts::Array< Real2d >::apply ( Real2d fncF &)
inlineinherited

Application operator to each component, e.g. std::sin or std::conj

Definition at line 219 of file array.hh.

◆ cursize()

uint concepts::Array< Real2d >::cursize ( ) const
inlineinherited

Returns the size of the allocated memory.

Definition at line 262 of file array.hh.

◆ info()

std::ostream & concepts::Array< Real2d >::info ( std::ostream &  os) const
inherited

Definition at line 270 of file array.hh.

◆ memory()

int concepts::Array< Real2d >::memory ( ) const
inlineinherited

Returns the memory usage in bytes.

Definition at line 265 of file array.hh.

◆ operator const Real2d *()

concepts::Array< Real2d >::operator const Real2d * ( ) const
inlineinherited

Returns a pointer to the array.

Definition at line 133 of file array.hh.

◆ operator Real2d *()

concepts::Array< Real2d >::operator Real2d * ( )
inlineinherited

Returns a pointer to the array.

Definition at line 131 of file array.hh.

◆ operator*=() [1/2]

Array< Real2d > & concepts::Array< Real2d >::operator*= ( const Array< H > &  a)
inlineinherited

Multiplication operator.

Definition at line 158 of file array.hh.

◆ operator*=() [2/2]

Array< Real2d > & concepts::Array< Real2d >::operator*= ( const G  n)
inlineinherited

Scaling operator.

Definition at line 150 of file array.hh.

◆ operator+=() [1/2]

Array< Real2d > & concepts::Array< Real2d >::operator+= ( const Array< H > &  a)
inlineinherited

Addition operator.

Definition at line 191 of file array.hh.

◆ operator+=() [2/2]

Array< Real2d > & concepts::Array< Real2d >::operator+= ( const Real2d  n)
inlineinherited

Addition operator.

Definition at line 185 of file array.hh.

◆ operator-()

Array< Real2d > concepts::Array< Real2d >::operator- ( ) const
inlineinherited

Negation operator.

Definition at line 211 of file array.hh.

◆ operator-=() [1/2]

Array< Real2d > & concepts::Array< Real2d >::operator-= ( const Array< H > &  a)
inlineinherited

Subtraction operator.

Definition at line 204 of file array.hh.

◆ operator-=() [2/2]

Array< Real2d > & concepts::Array< Real2d >::operator-= ( const Real2d  n)
inlineinherited

Subtraction operator.

Definition at line 198 of file array.hh.

◆ operator[]() [1/2]

Real2d & concepts::Array< Real2d >::operator[] ( const int  i)
inlineinherited

Index operator.

Definition at line 142 of file array.hh.

◆ operator[]() [2/2]

const Real2d & concepts::Array< Real2d >::operator[] ( const int  i) const
inlineinherited

Index operator.

Definition at line 136 of file array.hh.

◆ resize()

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.

Definition at line 122 of file array.hh.

◆ resizePreserve()

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.

Definition at line 126 of file array.hh.

◆ reverse()

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

Reverse the order of the entries.

Definition at line 268 of file array.hh.

◆ size()

uint concepts::Array< Real2d >::size ( ) const
inlineinherited

Returns the requested size of the array.

Definition at line 259 of file array.hh.

◆ zeros()

void concepts::Array< Real2d >::zeros ( )
inlineinherited

Fills the memory with zeros.

Definition at line 128 of file array.hh.

Member Data Documentation

◆ data_

Real2d * concepts::Array< Real2d >::data_
protectedinherited

Data.

Definition at line 273 of file array.hh.

◆ n_

uint concepts::Array< Real2d >::n_
protectedinherited

Requested size of the array.

Definition at line 277 of file array.hh.

◆ size_

uint concepts::Array< Real2d >::size_
protectedinherited

Current real size of the array.

Definition at line 275 of file array.hh.


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