#include <fem_mesh.h>
Public Member Functions | |
FEM_Attribute (FEM_Entity *owner_, int myAttr_) | |
virtual void | pup (PUP::er &p) |
virtual void | pupSingle (PUP::er &p, int pupindx) |
virtual | ~FEM_Attribute () |
void | setGhost (FEM_Attribute *ghost_) |
Install this attribute as our ghost:. | |
bool | isGhost (void) const |
Return true if we're a ghost. | |
int | getAttr (void) const |
Return our attribute code. | |
FEM_Entity * | getEntity (void) |
int | getLength (void) const |
Return the number of rows in our table of data (0 if unknown). | |
int | getRealLength (void) const |
int | getMax () |
int | getWidth (void) const |
Return the number of columns in our table of data (0 if unknown). | |
int | getRealWidth (void) const |
int | getDatatype (void) const |
Return our FEM_* datatype (-1 if unknown). | |
void | setLength (int l, const char *caller="") |
Set our length (number of rows, or records) to this value. | |
void | setWidth (int w, const char *caller="") |
Set our width (number of values per row) to this value. | |
void | setDatatype (int dt, const char *caller="") |
Set our datatype (e.g., FEM_INT, FEM_DOUBLE) to this value. | |
virtual void | copyShape (const FEM_Attribute &src) |
Copy our width and datatype from this attribute. | |
void | tryAllocate (void) |
Check if all three of length, width, and datatype are set, but we're not yet allocated. | |
void | reallocate (void) |
Our parent's length has changed: reallocate our storage. | |
bool | isAllocated (void) const |
Return true if we've already had storage allocated. | |
virtual void | set (const void *src, int firstItem, int length, const IDXL_Layout &layout, const char *caller) |
Set our data to these (typically user-supplied, unchecked) values. | |
virtual void | get (void *dest, int firstItem, int length, const IDXL_Layout &layout, const char *caller) const |
Extract this quantity of user data. | |
virtual void | copyEntity (int dstEntity, const FEM_Attribute &src, int srcEntity)=0 |
Copy everything associated with src[srcEntity] into our dstEntity. | |
virtual void | register_data (void *dest, int length, int max, const IDXL_Layout &layout, const char *caller) |
Register this user data for this attributre Length, layout etc are checked by the default implementaion. | |
FEM_Attribute (FEM_Entity *owner_, int myAttr_) | |
virtual void | pup (PUP::er &p) |
virtual void | pupSingle (PUP::er &p, int pupindx) |
virtual | ~FEM_Attribute () |
void | setGhost (FEM_Attribute *ghost_) |
Install this attribute as our ghost:. | |
bool | isGhost (void) const |
Return true if we're a ghost. | |
int | getAttr (void) const |
Return our attribute code. | |
FEM_Entity * | getEntity (void) |
int | getLength (void) const |
Return the number of rows in our table of data (0 if unknown). | |
int | getRealLength (void) const |
int | getMax () |
int | getWidth (void) const |
Return the number of columns in our table of data (0 if unknown). | |
int | getRealWidth (void) const |
int | getDatatype (void) const |
Return our FEM_* datatype (-1 if unknown). | |
void | setLength (int l, const char *caller="") |
Set our length (number of rows, or records) to this value. | |
void | setWidth (int w, const char *caller="") |
Set our width (number of values per row) to this value. | |
void | setDatatype (int dt, const char *caller="") |
Set our datatype (e.g., FEM_INT, FEM_DOUBLE) to this value. | |
virtual void | copyShape (const FEM_Attribute &src) |
Copy our width and datatype from this attribute. | |
void | tryAllocate (void) |
Check if all three of length, width, and datatype are set, but we're not yet allocated. | |
void | reallocate (void) |
Our parent's length has changed: reallocate our storage. | |
bool | isAllocated (void) const |
Return true if we've already had storage allocated. | |
virtual void | set (const void *src, int firstItem, int length, const IDXL_Layout &layout, const char *caller) |
Set our data to these (typically user-supplied, unchecked) values. | |
virtual void | get (void *dest, int firstItem, int length, const IDXL_Layout &layout, const char *caller) const |
Extract this quantity of user data. | |
virtual void | copyEntity (int dstEntity, const FEM_Attribute &src, int srcEntity)=0 |
Copy everything associated with src[srcEntity] into our dstEntity. | |
virtual void | register_data (void *dest, int length, int max, const IDXL_Layout &layout, const char *caller) |
Register this user data for this attributre Length, layout etc are checked by the default implementaion. | |
Protected Member Functions | |
virtual void | allocate (int length, int width, int datatype)=0 |
Allocate storage for at least length width-item records of type datatype. | |
virtual void | allocate (int length, int width, int datatype)=0 |
Allocate storage for at least length width-item records of type datatype. | |
Private Member Functions | |
void | bad (const char *field, bool forRead, int cur, int next, const char *caller) const |
void | bad (const char *field, bool forRead, int cur, int next, const char *caller) const |
Abort with a nice error message saying:. | |
Private Attributes | |
FEM_Entity * | e |
FEM_Attribute * | ghost |
int | attr |
My attribute code (e.g., FEM_DATA+7, FEM_CONN, etc.). | |
int | width |
Number of columns in our table of data (initially unknown). | |
int | datatype |
Datatype of entries (initially unknown). | |
bool | allocated |
True if subclass allocate has been called. | |
FEM_Entity * | e |
Owning entity (to get length, etc.). | |
FEM_Attribute * | ghost |
Ghost attribute, which has the same width and datatype as us (or 0). |
A user-visible 2D table attached to a FEM_Entity.
Common FEM_Attributes include: user data associated with nodes, the element-to-node connectivity array, etc.
Describes an FEM entity's "attribute"--a user-visible, user-settable 2D table. Common FEM_Attributes include: user data associated with nodes, the element-to-node connectivity array, etc.
Definition at line 311 of file fem_mesh.h.
FEM_Attribute::FEM_Attribute | ( | FEM_Entity * | owner_, | |
int | myAttr_ | |||
) |
FEM_Attribute::~FEM_Attribute | ( | ) | [virtual] |
Definition at line 534 of file fem_mesh.C.
FEM_Attribute::FEM_Attribute | ( | FEM_Entity * | owner_, | |
int | myAttr_ | |||
) |
virtual FEM_Attribute::~FEM_Attribute | ( | ) | [virtual] |
void FEM_Attribute::bad | ( | const char * | field, | |
bool | forRead, | |||
int | cur, | |||
int | next, | |||
const char * | caller | |||
) | const [private] |
Referenced by FEM_T_List< FEM_Mesh >::badIndex(), get(), register_data(), set(), setDatatype(), setLength(), and setWidth().
virtual void FEM_Attribute::allocate | ( | int | length, | |
int | width, | |||
int | datatype | |||
) | [protected, pure virtual] |
Allocate storage for at least length width-item records of type datatype.
This routine is called after all three parameters are set, as a convenience for subclasses.
Referenced by tryAllocate().
void FEM_Attribute::pup | ( | PUP::er & | p | ) | [virtual] |
Definition at line 520 of file fem_mesh.C.
References femVersion, PUP::er::isUnpacking(), and tryAllocate().
Referenced by FEM_Entity_Types< FEM_Elem >::pup(), FEM_Entity::pup(), and PUPmarshall().
Definition at line 527 of file fem_mesh.C.
References femVersion, PUP::er::isUnpacking(), and tryAllocate().
Referenced by FEM_Interpolate::FEM_InterpolateElementCopy(), femMeshModify::packElemData(), FEM_MUtil::packEntData(), and FEM_MUtil::updateAttrs().
void FEM_Attribute::setGhost | ( | FEM_Attribute * | ghost_ | ) | [inline] |
Install this attribute as our ghost:.
Definition at line 338 of file fem_mesh.h.
References ghost.
Referenced by FEM_Entity::add().
bool FEM_Attribute::isGhost | ( | void | ) | const [inline] |
int FEM_Attribute::getAttr | ( | void | ) | const [inline] |
Return our attribute code.
Definition at line 344 of file fem_mesh.h.
References attr.
Referenced by FEM_Entity::add(), FEM_Entity::copyEntity(), FEM_Entity::copyShape(), FEM_Ghost_Essential_attributes(), FEM_Interpolate::FEM_InterpolateCopyAttributes(), FEM_Interpolate::FEM_InterpolateElementCopy(), FEM_Interpolate::FEM_InterpolateNodeInElement(), FEM_Interpolate::FEM_InterpolateNodeOnEdge(), FEM_Interpolate::FEM_InterpolateNodeOnFace(), FEM_REFINE2D_Split(), FEM_Refine_Operation(), interpolateNode(), femMeshModify::packElemData(), FEM_MUtil::packEntData(), FEM_Entity::pup(), FEM_MUtil::updateAttrs(), and femMeshModify::updateNodeAttrs().
FEM_Entity* FEM_Attribute::getEntity | ( | void | ) | [inline] |
int FEM_Attribute::getLength | ( | void | ) | const |
Return the number of rows in our table of data (0 if unknown).
This value is obtained directly from our owning Entity.
Referenced by get(), set(), setLength(), and tryAllocate().
int FEM_Attribute::getWidth | ( | void | ) | const [inline] |
Return the number of columns in our table of data (0 if unknown).
Definition at line 356 of file fem_mesh.h.
References width.
Referenced by copyShape(), get(), lookupAdaptAdjacencies(), lookupEdgeAdaptAdjacencies(), register_data(), set(), setWidth(), and tryAllocate().
int FEM_Attribute::getRealWidth | ( | void | ) | const [inline] |
Definition at line 357 of file fem_mesh.h.
References width.
Referenced by register_data(), set(), and tryAllocate().
int FEM_Attribute::getDatatype | ( | void | ) | const [inline] |
Return our FEM_* datatype (-1 if unknown).
Definition at line 360 of file fem_mesh.h.
References datatype.
Referenced by copyShape(), get(), register_data(), set(), setDatatype(), and tryAllocate().
void FEM_Attribute::setLength | ( | int | l, | |
const char * | caller = "" | |||
) |
Set our length (number of rows, or records) to this value.
Default implementation calls setLength on our owning entity and tries to call allocate().
Definition at line 536 of file fem_mesh.C.
References bad(), getLength(), FEM_Entity::setLength(), and tryAllocate().
Referenced by set().
void FEM_Attribute::setWidth | ( | int | w, | |
const char * | caller = "" | |||
) |
Set our width (number of values per row) to this value.
The default implementation sets width and tries to call allocate().
Definition at line 544 of file fem_mesh.C.
References bad(), getWidth(), ghost, setWidth(), and tryAllocate().
Referenced by copyShape(), register_data(), set(), and setWidth().
void FEM_Attribute::setDatatype | ( | int | dt, | |
const char * | caller = "" | |||
) |
Set our datatype (e.g., FEM_INT, FEM_DOUBLE) to this value.
The default implementation sets width and tries to call allocate().
Definition at line 553 of file fem_mesh.C.
References bad(), getDatatype(), ghost, setDatatype(), and tryAllocate().
Referenced by copyShape(), register_data(), set(), and setDatatype().
void FEM_Attribute::copyShape | ( | const FEM_Attribute & | src | ) | [virtual] |
Copy our width and datatype from this attribute.
The default implementation calls setWidth and setDatatype. which should be enough for virtually any attribute.
Definition at line 562 of file fem_mesh.C.
References getDatatype(), getWidth(), setDatatype(), and setWidth().
Referenced by FEM_Entity::copyShape().
void FEM_Attribute::tryAllocate | ( | void | ) |
Check if all three of length, width, and datatype are set, but we're not yet allocated.
If so, call allocate; else ignore.
Definition at line 641 of file fem_mesh.C.
References allocate(), allocated, femVersion, getDatatype(), getLength(), getMax(), getRealLength(), getRealWidth(), and getWidth().
Referenced by allocated(), pup(), pupSingle(), reallocate(), setDatatype(), setLength(), and setWidth().
void FEM_Attribute::reallocate | ( | void | ) | [inline] |
Our parent's length has changed: reallocate our storage.
Definition at line 393 of file fem_mesh.h.
References allocated, and tryAllocate().
bool FEM_Attribute::isAllocated | ( | void | ) | const [inline] |
Return true if we've already had storage allocated.
Definition at line 396 of file fem_mesh.h.
References allocated.
void FEM_Attribute::set | ( | const void * | src, | |
int | firstItem, | |||
int | length, | |||
const IDXL_Layout & | layout, | |||
const char * | caller | |||
) | [virtual] |
Set our data to these (typically user-supplied, unchecked) values.
Subclasses normally override this method as: virtual void set( ...) { super::set(...); copy data from src. }
Definition at line 567 of file fem_mesh.C.
References bad(), CmiAbort(), femVersion, getDatatype(), getLength(), getRealLength(), getRealWidth(), getWidth(), setDatatype(), setLength(), setWidth(), IDXL_Layout::type, and IDXL_Layout::width.
Referenced by FEM_Mesh_data_layoutP().
void FEM_Attribute::get | ( | void * | dest, | |
int | firstItem, | |||
int | length, | |||
const IDXL_Layout & | layout, | |||
const char * | caller | |||
) | const [virtual] |
Extract this quantity of user data.
Length and layout are parameter checked by the default implementation. Subclasses normally override this method as: virtual void get( ...) { super::get(...); copy data to dest. }
Definition at line 595 of file fem_mesh.C.
References bad(), getDatatype(), getLength(), getWidth(), IDXL_Layout::type, and IDXL_Layout::width.
Referenced by FEM_Mesh_data_layoutP(), FEM_REFINE2D_Split(), makeGhost(), makeGhosts(), and ParFUM_generateGlobalNodeNumbers().
virtual void FEM_Attribute::copyEntity | ( | int | dstEntity, | |
const FEM_Attribute & | src, | |||
int | srcEntity | |||
) | [pure virtual] |
Copy everything associated with src[srcEntity] into our dstEntity.
Referenced by FEM_Entity::copyEntity(), FEM_Interpolate::FEM_InterpolateElementCopy(), FEM_Interpolate::FEM_InterpolateNodeOnEdge(), FEM_REFINE2D_Split(), and FEM_Refine_Operation().
void FEM_Attribute::register_data | ( | void * | dest, | |
int | length, | |||
int | max, | |||
const IDXL_Layout & | layout, | |||
const char * | caller | |||
) | [virtual] |
Register this user data for this attributre Length, layout etc are checked by the default implementaion.
Definition at line 615 of file fem_mesh.C.
References bad(), femVersion, getDatatype(), getRealWidth(), getWidth(), setDatatype(), setWidth(), IDXL_Layout::type, and IDXL_Layout::width.
void FEM_Attribute::bad | ( | const char * | field, | |
bool | forRead, | |||
int | cur, | |||
int | next, | |||
const char * | caller | |||
) | const [private] |
Abort with a nice error message saying:.
Our <field> was previously set to <cur>; it cannot now be <next>
virtual void FEM_Attribute::allocate | ( | int | length, | |
int | width, | |||
int | datatype | |||
) | [protected, pure virtual] |
Allocate storage for at least length width-item records of type datatype.
This routine is called after all three parameters are set, as a convenience for subclasses.
virtual void FEM_Attribute::pup | ( | PUP::er & | p | ) | [virtual] |
void FEM_Attribute::setGhost | ( | FEM_Attribute * | ghost_ | ) | [inline] |
Install this attribute as our ghost:.
Definition at line 414 of file ParFUM_internals.h.
References ghost.
bool FEM_Attribute::isGhost | ( | void | ) | const [inline] |
int FEM_Attribute::getAttr | ( | void | ) | const [inline] |
FEM_Entity* FEM_Attribute::getEntity | ( | void | ) | [inline] |
int FEM_Attribute::getLength | ( | void | ) | const |
Return the number of rows in our table of data (0 if unknown).
This value is obtained directly from our owning Entity.
int FEM_Attribute::getRealLength | ( | void | ) | const |
int FEM_Attribute::getMax | ( | ) |
int FEM_Attribute::getWidth | ( | void | ) | const [inline] |
Return the number of columns in our table of data (0 if unknown).
Definition at line 432 of file ParFUM_internals.h.
References width.
int FEM_Attribute::getRealWidth | ( | void | ) | const [inline] |
int FEM_Attribute::getDatatype | ( | void | ) | const [inline] |
Return our FEM_* datatype (-1 if unknown).
Definition at line 436 of file ParFUM_internals.h.
References datatype.
void FEM_Attribute::setLength | ( | int | l, | |
const char * | caller = "" | |||
) |
Set our length (number of rows, or records) to this value.
Default implementation calls setLength on our owning entity and tries to call allocate().
void FEM_Attribute::setWidth | ( | int | w, | |
const char * | caller = "" | |||
) |
Set our width (number of values per row) to this value.
The default implementation sets width and tries to call allocate().
void FEM_Attribute::setDatatype | ( | int | dt, | |
const char * | caller = "" | |||
) |
Set our datatype (e.g., FEM_INT, FEM_DOUBLE) to this value.
The default implementation sets width and tries to call allocate().
virtual void FEM_Attribute::copyShape | ( | const FEM_Attribute & | src | ) | [virtual] |
Copy our width and datatype from this attribute.
The default implementation calls setWidth and setDatatype. which should be enough for virtually any attribute.
void FEM_Attribute::tryAllocate | ( | void | ) |
Check if all three of length, width, and datatype are set, but we're not yet allocated.
If so, call allocate; else ignore.
void FEM_Attribute::reallocate | ( | void | ) | [inline] |
Our parent's length has changed: reallocate our storage.
Definition at line 469 of file ParFUM_internals.h.
References allocated, and tryAllocate().
bool FEM_Attribute::isAllocated | ( | void | ) | const [inline] |
Return true if we've already had storage allocated.
Definition at line 472 of file ParFUM_internals.h.
References allocated.
virtual void FEM_Attribute::set | ( | const void * | src, | |
int | firstItem, | |||
int | length, | |||
const IDXL_Layout & | layout, | |||
const char * | caller | |||
) | [virtual] |
Set our data to these (typically user-supplied, unchecked) values.
Subclasses normally override this method as: virtual void set( ...) { super::set(...); copy data from src. }
virtual void FEM_Attribute::get | ( | void * | dest, | |
int | firstItem, | |||
int | length, | |||
const IDXL_Layout & | layout, | |||
const char * | caller | |||
) | const [virtual] |
Extract this quantity of user data.
Length and layout are parameter checked by the default implementation. Subclasses normally override this method as: virtual void get( ...) { super::get(...); copy data to dest. }
virtual void FEM_Attribute::copyEntity | ( | int | dstEntity, | |
const FEM_Attribute & | src, | |||
int | srcEntity | |||
) | [pure virtual] |
Copy everything associated with src[srcEntity] into our dstEntity.
virtual void FEM_Attribute::register_data | ( | void * | dest, | |
int | length, | |||
int | max, | |||
const IDXL_Layout & | layout, | |||
const char * | caller | |||
) | [virtual] |
Register this user data for this attributre Length, layout etc are checked by the default implementaion.
FEM_Entity* FEM_Attribute::e [private] |
Definition at line 312 of file fem_mesh.h.
Referenced by getEntity(), getMax(), getRealLength(), and MeshElem::operator+=().
FEM_Attribute* FEM_Attribute::ghost [private] |
Definition at line 313 of file fem_mesh.h.
Referenced by isGhost(), FEM_Entity_Types< FEM_Elem >::set(), setDatatype(), setGhost(), and setWidth().
int FEM_Attribute::attr [private] |
My attribute code (e.g., FEM_DATA+7, FEM_CONN, etc.).
Definition at line 314 of file fem_mesh.h.
Referenced by getAttr(), and PUPmarshall().
int FEM_Attribute::width [private] |
Number of columns in our table of data (initially unknown).
Definition at line 316 of file fem_mesh.h.
Referenced by getRealWidth(), and getWidth().
int FEM_Attribute::datatype [private] |
Datatype of entries (initially unknown).
Definition at line 317 of file fem_mesh.h.
Referenced by getDatatype().
bool FEM_Attribute::allocated [private] |
True if subclass allocate has been called.
Definition at line 318 of file fem_mesh.h.
Referenced by isAllocated(), reallocate(), and tryAllocate().
FEM_Entity* FEM_Attribute::e [private] |
FEM_Attribute* FEM_Attribute::ghost [private] |
Ghost attribute, which has the same width and datatype as us (or 0).
Definition at line 386 of file ParFUM_internals.h.