Removed doubly defined getSurface and getBasis methods in ASMs2Dmx

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1329 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
kmo 2011-12-01 18:30:31 +00:00 committed by Knut Morten Okstad
parent 3e7601970b
commit c6b642b7f4
7 changed files with 19 additions and 30 deletions

View File

@ -40,6 +40,7 @@ public:
//! \brief Creates a two-parametric patch of specified discretization type. //! \brief Creates a two-parametric patch of specified discretization type.
//! \param[in] type The discretization method to use //! \param[in] type The discretization method to use
//! \param[in] nf Number of unknown per basis function in the patch //! \param[in] nf Number of unknown per basis function in the patch
//! \param[in] mixedFEM If \e true, force mixed formulation even if \a nf[1]=0
static ASMbase* create(ASM::Discretization type, unsigned char* nf, static ASMbase* create(ASM::Discretization type, unsigned char* nf,
bool mixedFEM = false); bool mixedFEM = false);

View File

@ -79,7 +79,7 @@ public:
//! \brief Returns the spline surface representing the geometry of this patch. //! \brief Returns the spline surface representing the geometry of this patch.
Go::SplineSurface* getSurface() const { return surf; } Go::SplineSurface* getSurface() const { return surf; }
//! \brief Returns the spline surface representing the basis of this patch. //! \brief Returns the spline surface representing the basis of this patch.
virtual Go::SplineSurface* getBasis() const { return surf; } virtual Go::SplineSurface* getBasis(int = 1) const { return surf; }
// Methods for model generation // Methods for model generation

View File

@ -49,15 +49,6 @@ ASMs2Dmx::ASMs2Dmx (const ASMs2Dmx& patch, char n_f1, char n_f2)
} }
Go::SplineSurface* ASMs2Dmx::getBasis(int basis) const
{
if (basis == 2)
return basis2;
else
return basis1;
}
bool ASMs2Dmx::write (std::ostream& os, int basis) const bool ASMs2Dmx::write (std::ostream& os, int basis) const
{ {
if (basis1 && basis == 1) if (basis1 && basis == 1)
@ -163,13 +154,14 @@ bool ASMs2Dmx::generateFEMTopology ()
int ndim = surf->dimension(); int ndim = surf->dimension();
Go::BsplineBasis b1 = surf->basis(0).extendedBasis(surf->order_u()+1); Go::BsplineBasis b1 = surf->basis(0).extendedBasis(surf->order_u()+1);
Go::BsplineBasis b2 = surf->basis(1).extendedBasis(surf->order_v()+1); Go::BsplineBasis b2 = surf->basis(1).extendedBasis(surf->order_v()+1);
// To lower order and regularity this can be used /* To lower order and regularity this can be used instead
// std::vector<double>::const_iterator first = ++surf->basis(0).begin(); std::vector<double>::const_iterator first = ++surf->basis(0).begin();
// std::vector<double>::const_iterator last = --surf->basis(0).end(); std::vector<double>::const_iterator last = --surf->basis(0).end();
// Go::BsplineBasis b1 = Go::BsplineBasis(surf->order_u()-1,first,last); Go::BsplineBasis b1 = Go::BsplineBasis(surf->order_u()-1,first,last);
// first = ++surf->basis(1).begin(); first = ++surf->basis(1).begin();
// last = --surf->basis(1).end(); last = --surf->basis(1).end();
// Go::BsplineBasis b2 = Go::BsplineBasis(surf->order_v()-1,first,last); Go::BsplineBasis b2 = Go::BsplineBasis(surf->order_v()-1,first,last);
*/
// Note: Currently this is implemented for non-rational splines only. // Note: Currently this is implemented for non-rational splines only.
// TODO: Ask the splines people how to fix this properly, that is, how // TODO: Ask the splines people how to fix this properly, that is, how
@ -507,6 +499,7 @@ bool ASMs2Dmx::integrate (Integrand& integrand,
Matrix dN1du, dN2du, Xnod, Jac; Matrix dN1du, dN2du, Xnod, Jac;
Vec4 X; Vec4 X;
// === Assembly loop over all elements in the patch ========================== // === Assembly loop over all elements in the patch ==========================
int iel = 1; int iel = 1;

View File

@ -40,14 +40,8 @@ public:
virtual ~ASMs2Dmx() {} virtual ~ASMs2Dmx() {}
//! \brief Returns the spline surface representing the basis of this patch. //! \brief Returns the spline surface representing the basis of this patch.
virtual Go::SplineSurface* getBasis() const { return basis1; } virtual Go::SplineSurface* getBasis(int basis = 1) const
{ return basis == 2 ? basis2 : basis1; }
//! \brief Returns the spline surface representing this patch.
Go::SplineSurface* getSurface() const { return surf; }
//! \brief Returns the spline surface representing this patch.
Go::SplineSurface* getBasis(int basis) const;
// Methods for model generation // Methods for model generation

View File

@ -99,7 +99,7 @@ public:
//! \brief Returns the spline volume representing this patch. //! \brief Returns the spline volume representing this patch.
Go::SplineVolume* getVolume() const { return svol; } Go::SplineVolume* getVolume() const { return svol; }
//! \brief Returns the spline volume representing the basis of this patch. //! \brief Returns the spline volume representing the basis of this patch.
virtual Go::SplineVolume* getBasis() const { return svol; } virtual Go::SplineVolume* getBasis(int = 1) const { return svol; }
// Methods for model generation // Methods for model generation

View File

@ -43,7 +43,8 @@ public:
virtual ~ASMs3Dmx() {} virtual ~ASMs3Dmx() {}
//! \brief Returns the spline volume representing the basis of this patch. //! \brief Returns the spline volume representing the basis of this patch.
virtual Go::SplineVolume* getBasis() const { return basis1; } virtual Go::SplineVolume* getBasis(int basis = 1) const
{ return basis == 2 ? basis2 : basis1; }
// Methods for model generation // Methods for model generation