diff --git a/examples/element_family.rs b/examples/element_family.rs index 4241040..14478c5 100644 --- a/examples/element_family.rs +++ b/examples/element_family.rs @@ -8,7 +8,7 @@ extern crate lapack_src; fn main() { // Create the degree 2 Lagrange element family. A family is a set of finite elements with the // same family type, degree, and continuity across a set of cells - let family = LagrangeElementFamily::::new(2, Continuity::Continuous); + let family = LagrangeElementFamily::::new(2, Continuity::Standard); // Get the element in the family on a triangle let element = family.element(ReferenceCellType::Triangle); diff --git a/examples/lagrange_element.rs b/examples/lagrange_element.rs index 49d3f49..8901146 100644 --- a/examples/lagrange_element.rs +++ b/examples/lagrange_element.rs @@ -10,7 +10,7 @@ extern crate lapack_src; fn main() { // Create a P2 element on a triangle - let element = lagrange::create::(ReferenceCellType::Triangle, 2, Continuity::Continuous); + let element = lagrange::create::(ReferenceCellType::Triangle, 2, Continuity::Standard); println!("This element has {} basis functions.", element.dim()); diff --git a/src/ciarlet.rs b/src/ciarlet.rs index e91dac4..f118e11 100644 --- a/src/ciarlet.rs +++ b/src/ciarlet.rs @@ -346,7 +346,7 @@ mod test { #[test] fn test_lagrange_1() { - let e = lagrange::create::(ReferenceCellType::Triangle, 1, Continuity::Continuous); + let e = lagrange::create::(ReferenceCellType::Triangle, 1, Continuity::Standard); assert_eq!(e.value_size(), 1); } @@ -370,7 +370,7 @@ mod test { #[test] fn test_lagrange_1_interval() { - let e = lagrange::create::(ReferenceCellType::Interval, 1, Continuity::Continuous); + let e = lagrange::create::(ReferenceCellType::Interval, 1, Continuity::Standard); assert_eq!(e.value_size(), 1); let mut data = rlst_dynamic_array4!(f64, e.tabulate_array_shape(0, 4)); let mut points = rlst_dynamic_array2!(f64, [4, 1]); @@ -423,7 +423,7 @@ mod test { #[test] fn test_lagrange_1_triangle() { - let e = lagrange::create::(ReferenceCellType::Triangle, 1, Continuity::Continuous); + let e = lagrange::create::(ReferenceCellType::Triangle, 1, Continuity::Standard); assert_eq!(e.value_size(), 1); let mut data = rlst_dynamic_array4!(f64, e.tabulate_array_shape(0, 6)); let mut points = rlst_dynamic_array2!(f64, [6, 2]); @@ -460,10 +460,10 @@ mod test { #[test] fn test_lagrange_higher_degree_triangle() { - lagrange::create::(ReferenceCellType::Triangle, 2, Continuity::Continuous); - lagrange::create::(ReferenceCellType::Triangle, 3, Continuity::Continuous); - lagrange::create::(ReferenceCellType::Triangle, 4, Continuity::Continuous); - lagrange::create::(ReferenceCellType::Triangle, 5, Continuity::Continuous); + lagrange::create::(ReferenceCellType::Triangle, 2, Continuity::Standard); + lagrange::create::(ReferenceCellType::Triangle, 3, Continuity::Standard); + lagrange::create::(ReferenceCellType::Triangle, 4, Continuity::Standard); + lagrange::create::(ReferenceCellType::Triangle, 5, Continuity::Standard); lagrange::create::(ReferenceCellType::Triangle, 2, Continuity::Discontinuous); lagrange::create::(ReferenceCellType::Triangle, 3, Continuity::Discontinuous); @@ -473,10 +473,10 @@ mod test { #[test] fn test_lagrange_higher_degree_interval() { - lagrange::create::(ReferenceCellType::Interval, 2, Continuity::Continuous); - lagrange::create::(ReferenceCellType::Interval, 3, Continuity::Continuous); - lagrange::create::(ReferenceCellType::Interval, 4, Continuity::Continuous); - lagrange::create::(ReferenceCellType::Interval, 5, Continuity::Continuous); + lagrange::create::(ReferenceCellType::Interval, 2, Continuity::Standard); + lagrange::create::(ReferenceCellType::Interval, 3, Continuity::Standard); + lagrange::create::(ReferenceCellType::Interval, 4, Continuity::Standard); + lagrange::create::(ReferenceCellType::Interval, 5, Continuity::Standard); lagrange::create::(ReferenceCellType::Interval, 2, Continuity::Discontinuous); lagrange::create::(ReferenceCellType::Interval, 3, Continuity::Discontinuous); @@ -486,10 +486,10 @@ mod test { #[test] fn test_lagrange_higher_degree_quadrilateral() { - lagrange::create::(ReferenceCellType::Quadrilateral, 2, Continuity::Continuous); - lagrange::create::(ReferenceCellType::Quadrilateral, 3, Continuity::Continuous); - lagrange::create::(ReferenceCellType::Quadrilateral, 4, Continuity::Continuous); - lagrange::create::(ReferenceCellType::Quadrilateral, 5, Continuity::Continuous); + lagrange::create::(ReferenceCellType::Quadrilateral, 2, Continuity::Standard); + lagrange::create::(ReferenceCellType::Quadrilateral, 3, Continuity::Standard); + lagrange::create::(ReferenceCellType::Quadrilateral, 4, Continuity::Standard); + lagrange::create::(ReferenceCellType::Quadrilateral, 5, Continuity::Standard); lagrange::create::( ReferenceCellType::Quadrilateral, @@ -545,8 +545,7 @@ mod test { #[test] fn test_lagrange_1_quadrilateral() { - let e = - lagrange::create::(ReferenceCellType::Quadrilateral, 1, Continuity::Continuous); + let e = lagrange::create::(ReferenceCellType::Quadrilateral, 1, Continuity::Standard); assert_eq!(e.value_size(), 1); let mut data = rlst_dynamic_array4!(f64, e.tabulate_array_shape(0, 6)); let mut points = rlst_dynamic_array2!(f64, [6, 2]); @@ -588,8 +587,7 @@ mod test { #[test] fn test_lagrange_2_quadrilateral() { - let e = - lagrange::create::(ReferenceCellType::Quadrilateral, 2, Continuity::Continuous); + let e = lagrange::create::(ReferenceCellType::Quadrilateral, 2, Continuity::Standard); assert_eq!(e.value_size(), 1); let mut data = rlst_dynamic_array4!(f64, e.tabulate_array_shape(0, 6)); let mut points = rlst_dynamic_array2!(f64, [6, 2]); @@ -661,7 +659,7 @@ mod test { #[test] fn test_raviart_thomas_1_triangle() { - let e = raviart_thomas::create(ReferenceCellType::Triangle, 1, Continuity::Continuous); + let e = raviart_thomas::create(ReferenceCellType::Triangle, 1, Continuity::Standard); assert_eq!(e.value_size(), 2); let mut data = rlst_dynamic_array4!(f64, e.tabulate_array_shape(0, 6)); let mut points = rlst_dynamic_array2!(f64, [6, 2]); diff --git a/src/ciarlet/lagrange.rs b/src/ciarlet/lagrange.rs index ff8bed3..7869612 100644 --- a/src/ciarlet/lagrange.rs +++ b/src/ciarlet/lagrange.rs @@ -26,7 +26,7 @@ pub fn create( let entity_counts = reference_cell::entity_counts(cell_type); let vertices = reference_cell::vertices::(cell_type); if degree == 0 { - if continuity == Continuity::Continuous { + if continuity == Continuity::Standard { panic!("Cannot create continuous degree 0 Lagrange element"); } for (d, counts) in entity_counts.iter().enumerate() { diff --git a/src/types.rs b/src/types.rs index 7bb0ed4..c0488c1 100644 --- a/src/types.rs +++ b/src/types.rs @@ -9,7 +9,7 @@ pub enum Continuity { /// For some element, this option does not indicate that the values are fully continuous. /// For example, for Raviart-Thomas elements it only indicates that the normal components /// are continuous across edges - Continuous = 0, + Standard = 0, /// The element is discontinuous betweeen cells Discontinuous = 1, }