Skip to content
Snippets Groups Projects
Commit c44992c4 authored by Nicolas Marsic's avatar Nicolas Marsic
Browse files

Comparaison between fast and slow integration + Mapper with faster interface + Minor Fix

parent 4331047a
Branches
Tags
No related merge requests found
......@@ -27,7 +27,7 @@ interpolate(const MElement& element,
eelement.xyz2uvw(phys, uvw);
// Get Jacobian //
fullMatrix<double> invJac(3, 3);
fullMatrix<double> invJac(3, 3);
eelement.getJacobian(uvw[0], uvw[1], uvw[2], invJac);
invJac.invertInPlace();
......@@ -38,20 +38,23 @@ interpolate(const MElement& element,
const unsigned int nFun = fun->size1();
// Interpolate (in Reference Place) //
fullVector<double> val(3);
val(0) = 0;
val(1) = 0;
val(2) = 0;
fullMatrix<double> val(1, 3);
val(0, 0) = 0;
val(0, 1) = 0;
val(0, 2) = 0;
for(unsigned int i = 0; i < nFun; i++){
val(0) += (*fun)(i, 0) * coef[i];
val(1) += (*fun)(i, 1) * coef[i];
val(2) += (*fun)(i, 2) * coef[i];
val(0, 0) += (*fun)(i, 0) * coef[i];
val(0, 1) += (*fun)(i, 1) * coef[i];
val(0, 2) += (*fun)(i, 2) * coef[i];
}
// Return Interpolated Value //
delete fun;
return Mapper::grad(val, invJac);
fullVector<double> map(3);
Mapper::hCurl(val, 0, 0, invJac, map);
return map;
}
fullVector<double> FunctionSpaceVector::
......@@ -76,18 +79,21 @@ interpolateInRefSpace(const MElement& element,
// Interpolate (in Reference Place) //
fullVector<double> val(3);
val(0) = 0;
val(1) = 0;
val(2) = 0;
fullMatrix<double> val(1, 3);
val(0, 0) = 0;
val(0, 1) = 0;
val(0, 2) = 0;
for(unsigned int i = 0; i < nFun; i++){
val(0) += (*fun)(i, 0) * coef[i];
val(1) += (*fun)(i, 1) * coef[i];
val(2) += (*fun)(i, 2) * coef[i];
val(0, 0) += (*fun)(i, 0) * coef[i];
val(0, 1) += (*fun)(i, 1) * coef[i];
val(0, 2) += (*fun)(i, 2) * coef[i];
}
// Return Interpolated Value //
delete fun;
return Mapper::grad(val, invJac);
fullVector<double> map(3);
Mapper::hCurl(val, 0, 0, invJac, map);
return map;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment