/[escript]/trunk/dudley/src/Mesh_markNodes.c
ViewVC logotype

Diff of /trunk/dudley/src/Mesh_markNodes.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 782 by bcumming, Tue Jul 18 00:47:47 2006 UTC revision 787 by bcumming, Wed Jul 26 01:46:45 2006 UTC
# Line 34  void Finley_Mesh_markNodes(index_t* mask Line 34  void Finley_Mesh_markNodes(index_t* mask
34            Finley_ElementFile_markNodes(mask,offset,in->Points,useLinear);            Finley_ElementFile_markNodes(mask,offset,in->Points,useLinear);
35  }  }
36    
 #ifdef PASO_MPI  
   
 /* assumes that mask has length in->Nodes->numNodes  
    hence, it assumes that nodes are dense and offset==0  
    offset must ==0  
    assumes mask[i]==-1, i=0:in->Nodes->numNodes  
     */  
 void Finley_Mesh_markOrderedNodesLocation(index_t* mask,index_t offset,Finley_Mesh* in,bool_t useLinear)  
 {  
   index_t *internalMask=NULL, *boundaryMask=NULL, i;  
   
   if( offset )  
   {  
     Finley_setError(VALUE_ERROR, "Finley_Mesh_markNodesExternal() : yet to implement offest!=0");  
     return;  
   }  
   
   internalMask = TMPMEMALLOC( in->Nodes->numNodes, index_t );  
   boundaryMask = TMPMEMALLOC( in->Nodes->numNodes, index_t );  
   for( i=0; i<in->Nodes->numNodes; i++ )  
     internalMask[i] = boundaryMask[i] = 0;  
   
   Finley_ElementFile_markInternalElementNodes(internalMask,offset,in->Elements,useLinear);  
   Finley_ElementFile_markInternalElementNodes(internalMask,offset,in->FaceElements,useLinear);  
   Finley_ElementFile_markInternalElementNodes(internalMask,offset,in->ContactElements,useLinear);  
   Finley_ElementFile_markInternalElementNodes(internalMask,offset,in->Points,useLinear);  
   
   Finley_ElementFile_markBoundaryElementNodes(boundaryMask,offset,in->Elements,useLinear);  
   Finley_ElementFile_markBoundaryElementNodes(boundaryMask,offset,in->FaceElements,useLinear);  
   Finley_ElementFile_markBoundaryElementNodes(boundaryMask,offset,in->ContactElements,useLinear);  
   Finley_ElementFile_markBoundaryElementNodes(boundaryMask,offset,in->Points,useLinear);  
   
   for( i=0; i<in->Nodes->numNodes; i++ )  
     if( internalMask[i] && boundaryMask[i] )  
       mask[i] = 2;  /* boundary */  
     else if( internalMask[i] )  
       mask[i] = 1;  /* internal */  
     else if( boundaryMask[i] )  
       mask[i] = 3;  /* external */  
     else  
       mask[i] = -1; /* not referenced */  
 }  
   
 void Finley_Mesh_markOrderedDegreesOfFreedomLocation(index_t* mask,index_t offset,Finley_Mesh* in,bool_t useLinear)  
 {  
   index_t *internalMask=NULL, *boundaryMask=NULL, i,startElement;  
   
   if( offset )  
   {  
     Finley_setError(VALUE_ERROR, "Finley_Mesh_markNodesExternal() : yet to implement offest!=0");  
     return;  
   }  
   
   internalMask = TMPMEMALLOC( in->Nodes->numDegreesOfFreedom, index_t );  
   boundaryMask = TMPMEMALLOC( in->Nodes->numDegreesOfFreedom, index_t );  
   for( i=0; i<in->Nodes->numDegreesOfFreedom; i++ )  
     internalMask[i] = boundaryMask[i] = 0;  
   
     startElement = 0;  
   Finley_ElementFile_markInternalElementDOF(internalMask,offset,in->Nodes->degreeOfFreedom,in->Elements,useLinear,startElement);  
     startElement += in->Elements->numElements;  
   Finley_ElementFile_markInternalElementDOF(internalMask,offset,in->Nodes->degreeOfFreedom,in->FaceElements,useLinear,startElement);  
     startElement += in->FaceElements->numElements;  
   Finley_ElementFile_markInternalElementDOF(internalMask,offset,in->Nodes->degreeOfFreedom,in->ContactElements,useLinear,startElement);  
     startElement += in->ContactElements->numElements;  
   Finley_ElementFile_markInternalElementDOF(internalMask,offset,in->Nodes->degreeOfFreedom,in->Points,useLinear,startElement);  
   
     startElement = 0;  
   Finley_ElementFile_markBoundaryElementDOF(boundaryMask,offset,in->Nodes->degreeOfFreedom,in->Elements,useLinear,startElement);  
     startElement += in->Elements->numElements;  
   Finley_ElementFile_markBoundaryElementDOF(boundaryMask,offset,in->Nodes->degreeOfFreedom,in->FaceElements,useLinear,startElement);  
     startElement += in->FaceElements->numElements;  
   Finley_ElementFile_markBoundaryElementDOF(boundaryMask,offset,in->Nodes->degreeOfFreedom,in->ContactElements,useLinear,startElement);  
     startElement += in->ContactElements->numElements;  
   Finley_ElementFile_markBoundaryElementDOF(boundaryMask,offset,in->Nodes->degreeOfFreedom,in->Points,useLinear,startElement);  
   
   for( i=0; i<in->Nodes->numDegreesOfFreedom; i++ )  
     if( internalMask[i] && boundaryMask[i] )  
       mask[i] = 2;  /* boundary */  
     else if( internalMask[i] )  
       mask[i] = 1;  /* internal */  
     else if( boundaryMask[i] )  
       mask[i] = 3;  /* external */  
     else  
       mask[i] = -1; /* not referenced */  
 }  
 #endif  
   
37  /*  /*
38  * $Log$  * $Log$
39  * Revision 1.3  2005/09/15 03:44:22  jgs  * Revision 1.3  2005/09/15 03:44:22  jgs

Legend:
Removed from v.782  
changed lines
  Added in v.787

  ViewVC Help
Powered by ViewVC 1.1.26