Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
Nektar::LibUtilities::BLPoints Class Reference

#include <BLPoints.h>

Inheritance diagram for Nektar::LibUtilities::BLPoints:
Inheritance graph
[legend]
Collaboration diagram for Nektar::LibUtilities::BLPoints:
Collaboration graph
[legend]

Public Member Functions

virtual ~BLPoints ()
boost::shared_ptr< NekMatrix
< NekDouble > > 
CreateMatrix (const PointsKey &pkey)
const MatrixSharedPtrType GetI (const PointsKey &pkey)
const MatrixSharedPtrType GetI (const Array< OneD, const NekDouble > &x)
const MatrixSharedPtrType GetI (unsigned int numpoints, const Array< OneD, const NekDouble > &x)
 BLPoints (const PointsKey &key)
- Public Member Functions inherited from Nektar::LibUtilities::Points< NekDouble >
virtual ~Points ()
virtual void Initialize (void)
unsigned int GetPointsDim () const
unsigned int GetNumPoints () const
unsigned int GetTotNumPoints () const
PointsType GetPointsType () const
const Array< OneD, const
DataType > & 
GetZ () const
const Array< OneD, const
DataType > & 
GetW () const
void GetZW (Array< OneD, const DataType > &z, Array< OneD, const DataType > &w) const
void GetPoints (Array< OneD, const DataType > &x) const
void GetPoints (Array< OneD, const DataType > &x, Array< OneD, const DataType > &y) const
void GetPoints (Array< OneD, const DataType > &x, Array< OneD, const DataType > &y, Array< OneD, const DataType > &z) const
const MatrixSharedPtrTypeGetD (Direction dir=xDir) const
virtual const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y)
virtual const MatrixSharedPtrType GetI (const Array< OneD, const DataType > &x, const Array< OneD, const DataType > &y, const Array< OneD, const DataType > &z)
virtual const MatrixSharedPtrType GetGalerkinProjection (const PointsKey &pkey)

Static Public Member Functions

static boost::shared_ptr
< PointsBaseType
Create (const PointsKey &key)

Private Member Functions

 BLPoints ()
 Default constructor should not be called except by Create method.
 BLPoints (const BLPoints &points)
 Copy constructor should not be called.
void CalculatePoints ()
void CalculateWeights ()
void CalculateDerivMatrix ()
void CalculateInterpMatrix (unsigned int npts, const Array< OneD, const NekDouble > &xpoints, Array< OneD, NekDouble > &interp)

Additional Inherited Members

- Public Types inherited from Nektar::LibUtilities::Points< NekDouble >
typedef NekDouble DataType
typedef boost::shared_ptr
< NekMatrix< DataType > > 
MatrixSharedPtrType
- Protected Member Functions inherited from Nektar::LibUtilities::Points< NekDouble >
virtual void CalculatePoints ()
virtual void CalculateWeights ()
virtual void CalculateDerivMatrix ()
 Points (const PointsKey &key)
- Protected Attributes inherited from Nektar::LibUtilities::Points< NekDouble >
PointsKey m_pointsKey
Array< OneD, DataTypem_points [3]
Array< OneD, DataTypem_weights
MatrixSharedPtrType m_derivmatrix [3]
NekManager< PointsKey,
NekMatrix< DataType >
, PointsKey::opLess
m_InterpManager
NekManager< PointsKey,
NekMatrix< DataType >
, PointsKey::opLess
m_GalerkinProjectionManager

Detailed Description

Definition at line 47 of file BLPoints.h.

Constructor & Destructor Documentation

virtual Nektar::LibUtilities::BLPoints::~BLPoints ( )
inlinevirtual

Definition at line 50 of file BLPoints.h.

{
}
Nektar::LibUtilities::BLPoints::BLPoints ( const PointsKey key)
inline

Definition at line 67 of file BLPoints.h.

References CreateMatrix(), Nektar::LibUtilities::eBoundaryLayerPoints, Nektar::LibUtilities::eBoundaryLayerPointsRev, Nektar::LibUtilities::eFourierEvenlySpaced, Nektar::LibUtilities::eGaussGaussChebyshev, Nektar::LibUtilities::eGaussGaussLegendre, Nektar::LibUtilities::eGaussLobattoChebyshev, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGaussRadauMAlpha0Beta1, Nektar::LibUtilities::eGaussRadauMAlpha0Beta2, Nektar::LibUtilities::eGaussRadauMAlpha1Beta0, Nektar::LibUtilities::eGaussRadauMAlpha2Beta0, Nektar::LibUtilities::eGaussRadauMChebyshev, Nektar::LibUtilities::eGaussRadauMLegendre, Nektar::LibUtilities::eGaussRadauPChebyshev, Nektar::LibUtilities::eGaussRadauPLegendre, Nektar::LibUtilities::ePolyEvenlySpaced, Nektar::LibUtilities::Points< NekDouble >::m_InterpManager, and Nektar::LibUtilities::NekManager< KeyType, ValueT, opLessCreator >::RegisterCreator().

{
PointsKey(0, eGaussGaussLegendre),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussRadauMLegendre),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussRadauPLegendre),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussLobattoLegendre),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussGaussChebyshev),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussRadauMChebyshev),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussRadauPChebyshev),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussLobattoChebyshev),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussRadauMAlpha0Beta1),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussRadauMAlpha0Beta2),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussRadauMAlpha1Beta0),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eGaussRadauMAlpha2Beta0),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, ePolyEvenlySpaced),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eFourierEvenlySpaced),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eBoundaryLayerPoints),
boost::bind(&BLPoints::CreateMatrix, this, _1));
PointsKey(0, eBoundaryLayerPointsRev),
boost::bind(&BLPoints::CreateMatrix, this, _1));
}
Nektar::LibUtilities::BLPoints::BLPoints ( )
private

