]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make FE_Nothing work with SolutionTransfer.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Dec 2011 19:31:40 +0000 (19:31 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Dec 2011 19:31:40 +0000 (19:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@24830 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/source/fe/fe.cc
deal.II/source/fe/fe_nothing.cc
deal.II/source/fe/fe_system.cc

index 0425b486e467a9b7964225dbd8b2951eb835f1b5..7ccff517e2eae7805f54368f87e06a14d01f0528 100644 (file)
@@ -73,7 +73,13 @@ enabled due to a missing include file in file
 <h3>Specific improvements</h3>
 
 <ol>
-<li> Fixed: DerivativeApproximation for distributed computations.
+<li> Fixed: Restriction and prolongation didn't work for elements of
+kind FE_Nothing. Consequently, many other parts of the library also
+didn't work, such as the SolutionTransfer class. This is now fixed.
+<br>
+(Wolfgang Bangerth, 2011/12/15)
+
+<li> Fixed: The DerivativeApproximation class now works for distributed computations.
 <br>
 (Timo Heister, 2011/12/15)
 
index 2c6b3d2a6f6ee8fdd12ae58a06562a053cc6082e..1f6340aa4b77839729319a3a857fbc5ea91456f7 100644 (file)
@@ -343,7 +343,7 @@ FiniteElement<dim,spacedim>::get_restriction_matrix (const unsigned int child,
                                   // RefinementCase<dim>::no_refinement (=0) there is no
                                   // data available and so the vector indices
                                   // are shifted
-  Assert (restriction[refinement_case-1][child].n() != 0, ExcProjectionVoid());
+  Assert (restriction[refinement_case-1][child].n() == this->dofs_per_cell, ExcProjectionVoid());
   return restriction[refinement_case-1][child];
 }
 
@@ -365,7 +365,7 @@ FiniteElement<dim,spacedim>::get_prolongation_matrix (const unsigned int child,
                                   // RefinementCase::no_refinement (=0) there is no
                                   // data available and so the vector indices
                                   // are shifted
-  Assert (prolongation[refinement_case-1][child].n() != 0, ExcEmbeddingVoid());
+  Assert (prolongation[refinement_case-1][child].n() == this->dofs_per_cell, ExcEmbeddingVoid());
   return prolongation[refinement_case-1][child];
 }
 
index 8b5d72c9097e2fc82ba11654d9a6084eeb227625..39eb591b353a948486c15433c42190b97dcbddc3 100644 (file)
@@ -33,7 +33,13 @@ FE_Nothing<dim>::FE_Nothing (const unsigned n_components)
                                        FiniteElementData<dim>::unknown),
                 std::vector<bool>(),
                 std::vector<std::vector<bool> >() )
-{}
+{
+// in most other elements we have to set up all sorts of stuff
+// here. there isn't much that we have to do here; in particular,
+// we can simply leave the restriction and prolongation matrices
+// empty since their proper size is in fact zero given that the
+// element here has no degrees of freedom
+}
 
 
 template <int dim>
index 9f3caf63ac0883c3f16c897dea938dd4729c0e81..054846bf93b395261028f5f31bf62cec3fb030dc 100644 (file)
@@ -1890,9 +1890,9 @@ void FESystem<dim,spacedim>::initialize ()
 
       for (unsigned int i=0; i<this->n_base_elements(); ++i)
        {
-         if (base_element(i).restriction[ref_case-1][0].n() == 0)
+         if (base_element(i).restriction[ref_case-1][0].n() != base_element(i).dofs_per_cell)
            do_restriction = false;
-         if (base_element(i).prolongation[ref_case-1][0].n() == 0)
+         if (base_element(i).prolongation[ref_case-1][0].n() != base_element(i).dofs_per_cell)
            do_prolongation = false;
        }
 

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.