MFEM  v4.6.0
Finite element discretization library
Public Member Functions | List of all members
mfem::Poly_1D::Basis Class Reference

Class for evaluating 1D nodal, positive (Bernstein), or integrated (Gerritsma) bases. More...

#include <fe_base.hpp>

Public Member Functions

 Basis (const int p, const double *nodes, EvalType etype=Barycentric)
 Create a nodal or positive (Bernstein) basis of degree p. More...
 
void Eval (const double x, Vector &u) const
 Evaluate the basis functions at point x in [0,1]. More...
 
void Eval (const double x, Vector &u, Vector &d) const
 Evaluate the basis functions and their derivatives at point x in [0,1]. More...
 
void Eval (const double x, Vector &u, Vector &d, Vector &d2) const
 Evaluate the basis functions and their first two derivatives at point x in [0,1]. More...
 
void EvalIntegrated (const Vector &d, Vector &i) const
 Evaluate the "integrated" basis type using pre-computed closed basis derivatives. More...
 
void ScaleIntegrated (bool scale_integrated_)
 Set whether the "integrated" basis should be scaled by the subcell sizes. Has no effect for non-integrated bases. More...
 
bool IsIntegratedType () const
 Returns true if the basis is "integrated", false otherwise. More...
 
 ~Basis ()
 

Detailed Description

Class for evaluating 1D nodal, positive (Bernstein), or integrated (Gerritsma) bases.

Definition at line 978 of file fe_base.hpp.

Constructor & Destructor Documentation

◆ Basis()

mfem::Poly_1D::Basis::Basis ( const int  p,
const double *  nodes,
EvalType  etype = Barycentric 
)

Create a nodal or positive (Bernstein) basis of degree p.

Definition at line 1611 of file fe_base.cpp.

◆ ~Basis()

mfem::Poly_1D::Basis::~Basis ( )

Definition at line 1937 of file fe_base.cpp.

Member Function Documentation

◆ Eval() [1/3]

void mfem::Poly_1D::Basis::Eval ( const double  x,
Vector u 
) const

Evaluate the basis functions at point x in [0,1].

Definition at line 1675 of file fe_base.cpp.

◆ Eval() [2/3]

void mfem::Poly_1D::Basis::Eval ( const double  x,
Vector u,
Vector d 
) const

Evaluate the basis functions and their derivatives at point x in [0,1].

Definition at line 1736 of file fe_base.cpp.

◆ Eval() [3/3]

void mfem::Poly_1D::Basis::Eval ( const double  x,
Vector u,
Vector d,
Vector d2 
) const

Evaluate the basis functions and their first two derivatives at point x in [0,1].

Definition at line 1816 of file fe_base.cpp.

◆ EvalIntegrated()

void mfem::Poly_1D::Basis::EvalIntegrated ( const Vector d,
Vector i 
) const

Evaluate the "integrated" basis type using pre-computed closed basis derivatives.

This basis is given by the negative partial sum of the corresponding closed basis derivatives. The closed basis derivatives are given by d, and the result is stored in i.

Definition at line 1907 of file fe_base.cpp.

◆ IsIntegratedType()

bool mfem::Poly_1D::Basis::IsIntegratedType ( ) const
inline

Returns true if the basis is "integrated", false otherwise.

Definition at line 1023 of file fe_base.hpp.

◆ ScaleIntegrated()

void mfem::Poly_1D::Basis::ScaleIntegrated ( bool  scale_integrated_)

Set whether the "integrated" basis should be scaled by the subcell sizes. Has no effect for non-integrated bases.

Generally, this should be true for mfem::FiniteElement::MapType VALUE and false for all other map types. If this option is enabled, the basis functions will be scaled by the widths of the subintervals, so that the basis functions represent mean values. Otherwise, the basis functions represent integrated values.

Definition at line 1932 of file fe_base.cpp.


The documentation for this class was generated from the following files: