diff --git a/src/ASM/ASMs2Drecovery.C b/src/ASM/ASMs2Drecovery.C index 8940aeaa..0037122f 100644 --- a/src/ASM/ASMs2Drecovery.C +++ b/src/ASM/ASMs2Drecovery.C @@ -116,10 +116,12 @@ Go::SplineSurface* ASMs2D::projectSolution (const IntegrandBase& integrnd) const { PROFILE2("ASMs2D::projectSolution"); + const int basis = 1; + // Compute parameter values of the result sampling points (Greville points) std::array gpar; for (int dir = 0; dir < 2; dir++) - if (!this->getGrevilleParameters(gpar[dir],dir)) + if (!this->getGrevilleParameters(gpar[dir],dir,basis)) return nullptr; // Evaluate the secondary solution at all sampling points @@ -127,6 +129,8 @@ Go::SplineSurface* ASMs2D::projectSolution (const IntegrandBase& integrnd) const if (!this->evalSolution(sValues,integrnd,gpar.data()) || sValues.rows() == 0) return nullptr; + const Go::SplineSurface* psurf = this->getBasis(basis); + // Project the results onto the spline basis to find control point // values based on the result values evaluated at the Greville points. // Note that we here implicitly assume that the number of Greville points @@ -135,17 +139,17 @@ Go::SplineSurface* ASMs2D::projectSolution (const IntegrandBase& integrnd) const // other projection schemes later. RealArray weights; - if (surf->rational()) - surf->getWeights(weights); + if (psurf->rational()) + psurf->getWeights(weights); const Vector& vec = sValues; - return Go::SurfaceInterpolator::regularInterpolation(surf->basis(0), - surf->basis(1), - gpar[0], gpar[1], - const_cast(vec), - sValues.rows(), - surf->rational(), - weights); + return Go::SurfaceInterpolator::regularInterpolation(psurf->basis(0), + psurf->basis(1), + gpar[0], gpar[1], + const_cast(vec), + sValues.rows(), + psurf->rational(), + weights); } diff --git a/src/ASM/ASMs3Drecovery.C b/src/ASM/ASMs3Drecovery.C index bdff28a4..14066d59 100644 --- a/src/ASM/ASMs3Drecovery.C +++ b/src/ASM/ASMs3Drecovery.C @@ -115,12 +115,16 @@ Go::SplineVolume* ASMs3D::projectSolution (const IntegrandBase& integrand) const { PROFILE2("ASMs3D::projectSolution"); + const int basis = 1; + // Compute parameter values of the result sampling points (Greville points) std::array gpar; for (int dir = 0; dir < 3; dir++) - if (!this->getGrevilleParameters(gpar[dir],dir)) + if (!this->getGrevilleParameters(gpar[dir],dir,basis)) return nullptr; + const Go::SplineVolume* pvol = this->getBasis(basis); + // Evaluate the secondary solution at all sampling points Matrix sValues; if (!this->evalSolution(sValues,integrand,gpar.data()) || sValues.rows() == 0) @@ -134,18 +138,18 @@ Go::SplineVolume* ASMs3D::projectSolution (const IntegrandBase& integrand) const // other projection schemes later. RealArray weights; - if (svol->rational()) - svol->getWeights(weights); + if (pvol->rational()) + pvol->getWeights(weights); const Vector& vec = sValues; - return Go::VolumeInterpolator::regularInterpolation(svol->basis(0), - svol->basis(1), - svol->basis(2), - gpar[0], gpar[1], gpar[2], - const_cast(vec), - sValues.rows(), - svol->rational(), - weights); + return Go::VolumeInterpolator::regularInterpolation(pvol->basis(0), + pvol->basis(1), + pvol->basis(2), + gpar[0], gpar[1], gpar[2], + const_cast(vec), + sValues.rows(), + pvol->rational(), + weights); }