35 #include <boost/core/ignore_unused.hpp> 50 StdSegExp::StdSegExp()
93 bool returnval =
false;
126 int nquad0 =
m_base[0]->GetNumPoints();
161 boost::ignore_unused(out_d1, out_d2);
170 boost::ignore_unused(dir);
171 ASSERTL1(dir==0,
"input dir is out of range");
182 boost::ignore_unused(out_d1, out_d2);
192 boost::ignore_unused(dir);
193 ASSERTL1(dir==0,
"input dir is out of range");
227 int nquad =
m_base[0]->GetNumPoints();
229 if(
m_base[0]->Collocation())
237 (
m_base[0]->GetBdata()).
get(),
238 nquad,&inarray[0],1,0.0,&outarray[0],1);
248 int n_coeffs = inarray.num_elements();
255 int nmodes0 =
m_base[0]->GetNumModes();
267 b0, coeff_tmp, bortho0, coeff);
276 bortho0, coeff_tmp, b0, outarray);
300 if(
m_base[0]->Collocation())
323 if(
m_base[0]->Collocation())
352 ASSERTL0(
false,
"This type of FwdTrans is not defined for this expansion type");
355 fill(outarray.get(), outarray.get()+
m_ncoeffs, 0.0 );
380 &(matsys->GetPtr())[0],nInteriorDofs,tmp1.get()
381 +offset,1,0.0,outarray.get()+offset,1);
434 boost::ignore_unused(coll_check);
436 int nquad =
m_base[0]->GetNumPoints();
455 &tmp[0],1,0.0,outarray.get(),1);
479 boost::ignore_unused(dir);
480 ASSERTL1(dir >= 0 && dir < 1,
"input dir is out of range");
487 bool multiplybyweights)
489 int nquad =
m_base[0]->GetNumPoints();
494 if(multiplybyweights)
499 &tmp[0],1,0.0,outarray.get(),1);
504 &inarray[0],1,0.0,outarray.get(),1);
518 int nquad =
m_base[0]->GetNumPoints();
522 "calling argument mode is larger than total expansion order");
540 boost::ignore_unused(mkey);
542 int nquad =
m_base[0]->GetNumPoints();
560 int nquad =
m_base[0]->GetNumPoints();
581 int nq =
m_base[0]->GetNumPoints();
582 int nmodes =
m_base[0]->GetNumModes();
596 OrthoExp.
FwdTrans(array,orthocoeffs);
599 for(
int j = 0; j < nmodes; ++j)
604 (SvvDiffCoeff*exp(-(j-nmodes)*(j-nmodes)/
610 orthocoeffs[j] *= 0.0;
615 OrthoExp.
BwdTrans(orthocoeffs,array);
625 int nq =
m_base[0]->GetNumPoints();
626 int nmodes =
m_base[0]->GetNumModes();
639 OrthoExp.
FwdTrans(array,orthocoeffs);
643 for(
int j = 0; j < nmodes; ++j)
649 fac = pow(fac, exponent);
650 orthocoeffs[j] *= exp(-alpha*fac);
655 OrthoExp.
BwdTrans(orthocoeffs,array);
663 int nquad0 =
m_base[0]->GetNumPoints();
668 w0.get(),1,outarray.get(),1);
676 boost::ignore_unused(coords_1, coords_2);
705 const std::vector<unsigned int> &nummodes,
708 int nmodes = nummodes[modes_offset];
727 int nq =
m_base[0]->GetNumPoints();
742 for(
int i = 0; i < neq; ++i)
744 coords[0] = -1.0 + 2*i/(
NekDouble)(neq-1);
745 I =
m_base[0]->GetI(coords);
747 Mat->GetRawPtr()+i,neq);
759 (*Mat) = Imass*Iprod;
801 int nummodes =
m_base[0]->GetNumModes();
811 outarray[1]= nummodes-1;
818 ASSERTL0(0,
"Mapping array is not defined for this expansion");
851 ASSERTL0(0,
"Mapping array is not defined for this expansion");
858 boost::ignore_unused(useCoeffPacking);
859 ASSERTL0((localVertexId==0)||(localVertexId==1),
"local vertex id" 860 "must be between 0 or 1");
862 int localDOF = localVertexId;
867 localDOF =
m_base[0]->GetNumModes()-1;
876 boost::ignore_unused(standard);
877 int np =
m_base[0]->GetNumPoints();
881 for(
int i = 0; i < np-1; ++i)
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrate the physical point list inarray over region and return the value.
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
#define ASSERTL0(condition, msg)
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
virtual void v_ExponentialFilter(Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff)
virtual void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2)
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
int NumBndryCoeffs(void) const
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Backward transform from coefficient space given in inarray and evaluate at the physical quadrature po...
virtual int v_GetNverts() const
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void InterpCoeff1D(const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
Principle Modified Functions .
Lagrange Polynomials using the Gauss points .
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
StdSegExp()
Default constructor.
std::shared_ptr< DNekMat > DNekMatSharedPtr
LibUtilities::NekManager< StdMatrixKey, DNekBlkMat, StdMatrixKey::opLess > m_stdStaticCondMatrixManager
MatrixType GetMatrixType() const
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
virtual bool v_IsBoundaryInteriorExpansion()
virtual LibUtilities::ShapeType v_DetShapeType() const
Return Shape of region, using ShapeType enum list. i.e. Segment.
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
virtual int v_NumDGBndryCoeffs() const
virtual int v_NumBndryCoeffs() const
Class representing a segment element in reference space.
The base class for all shapes.
int GetVertexMap(const int localVertexId, bool useCoeffPacking=false)
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
int getNumberOfCoefficients(int Na)
Principle Modified Functions .
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
DNekMatSharedPtr CreateGeneralMatrix(const StdMatrixKey &mkey)
this function generates the mass matrix
Principle Orthogonal Functions .
Defines a specification for a set of points.
static void Dgemv(const char &trans, const int &m, const int &n, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = A x where A[m x n].
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return...
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &Lcoords, const Array< OneD, const NekDouble > &physvals)
NekDouble GetConstFactor(const ConstFactorType &factor) const
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
void PhysTensorDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Evaluate the derivative at the physical quadrature points given by inarray and return in outarray...
bool ConstFactorExists(const ConstFactorType &factor) const
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Backward transformation from coefficient space to physical space...
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
T Vsum(int n, const T *x, const int incx)
Subtract return sum(x)
void Zero(int n, T *x, const int incx)
Zero vector.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Array< OneD, LibUtilities::BasisSharedPtr > m_base
static void Daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: y = alpha x plus y.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
static void Dcopy(const int &n, const double *x, const int &incx, double *y, const int &incy)
BLAS level 1: Copy x to y.
Describes the specification for a Basis.
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
1D Gauss-Lobatto-Legendre quadrature points
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
Evaluate the derivative at the physical quadrature points given by inarray and return in outarray...
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Forward transformation from physical space to coefficient space...