[MOAB-dev] r5842 - MOAB/trunk/tools/mbcoupler
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Tue Oct 30 11:52:27 CDT 2012
Author: tautges
Date: 2012-10-30 11:52:27 -0500 (Tue, 30 Oct 2012)
New Revision: 5842
Modified:
MOAB/trunk/tools/mbcoupler/Coupler.cpp
Log:
Fixing error in memcpy, specified # values, not # bytes.
TODO: need to write a test that catches this...
Modified: MOAB/trunk/tools/mbcoupler/Coupler.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/Coupler.cpp 2012-10-30 15:20:17 UTC (rev 5841)
+++ MOAB/trunk/tools/mbcoupler/Coupler.cpp 2012-10-30 16:52:27 UTC (rev 5842)
@@ -570,10 +570,10 @@
if(LINEAR_FE == method || QUADRATIC_FE == method){
result = interp_field(mappedPts->vul_rd[mindex],
CartVect(mappedPts->vr_wr+3*mindex),
- tag, tinterp.vr_rd[i]);
+ tag, tinterp.vr_wr[i]);
}else if (CONSTANT == method){
result = constant_interp(mappedPts->vul_rd[mindex],
- tag, tinterp.vr_rd[i]);
+ tag, tinterp.vr_wr[i]);
}
if (MB_SUCCESS != result) return result;
@@ -584,7 +584,7 @@
}
// copy the interpolated field as a unit
- memcpy(interp_vals, tinterp.vr_rd, tinterp.get_n());
+ memcpy(interp_vals, tinterp.vr_rd, tinterp.get_n()*sizeof(double));
// done
return MB_SUCCESS;
More information about the moab-dev
mailing list