OISEAU
A modern DGTD framework
Loading...
Searching...
No Matches
ref_quadrilateral.hpp
Go to the documentation of this file.
1// Copyright (C) 2025 Tiago V. L. Amorim (@tiagovla)
2//
3// This file is part of oiseau (https://github.com/tiagovla/oiseau)
4//
5// SPDX-License-Identifier: GPL-3.0-or-later
6
7#pragma once
8#include <xtensor/core/xtensor_forward.hpp>
9
10#include "oiseau/dg/nodal/ref_element.hpp"
11
33
34namespace oiseau::dg::nodal {
35
44class RefQuadrilateral : public RefElement {
45 public:
51 explicit RefQuadrilateral(unsigned order);
52
66 static xt::xarray<double> basis_function(const xt::xarray<double>& rs, int i, int j);
67
81 static xt::xarray<double> grad_basis_function(const xt::xarray<double>& rs, int i, int j);
82
83 private:
93 xt::xarray<double> vandermonde(const xt::xarray<double>& rs) const;
94
103 xt::xarray<double> grad_vandermonde(const xt::xarray<double>& rs) const;
104
115 xt::xarray<double> grad_operator(const xt::xarray<double>& v, const xt::xarray<double>& gv) const;
116};
117
118namespace detail {
119
128xt::xarray<double> generate_quadrilateral_nodes(unsigned order);
129
130} // namespace detail
131} // namespace oiseau::dg::nodal
RefQuadrilateral(unsigned order)
Constructs a RefQuadrilateral object of a specific polynomial order.
Definition ref_quadrilateral.cpp:24
static xt::xarray< double > basis_function(const xt::xarray< double > &rs, int i, int j)
Static member function that evaluates a 2D tensor-product basis function on the reference quadrilater...
Definition ref_quadrilateral.cpp:33
static xt::xarray< double > grad_basis_function(const xt::xarray< double > &rs, int i, int j)
Static member function that computes the gradient of a tensor-product basis function on the reference...
Definition ref_quadrilateral.cpp:41