//storing the source volumes
_source_volume.resize(source_size);
for (int i=0; i<source_size; i++)
- _source_volume[i] = source_triangle_surf->getValueIJ(i+1,1);
+ _source_volume[i] = fabs(source_triangle_surf->getValueIJ(i+1,1));
//loop over the elements to build the interpolation
//matrix structures
iter++)
{
//surface of the target triangle
- double surf = target_triangle_surf->getValueIJ(iter->first,1);
+ double surf = fabs(target_triangle_surf->getValueIJ(iter->first,1));
//locating the (iproc, itriangle) pair in the list of columns
vector<pair<int,int> >::iterator iter2 =
else
{
// barycenter of intersection of cells ielem and iter->first
- double* bary_centre = surfaces.getBaryCentre( ielem, iter->first );
+ double* bary_centre = surfaces.findBaryCentre( ielem, iter->first );
// coordinates of a source cell
const int* cell_conn = src_conn + nbNodesPerCell * ielem;
for ( int i = 0; i < nbNodesPerCell; ++i, ++cell_conn )
_coeffs[ielem].push_back(make_pair(col_id, &coef_values.back() ));
for ( int j = 1; j < bary_coords.size(); ++j )
coef_values.push_back(iter->second * bary_coords[j]);
+
+// cout << _source_group.myRank() << "| int area: "<< iter->second << endl;
+// cout << "bary_centre: " << bary_centre[0] << ", " << bary_centre[1] << ", "
+// << bary_centre[0] << ") " << endl << "bary_coords: ";
+// for ( int j = 0; j < bary_coords.size(); ++j )
+// cout << bary_coords[j] << " ";
+// cout << endl;
}
}
}
{
double coeff_row = field.getValueIJ(cell_conn[ival],icomp+1);
target_value[(colid-1)*nbcomp+icomp]+=value[ival]*coeff_row;
+// cout << _source_group.myRank() << ": row " << irow << ", colid: " << colid
+// << " -- coeff_row: " << coeff_row
+// << ", value: " << value[ival] << endl;
}
}
}
{
double coeff_row = field.getValueIJK(irow+1,icomp+1,ival+1);
target_value[(colid-1)*nbcomp+icomp]+=value[ival]*coeff_row;
+// cout << _source_group.myRank() << ": row " << irow << ", colid: " << colid
+// << ", ival: " << ival
+// << " -- coeff_row: " << coeff_row
+// << ", value: " << value[ival] << endl;
}
}
}