OISEAU
A modern DGTD framework
Loading...
Searching...
No Matches
oiseau::dg::nodal::RefTriangle Class Reference

Represents a reference triangular element for nodal Discontinuous Galerkin methods. More...

#include <ref_triangle.hpp>

Inheritance diagram for oiseau::dg::nodal::RefTriangle:
oiseau::dg::nodal::RefElement

Public Member Functions

 RefTriangle (unsigned order)
 Constructs a RefTriangle object of a specific polynomial order.
Public Member Functions inherited from oiseau::dg::nodal::RefElement
const xt::xarray< double > & v () const
const xt::xarray< double > & gv () const
const xt::xarray< double > & d () const
const xt::xarray< double > & r () const
unsigned order () const
unsigned number_of_nodes () const
unsigned number_of_face_nodes () const

Static Public Member Functions

static xt::xarray< double > basis_function (const xt::xarray< double > &ab, int i, int j)
 Static member function that evaluates a 2D orthonormal basis function on the reference triangle in collapsed (a, b) coordinates.
static xt::xarray< double > grad_basis_function (const xt::xarray< double > &ab, int i, int j)
 Static member function that computes the gradient of a 2D orthonormal basis function on the reference triangle in (r, s) coordinates.

Additional Inherited Members

Protected Member Functions inherited from oiseau::dg::nodal::RefElement
 RefElement (unsigned order)
Protected Attributes inherited from oiseau::dg::nodal::RefElement
unsigned m_order
unsigned m_np {}
unsigned m_nfp {}
xt::xarray< double > m_v
xt::xarray< double > m_gv
xt::xarray< double > m_d
xt::xarray< double > m_r

Detailed Description

Represents a reference triangular element for nodal Discontinuous Galerkin methods.

The reference triangle is defined in (r, s) coordinates with vertices at (-1, -1), (1, -1), and (-1, 1). This class computes and stores properties such as nodal distribution, Vandermonde matrix, and differentiation matrices for a specified polynomial order.

Constructor & Destructor Documentation

◆ RefTriangle()

oiseau::dg::nodal::RefTriangle::RefTriangle ( unsigned order)
explicit

Constructs a RefTriangle object of a specific polynomial order.

Parameters
orderThe polynomial order for the basis functions on the triangle. Determines the number of nodes and approximation accuracy.

Member Function Documentation

◆ basis_function()

xt::xarray< double > oiseau::dg::nodal::RefTriangle::basis_function ( const xt::xarray< double > & ab,
int i,
int j )
static

Static member function that evaluates a 2D orthonormal basis function on the reference triangle in collapsed (a, b) coordinates.

The basis function is defined by: \(\sqrt{2}\,P_i^{0,0}(a)\,P_j^{2i+1,0}(b)\,(1 - b)^i\) where \(P_n^{\alpha,\beta}\) are Jacobi polynomials.

Parameters
ab2D array (shape: N_points × 2) of (a, b) coordinates where to evaluate the basis.
iPolynomial degree index for the a-direction component.
jPolynomial degree index for the b-direction component.
Returns
1D array (length N_points) of basis function values at each (a, b) point.

◆ grad_basis_function()

xt::xarray< double > oiseau::dg::nodal::RefTriangle::grad_basis_function ( const xt::xarray< double > & ab,
int i,
int j )
static

Static member function that computes the gradient of a 2D orthonormal basis function on the reference triangle in (r, s) coordinates.

Uses the chain rule to transform derivatives from collapsed (a, b) to (r, s).

Parameters
ab2D array (shape: N_points × 2) of (a, b) coordinates from rs_to_ab.
iPolynomial degree index for the a-component.
jPolynomial degree index for the b-component.
Returns
2D array (shape: N_points × 2) containing (∂/∂r, ∂/∂s) for each point.

The documentation for this class was generated from the following files:
  • /__w/oiseau/oiseau/src/oiseau/dg/nodal/ref_triangle.hpp
  • /__w/oiseau/oiseau/src/oiseau/dg/nodal/ref_triangle.cpp