Department of Scientific Computing   
Institute for Numerical Simulation   
University of Bonn   
Documentation
Download
Programming References
Bug Reports / Suggestions
FAQ
Authors
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

IndexSet Struct Reference

struct IndexSet is an efficient representation of the index set actually only the number and the beginnings/ends of the intervals are stored. More...

#include <Adaptive1D.hpp>

List of all members.

Public Methods

 IndexSet ()
 default constructor.

 IndexSet (int Size)
 constructor with initialization, see Init().

int Init (int Size)
 initialization
Parameters:
Size   max number of intervals .


int Print (char *st=NULL)
 print [a_r,e_r] for r=0:n-1.

void Print (char *st, int l, int Level0)
 print *st, i*2^(-*l*) , l for i\in [a_r,e_r] and r=0:n-1 // *l* = (l==Level0) ? l : l-1 for i \in.

size_t Size ()
 return number of elements in the index set: .

bool IsSame (IndexSet *F)
 return (*this) == (*F).

void Union (IndexSet *A, IndexSet *B)
 (*this) = (*A) (*B).

void Difference (IndexSet *A, IndexSet *B)
 (*this) = (*A) \ (*B).

bool Contains (int i, int *r=NULL)
 return i (*this)
Parameters:
r   may be used to guess the first intervall to search in.


double VecMax (double *t)
 Max().

double VecMaxAbs (double *t)
 MaxAbs().

void VecAdd (double *to, double *a, double *b)
 to[i]=a[i]+b[i] for i (*this).

void VecSub (double *to, double *a, double *b)
 to[i]=a[i]-b[i] for i (*this).

void VecPlus (double *to, double *a)
 to[i] += a[i] for i (*this).

void VecMinus (double *to, double *a)
 to[i] -= a[i] for i (*this).

void VecMinus (double *to, double a)
 to[i] -= a for i (*this).

void VecMul (double *to, const double factor)
 to[i] *= factor for i (*this).

void VecCopy (double *to, double *from)
 to[i] = from[i] for i (*this).

void VecFill (double *to, const double f)
 to[i] = f for i (*this).

void VecClear (double *to)
 to[i] = 0 for i (*this).

double VecInnerProd (double *a, double *b)
 return a[i]*b[i].

void VecPrint (const char *st, double *t)
 printf("s d 20.18e
",st,i,t[i]) for i (*this).


void GenerateRandom (bool boundflag, int KW, int J, bool isW, bool dorandom)
 generate index set for random adaptive bases (to test the adaptive routines).

void VecApplyWENO (double *to, double *f, double *roespeed, int *BC, int J, int k, double DX)
 apply WENO scheme
Parameters:
k   2*k-1 is the order of the WENO scheme
f   is the advected quantity
roespeed   determines whether to use up/downwind for the reconstruction of f (just the sign of roespeed is important)
J   is the level of refinement
DX   length of physical domain up to now only periodic BC are implemented.


void Load (AdaptiveLE *al)
 generate index set according to the entries of (*al).

void Load (AdaptiveLE *al, vector< double > *v, double *d)
 generate index set according to the entries of (*al) and copy data from (*v) to (*d).

void Store (AdaptiveLE *al, vector< double > *v, double *d, bool add=false)
 copy data from (*d) to (*v), NO CHECK is done whether the index set according to (*al) coincides with (*this) !

void LoadBoundary (AdaptiveLE *al, vector< double > *v, double *d, int Left, int Right)
 load only the coefficients near the boundary: i<Left and i>Right.

void StoreBoundary (AdaptiveLE *al, vector< double > *v, double *d, int Left, int Right, bool add=false)
 store only the coefficients near the boundary: i<Left and i>Right.


The documentation for this struct was generated from the following files:
Generated at Mon Aug 19 10:02:33 2002 for AWFD by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001