added: establish COMPATIBLE basis for Stokes
This commit is contained in:
committed by
Knut Morten Okstad
parent
ecef4de55f
commit
0d08357cb7
@@ -182,6 +182,7 @@ ASMmxBase::SurfaceVec ASMmxBase::establishBases(Go::SplineSurface* surf,
|
||||
ug,vg,XYZ,ndim,
|
||||
false,XYZ));
|
||||
}
|
||||
result[1].reset(new Go::SplineSurface(*surf));
|
||||
}
|
||||
else if (type == REDUCED_CONT_RAISE_BASIS1 || type == REDUCED_CONT_RAISE_BASIS2)
|
||||
{
|
||||
@@ -189,8 +190,46 @@ ASMmxBase::SurfaceVec ASMmxBase::establishBases(Go::SplineSurface* surf,
|
||||
// but only C^p-2 continuous
|
||||
result[0].reset(new Go::SplineSurface(*surf));
|
||||
result[0]->raiseOrder(1,1);
|
||||
result[1].reset(new Go::SplineSurface(*surf));
|
||||
}
|
||||
else if (ASMmxBase::Type == ASMmxBase::DIV_COMPATIBLE)
|
||||
{
|
||||
result.resize(3);
|
||||
|
||||
// basis1 should be one degree higher than basis2 and C^p-1 continuous
|
||||
int ndim = surf->dimension();
|
||||
Go::BsplineBasis a1 = surf->basis(0);
|
||||
Go::BsplineBasis a2 = surf->basis(1);
|
||||
Go::BsplineBasis b1 = surf->basis(0).extendedBasis(surf->order_u()+1);
|
||||
Go::BsplineBasis b2 = surf->basis(1).extendedBasis(surf->order_v()+1);
|
||||
|
||||
// Compute parameter values of the Greville points
|
||||
size_t i;
|
||||
RealArray u0(a1.numCoefs()), v0(a2.numCoefs());
|
||||
for (i = 0; i < u0.size(); i++)
|
||||
u0[i] = a1.grevilleParameter(i);
|
||||
for (i = 0; i < v0.size(); i++)
|
||||
v0[i] = a2.grevilleParameter(i);
|
||||
RealArray ug(b1.numCoefs()), vg(b2.numCoefs());
|
||||
for (i = 0; i < ug.size(); i++)
|
||||
ug[i] = b1.grevilleParameter(i);
|
||||
for (i = 0; i < vg.size(); i++)
|
||||
vg[i] = b2.grevilleParameter(i);
|
||||
|
||||
// Evaluate the spline surface at all points
|
||||
// Project the coordinates onto the new basis (the 2nd XYZ is dummy here)
|
||||
RealArray XYZ0(ndim*ug.size()*v0.size()), XYZ1(ndim*u0.size()*vg.size());
|
||||
surf->gridEvaluator(XYZ0,ug,v0);
|
||||
surf->gridEvaluator(XYZ1,u0,vg);
|
||||
result[2].reset(new Go::SplineSurface(*surf));
|
||||
result[0].reset(Go::SurfaceInterpolator::regularInterpolation(b1,a2,
|
||||
ug,v0,XYZ0,ndim,
|
||||
false,XYZ0));
|
||||
result[1].reset(Go::SurfaceInterpolator::regularInterpolation(a1,b2,
|
||||
u0,vg,XYZ1,ndim,
|
||||
false,XYZ1));
|
||||
geoBasis = 3;
|
||||
}
|
||||
result[1].reset(new Go::SplineSurface(*surf));
|
||||
|
||||
if (type == FULL_CONT_RAISE_BASIS2 || type == REDUCED_CONT_RAISE_BASIS2)
|
||||
std::swap(result[0], result[1]);
|
||||
|
||||
@@ -70,6 +70,7 @@ public:
|
||||
REDUCED_CONT_RAISE_BASIS1, //!< Reduced continuity, raise order and use as basis 1
|
||||
FULL_CONT_RAISE_BASIS2, //!< Full continuity, raise order and use as basis 2
|
||||
REDUCED_CONT_RAISE_BASIS2, //!< Reduced continuity, raise order and use as basis 2
|
||||
DIV_COMPATIBLE, //!< Div-compatible space for incompressible problems
|
||||
};
|
||||
|
||||
static MixedType Type; //!< Type of mixed formulation used
|
||||
|
||||
Reference in New Issue
Block a user