|
#include <AdaptiveGrid.hpp>
Public Types | |||||
typedef map<AdaptiveLevelsIndex* , AdaptiveLevels* , AdaptiveLevelsIndexCmp > | ProjectionGrid | ||||
data structure for access to AdaptiveLevels along one coordinate direction. | |||||
enum | { NUM_TMP = 13 } | ||||
Public Methods | |||||
AdaptiveGrid () | |||||
default constructor. | |||||
AdaptiveGrid (Wavelets *W, bool Init_tmp=true) | |||||
see Init(.,.). | |||||
~AdaptiveGrid () | |||||
default destructor. | |||||
void | Init (Wavelets *W, bool Init_tmp=true) | ||||
| |||||
void | SetPeriodicConditions (int BC[DIM][2]) | ||||
Internally mark the coordinate directions with periodic BCs. Automatically called whenever boundary conditions for attached AdaptiveDatas are set. | |||||
void | Set (Function *F, double c) | ||||
Generates a level adaptive grid, all indices
with
are kept in the adaptive index set. All AdaptiveData attached to (*this) are either refined or resized. | |||||
void | SetSparse (int sl) | ||||
Specialization of Set(.) for simple sparse grids:
~and~
. | |||||
void | SetFull (int *L) | ||||
As above for full grids:
. | |||||
void | SetFull (int L) | ||||
As above for full grids
. | |||||
void | SetAsSlice (AdaptiveGrid< DIM+1 > *G, int dir, int l, int t) | ||||
Generate an adaptive grid as slice of a (DIM+1)-dimensional adaptive grid. The slice consists of all indices of *G whose <dir>th components of the level and spatial index are l and t, respectively. Refinement of attached AdaptiveData is NOT supported, just resize(). | |||||
void | Refine (AdaptiveData< DIM > *TestData, AdaptivityCriterion *R, AdaptiveData< DIM > *ActiveEntries=NULL) | ||||
Refinement of (*this). For all coefficients of *TestData<DIM> it is checked whether they fulfill the refinement-criterion *R (the magnitude of the coefficients as well as the level determine). If so, the corresponding index and the neighbours in space and level are included in the refined index set. (Optional) the corresponding coefficient is set to one in *ActiveEntries (not the neigbours!). Thus, we can discriminate between 'truely' active components and just neighbours. The extent of the spatial neighbourhood is defined by Refine::REFINEBOUNDBOX. Currently, it is 1 which means all same-level indices
of
with
are considered neighbours. After the generation of the new index set, all attached instances of AdaptiveData<DIM> are either refined or resized. If the underlying basis functions of TestData are Lifting-Interpolets then the refined adaptive grid does not only fulfill the Interpolet cone-condition, but also the Lifting cone-condition. This is needed by subsequent INTERPOLET2LIFTING / LIFTING2INTERPOLET operations, but, nevertheless, makes the grids a little bit larger. Note, one can directly set the TestData->Ext.islifting[] flags without need to perform a INTERPOLET2LIFTING operations. Carefull use of this quick and dirty trick saves the basis transforms. | |||||
size_t | Size () | ||||
Return size of adaptive basis. | |||||
void | PrintCounterArray () | ||||
Dump the numbers of active basis functions for all levels. | |||||
void | DataMemory (int *reserved, int *used) | ||||
Compute memory usage. | |||||
void | LargestActiveLevel (int *L) | ||||
Return largest active level in each direction. | |||||
void | PrintLargestActiveLevel () | ||||
Print largest active level in each direction. | |||||
long* | FindOrInsert (ProjectionGrid *PG, int dirTo, int *l, int *t) | ||||
Find (and insert if necessary) index (l,t) and return pointer to the vector index for AdaptiveDataArray. CounterArray will neither be used nor updated. | |||||
long | Insert (ProjectionGrid *PG, int dirTo, int *l, int *t) | ||||
Insert (if necessary) index (l,t). Use and update the so called CounterArray for the new vector index. Returns the new vector index. This function is used to successively build up a ProjectionGrid. | |||||
void | Insert (ProjectionGrid *PG, int dirTo, int *l, int *t, long vectorindex) | ||||
Insert an index (l,t). vectorindex is the known index of the vector component for the AdaptiveDataArrays. This function is used for the generation of a ProjectionGrid from an existing one. | |||||
long | Find (ProjectionGrid *PG, int dirTo, int *l, int *t) | ||||
Find index (l,t). Returns the vector index for AdaptiveDataArray, and -1 if (l,t) is not contained in the index set. | |||||
size_t | GeneratePG (ProjectionGrid *PGFrom, int dirFrom, ProjectionGrid *PGTo,int dirTo) | ||||
Generate from *PGFrom the data structure for access to all AdaptiveLevels along coordinate direction dirTo. | |||||
void | SMPLoadBalance () | ||||
load balancing for thread parallelization. | |||||
void | ReadSparse (const char *name) | ||||
read a sparse format file and initialize the adaptive grid (i.e. the index set for the active wavelets) according to the indices from the file. No numerical data is read. | |||||
Public Attributes | |||||
AdaptiveGrid<DIM-1>* | FaceGrid [DIM][2] | ||||
(DIM-1)-dimensional grids for the 2*DIM faces. Required, e.g., in AdaptiveData<DIM>::SetBoundaryValueFunction. | |||||
AdaptiveData<DIM>* | tmp [NUM_TMP] | ||||
valid if Init_tmp == true, aux. Data for BICGSolver (0..8) and other subroutines (9,10,11), NUM_TMP=13. |