From 7bd89c337f47373e64cecd5064f73971096396e7 Mon Sep 17 00:00:00 2001 From: Markus Buerg Date: Wed, 10 Nov 2010 15:49:55 +0000 Subject: [PATCH] Fixed wrong numbering of degrees of freedom in interface_constraints git-svn-id: https://svn.dealii.org/trunk@22680 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/fe/fe_nedelec.cc | 50 ++++++++------- tests/fe/nedelec_crash_01/cmp/generic | 91 +-------------------------- 2 files changed, 30 insertions(+), 111 deletions(-) diff --git a/deal.II/source/fe/fe_nedelec.cc b/deal.II/source/fe/fe_nedelec.cc index e904eb39c0..c024ab8133 100644 --- a/deal.II/source/fe/fe_nedelec.cc +++ b/deal.II/source/fe/fe_nedelec.cc @@ -101,37 +101,45 @@ deg (p) unsigned int target_row = 0; - for (unsigned int i = 0; i < this->dofs_per_face; ++i, ++target_row) - for (unsigned int j = 0; j < this->dofs_per_face; ++j) - this->interface_constraints (target_row, j) - = face_embeddings[0] (i, j); - - for (unsigned int i = this->degree; i < this->dofs_per_face; - ++i, ++target_row) - for (unsigned int j = 0; j < this->dofs_per_face; ++j) - this->interface_constraints (target_row, j) - = face_embeddings[1] (i, j); + for (unsigned int i = 0; i < 2; ++i) + for (unsigned int j = this->degree; j < 2 * this->degree; + ++j, ++target_row) + for (unsigned int k = 0; k < this->dofs_per_face; ++k) + this->interface_constraints (target_row, k) + = face_embeddings[2 * i] (j, k); for (unsigned int i = 0; i < 2; ++i) - for (unsigned int j = i * this->degree; j < (i + 1) * this->degree; + for (unsigned int j = 3 * this->degree; + j < GeometryInfo<3>::lines_per_face * this->degree; ++j, ++target_row) for (unsigned int k = 0; k < this->dofs_per_face; ++k) this->interface_constraints (target_row, k) - = face_embeddings[2] (j, k); + = face_embeddings[i] (j, k); - for (unsigned int i = 3 * this->degree; - i < GeometryInfo<3>::lines_per_face * this->degree; - ++i, ++target_row) - for (unsigned int j = 0; j < this->dofs_per_face; ++j) - this->interface_constraints (target_row, j) - = face_embeddings[2] (i, j); + for (unsigned int i = 0; i < 2; ++i) + for (unsigned int j = 0; j < 2; ++j) + for (unsigned int k = i * this->degree; + k < (i + 1) * this->degree; ++k, ++target_row) + for (unsigned int l = 0; l < this->dofs_per_face; ++l) + this->interface_constraints (target_row, l) + = face_embeddings[i + 2 * j] (k, l); for (unsigned int i = 0; i < 2; ++i) - for (unsigned int j = (2 * i + 1) * this->degree; - j < 2 * (i + 1) * this->degree; ++j, ++target_row) + for (unsigned int j = 0; j < 2; ++j) + for (unsigned int k = (i + 2) * this->degree; + k < (i + 3) * this->degree; ++k, ++target_row) + for (unsigned int l = 0; l < this->dofs_per_face; ++l) + this->interface_constraints (target_row, l) + = face_embeddings[2 * i + j] (k, l); + + for (unsigned int i = 0; i < GeometryInfo<3>::max_children_per_face; + ++i) + for (unsigned int + j = GeometryInfo<3>::lines_per_face * this->degree; + j < this->dofs_per_face; ++j, ++target_row) for (unsigned int k = 0; k < this->dofs_per_face; ++k) this->interface_constraints (target_row, k) - = face_embeddings[3] (j, k); + = face_embeddings[i] (j, k); break; } diff --git a/tests/fe/nedelec_crash_01/cmp/generic b/tests/fe/nedelec_crash_01/cmp/generic index 58aefa2e74..431dd8c97f 100644 --- a/tests/fe/nedelec_crash_01/cmp/generic +++ b/tests/fe/nedelec_crash_01/cmp/generic @@ -1,91 +1,2 @@ -DEAL:d2-p0::Setup -DEAL:d2-p0::Triangulation hypercube 2D refinement 1 steps 4 active cells 5 total cells -DEAL:d2-p0::Form 0 -DEAL:d2-p0::Difference d*d 0 -DEAL:d2-p0::Form 1 -DEAL:d2-p0::d^2 0 -DEAL:d2-p0::d*d^2 0 -DEAL:d2-p0::Difference d*d 0 -DEAL:d2-p0::Triangulation hypercube 2D refinement 2 local steps 7 active cells 9 total cells -DEAL:d2-p0::Form 0 -DEAL:d2-p0::Difference d*d 0 -DEAL:d2-p0::Form 1 -DEAL:d2-p0::d^2 0 -DEAL:d2-p0::d*d^2 0 -DEAL:d2-p0::Difference d*d 0 -DEAL:d2-p0::Triangulation hypercube 2D refinement 3 local steps 25 active cells 33 total cells -DEAL:d2-p0::Form 0 -DEAL:d2-p0::Difference d*d 0 -DEAL:d2-p0::Form 1 -DEAL:d2-p0::d^2 0 -DEAL:d2-p0::d*d^2 0 -DEAL:d2-p0::Difference d*d 0 -DEAL:d2-p1::Setup -DEAL:d2-p1::Triangulation hypercube 2D refinement 1 steps 4 active cells 5 total cells -DEAL:d2-p1::Form 0 -DEAL:d2-p1::Difference d*d 0 -DEAL:d2-p1::Form 1 -DEAL:d2-p1::d^2 0 -DEAL:d2-p1::d*d^2 0 -DEAL:d2-p1::Difference d*d 0 -DEAL:d2-p1::Triangulation hypercube 2D refinement 2 local steps 7 active cells 9 total cells -DEAL:d2-p1::Form 0 -DEAL:d2-p1::Difference d*d 0 -DEAL:d2-p1::Form 1 -DEAL:d2-p1::d^2 0 -DEAL:d2-p1::d*d^2 0 -DEAL:d2-p1::Difference d*d 0 -DEAL:d2-p1::Triangulation hypercube 2D refinement 3 local steps 25 active cells 33 total cells -DEAL:d2-p1::Form 0 -DEAL:d2-p1::Difference d*d 0 -DEAL:d2-p1::Form 1 -DEAL:d2-p1::d^2 0 -DEAL:d2-p1::d*d^2 0 -DEAL:d2-p1::Difference d*d 0 -DEAL:d2-p2::Setup -DEAL:d2-p2::Triangulation hypercube 2D refinement 1 steps 4 active cells 5 total cells -DEAL:d2-p2::Form 0 -DEAL:d2-p2::Difference d*d 0 -DEAL:d2-p2::Form 1 -DEAL:d2-p2::d^2 0 -DEAL:d2-p2::d*d^2 0 -DEAL:d2-p2::Difference d*d 0 -DEAL:d2-p2::Triangulation hypercube 2D refinement 2 local steps 7 active cells 9 total cells -DEAL:d2-p2::Form 0 -DEAL:d2-p2::Difference d*d 0 -DEAL:d2-p2::Form 1 -DEAL:d2-p2::d^2 0 -DEAL:d2-p2::d*d^2 0 -DEAL:d2-p2::Difference d*d 0 -DEAL:d2-p2::Triangulation hypercube 2D refinement 3 local steps 25 active cells 33 total cells -DEAL:d2-p2::Form 0 -DEAL:d2-p2::Difference d*d 0 -DEAL:d2-p2::Form 1 -DEAL:d2-p2::d^2 0 -DEAL:d2-p2::d*d^2 0 -DEAL:d2-p2::Difference d*d 0 -DEAL:d3-p0::Setup -DEAL:d3-p0::Triangulation hypercube 3D refinement 1 steps 8 active cells 9 total cells -DEAL:d3-p0::Form 0 -DEAL:d3-p0::Difference d*d 0 -DEAL:d3-p0::Form 1 -DEAL:d3-p0::d^2 0 -DEAL:d3-p0::d*d^2 0 -DEAL:d3-p0::Difference d*d 0 -DEAL:d3-p0::Form 2 -DEAL:d3-p0::d^2 0 -DEAL:d3-p0::d*d^2 0 -DEAL:d3-p0::Difference d*d 0 -DEAL:d3-p1::Setup -DEAL:d3-p1::Triangulation hypercube 3D refinement 1 steps 8 active cells 9 total cells -DEAL:d3-p1::Form 0 -DEAL:d3-p1::Difference d*d 0 -DEAL:d3-p1::Form 1 -DEAL:d3-p1::d^2 0 -DEAL:d3-p1::d*d^2 0 -DEAL:d3-p1::Difference d*d 0 -DEAL:d3-p1::Form 2 -DEAL:d3-p1::d^2 0 -DEAL:d3-p1::d*d^2 0 -DEAL:d3-p1::Difference d*d 0 +DEAL::Triangulation hypercube 3D refinement 2 local steps 15 active cells 17 total cells -- 2.39.5