PPL Logo

libs/ck-libs/ParFUM-Tops-Dev/ParFUM_TOPS.h File Reference

A ParFUM "Tops" compatibility layer API Definition. More...

Go to the source code of this file.

Data Structures

struct  TopModel
 A tops model is roughly equivalent to a ParFUM FEM_Mesh object. More...
class  TopNodeItr
 Node Iterator. More...
class  TopElemItr
 Element Iterator. More...
class  TopNodeElemItr
 Node->Element adjacency Iterator. More...
class  TopFacetItr
 Facet Iterator. More...

Functions

int tops_lib_FP_Type_Size ()
 Return the size of the FP Type the PTops library was compiled with, in bytes.
TopModeltopModel_Create_Init (int _nelnode)
 Create and access a Tops model.
TopModeltopModel_Create_Driver (int elem_attr_sz, int node_attr_sz, int model_attr_sz, void *mAtt)
 Create and access a Tops model.
void topModel_Destroy (TopModel *m)
 Cleanup a model.
TopNode topModel_InsertNode (TopModel *, float x, float y, float z)
 Insert a node.
TopNode topModel_InsertNode (TopModel *, double x, double y, double z)
void topModel_SuggestInitialSize (TopModel *m, unsigned numNodes, unsigned numElements)
void topNode_SetId (TopModel *, TopNode, TopID id)
 Set id of a node.
void topNode_SetAttrib (TopModel *, TopNode, void *)
 Set attribute of a node.
TopElement topModel_InsertElem (TopModel *, TopElemType, TopNode *)
 Insert an element.
void topElement_SetId (TopModel *, TopElement, TopID id)
 Set id of an element.
int topElement_GetId (TopModel *m, TopElement e)
 Get id of an element.
void topElement_SetAttrib (TopModel *, TopElement, void *)
 Set attribute of an element.
TopNode topModel_GetNodeAtId (TopModel *, TopID)
 Get node via id.
void * topNode_GetAttrib (TopModel *, TopNode)
 Get nodal attribute.
void * topElement_GetAttrib (TopModel *, TopElement)
 Get element attribute.
TopNode topElement_GetNode (TopModel *, TopElement, int idx)
 Get node via id.
TopElement topModel_GetElemAtId (TopModel *, TopID)
 Get element via id.
int topNode_GetId (TopModel *m, TopNode n)
int topModel_GetNNodes (TopModel *model)
int topElement_GetNNodes (TopModel *model, TopElement elem)
bool topElement_IsCohesive (TopModel *m, TopElement e)
void topNode_GetPosition (TopModel *model, TopNode node, float *x, float *y, float *z)
void topNode_GetPosition (TopModel *model, TopNode node, double *x, double *y, double *z)
TopNodeItrtopModel_CreateNodeItr (TopModel *)
 Create Iterator for nodes.
void topNodeItr_Destroy (TopNodeItr *)
 Destroy Iterator.
void topNodeItr_Begin (TopNodeItr *)
 Initialize Iterator.
bool topNodeItr_IsValid (TopNodeItr *)
 Determine if Iterator is valid or if it has iterated past last Node.
void topNodeItr_Next (TopNodeItr *)
 Increment iterator.
TopNode topNodeItr_GetCurr (TopNodeItr *)
 Get TopNode associated with the iterator.
TopElemItrtopModel_CreateElemItr (TopModel *)
 Create Iterator for elements.
void topElemItr_Destroy (TopElemItr *)
 Destroy Iterator.
void topElemItr_Begin (TopElemItr *)
 Initialize Iterator.
bool topElemItr_IsValid (TopElemItr *)
 Determine if Iterator is valid or if it has iterated past last Element.
void topElemItr_Next (TopElemItr *)
 Increment iterator.
TopElement topElemItr_GetCurr (TopElemItr *)
 Get TopElement associated with the iterator.
void topModel_TestIterators (TopModel *m)
 Perform sanity check on iterators.
