Moved gauss integration up in the ASM hierarchy (set gauss points)

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1468 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
kjetijo 2012-02-17 14:33:46 +00:00 committed by Knut Morten Okstad
parent 7a85bc64e9
commit c45ce38e1f
6 changed files with 10 additions and 15 deletions

View File

@ -373,8 +373,7 @@ public:
//! \brief Extracts nodal results for this patch from the global vector. //! \brief Extracts nodal results for this patch from the global vector.
//! \param[in] globVec Global solution vector in DOF-order //! \param[in] globVec Global solution vector in DOF-order
//! \param[out] nodeVec Nodal result vector for this patch //! \param[out] nodeVec Nodal result vector for this patch
//! \param[in] nndof Number of DOFs per node (the default is \a nf) //! \param[in] nndof Number of DOFs per node (the default is \a nf) //! \param[in] basis Which basis to extract nodal values for (mixed methods)
//! \param[in] basis Which basis to extract nodal values for (mixed methods)
virtual void extractNodeVec(const Vector& globVec, Vector& nodeVec, virtual void extractNodeVec(const Vector& globVec, Vector& nodeVec,
unsigned char nndof = 0, int basis = 0) const; unsigned char nndof = 0, int basis = 0) const;
@ -450,6 +449,10 @@ protected:
public: public:
static bool fixHomogeneousDirichlet; //!< If \e true, pre-eliminate fixed DOFs static bool fixHomogeneousDirichlet; //!< If \e true, pre-eliminate fixed DOFs
//! \brief Defines the numerical integration scheme to use.
//! \param[in] ng Number of Gauss points in each parameter direction
void setGauss(int ng) { nGauss = ng; }
protected: protected:
// Standard finite element data structures // Standard finite element data structures
unsigned char ndim; //!< Number of parametric dimensions (1, 2 or 3) unsigned char ndim; //!< Number of parametric dimensions (1, 2 or 3)
@ -457,6 +460,8 @@ protected:
unsigned char nf; //!< Number of primary solution fields (1 or larger) unsigned char nf; //!< Number of primary solution fields (1 or larger)
size_t neldof; //!< Number of degrees of freedom per element size_t neldof; //!< Number of degrees of freedom per element
int nGauss; //!< Numerical integration scheme
const IntVec& MLGE; //!< Matrix of Local to Global Element numbers const IntVec& MLGE; //!< Matrix of Local to Global Element numbers
const IntVec& MLGN; //!< Matrix of Local to Global Node numbers const IntVec& MLGN; //!< Matrix of Local to Global Node numbers
const IntMat& MNPC; //!< Matrix of Nodal Point Correspondance const IntMat& MNPC; //!< Matrix of Nodal Point Correspondance

View File

@ -45,10 +45,6 @@ public:
//! \brief Checks if the patch is empty. //! \brief Checks if the patch is empty.
virtual bool empty() const { return geo == 0; } virtual bool empty() const { return geo == 0; }
//! \brief Defines the numerical integration scheme to use.
//! \param[in] ng Number of Gauss points in each parameter direction
void setGauss(int ng) { nGauss = ng; }
//! \brief Resets the global element and node counters. //! \brief Resets the global element and node counters.
static void resetNumbering() { gEl = gNod = 0; } static void resetNumbering() { gEl = gNod = 0; }
@ -70,7 +66,6 @@ protected:
//! Global indices to first integration point for the Neumann boundaries //! Global indices to first integration point for the Neumann boundaries
std::map<char,size_t> firstBp; std::map<char,size_t> firstBp;
int nGauss; //!< Numerical integration scheme
static int gEl; //!< Global element counter static int gEl; //!< Global element counter
static int gNod; //!< Global node counter static int gNod; //!< Global node counter
}; };

View File

@ -49,10 +49,6 @@ public:
//! \brief Checks if the patch is empty. //! \brief Checks if the patch is empty.
virtual bool empty() const { return geo == 0; } virtual bool empty() const { return geo == 0; }
//! \brief Defines the numerical integration scheme to use.
//! \param[in] ng Number of Gauss points in each parameter direction
void setGauss(int ng) { nGauss = ng; }
//! \brief Resets global element and node counters. //! \brief Resets global element and node counters.
static void resetNumbering() { gEl = gNod = 0; } static void resetNumbering() { gEl = gNod = 0; }
@ -64,7 +60,6 @@ public:
protected: protected:
LR::LRSplineSurface* geo; //!< Pointer to the actual spline geometry object LR::LRSplineSurface* geo; //!< Pointer to the actual spline geometry object
int nGauss; //!< Numerical integration scheme
static int gEl; //!< Global element counter static int gEl; //!< Global element counter
static int gNod; //!< Global node counter static int gNod; //!< Global node counter

View File

@ -392,7 +392,7 @@ void SIM1D::setQuadratureRule (size_t ng)
{ {
for (size_t i = 0; i < myModel.size(); i++) for (size_t i = 0; i < myModel.size(); i++)
if (!myModel.empty()) if (!myModel.empty())
static_cast<ASMs1D*>(myModel[i])->setGauss(ng); myModel[i]->setGauss(ng);
this->initIntegrationBuffers(); this->initIntegrationBuffers();
} }

View File

@ -545,7 +545,7 @@ void SIM2D::setQuadratureRule (size_t ng)
{ {
for (size_t i = 0; i < myModel.size(); i++) for (size_t i = 0; i < myModel.size(); i++)
if (!myModel.empty()) if (!myModel.empty())
static_cast<ASMs2D*>(myModel[i])->setGauss(ng); myModel[i]->setGauss(ng);
this->initIntegrationBuffers(); this->initIntegrationBuffers();
} }

View File

@ -578,7 +578,7 @@ void SIM3D::setQuadratureRule (size_t ng)
{ {
for (size_t i = 0; i < myModel.size(); i++) for (size_t i = 0; i < myModel.size(); i++)
if (!myModel.empty()) if (!myModel.empty())
static_cast<ASMs3D*>(myModel[i])->setGauss(ng); myModel[i]->setGauss(ng);
this->initIntegrationBuffers(); this->initIntegrationBuffers();
} }