[MOAB-dev] r5703 - MOAB/trunk/tools/mbcoupler
iulian at mcs.anl.gov
iulian at mcs.anl.gov
Fri Aug 17 22:14:13 CDT 2012
Author: iulian
Date: 2012-08-17 22:14:13 -0500 (Fri, 17 Aug 2012)
New Revision: 5703
Modified:
MOAB/trunk/tools/mbcoupler/Coupler.cpp
MOAB/trunk/tools/mbcoupler/Coupler.hpp
Log:
Patch supplied by Vijay, more enum choices for the client
Modified: MOAB/trunk/tools/mbcoupler/Coupler.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/Coupler.cpp 2012-08-17 07:10:31 UTC (rev 5702)
+++ MOAB/trunk/tools/mbcoupler/Coupler.cpp 2012-08-18 03:14:13 UTC (rev 5703)
@@ -529,8 +529,8 @@
TupleList *tl,
bool normalize)
{
- if (!((LINEAR_FE == method) || (PLAIN_FE == method)))
- return MB_FAILURE;
+ //if (!((LINEAR_FE == method) || (PLAIN_FE == method)))
+ // return MB_FAILURE;
TupleList *tl_tmp = (tl ? tl : targetPts);
// remote pts first
@@ -549,7 +549,7 @@
int mindex = tl_tmp->vi_rd[3*i+2];
result = MB_FAILURE;
- if(LINEAR_FE == method){
+ if(LINEAR_FE == method || QUADRATIC_FE == method){
result = interp_field(mappedPts->vul_rd[mindex],
CartVect(mappedPts->vr_wr+3*mindex),
tag, tl_tmp->vr_rd[i]);
@@ -565,27 +565,29 @@
(myPc->proc_config().crystal_router())->gs_transfer(1, *tl_tmp, 0);
}
- if (!tl) {
- // mapped whole targetPts tuple; put into proper place in interp_vals
+ if (!tl)
+ {
+ // mapped whole targetPts tuple; put into proper place in interp_vals
for (unsigned int i = 0; i < tl_tmp->get_n(); i++)
- interp_vals[tl_tmp->vi_rd[3*i+1]] = tl_tmp->vr_rd[i];
+ interp_vals[tl_tmp->vi_rd[3 * i + 1]] = tl_tmp->vr_rd[i];
- // now do locally-contained pts, since we're mapping everything
+ // now do locally-contained pts, since we're mapping everything
for (std::vector<unsigned int>::iterator vit = localMappedPts.begin();
- vit != localMappedPts.end(); vit += 2) {
- int mindex = *(vit+1);
+ vit != localMappedPts.end(); vit += 2) {
+ int mindex = *(vit + 1);
result = MB_FAILURE;
- if(LINEAR_FE == method){
- result = interp_field(mappedPts->vul_rd[mindex],
- CartVect(mappedPts->vr_wr+3*mindex),
- tag, interp_vals[*vit]);
- }else if (PLAIN_FE == method){
More information about the moab-dev
mailing list