diff --git a/FunctionSpace/FunctionSpaceVector.cpp b/FunctionSpace/FunctionSpaceVector.cpp index 5cbb3657f4575a56b4720b24f8158ee6f5c559ed..8ca871ef95bbe3dc461f3847d7d8d55a30de8451 100644 --- a/FunctionSpace/FunctionSpaceVector.cpp +++ b/FunctionSpace/FunctionSpaceVector.cpp @@ -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; }