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::FourierSingleModePoints Class Reference

#include <FourierSingleModePoints.h>

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

Public Member Functions

virtual ~FourierSingleModePoints ()
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)
 FourierSingleModePoints (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

 FourierSingleModePoints ()
 Default constructor should not be called except by Create method.
 FourierSingleModePoints (const FourierSingleModePoints &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)
NekDouble PeriodicSincFunction (const NekDouble x, const NekDouble h)

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 51 of file FourierSingleModePoints.h.

Constructor & Destructor Documentation

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

Definition at line 54 of file FourierSingleModePoints.h.

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

Definition at line 65 of file FourierSingleModePoints.h.

References CreateMatrix(), Nektar::LibUtilities::eFourierEvenlySpaced, Nektar::LibUtilities::eFourierSingleModeSpaced, 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().

{
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
boost::bind(&FourierSingleModePoints::CreateMatrix, this, _1));
}
Nektar::LibUtilities::FourierSingleModePoints::FourierSingleModePoints ( )
private

Default constructor should not be called except by Create method.

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

Copy constructor should not be called.

Member Function Documentation

void Nektar::LibUtilities::FourierSingleModePoints::CalculateDerivMatrix ( )
private
void Nektar::LibUtilities::FourierSingleModePoints::CalculateInterpMatrix ( unsigned int  npts,
const Array< OneD, const NekDouble > &  xpoints,
Array< OneD, NekDouble > &  interp 
)
private

Definition at line 136 of file FourierSingleModePoints.cpp.

Referenced by GetI().

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

Definition at line 46 of file FourierSingleModePoints.cpp.

References ASSERTL0, Nektar::LibUtilities::PointsKey::GetNumPoints(), 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();
if(npts==1)
{
m_points[0][0] = 0.25;
}
else
{
ASSERTL0(npts==2, "Fourier points for single mode analysis should be 2");
m_points[0][0] = 0.0;
m_points[0][1] = 0.5;
}
}
void Nektar::LibUtilities::FourierSingleModePoints::CalculateWeights ( )
private

Definition at line 66 of file FourierSingleModePoints.cpp.

References Nektar::LibUtilities::PointsKey::GetNumPoints(), Nektar::LibUtilities::Points< NekDouble >::m_pointsKey, Nektar::LibUtilities::Points< NekDouble >::m_weights, and npts.

{
// Allocate the storage for points
unsigned int npts = m_pointsKey.GetNumPoints();
//Here I need to insert the weight for the new point distribution
for(unsigned int i=0; i<npts; ++i)
{
m_weights[i] = 1.0;
}
}
boost::shared_ptr< Points< NekDouble > > Nektar::LibUtilities::FourierSingleModePoints::Create ( const PointsKey key)
static

Definition at line 86 of file FourierSingleModePoints.cpp.

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

Delegate to function below.

Definition at line 96 of file FourierSingleModePoints.cpp.

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

Referenced by FourierSingleModePoints().

{
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::FourierSingleModePoints::GetI ( const PointsKey pkey)
virtual

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

Definition at line 107 of file FourierSingleModePoints.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::FourierSingleModePoints::GetI ( const Array< OneD, const NekDouble > &  x)
virtual

Delegate to function below.

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

Definition at line 115 of file FourierSingleModePoints.cpp.

References GetI().

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

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

Definition at line 123 of file FourierSingleModePoints.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;
}
NekDouble Nektar::LibUtilities::FourierSingleModePoints::PeriodicSincFunction ( const NekDouble  x,
const NekDouble  h 
)
private