Skip to content

Commit

Permalink
Implement degree 0 to 2 macro polynomials on a triangle (#687)
Browse files Browse the repository at this point in the history
* Hard code degree 1 macro polynomials on a triangle

* cell types for iso

* correct basis functions

* decimals not std::sqrt

* Add degree 2 macro edge polyset on a triangle
  • Loading branch information
mscroggs authored Aug 16, 2023
1 parent 482741c commit fd06036
Show file tree
Hide file tree
Showing 6 changed files with 538 additions and 7 deletions.
7 changes: 4 additions & 3 deletions cpp/basix/e-lagrange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1435,10 +1435,11 @@ FiniteElement<T> basix::element::create_iso(cell::type celltype, int degree,
bool discontinuous)
{
if (celltype != cell::type::interval && celltype != cell::type::quadrilateral
&& celltype != cell::type::hexahedron)
&& celltype != cell::type::hexahedron && celltype != cell::type::triangle)
{
throw std::runtime_error("Can currently only create iso elements on "
"intervals, quadrilaterals, and hexahedra");
throw std::runtime_error(
"Can currently only create iso elements on "
"intervals, triangles, quadrilaterals, and hexahedra");
}

if (variant == lagrange_variant::unset)
Expand Down
Loading

0 comments on commit fd06036

Please sign in to comment.