changed: hardcode basis to 1 in ASMs[2|3]D::projectSolution
retains current behavior for single basis and this way it also works for basis 1 in mixed ASMs.
This commit is contained in:
parent
ea76fc6cf9
commit
b38a254a30
@ -116,10 +116,12 @@ Go::SplineSurface* ASMs2D::projectSolution (const IntegrandBase& integrnd) const
|
|||||||
{
|
{
|
||||||
PROFILE2("ASMs2D::projectSolution");
|
PROFILE2("ASMs2D::projectSolution");
|
||||||
|
|
||||||
|
const int basis = 1;
|
||||||
|
|
||||||
// Compute parameter values of the result sampling points (Greville points)
|
// Compute parameter values of the result sampling points (Greville points)
|
||||||
std::array<RealArray,2> gpar;
|
std::array<RealArray,2> gpar;
|
||||||
for (int dir = 0; dir < 2; dir++)
|
for (int dir = 0; dir < 2; dir++)
|
||||||
if (!this->getGrevilleParameters(gpar[dir],dir))
|
if (!this->getGrevilleParameters(gpar[dir],dir,basis))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// Evaluate the secondary solution at all sampling points
|
// 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)
|
if (!this->evalSolution(sValues,integrnd,gpar.data()) || sValues.rows() == 0)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
const Go::SplineSurface* psurf = this->getBasis(basis);
|
||||||
|
|
||||||
// Project the results onto the spline basis to find control point
|
// Project the results onto the spline basis to find control point
|
||||||
// values based on the result values evaluated at the Greville points.
|
// values based on the result values evaluated at the Greville points.
|
||||||
// Note that we here implicitly assume that the number of 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.
|
// other projection schemes later.
|
||||||
|
|
||||||
RealArray weights;
|
RealArray weights;
|
||||||
if (surf->rational())
|
if (psurf->rational())
|
||||||
surf->getWeights(weights);
|
psurf->getWeights(weights);
|
||||||
|
|
||||||
const Vector& vec = sValues;
|
const Vector& vec = sValues;
|
||||||
return Go::SurfaceInterpolator::regularInterpolation(surf->basis(0),
|
return Go::SurfaceInterpolator::regularInterpolation(psurf->basis(0),
|
||||||
surf->basis(1),
|
psurf->basis(1),
|
||||||
gpar[0], gpar[1],
|
gpar[0], gpar[1],
|
||||||
const_cast<Vector&>(vec),
|
const_cast<Vector&>(vec),
|
||||||
sValues.rows(),
|
sValues.rows(),
|
||||||
surf->rational(),
|
psurf->rational(),
|
||||||
weights);
|
weights);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -115,12 +115,16 @@ Go::SplineVolume* ASMs3D::projectSolution (const IntegrandBase& integrand) const
|
|||||||
{
|
{
|
||||||
PROFILE2("ASMs3D::projectSolution");
|
PROFILE2("ASMs3D::projectSolution");
|
||||||
|
|
||||||
|
const int basis = 1;
|
||||||
|
|
||||||
// Compute parameter values of the result sampling points (Greville points)
|
// Compute parameter values of the result sampling points (Greville points)
|
||||||
std::array<RealArray,3> gpar;
|
std::array<RealArray,3> gpar;
|
||||||
for (int dir = 0; dir < 3; dir++)
|
for (int dir = 0; dir < 3; dir++)
|
||||||
if (!this->getGrevilleParameters(gpar[dir],dir))
|
if (!this->getGrevilleParameters(gpar[dir],dir,basis))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
const Go::SplineVolume* pvol = this->getBasis(basis);
|
||||||
|
|
||||||
// Evaluate the secondary solution at all sampling points
|
// Evaluate the secondary solution at all sampling points
|
||||||
Matrix sValues;
|
Matrix sValues;
|
||||||
if (!this->evalSolution(sValues,integrand,gpar.data()) || sValues.rows() == 0)
|
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.
|
// other projection schemes later.
|
||||||
|
|
||||||
RealArray weights;
|
RealArray weights;
|
||||||
if (svol->rational())
|
if (pvol->rational())
|
||||||
svol->getWeights(weights);
|
pvol->getWeights(weights);
|
||||||
|
|
||||||
const Vector& vec = sValues;
|
const Vector& vec = sValues;
|
||||||
return Go::VolumeInterpolator::regularInterpolation(svol->basis(0),
|
return Go::VolumeInterpolator::regularInterpolation(pvol->basis(0),
|
||||||
svol->basis(1),
|
pvol->basis(1),
|
||||||
svol->basis(2),
|
pvol->basis(2),
|
||||||
gpar[0], gpar[1], gpar[2],
|
gpar[0], gpar[1], gpar[2],
|
||||||
const_cast<Vector&>(vec),
|
const_cast<Vector&>(vec),
|
||||||
sValues.rows(),
|
sValues.rows(),
|
||||||
svol->rational(),
|
pvol->rational(),
|
||||||
weights);
|
weights);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user