void top_retrieve_elem_data (TopModel *m)
void top_retrieve_node_data (TopModel *m)
void top_put_node_data (TopModel *m)
TopNodeElemItrtopModel_CreateNodeElemItr (TopModel *m, TopNode n)
bool topNodeElemItr_IsValid (TopNodeElemItr *neitr)
void topNodeElemItr_Next (TopNodeElemItr *neitr)
TopElement topNodeElemItr_GetCurr (TopNodeElemItr *neitr)
void topNodeElemItr_Destroy (TopNodeElemItr *neitr)
int topFacet_GetNNodes (TopModel *m, TopFacet f)
TopNode topFacet_GetNode (TopModel *m, TopFacet f, int i)
TopElement topFacet_GetElem (TopModel *m, TopFacet f, int i)
bool topElement_IsValid (TopModel *m, TopElement e)
bool topVertex_IsBoundary (TopModel *m, TopVertex v)
TopVertex topNode_GetVertex (TopModel *m, TopNode n)
TopFacetItrtopModel_CreateFacetItr (TopModel *m)
void topFacetItr_Begin (TopFacetItr *itr)
bool topFacetItr_IsValid (TopFacetItr *itr)
void topFacetItr_Next (TopFacetItr *itr)
TopFacet topFacetItr_GetCurr (TopFacetItr *itr)
void topFacetItr_Destroy (TopFacetItr *itr)
void topModel_InsertCohesiveAtFacet (TopModel *m, int ElemType, TopFacet f)


Detailed Description

A ParFUM "Tops" compatibility layer API Definition.

Author:
Isaac Dooley
ParFUM-TOPS provides a Tops-like API for ParFUM.

Note:
NodeAtt and ElemAtt are just replaced with void* for this implementation.

Definition in file ParFUM_TOPS.h.


Function Documentation

int tops_lib_FP_Type_Size (  ) 

Return the size of the FP Type the PTops library was compiled with, in bytes.

TopModel* topModel_Create_Init ( int  _nelnode  ) 

Create and access a Tops model.

Only call from Init Currently only one model can be created. To extend, each model must just reference a different FEM_Mesh object

TopModel* topModel_Create_Driver ( int  elem_attr_sz,
int  node_attr_sz,
int  model_attr_sz,
void *  mAtt 
)

Create and access a Tops model.

Only call from Driver

void topModel_Destroy ( TopModel m  ) 

Cleanup a model.

Currently does nothing

TopNode topModel_InsertNode ( TopModel ,
float  x,
float  y,
float  z 
)

Insert a node.

TopNode topModel_InsertNode ( TopModel ,
double  x,
double  y,
double  z 
)

void topModel_SuggestInitialSize ( TopModel m,
unsigned  numNodes,
unsigned  numElements 
)

void topNode_SetId ( TopModel ,
TopNode  ,
TopID  id 
)

Set id of a node.

void topNode_SetAttrib ( TopModel ,
TopNode  ,
void *   
)

Set attribute of a node.

TopElement topModel_InsertElem ( TopModel ,
TopElemType  ,
TopNode  
)

Insert an element.

void topElement_SetId ( TopModel ,
TopElement  ,
TopID  id 
)

Set id of an element.

int topElement_GetId ( TopModel m,
TopElement  e 
)

Get id of an element.

void topElement_SetAttrib ( TopModel ,
TopElement  ,
void *   
)

Set attribute of an element.

TopNode topModel_GetNodeAtId ( TopModel ,
TopID   
)

Get node via id.

void* topNode_GetAttrib ( TopModel ,
TopNode   
)

Get nodal attribute.

void* topElement_GetAttrib ( TopModel ,
TopElement   
)

Get element attribute.

TopNode topElement_GetNode ( TopModel ,
TopElement  ,
int  idx 
)

Get node via id.

TopElement topModel_GetElemAtId ( TopModel ,
TopID   
) [inline]

Get element via id.

Definition at line 195 of file ParFUM_TOPS.h.

