/[escript]/trunk/dudley/src/Assemble_CopyElementData.cpp
ViewVC logotype

Diff of /trunk/dudley/src/Assemble_CopyElementData.cpp

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

revision 3080 by jfenwick, Tue Aug 3 04:28:03 2010 UTC revision 3086 by jfenwick, Thu Aug 5 05:07:58 2010 UTC
# Line 26  Line 26 
26  /******************************************************************************************************/  /******************************************************************************************************/
27    
28    
29  void Finley_Assemble_CopyElementData(Finley_ElementFile* elements,escriptDataC* out,escriptDataC* in) {  void Dudley_Assemble_CopyElementData(Dudley_ElementFile* elements,escriptDataC* out,escriptDataC* in) {
30      dim_t n,q, numElements, numQuad;      dim_t n,q, numElements, numQuad;
31      __const double *in_array;      __const double *in_array;
32      double *out_array;      double *out_array;
33      dim_t numComps=getDataPointSize(out);      dim_t numComps=getDataPointSize(out);
34      size_t len_size;      size_t len_size;
35    
36      Finley_resetError();      Dudley_resetError();
37      if( elements == NULL )      if( elements == NULL )
38      {      {
39         return;         return;
40      }      }
41    
42      numElements=elements->numElements;      numElements=elements->numElements;
43      if (Finley_Assemble_reducedIntegrationOrder(in)) {      if (Dudley_Assemble_reducedIntegrationOrder(in)) {
44         numQuad=elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->numQuadNodes;         numQuad=elements->referenceElementSet->referenceElementReducedQuadrature->Parametrization->numQuadNodes;
45      } else {      } else {
46         numQuad=elements->referenceElementSet->referenceElement->Parametrization->numQuadNodes;         numQuad=elements->referenceElementSet->referenceElement->Parametrization->numQuadNodes;
# Line 48  void Finley_Assemble_CopyElementData(Fin Line 48  void Finley_Assemble_CopyElementData(Fin
48    
49      /* check out and in */      /* check out and in */
50      if (numComps!=getDataPointSize(in)) {      if (numComps!=getDataPointSize(in)) {
51         Finley_setError(TYPE_ERROR,"Finley_Assemble_CopyElementData: number of components of input and output Data do not match.");         Dudley_setError(TYPE_ERROR,"Dudley_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,"Finley_Assemble_CopyElementData: illegal number of samples of input Data object");         Dudley_setError(TYPE_ERROR,"Dudley_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,"Finley_Assemble_CopyElementData: illegal number of samples of output Data object");         Dudley_setError(TYPE_ERROR,"Dudley_Assemble_CopyElementData: illegal number of samples of output Data object");
56      } else if (!isExpanded(out)) {      } else if (!isExpanded(out)) {
57         Finley_setError(TYPE_ERROR,"Finley_Assemble_CopyElementData: expanded Data object is expected for output data.");         Dudley_setError(TYPE_ERROR,"Dudley_Assemble_CopyElementData: expanded Data object is expected for output data.");
58      }      }
59    
60      /* now we can start */      /* now we can start */
61    
62      if (Finley_noError()) {      if (Dudley_noError()) {
63           if (isExpanded(in)) {           if (isExpanded(in)) {
64               len_size=numComps*numQuad*sizeof(double);               len_size=numComps*numQuad*sizeof(double);
65           requireWrite(out);           requireWrite(out);

Legend:
Removed from v.3080  
changed lines
  Added in v.3086

  ViewVC Help
Powered by ViewVC 1.1.26