NetFEM NetFEM_Begin(int source, int step, int dim, int flavor);
integer function NetFEM_Begin(source,step,dim,flavor)
integer, intent(in) :: source,step,dim,flavor
Begins describing a single piece of a mesh. Returns a handle that is used for each subsequent call until NetFEM_End. This call, like all NetFEM calls, is collective--every processor should make the same calls in the same order.
source identifies the piece of the mesh--use FEM_My_partition or CkMyPe.
step identifies which version of the mesh this is--for example, you might use the timestep number. This is only used to identify the mesh in the client.
dim is the number of spatial dimensions. For example, in a 2D computation, you'd pass dim==2; in a 3D computation, dim==3. The client currently only supports 2D or 3D computations.
flavor specifies what to do with the data. This can take the value NetFEM_POINTAT, which is used in online visualization, and specifies that NetFEM should only keep a pointer to your data rather than copy it out of your arrays. Or it can take the value NetFEM_WRITE, which writes out the data to files named ``NetFEM/step/source.dat'' for offline visualization.
void NetFEM_End(NetFEM n);
subroutine NetFEM_End(n)
integer, intent(in) :: n
Finishes describing a single piece of a mesh, which then makes the mesh available for display.
void NetFEM_Nodes(NetFEM n,int nNodes,const double *loc,const char *name);
subroutine NetFEM_Nodes(n,nNodes,loc,name)
integer, intent(in) :: n, nNodes
double precision, intent(in) :: loc(dim,nNodes)
character*(*), intent(in) :: name
Describes the nodes in this piece of the mesh.
n is the NetFEM handle obtained from NetFEM_Begin.
nNodes is the number of nodes listed here.
loc is the location of each node. This must be double-precision array, laid out with the same number of dimentions as passed to NetFEM_Begin. For example, in C the location of a 2D node is stored in loc[2*n+0] (x coordinate) and loc[2*n+1] (y coordinate). In Fortran, location of a node is stored in loc(:,n).
name is a human-readable name for the node locations to display in the client. We recommend also including the location units here, for example "Position (m)".
void NetFEM_Elements(NetFEM n,int nElements,int nodePerEl,const int *conn,const char *name);
subroutine NetFEM_Elements(n,nElements,nodePerEl,conn,name)
integer, intent(in) :: n, nElements, nodePerEl
integer, intent(in) :: conn(nodePerEl,nElements)
character*(*), intent(in) :: name
Describes the elements in this piece of the mesh. Unlike NetFEM_Nodes, this call can be repeated if there are different types of elements (For example, some meshes contain a mix of triangles and quadrilaterals).
n is the NetFEM handle obtained from NetFEM_Begin.
nElements is the number of elements listed here.
nodePerEl is the number of nodes for each element. For example, a triangle has 3 nodes per element; while tetrahedra have 4.
conn gives the index of each element's nodes. Note that when called from C, the first node is listed in conn as 0 (0-based node indexing), and element 's first node is stored in conn[e*nodePerEl+0]. When called from Fortran, the first node is listed as 1 (1-based node indexing), and element 's first node is stored in conn(1,e) or conn((e-1)*nodePerEl+1).
name is a human-readable name for the elements to display in the client. For example, this might be "Linear-Strain Triangles".
void NetFEM_Vector(NetFEM n,const double *data,const char *name);
subroutine NetFEM_Vector(n,data,name)
integer, intent(in) :: n
double precision, intent(in) :: data(dim,lastEntity)
character*(*), intent(in) :: name
Describes a spatial vector associated with each node or element in the mesh. Attaches the vector to the most recently listed node or element. You can repeat this call several times to describe different vectors.
n is the NetFEM handle obtained from NetFEM_Begin.
data is the double-precision array of vector values. The dimensions of the array have to match up with the node or element the data is associated with-in C, a 2D element 's vector starts at data[2*e]; in Fortran, element 's vector is data(:,e).
name is a human-readable name for this vector data. For example, this might be "Velocity (m/s)".
void NetFEM_Scalar(NetFEM n,const double *data,int dataPer,const char *name);
subroutine NetFEM_Scalar(n,data,dataPer,name)
integer, intent(in) :: n, dataPer
double precision, intent(in) :: data(dataPer,lastEntity)
character*(*), intent(in) :: name
Describes some scalar data associated with each node or element in the mesh. Like NetFEM_Vector, this data is attached to the most recently listed node or element and this call can be repeated. For a node or element, you can make the calls to NetFEM_Vector and NetFEM_Scalar in any order.
n is the NetFEM handle obtained from NetFEM_Begin.
data is the double-precision array of values. In C, an element 's scalar values start at data[dataPer*e]; in Fortran, element 's values are in data(:,e).
dataPer is the number of values associated with each node or element. For true scalar data, this is 1; but can be any value. Even if dataPer happens to equal the number of dimensions, the client knows that this data does not represent a spatial vector.
name is a human-readable name for this scalar data. For example, this might be "Mass (Kg)" or "Stresses (pure)".
June 29, 2008
FEM Homepage
Charm Homepage