Default constructor should not be called except by Create method.

Nektar::LibUtilities::BLPoints::BLPoints ( const BLPoints points)
private

Copy constructor should not be called.

Member Function Documentation

void Nektar::LibUtilities::BLPoints::CalculateDerivMatrix ( )
private

Definition at line 97 of file BLPoints.cpp.

{
//// Allocate the derivative matrix.
}
void Nektar::LibUtilities::BLPoints::CalculateInterpMatrix ( unsigned int  npts,
const Array< OneD, const NekDouble > &  xpoints,
Array< OneD, NekDouble > &  interp 
)
private

Definition at line 152 of file BLPoints.cpp.

Referenced by GetI().

{
}
void Nektar::LibUtilities::BLPoints::CalculatePoints ( )
private

Definition at line 45 of file BLPoints.cpp.

References ASSERTL0, Nektar::LibUtilities::eBoundaryLayerPointsRev, Nektar::LibUtilities::PointsKey::GetFactor(), Nektar::LibUtilities::PointsKey::GetNumPoints(), Nektar::LibUtilities::PointsKey::GetPointsType(), Nektar::NekConstants::kNekUnsetDouble, Nektar::LibUtilities::Points< NekDouble >::m_points, Nektar::LibUtilities::Points< NekDouble >::m_pointsKey, and npts.

{
// Allocate the storage for points.
unsigned int npts = m_pointsKey.GetNumPoints();
// Derived power coefficient.
"Must set factor in BLPoints key");
if (fabs(r-1.0) < 1e-6)
{
NekDouble tmp = 2.0/(npts-1.0);
for (unsigned int i = 0; i < npts; ++i)
{
m_points[0][i] = -1.0 + i * tmp;
}
}
else
{
NekDouble a = 2.0 * (1.0-r) / (1.0 - pow(r,(double)npts));
m_points[0][0] = -1.0;
for (unsigned int i = 1; i < npts; ++i)
{
m_points[0][i] = m_points[0][i-1] + a*pow(r,(double)i);
}
m_points[0][npts-1] = 1.0;
}
{
vector<NekDouble> tmp(npts);
for (unsigned int i = 0; i < npts; ++i)
{
tmp[i] = - m_points[0][npts-1-i];
}
for (unsigned int i = 0; i < npts; ++i)
{
m_points[0][i] = tmp[i];
}
}
}
void Nektar::LibUtilities::BLPoints::CalculateWeights ( )
private

Definition at line 92 of file BLPoints.cpp.

{
}
boost::shared_ptr< Points< NekDouble > > Nektar::LibUtilities::BLPoints::Create ( const PointsKey key)
static

Definition at line 103 of file BLPoints.cpp.

{
boost::shared_ptr<Points<NekDouble> > returnval(MemoryManager<BLPoints>::AllocateSharedPtr(key));
returnval->Initialize();
return returnval;
}
boost::shared_ptr< NekMatrix< NekDouble > > Nektar::LibUtilities::BLPoints::CreateMatrix ( const PointsKey pkey)

Delegate to function below.

Definition at line 113 of file BLPoints.cpp.

References GetI(), Nektar::LibUtilities::PointsKey::GetNumPoints(), and Nektar::LibUtilities::PointsManager().

Referenced by BLPoints().

{
int numpoints = pkey.GetNumPoints();
Array<OneD, const NekDouble> xpoints;
PointsManager()[pkey]->GetPoints(xpoints);
/// Delegate to function below.
return GetI(numpoints, xpoints);
}
const boost::shared_ptr< NekMatrix< NekDouble > > Nektar::LibUtilities::BLPoints::GetI ( const PointsKey pkey)
virtual

Reimplemented from Nektar::LibUtilities::Points< NekDouble >.

Definition at line 124 of file BLPoints.cpp.

References ASSERTL0, Nektar::LibUtilities::PointsKey::GetPointsDim(), and Nektar::LibUtilities::Points< NekDouble >::m_InterpManager.

Referenced by CreateMatrix(), and GetI().

{
ASSERTL0(pkey.GetPointsDim()==1, "Fourier Points can only interp to other 1d point distributions");
return m_InterpManager[pkey];
}
const boost::shared_ptr< NekMatrix< NekDouble > > Nektar::LibUtilities::BLPoints::GetI ( const Array< OneD, const NekDouble > &  x)
virtual

Delegate to function below.

Reimplemented from Nektar::LibUtilities::Points< NekDouble >.

Definition at line 131 of file BLPoints.cpp.

References GetI().

{
int numpoints = 1;
/// Delegate to function below.
return GetI(numpoints, x);
}
const boost::shared_ptr< NekMatrix< NekDouble > > Nektar::LibUtilities::BLPoints::GetI ( unsigned int  numpoints,
const Array< OneD, const NekDouble > &  x 
)
virtual

Reimplemented from Nektar::LibUtilities::Points< NekDouble >.

Definition at line 139 of file BLPoints.cpp.

References CalculateInterpMatrix(), and Nektar::LibUtilities::Points< NekDouble >::GetNumPoints().

{
Array<OneD, NekDouble> interp(GetNumPoints()*numpoints);
CalculateInterpMatrix(numpoints, x, interp);
NekDouble* t = interp.data();
unsigned int np = GetNumPoints();
boost::shared_ptr< NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr(numpoints,np,t));
return returnval;
}