changed: override separateProjectionBasis in ASMxxD(mx)

in preparation for having a separate geometry basis. in that case
we cannot use the geomB pointer to check for equivalence.
also fixes two field mixed formulations with the higher
order basis being the second basis. in that case we are
not projecting on basis 1, but rather on basis 2.
This commit is contained in:
Arne Morten Kvarving 2023-08-28 11:58:40 +02:00
parent 0c2e160d90
commit 4abf4c64a7
12 changed files with 61 additions and 0 deletions

View File

@ -431,6 +431,12 @@ bool ASMs2D::raiseOrder (int ru, int rv)
} }
bool ASMs2D::separateProjectionBasis () const
{
return projB && projB != surf;
}
/*! /*!
This method is supposed to be invoked twice during the model generation. This method is supposed to be invoked twice during the model generation.
In the first call, with \a init = \e true, the spline surface object \a *surf In the first call, with \a init = \e true, the spline surface object \a *surf

View File

@ -312,6 +312,8 @@ public:
//! \brief Creates a separate projection basis for this patch. //! \brief Creates a separate projection basis for this patch.
virtual bool createProjectionBasis(bool init); virtual bool createProjectionBasis(bool init);
//! \brief Checks if a separate projection basis is used for this patch.
virtual bool separateProjectionBasis() const;
// Various methods for preprocessing of boundary conditions and patch topology // Various methods for preprocessing of boundary conditions and patch topology
// =========================================================================== // ===========================================================================

View File

@ -1124,3 +1124,11 @@ int ASMs2Dmx::getLastItgElmNode () const
{ {
return std::accumulate(elem_size.begin(), elem_size.begin() + geoBasis, -1); return std::accumulate(elem_size.begin(), elem_size.begin() + geoBasis, -1);
} }
bool ASMs2Dmx::separateProjectionBasis () const
{
return std::none_of(m_basis.begin(), m_basis.end(),
[this](const std::shared_ptr<Go::SplineSurface>& entry)
{ return entry.get() == projB; });
}

View File

@ -184,6 +184,9 @@ public:
//! \brief Swap between main and alternative projection basis. //! \brief Swap between main and alternative projection basis.
virtual void swapProjectionBasis(); virtual void swapProjectionBasis();
//! \brief Checks if a separate projection basis is used for this patch.
virtual bool separateProjectionBasis() const;
//! \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

View File

@ -365,6 +365,12 @@ bool ASMs3D::raiseOrder (int ru, int rv, int rw, bool setOrder)
} }
bool ASMs3D::separateProjectionBasis () const
{
return projB && projB != svol;
}
/*! /*!
This method is supposed to be invoked twice during the model generation. This method is supposed to be invoked twice during the model generation.
In the first call, with \a init = \e true, the spline volume object \a *svol In the first call, with \a init = \e true, the spline volume object \a *svol

View File

@ -337,6 +337,9 @@ public:
//! \brief Creates a separate projection basis for this patch. //! \brief Creates a separate projection basis for this patch.
virtual bool createProjectionBasis(bool init); virtual bool createProjectionBasis(bool init);
//! \brief Checks if a separate projection basis is used for this patch.
virtual bool separateProjectionBasis() const;
// Various methods for preprocessing of boundary conditions and patch topology // Various methods for preprocessing of boundary conditions and patch topology
// =========================================================================== // ===========================================================================

View File

@ -1276,3 +1276,11 @@ int ASMs3Dmx::getLastItgElmNode () const
{ {
return std::accumulate(elem_size.begin(), elem_size.begin() + geoBasis, -1); return std::accumulate(elem_size.begin(), elem_size.begin() + geoBasis, -1);
} }
bool ASMs3Dmx::separateProjectionBasis () const
{
return std::none_of(m_basis.begin(), m_basis.end(),
[this](const std::shared_ptr<Go::SplineVolume>& entry)
{ return entry.get() == projB; });
}

View File

@ -189,6 +189,9 @@ public:
//! \brief Swap between main and alternative projection basis. //! \brief Swap between main and alternative projection basis.
virtual void swapProjectionBasis(); virtual void swapProjectionBasis();
//! \brief Checks if a separate projection basis is used for this patch.
virtual bool separateProjectionBasis() const;
//! \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

View File

@ -1271,3 +1271,11 @@ BasisFunctionVals ASMu2Dmx::BasisFunctionCache::calculatePt (size_t el,
return result; return result;
} }
bool ASMu2Dmx::separateProjectionBasis () const
{
return std::none_of(m_basis.begin(), m_basis.end(),
[this](const SplinePtr& entry)
{ return entry == projB; });
}

View File

@ -246,6 +246,9 @@ public:
//! \brief Swaps between the main and alternative projection basis. //! \brief Swaps between the main and alternative projection basis.
virtual void swapProjectionBasis(); virtual void swapProjectionBasis();
//! \brief Checks if a separate projection basis is used for this patch.
virtual bool separateProjectionBasis() const;
private: private:
//! \brief Finds the elements and associted sizes at given parametric point. //! \brief Finds the elements and associted sizes at given parametric point.
//! \param[in] param Parametric point to find elements at //! \param[in] param Parametric point to find elements at

View File

@ -1069,3 +1069,11 @@ BasisFunctionVals ASMu3Dmx::BasisFunctionCache::calculatePt (size_t el,
return this->calculatePrm(fe,du,el,gp,reduced); return this->calculatePrm(fe,du,el,gp,reduced);
} }
bool ASMu3Dmx::separateProjectionBasis () const
{
return std::none_of(m_basis.begin(), m_basis.end(),
[this](const SplinePtr& entry)
{ return entry == projB; });
}

View File

@ -211,6 +211,9 @@ public:
//! \brief Swaps between the main and alternative projection basis. //! \brief Swaps between the main and alternative projection basis.
virtual void swapProjectionBasis(); virtual void swapProjectionBasis();
//! \brief Checks if a separate projection basis is used for this patch.
virtual bool separateProjectionBasis() const;
private: private:
//! \brief Finds the elements and associted sizes at given parametric point. //! \brief Finds the elements and associted sizes at given parametric point.
//! \param[in] param Parametric point to find elements at //! \param[in] param Parametric point to find elements at