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

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

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

revision 1061 by phornby, Wed Mar 14 05:14:44 2007 UTC revision 1062 by gross, Mon Mar 26 06:17:53 2007 UTC
# Line 30  Line 30 
30    
31  void Finley_Assemble_CopyElementData(Finley_ElementFile* elements,escriptDataC* out,escriptDataC* in) {  void Finley_Assemble_CopyElementData(Finley_ElementFile* elements,escriptDataC* out,escriptDataC* in) {
32      dim_t n,q, numElements, numQuad;      dim_t n,q, numElements, numQuad;
     dim_t numComps=getDataPointSize(out);  
33      double *in_array,*out_array;      double *in_array,*out_array;
34        dim_t numComps=getDataPointSize(out);
35    
36        Finley_resetError();
37      if( elements == NULL )      if( elements == NULL )
38      {      {
39         return;         return;
40      }      }
41    
42      numElements=elements->numElements;      numElements=elements->numElements;
43      numQuad=elements->ReferenceElement->numQuadNodes;      if (Finley_Assemble_reducedIntegrationOrder(in)) {
44           numQuad=elements->ReferenceElementReducedOrder->numQuadNodes;
45      Finley_resetError();      } else {
46           numQuad=elements->ReferenceElement->numQuadNodes;
47      if (elements==NULL) return;      }
     numElements=elements->numElements;  
     numQuad=elements->ReferenceElement->numQuadNodes;  
48    
49      /* check out and in */      /* check out and in */
50      if (numComps!=getDataPointSize(in)) {      if (numComps!=getDataPointSize(in)) {
51         Finley_setError(TYPE_ERROR,"__FILE__: number of components of input and output Data do not match.");         Finley_setError(TYPE_ERROR,"Finley_Assemble_CopyElementData: number of components of input and output Data do not match.");
52      } else if (!numSamplesEqual(in,numQuad,numElements)) {      } else if (!numSamplesEqual(in,numQuad,numElements)) {
53         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of input Data object");         Finley_setError(TYPE_ERROR,"Finley_Assemble_CopyElementData: illegal number of samples of input Data object");
54      } else if (!numSamplesEqual(out,numQuad,numElements)) {      } else if (!numSamplesEqual(out,numQuad,numElements)) {
55         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of output Data object");         Finley_setError(TYPE_ERROR,"Finley_Assemble_CopyElementData: illegal number of samples of output Data object");
56      } else if (!isExpanded(out)) {      } else if (!isExpanded(out)) {
57         Finley_setError(TYPE_ERROR,"__FILE__: expanded Data object is expected for output data.");         Finley_setError(TYPE_ERROR,"Finley_Assemble_CopyElementData: expanded Data object is expected for output data.");
58      }      }
59    
60      /* now we can start */      /* now we can start */

Legend:
Removed from v.1061  
changed lines
  Added in v.1062

  ViewVC Help
Powered by ViewVC 1.1.26