#include <bulk_adapt.h>
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 | |
elemEntry * | elements |
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... |
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.
Element_Bucket::Element_Bucket | ( | ) | [inline] |
void Element_Bucket::Alloc | ( | int | n | ) | [inline] |
Definition at line 51 of file bulk_adapt.h.
References bucketSz, elements, Element_Bucket::elemEntry::elID, Element_Bucket::elemEntry::leftIdx, Element_Bucket::elemEntry::len, numElements, Element_Bucket::elemEntry::rightIdx, and root.
Referenced by Bulk_Adapt::Refine_h().
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().
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().
bool Element_Bucket::IsBucketEmpty | ( | ) | [inline] |
Definition at line 86 of file bulk_adapt.h.
References numElements.
Referenced by Bulk_Adapt::Refine_h().
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().
Definition at line 133 of file bulk_adapt.h.
References elements, Element_Bucket::elemEntry::leftIdx, len, and Element_Bucket::elemEntry::rightIdx.
Referenced by Insert().
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().
int Element_Bucket::findEmptySlot | ( | ) | [inline] |
Definition at line 200 of file bulk_adapt.h.
References elements, and numElements.
Referenced by Insert().
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().
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().
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().