131 bool localCoord =
false)
const;
144 static std::unique_ptr<concepts::QuadRuleFactoryTensor2d>&
factory() {
return factory_; }
158 std::unique_ptr<concepts::QuadratureRule2d>
intRule_;
165 static std::unique_ptr<concepts::QuadRuleFactoryTensor2d> factory_;
180 template<
class F = Real>
202 virtual std::ostream&
info(std::ostream& os)
const;
229 inline const ushort*
p()
const {
return p_; }
233 return shpfctX_.get();
237 return shpfctY_.get(); }
241 return shpfctDX_.get(); }
244 return shpfctDY_.get(); }
257 std::unique_ptr<concepts::Karniadakis<1,0> > shpfctX_, shpfctY_;
259 std::unique_ptr<concepts::Karniadakis<1,1> > shpfctDX_, shpfctDY_;
270 template<
class F = Real>
292 void edgeP(
const uint i,
const uint&
p) {
295 const uint
edgeP(
const uint i)
const {
301 virtual std::ostream&
info(std::ostream& os)
const;
304 static std::unique_ptr<concepts::ElementGraphics<F> > graphics_;
306 const uint* edges_[4];
335 inline const ushort*
p()
const {
return p_; }
339 {
return intX_.get(); }
343 {
return intY_.get(); }
371 return shpfctX_.get();
376 return shpfctDX_.get(); }
389 void computeIntegrationRuleFromP_(
const ushort*
p);
391 void computeIntegrationRule_(
const uint nq[2]);
396 virtual std::ostream&
info(std::ostream& os)
const;
402 std::unique_ptr<concepts::QuadratureRule1d>
intX_;
403 std::unique_ptr<concepts::QuadratureRule1d> intY_;
420 static uint constNumerOfPointsX_, constNumerOfPointsY_;
424 static uint addNumberOfPointsX_, addNumberOfPointsY_;
428 static bool useConstantNumberOfPointsX_, useConstantNumberOfPointsY_;
430 static Real borderY_;
433 std::unique_ptr<concepts::Karniadakis<1,0> > shpfctX_;
435 std::unique_ptr<concepts::Karniadakis<1,1> > shpfctDX_;
466 return shpfctY_.get(); }
470 return shpfctDY_.get(); }
472 void recomputeShapefunctions();
476 virtual std::ostream&
info(std::ostream& os)
const;
479 static std::unique_ptr<concepts::ElementGraphics<Real> > graphics_;
482 std::unique_ptr<concepts::LaguerreBasis<0> > shpfctY_;
484 std::unique_ptr<concepts::LaguerreBasis<1> > shpfctDY_;
487 void computeShapefunctionsY_();
526 const bool cache =
true);
534 virtual std::ostream&
info(std::ostream& os)
const;
566 inline const ushort* p()
const {
return p_; }
569 inline const KarniadakisDeriv2* shpfctX()
const {
570 return shpfctX_.get();
573 inline const KarniadakisDeriv2* shpfctY()
const {
574 return shpfctY_.get(); }
582 std::unique_ptr<KarniadakisDeriv2 > shpfctX_, shpfctY_;
593 template<
class F = Real>
594 class Quad :
public BaseQuad<F>,
public QuadShapeFunctions {
613 void recomputeShapefunctions();
614 void recomputeShapefunctions(
const uint nq[2]);
616 virtual std::ostream& info(std::ostream& os)
const;
619 static std::unique_ptr<concepts::ElementGraphics<F> > graphics_;
virtual Real3d vertex(uint i) const =0
Returns the coordinates of the ith vertex.
virtual Real3d elemMap(const Real2d &coord_local) const =0
Element map from point local coordinates in 2D.
Real3d vertex(uint i) const
Returns the coordinates of the ith vertex.
InfiniteQuad & connector() const
Returns the quadrilateral connector (topology)
Mapping< F, DimX, DimY > inverse() const
Returns the inverse of the matrix.
MapReal2d inverseLaplace(const Real xi, const Real eta) const
MapReal2d jacobian(const Real xi, const Real eta) const
const Quad2dSubdivision * getStrategy() const
virtual void setStrategy(const Quad2dSubdivision *strategy=0)
Quad & connector() const
Returns the quadrilateral connector (topology)
virtual Real gramDeterminantRoot(const Real xi, const Real eta) const =0
ArrayQuadWeights(const Quad<> &quad)
virtual const concepts::ElementGraphics< F > * graphics() const =0
Returns element graphics class.
virtual concepts::Real3d vertex(uint i) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual const concepts::Quad & support() const
BaseQuad(concepts::QuadNd &cell, const ushort *p, concepts::TColumn< F > *T0, concepts::TColumn< F > *T1)
virtual const concepts::QuadNd & cell() const
Returns the cell on which the element is built.
const concepts::LaguerreBasis< 1 > * shpfctDY() const
Returns the derivatives of the shape functions in x direction.
InfiniteLaguerreQuad(concepts::InfiniteQuad2d &cell, const ushort *p, concepts::TColumn< Real > *T0, concepts::TColumn< Real > *T1)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
const concepts::LaguerreBasis< 0 > * shpfctY() const
Returns the shape functions in x direction.
std::unique_ptr< concepts::QuadratureRule1d > intX_
The integration rules.
virtual const concepts::LaguerreBasis< 1 > * shpfctDY() const =0
Returns the derivatives of the shape functions in x direction.
void computeShapefunctionsX_()
gets the shapefunctions in x direction
ushort p_[2]
Polynomial degree.
virtual const concepts::LaguerreBasis< 0 > * shpfctY() const =0
Returns the shape functions in x direction.
static Real & borderY()
Largest value in local y coordinates. Default is 1.0.
const concepts::QuadratureRule1d * integrationX() const
Returns the integration rule in x direction.
const concepts::Karniadakis< 1, 0 > * shpfctX() const
Returns the shape functions in x direction.
const concepts::Karniadakis< 1, 1 > * shpfctDX() const
Returns the derivatives of the shape functions in x direction.
static void setIntegrationRuleX(enum concepts::intRule rule, bool constant, uint points)
InfiniteQuad(concepts::InfiniteQuad2d &cell, const ushort *p, concepts::TColumn< Real > *T0, concepts::TColumn< Real > *T1)
static void setIntegrationRuleY(bool constant, uint points, const Real border)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
const concepts::QuadratureRule1d * integrationY() const
Returns the integration rule in y direction.
concepts::Real3d vertex(uint i) const
const concepts::Connector2 & support() const
static void resetIntegrationRule()
Set the standard type of integration.
static std::string integrationRule()
Returns information on the settings of the quadrature rule.
const concepts::InfiniteQuad2d & cell() const
Returns the cell on which the element is built.
virtual bool quadraturePoint(uint i, intPoint &p, intFormType form=ZERO, bool localCoord=false) const
concepts::MapReal2d jacobianInverse(const Real x, const Real y) const
Computes the inverse of the Jacobian.
static concepts::QuadRuleFactoryTensor2d * factory_rp()
concepts::QuadNd & cell_
The cell.
concepts::MapReal2d jacobian(const Real x, const Real y) const
Computes the Jacobian.
std::unique_ptr< concepts::QuadratureRule2d > intRule_
The integration rules.
Real gramDeterminantRoot(const Real x, const Real y) const
concepts::Real2d chi(const Real x, const Real y) const
static std::unique_ptr< concepts::QuadRuleFactoryTensor2d > & factory()
const concepts::Quad2dSubdivision * getStrategy() const
void setStrategy(const concepts::Quad2dSubdivision *strategy=0)
~KarniadakisDeriv2()
Copy constructor.
KarniadakisDeriv2(const int P, const Real *xP, const int NxP, const bool cache=true)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
void computeShapefunctions_(const concepts::QuadratureRule2d *intRule)
gets the shapefunctions, used in both constructors
const concepts::Karniadakis< 1, 1 > * shpfctDY() const
Returns the shape functions in y direction.
QuadShapeFunctions(const ushort *p, const concepts::QuadratureRule2d *intRule)
QuadShapeFunctions(const ushort p, const concepts::QuadratureRule2d *intRule)
const concepts::Karniadakis< 1, 0 > * shpfctX() const
Returns the shape functions in x direction.
const concepts::Karniadakis< 1, 0 > * shpfctY() const
Returns the shape functions in y direction.
const concepts::Karniadakis< 1, 1 > * shpfctDX() const
Returns the derivatives of the shape functions in x direction.
void edgeP(const uint i, const uint &p)
Set polynomial degree of edge i to p.
virtual const concepts::ElementGraphics< F > * graphics() const
Returns element graphics class.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
void recomputeShapefunctions()
Quad(concepts::QuadNd &cell, const ushort *p, concepts::TColumn< F > *T0, concepts::TColumn< F > *T1)
#define conceptsAssert(cond, exc)
unsigned short ushort
Abbreviation for unsigned short.
intRule
Types of integration rules to choose from.
void setQuadrature(enum concepts::intRule rule, uint noP)