1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! `POI1` — a single node.
use super::{ElementKind, Interpolation};
use crate::atoms::ElementType;
/// 1 node. A `POI1` submesh is effectively a list of nodes: it carries no
/// reference frame, so it has no domain to be inside of and no facet.
pub struct Poi1;
impl ElementKind for Poi1 {
fn element_type(&self) -> ElementType {
ElementType::POI1
}
fn ref_nodes(&self) -> &'static [&'static [f64]] {
&[&[]]
}
fn reversal_permutation(&self) -> &'static [usize] {
&[0]
}
fn corner_count(&self) -> usize {
1
}
fn ref_centroid(&self) -> &'static [f64] {
&[]
}
/// A point has no extent. Reported as `0` rather than left undefined so
/// generic code can compare measures without special-casing.
fn ref_measure(&self) -> f64 {
0.0
}
/// No reference frame, so no `ξ` is ever inside.
fn contains_ref(&self, _xi: &[f64], _tol: f64) -> bool {
false
}
fn clamp_ref(&self, _xi: &mut [f64]) {}
/// A point carries no reference frame, so no interpolation is defined
/// over it — `SubFiniteElementSpace::new` rejects `POI1` outright.
fn degree(&self) -> Option<Interpolation> {
None
}
/// The one constant function on a point. Never reached through
/// [`Interpolation`], which rejects `POI1`, but well defined.
fn shape_into(&self, _xi: &[f64], out: &mut [f64]) {
out[0] = 1.0;
}
/// Zero-length: a point has no direction to differentiate along.
fn dshape_into(&self, _xi: &[f64], _out: &mut [f64]) {}
/// A point has nothing to integrate over; `QuadratureRule` rejects `POI1`
/// before ever asking.
fn gauss(&self) -> (Vec<f64>, Vec<f64>) {
(Vec::new(), Vec::new())
}
fn vtk_code(&self) -> u8 {
1 // VTK_VERTEX
}
fn gmsh_code(&self) -> u32 {
15
}
}