]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed size of interface_constraints in FE_Nedelec
authorbuerg <buerg@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Nov 2010 15:13:41 +0000 (15:13 +0000)
committerbuerg <buerg@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Nov 2010 15:13:41 +0000 (15:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@22675 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/fe/fe_nedelec.cc
tests/fe/internals/cmp/generic

index 8fdbe96cc95363f40c59d66064c76aca350866a5..47b4c721f5cc94a9ccfc0f8a4828ee075227e36c 100644 (file)
@@ -70,20 +70,75 @@ deg (p)
 
   FETools::compute_face_embedding_matrices<dim,double>
     (*this, face_embeddings, 0, 0);
-  this->interface_constraints.reinit ((1 << (dim - 1)) * this->dofs_per_face,
-                                      this->dofs_per_face);
-
-  unsigned int target_row = 0;
-
-  for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
-    for (unsigned int j = 0; j < face_embeddings[i].m (); ++j)
-      {
-        for (unsigned int k = 0; k < face_embeddings[i].n (); ++k)
-          this->interface_constraints (target_row, k)
-            = face_embeddings[i] (j, k);
-
-        ++target_row;
-      }
+  
+  switch (dim)
+    {
+      case 1:
+        { 
+          this->interface_constraints.reinit (0, 0);
+          break;
+        }
+      
+      case 2:
+        { 
+          this->interface_constraints.reinit (2 * this->dofs_per_face,
+                                              this->dofs_per_face);
+          
+          for (unsigned int i = 0; i < GeometryInfo<2>::max_children_per_face;
+               ++i)
+            for (unsigned int j = 0; j < this->dofs_per_face; ++j)
+              for (unsigned int k = 0; k < this->dofs_per_face; ++k)
+                this->interface_constraints (i * this->dofs_per_face + j, k)
+                  = face_embeddings[i] (j, k);
+          
+          break;
+        }
+      
+      case 3:
+        {
+          this->interface_constraints.reinit
+          (4 * (this->dofs_per_face - this->degree), this->dofs_per_face);
+          
+          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 = i * this->degree; j < (i + 1) * 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);
+          
+          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 = (2 * i + 1) * this->degree;
+                 j < 2 * (i + 1) * this->degree; ++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);
+          
+          break;
+        }
+      
+      default:
+        Assert (false, ExcNotImplemented ());
+    }
 }
 
 
index 3cdf43676bc5de5a6059fbdff73342f6f436ffb8..93e454b26c8696cfaecbb5550a7d7ba05a7e4d6f 100644 (file)
@@ -3977,17 +3977,13 @@ 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.2500000  0.2500000  
 DEAL::~          ~          ~          0.5000000  
-DEAL::0.2500000  0.2500000  ~          ~          
 DEAL::~          0.5000000  ~          ~          
-DEAL::~          ~          0.2500000  0.2500000  
 DEAL::~          ~          ~          0.5000000  
 DEAL::Nedelec0<3> restriction 0
 DEAL::1.00   ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      
@@ -4331,8 +4327,6 @@ DEAL::~          ~          ~          ~          ~          ~          ~
 DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          0.06250000 ~          ~          
 DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          0.1250000  -0.1082532 
 DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          0.06250000 
-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.5000000  0.4330127  ~          ~          ~          ~          ~          ~          
@@ -4347,26 +4341,20 @@ 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.5000000  -0.4330127 ~          ~          ~          ~          
 DEAL::~          ~          ~          ~          ~          ~          ~          0.2500000  ~          ~          ~          ~          
-DEAL::~          ~          ~          ~          ~          ~          ~          ~          0.1250000  -0.1082532 ~          ~          
-DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          0.06250000 ~          ~          
-DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          0.1250000  0.1082532  
-DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          0.06250000 
-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.5000000  0.4330127  ~          ~          ~          ~          
 DEAL::~          ~          ~          ~          ~          ~          ~          0.2500000  ~          ~          ~          ~          
-DEAL::~          ~          ~          ~          ~          ~          ~          ~          0.1250000  0.1082532  ~          ~          
-DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          0.06250000 ~          ~          
-DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          0.1250000  0.1082532  
-DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          0.06250000 
+DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          
+DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          
+DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          
+DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          
+DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          
+DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          
+DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          
+DEAL::~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          ~          
 DEAL::Nedelec1<3> restriction 0
 DEAL::1.00   -0.0737 ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      
 DEAL::-0.903 0.436  ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      ~      

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.