Added: Default implementation of IntegrandBase::getNoFields(int group)
returning the number of norm groups when the argument group is zero.
This commit is contained in:
		@@ -254,6 +254,19 @@ LocalIntegral* NormBase::getLocalIntegral (size_t, size_t iEl, bool) const
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
size_t NormBase::getNoFields (int group) const
 | 
			
		||||
{
 | 
			
		||||
  if (group > 0) return 0;
 | 
			
		||||
 | 
			
		||||
  // Calculate the number of norm groups
 | 
			
		||||
  size_t nf = 1;
 | 
			
		||||
  for (size_t i = 0; i < prjsol.size(); i++)
 | 
			
		||||
    if (!prjsol.empty()) nf++;
 | 
			
		||||
 | 
			
		||||
  return nf;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bool NormBase::initElement (const std::vector<int>& MNPC,
 | 
			
		||||
                            const FiniteElement& fe,
 | 
			
		||||
                            const Vec3& Xc, size_t nPt,
 | 
			
		||||
 
 | 
			
		||||
@@ -331,7 +331,9 @@ public:
 | 
			
		||||
  virtual void addBoundaryTerms(Vectors&, double) const {}
 | 
			
		||||
 | 
			
		||||
  //! \brief Returns the number of norm groups or size of a specified group.
 | 
			
		||||
  virtual size_t getNoFields(int group = 0) const { return 0; }
 | 
			
		||||
  //! \details If \a group is zero, the number of norm groups is returned.
 | 
			
		||||
  //! If \a group is greater than zero, the size of that groups is returned.
 | 
			
		||||
  virtual size_t getNoFields(int group = 0) const;
 | 
			
		||||
 | 
			
		||||
  //! \brief Returns the name of a norm quantity.
 | 
			
		||||
  //! \param[in] i The norm group
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user