PPL Logo

Element_Bucket Class Reference

Type for sorted element storage while awaiting adaptivity. More...

#include <bulk_adapt.h>

Collaboration diagram for Element_Bucket:

Collaboration graph
[legend]

Public Member Functions

 Element_Bucket ()
void Alloc (int n)
void Resize (int n)
void Clear ()
bool IsBucketEmpty ()
void Insert (int elID, double len)
 Insert element to be refined/coarsened.
void Insert_help (int subtree, int pos)
int Remove (double *len)
 Get next element to be refined/coarsened.
int findEmptySlot ()
void sanity_check ()
void sanity_check_helper (int idx, int *count)

Data Fields

elemEntryelements
 Element bucket.
int numElements
 The number of entries in the bucket.
int bucketSz
 The number of spaces in the bucket.
int root
 index of the first element in the bucket

Data Structures

struct  elemEntry
 This is a bucket data structure used to sort elements. More...

Detailed Description

Type for sorted element storage while awaiting adaptivity.

Elements are sorted by some real valued attribute associated with them. This is typically edge length or element quality. Iteration through the data structure should not produce repeats in a single iteration through elements to be refined. Thus, visited elements that are reinserted are buffered in a stack until the end of an iteration.

Definition at line 29 of file bulk_adapt.h.


Constructor & Destructor Documentation

Element_Bucket::Element_Bucket (  )  [inline]

Definition at line 46 of file bulk_adapt.h.

References bucketSz, elements, numElements, and root.


Member Function Documentation

void Element_Bucket::Alloc ( int  n  )  [inline]

void Element_Bucket::Resize ( int  n  )  [inline]

Definition at line 63 of file bulk_adapt.h.

References bucketSz, elements, Element_Bucket::elemEntry::elID, Element_Bucket::elemEntry::leftIdx, Element_Bucket::elemEntry::len, and Element_Bucket::elemEntry::rightIdx.

Referenced by Insert().

Here is the caller graph for this function:

void Element_Bucket::Clear ( void   )  [inline]

Definition at line 81 of file bulk_adapt.h.

References bucketSz, elements, numElements, and root.

Referenced by Bulk_Adapt::Refine_h().

Here is the caller graph for this function:

bool Element_Bucket::IsBucketEmpty (  )  [inline]

Definition at line 86 of file bulk_adapt.h.

References numElements.

Referenced by Bulk_Adapt::Refine_h().

Here is the caller graph for this function:

void Element_Bucket::Insert ( int  elID,
double  len 
) [inline]

Insert element to be refined/coarsened.

Definition at line 88 of file bulk_adapt.h.

References bucketSz, elements, Element_Bucket::elemEntry::elID, findEmptySlot(), Insert_help(), Element_Bucket::elemEntry::leftIdx, Element_Bucket::elemEntry::len, numElements, Resize(), Element_Bucket::elemEntry::rightIdx, root, and sanity_check().

Referenced by Bulk_Adapt::Refine_h().

Here is the call graph for this function:

Here is the caller graph for this function:

void Element_Bucket::Insert_help ( int  subtree,
int  pos 
) [inline]

Definition at line 133 of file bulk_adapt.h.

References elements, Element_Bucket::elemEntry::leftIdx, len, and Element_Bucket::elemEntry::rightIdx.

Referenced by Insert().

Here is the caller graph for this function:

int Element_Bucket::Remove ( double *  len  )  [inline]

Get next element to be refined/coarsened.

Definition at line 160 of file bulk_adapt.h.

References bucketSz, elements, Element_Bucket::elemEntry::elID, idx, Element_Bucket::elemEntry::leftIdx, Element_Bucket::elemEntry::len, numElements, parent(), Element_Bucket::elemEntry::rightIdx, root, and sanity_check().

Referenced by Bulk_Adapt::Refine_h().

Here is the call graph for this function:

Here is the caller graph for this function:

int Element_Bucket::findEmptySlot (  )  [inline]

Definition at line 200 of file bulk_adapt.h.

References elements, and numElements.

Referenced by Insert().

Here is the caller graph for this function:

void Element_Bucket::sanity_check (  )  [inline]

Definition at line 209 of file bulk_adapt.h.

References bucketSz, count, idx, numElements, root, and sanity_check_helper().

Referenced by Insert(), and Remove().

Here is the call graph for this function:

Here is the caller graph for this function:

void Element_Bucket::sanity_check_helper ( int  idx,
int count 
) [inline]

Definition at line 222 of file bulk_adapt.h.

References bucketSz, elements, Element_Bucket::elemEntry::leftIdx, len, and Element_Bucket::elemEntry::rightIdx.

Referenced by sanity_check().

Here is the caller graph for this function:


Field Documentation

Element bucket.

Definition at line 39 of file bulk_adapt.h.

Referenced by Alloc(), Clear(), Element_Bucket(), findEmptySlot(), Insert(), Insert_help(), Remove(), Resize(), and sanity_check_helper().

The number of entries in the bucket.

Definition at line 41 of file bulk_adapt.h.

Referenced by Alloc(), Clear(), Element_Bucket(), findEmptySlot(), Insert(), IsBucketEmpty(), Remove(), and sanity_check().

The number of spaces in the bucket.

Definition at line 43 of file bulk_adapt.h.

Referenced by Alloc(), Clear(), Element_Bucket(), Insert(), Remove(), Resize(), sanity_check(), and sanity_check_helper().

index of the first element in the bucket

Definition at line 45 of file bulk_adapt.h.

Referenced by Alloc(), Clear(), Element_Bucket(), Insert(), Remove(), and sanity_check().


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

Generated on Mon Sep 21 08:22:57 2020 for Charm++ by  doxygen 1.5.5