/[escript]/trunk/finley/src/ElementFile_markNodes.c
ViewVC logotype

Diff of /trunk/finley/src/ElementFile_markNodes.c

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

revision 781 by bcumming, Mon Jun 26 01:46:34 2006 UTC revision 782 by bcumming, Tue Jul 18 00:47:47 2006 UTC
# Line 90  void Finley_ElementFile_markBoundaryElem Line 90  void Finley_ElementFile_markBoundaryElem
90          lin_node=id;          lin_node=id;
91       }       }
92       NN2=in->ReferenceElement->Type->numNodes;       NN2=in->ReferenceElement->Type->numNodes;
93       for (e=0;e<in->elementDistribution->numBoundary;e++)       for (e=0;e<in->elementDistribution->numLocal;e++)
94         for (i=0;i<NN;i++)               if( in->Id[e]>=in->elementDistribution->numInternal )
95           mask[in->Nodes[INDEX2(lin_node[i],e+in->elementDistribution->numInternal,NN2)]-offset]=1;                   for (i=0;i<NN;i++)
96                         mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;
97     }     }
98  }  }
99    
# Line 111  void Finley_ElementFile_markInternalElem Line 112  void Finley_ElementFile_markInternalElem
112       }       }
113       NN2=in->ReferenceElement->Type->numNodes;       NN2=in->ReferenceElement->Type->numNodes;
114    
115       for (e=0;e<in->elementDistribution->numInternal;e++)       for (e=0;e<in->elementDistribution->numLocal;e++)
116         for (i=0;i<NN;i++)               if( in->Id[e]<in->elementDistribution->numInternal )
117           mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;                   for (i=0;i<NN;i++)
118                         mask[in->Nodes[INDEX2(lin_node[i],e,NN2)]-offset]=1;
119     }     }
120  }  }
121    
122  void Finley_ElementFile_markBoundaryElementDOF(index_t* mask,index_t offset,index_t *degreeOfFreedom,Finley_ElementFile* in,bool_t useLinear) {  void Finley_ElementFile_markBoundaryElementDOF(index_t* mask,index_t offset,index_t *degreeOfFreedom, Finley_ElementFile* in,bool_t useLinear, index_t startElement) {
123     dim_t i,NN,NN2,e;      dim_t i,NN,NN2,e;
124     index_t color,*lin_node;      index_t color,*lin_node;
125     if (in!=NULL&& in->numElements>0) {      if (in!=NULL&& in->numElements>0) {
126       index_t id[in->ReferenceElement->Type->numNodes];  
127       for (i=0;i<in->ReferenceElement->Type->numNodes;i++) id[i]=i;          index_t id[in->ReferenceElement->Type->numNodes];
128       if (useLinear) {          for (i=0;i<in->ReferenceElement->Type->numNodes;i++) id[i]=i;
129          NN=in->LinearReferenceElement->Type->numNodes;              if (useLinear) {
130          lin_node=in->ReferenceElement->Type->linearNodes;                  NN=in->LinearReferenceElement->Type->numNodes;
131       } else {                  lin_node=in->ReferenceElement->Type->linearNodes;
132          NN=in->ReferenceElement->Type->numNodes;              } else {
133          lin_node=id;                  NN=in->ReferenceElement->Type->numNodes;
134       }                  lin_node=id;
135       NN2=in->ReferenceElement->Type->numNodes;              }
136       for (e=0;e<in->elementDistribution->numBoundary;e++)              NN2=in->ReferenceElement->Type->numNodes;
137         for (i=0;i<NN;i++)              for (e=0;e<in->elementDistribution->numLocal;e++)
138           mask[degreeOfFreedom[in->Nodes[INDEX2(lin_node[i],e+in->elementDistribution->numInternal,NN2)]]-offset]=1;                  if( in->Id[e]-startElement>=in->elementDistribution->numInternal )
139     }                      for (i=0;i<NN;i++)
140                            mask[degreeOfFreedom[in->Nodes[INDEX2(lin_node[i],e,NN2)]]-offset]=1;
141        }
142    
143  }  }
144    
145  void Finley_ElementFile_markInternalElementDOF(index_t* mask,index_t offset,index_t *degreeOfFreedom, Finley_ElementFile* in,bool_t useLinear) {  void Finley_ElementFile_markInternalElementDOF(index_t* mask,index_t offset,index_t *degreeOfFreedom, Finley_ElementFile* in,bool_t useLinear, index_t startElement) {
146     dim_t i,NN,NN2,e;     dim_t i,NN,NN2,e;
147     index_t color,*lin_node;     index_t color,*lin_node;
148     if (in!=NULL && in->numElements>0) {     if (in!=NULL && in->numElements>0) {
# Line 152  void Finley_ElementFile_markInternalElem Line 157  void Finley_ElementFile_markInternalElem
157       }       }
158       NN2=in->ReferenceElement->Type->numNodes;       NN2=in->ReferenceElement->Type->numNodes;
159    
160       for (e=0;e<in->elementDistribution->numInternal;e++)       for (e=0;e<in->elementDistribution->numLocal;e++)
161         for (i=0;i<NN;i++)               if( in->Id[e]-startElement<in->elementDistribution->numInternal )
162           mask[degreeOfFreedom[in->Nodes[INDEX2(lin_node[i],e,NN2)]]-offset]=1;                   for (i=0;i<NN;i++)
163                         mask[degreeOfFreedom[in->Nodes[INDEX2(lin_node[i],e,NN2)]]-offset]=1;
164     }     }
165  }  }
166  #endif  #endif

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

  ViewVC Help
Powered by ViewVC 1.1.26