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

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

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

revision 902 by gross, Sun Sep 17 23:27:00 2006 UTC revision 903 by gross, Fri Nov 17 01:59:49 2006 UTC
# Line 866  void Finley_Mesh_saveVTK_MPIO(const char Line 866  void Finley_Mesh_saveVTK_MPIO(const char
866            // averaging over the number of points in the sample            // averaging over the number of points in the sample
867            for (n=0; n<nComp; n++)            for (n=0; n<nComp; n++)
868            {            {
869              rtmp = 0.;              if (isExpanded(data_pp[i_data])) {
870              for (j=0; j<numPointsPerSample; j++) rtmp += values[INDEX2(n,j,nComp)];                 rtmp = 0.;
871              sampleAvg[k] = rtmp/numPointsPerSample;                 for (j=0; j<numPointsPerSample; j++) rtmp += values[INDEX2(n,j,nComp)];
872                   sampleAvg[n] = rtmp/numPointsPerSample;
873                } else {
874                   sampleAvg[n] = values[n];
875                }
876            }            }
877            // if the number of required components is more than the number            // if the number of required components is more than the number
878            // of actual components, pad with zeros            // of actual components, pad with zeros
# Line 1721  void Finley_Mesh_saveVTK(const char * fi Line 1725  void Finley_Mesh_saveVTK(const char * fi
1725            /* averaging over the number of points in the sample */            /* averaging over the number of points in the sample */
1726            for (k=0; k<nComp; k++)            for (k=0; k<nComp; k++)
1727            {            {
1728              rtmp = 0.;              if (isExpanded(data_pp[i_data])) {
1729              for (j=0; j<numPointsPerSample; j++) rtmp += values[INDEX2(k,j,nComp)];                 rtmp = 0.;
1730              sampleAvg[k] = rtmp/numPointsPerSample;                 for (j=0; j<numPointsPerSample; j++) rtmp += values[INDEX2(k,j,nComp)];
1731                   sampleAvg[k] = rtmp/numPointsPerSample;
1732                } else {
1733                   sampleAvg[k] = values[k];
1734                }
1735    
1736            }            }
1737            /* if the number of required components is more than the number            /* if the number of required components is more than the number
1738            * of actual components, pad with zeros            * of actual components, pad with zeros

Legend:
Removed from v.902  
changed lines
  Added in v.903

  ViewVC Help
Powered by ViewVC 1.1.26