References elem, TopModel::elemIDHash, CkHashtableT< KEY, OBJ >::get(), TopModel::mesh, BasicTable2d< T >::size(), TOP_ELEMENT_TET4, and TopElement::type.

Here is the call graph for this function:

int topNode_GetId ( TopModel m,
TopNode  n 
)

int topModel_GetNNodes ( TopModel model  ) 

int topElement_GetNNodes ( TopModel model,
TopElement  elem 
)

bool topElement_IsCohesive ( TopModel m,
TopElement  e 
)

void topNode_GetPosition ( TopModel model,
TopNode  node,
float x,
float y,
float z 
)

void topNode_GetPosition ( TopModel model,
TopNode  node,
double *  x,
double *  y,
double *  z 
)

TopNodeItr* topModel_CreateNodeItr ( TopModel  ) 

Create Iterator for nodes.

void topNodeItr_Destroy ( TopNodeItr  ) 

Destroy Iterator.

void topNodeItr_Begin ( TopNodeItr  ) 

Initialize Iterator.

bool topNodeItr_IsValid ( TopNodeItr  ) 

Determine if Iterator is valid or if it has iterated past last Node.

void topNodeItr_Next ( TopNodeItr  ) 

Increment iterator.

TopNode topNodeItr_GetCurr ( TopNodeItr  ) 

Get TopNode associated with the iterator.

TopElemItr* topModel_CreateElemItr ( TopModel  ) 

Create Iterator for elements.

void topElemItr_Destroy ( TopElemItr  ) 

Destroy Iterator.

void topElemItr_Begin ( TopElemItr  ) 

Initialize Iterator.

bool topElemItr_IsValid ( TopElemItr  ) 

Determine if Iterator is valid or if it has iterated past last Element.

void topElemItr_Next ( TopElemItr  ) 

Increment iterator.

TopElement topElemItr_GetCurr ( TopElemItr  ) 

Get TopElement associated with the iterator.

void topModel_TestIterators ( TopModel m  ) 

Perform sanity check on iterators.

This checks to make sure that the count of the itereated elements and nodes matches that returned by ParFUM's countValid()

void top_retrieve_elem_data ( TopModel m  ) 

void top_retrieve_node_data ( TopModel m  ) 

void top_put_node_data ( TopModel m  ) 

TopNodeElemItr* topModel_CreateNodeElemItr ( TopModel m,
TopNode  n 
)

bool topNodeElemItr_IsValid ( TopNodeElemItr neitr  ) 

void topNodeElemItr_Next ( TopNodeElemItr neitr  ) 

TopElement topNodeElemItr_GetCurr ( TopNodeElemItr neitr  ) 

void topNodeElemItr_Destroy ( TopNodeElemItr neitr  ) 

int topFacet_GetNNodes ( TopModel m,
TopFacet  f 
)

TopNode topFacet_GetNode ( TopModel m,
TopFacet  f,
int  i 
)

TopElement topFacet_GetElem ( TopModel m,
TopFacet  f,
int  i 
)

bool topElement_IsValid ( TopModel m,
TopElement  e 
)

bool topVertex_IsBoundary ( TopModel m,
TopVertex  v 
)

TopVertex topNode_GetVertex ( TopModel m,
TopNode  n 
)

TopFacetItr* topModel_CreateFacetItr ( TopModel m  ) 

void topFacetItr_Begin ( TopFacetItr itr  ) 

bool topFacetItr_IsValid ( TopFacetItr itr  ) 

void topFacetItr_Next ( TopFacetItr itr  ) 

TopFacet topFacetItr_GetCurr ( TopFacetItr itr  ) 

void topFacetItr_Destroy ( TopFacetItr itr  ) 

void topModel_InsertCohesiveAtFacet ( TopModel m,
int  ElemType,
TopFacet  f 
)


Generated on Mon Sep 21 08:10:34 2020 for Charm++ by  doxygen 1.5.5