Added parameter mixedFEM to create to have mixed formulation when nf[1] = 0

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1312 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
rho 2011-11-29 13:43:00 +00:00 committed by Knut Morten Okstad
parent ce2ac4c02e
commit 9644f6725c
2 changed files with 6 additions and 4 deletions

View File

@ -21,14 +21,15 @@
#endif
ASMbase* ASM2D::create (ASM::Discretization discretization, unsigned char* nf)
ASMbase* ASM2D::create (ASM::Discretization discretization,
unsigned char* nf, bool mixedFEM)
{
switch (discretization) {
case ASM::SplineC1:
return new ASMs2DC1(2,nf[0]);
case ASM::Lagrange:
if (nf[1] > 0)
if (nf[1] > 0 || mixedFEM)
return new ASMs2DmxLag(2,nf[0],nf[1]);
else
return new ASMs2DLag(2,nf[0]);
@ -42,7 +43,7 @@ ASMbase* ASM2D::create (ASM::Discretization discretization, unsigned char* nf)
#endif
default:
if (nf[1] > 0)
if (nf[1] > 0 || mixedFEM)
return new ASMs2Dmx(2,nf[0],nf[1]);
else
return new ASMs2D(2,nf[0]);

View File

@ -40,7 +40,8 @@ public:
//! \brief Creates a two-parametric patch of specified discretization type.
//! \param[in] type The discretization method to use
//! \param[in] nf Number of unknown per basis function in the patch
static ASMbase* create(ASM::Discretization type, unsigned char* nf);
static ASMbase* create(ASM::Discretization type, unsigned char* nf,
bool mixedFEM = false);
//! \brief Returns a copy of this patch with identical FE discretizations.
//! \param[in] nf Number of unknown per basis function in the patch