File: test_crouzeix-raviart.py

package info (click to toggle)
basix 0.0.1~git20210122.4f10ef2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 696 kB
  • sloc: cpp: 3,987; python: 1,918; makefile: 33
file content (19 lines) | stat: -rw-r--r-- 530 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Copyright (c) 2020 Chris Richardson
# FEniCS Project
# SPDX-License-Identifier: MIT

import basix


def test_cr2d():
    cr2 = basix.CrouzeixRaviart("triangle", 1)
    pts = basix.create_lattice(basix.CellType.triangle, 2, basix.LatticeType.equispaced, True)
    w = cr2.tabulate(0, pts)[0]
    print(w.shape)


def test_cr3d():
    cr3 = basix.CrouzeixRaviart("tetrahedron", 1)
    pts = basix.create_lattice(basix.CellType.tetrahedron, 2, basix.LatticeType.equispaced, True)
    w = cr3.tabulate(0, pts)[0]
    print(w.shape)