From fc35963aac2d9af8ef3a31e44341ed278d99ce96 Mon Sep 17 00:00:00 2001 From: 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/internals/cmp/generic | 68 ++++++++++---------- tests/fe/nedelec_crash_01/cmp/generic | 91 +-------------------------- 3 files changed, 64 insertions(+), 145 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/internals/cmp/generic b/tests/fe/internals/cmp/generic index 93e454b26c..14c62a7373 100644 --- a/tests/fe/internals/cmp/generic +++ b/tests/fe/internals/cmp/generic @@ -3973,17 +3973,17 @@ DEAL::Nedelec0<3> face 3 support points DEAL::Nedelec0<3> face 4 support points DEAL::Nedelec0<3> face 5 support points DEAL::Nedelec0<3> constraint -DEAL::0.5000000 ~ ~ ~ DEAL::0.2500000 0.2500000 ~ ~ -DEAL::~ ~ 0.5000000 ~ +DEAL::0.2500000 0.2500000 ~ ~ DEAL::~ ~ 0.2500000 0.2500000 -DEAL::~ 0.5000000 ~ ~ -DEAL::~ ~ 0.5000000 ~ DEAL::~ ~ 0.2500000 0.2500000 DEAL::0.5000000 ~ ~ ~ -DEAL::0.2500000 0.2500000 ~ ~ -DEAL::~ ~ ~ 0.5000000 +DEAL::0.5000000 ~ ~ ~ DEAL::~ 0.5000000 ~ ~ +DEAL::~ 0.5000000 ~ ~ +DEAL::~ ~ 0.5000000 ~ +DEAL::~ ~ 0.5000000 ~ +DEAL::~ ~ ~ 0.5000000 DEAL::~ ~ ~ 0.5000000 DEAL::Nedelec0<3> restriction 0 DEAL::1.00 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ @@ -4315,46 +4315,46 @@ DEAL::Nedelec1<3> face 3 support points DEAL::Nedelec1<3> face 4 support points DEAL::Nedelec1<3> face 5 support points DEAL::Nedelec1<3> constraint -DEAL::0.5000000 -0.4330127 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ -DEAL::~ 0.2500000 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ DEAL::0.2500000 -0.2165064 0.2500000 -0.2165064 ~ ~ ~ ~ ~ ~ -0.2165064 0.1875000 DEAL::~ 0.1250000 ~ 0.1250000 ~ ~ ~ ~ ~ ~ ~ -0.1082532 -DEAL::~ ~ ~ ~ 0.5000000 -0.4330127 ~ ~ ~ ~ ~ ~ -DEAL::~ ~ ~ ~ ~ 0.2500000 ~ ~ ~ ~ ~ ~ +DEAL::0.2500000 0.2165064 0.2500000 0.2165064 ~ ~ ~ ~ ~ ~ -0.2165064 -0.1875000 +DEAL::~ 0.1250000 ~ 0.1250000 ~ ~ ~ ~ ~ ~ ~ -0.1082532 DEAL::~ ~ ~ ~ 0.2500000 -0.2165064 0.2500000 -0.2165064 -0.2165064 0.1875000 ~ ~ DEAL::~ ~ ~ ~ ~ 0.1250000 ~ 0.1250000 ~ -0.1082532 ~ ~ -DEAL::~ ~ ~ ~ ~ ~ ~ ~ 0.1250000 -0.1082532 ~ ~ -DEAL::~ ~ ~ ~ ~ ~ ~ ~ ~ 0.06250000 ~ ~ -DEAL::~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 0.1250000 -0.1082532 -DEAL::~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 0.06250000 -DEAL::~ ~ 0.5000000 -0.4330127 ~ ~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0::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