]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add tests for transform_unit_to_real_cell and transform_real_to_unit_cell functions...
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Jun 2002 09:25:52 +0000 (09:25 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Jun 2002 09:25:52 +0000 (09:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@6037 0785d39b-7218-0410-832d-ea1e28bc413d

tests/fe/mapping.cc
tests/fe/mapping.checked

index 55ee9af33f648b8e6cc846da8eeac0d645560157..cf74d62f8d391f63f9c6bb96dfea1fe604ef5d03 100644 (file)
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (C) 2001 Ralf Hartmann
+// Copyright (C) 2001, 2002 Ralf Hartmann
 //
 // Shows the shape functions implemented and computes the area of cells.
 
@@ -506,10 +506,23 @@ void mapping_test()
 
            
                                   // Test for transform_*_to_*_cell
-           if (dim==2 && true)
+           if (true)
              {
                Mapping<dim> &mapping=*mapping_ptr[j];
-               Point<dim> p_unit(6/7.,4/7.);
+               Point<dim> p_unit;
+               switch(dim)
+                 {
+                   case 1:
+                         p_unit=Point<dim>(6/7.);
+                         break;
+                   case 2:
+                         p_unit=Point<dim>(6/7.,4/7.);
+                         break;
+                   case 3:
+                         p_unit=Point<dim>(6/7.,4/7.,5/7.);
+                         break;
+                 }
+               
                Point<dim> p_real=mapping.transform_unit_to_real_cell(cell, p_unit);
                Point<dim> p_re_unit=mapping.transform_real_to_unit_cell(cell, p_real);
                deallog << "p_unit=" << p_unit << ",  p_real=" << p_real
index 8063966acd70e55a07458fd8f13f7b98f58fca33..04146571415bb4c0a29fb2d1c01947f1e32230ab 100644 (file)
@@ -14,6 +14,7 @@ DEAL:Mapping1d-0-Q1fixed::3.0 2.0
 DEAL:Mapping1d-0-Q1fixed::
 DEAL:Mapping1d-0-Q1fixed::
 DEAL::  area=2.0
+DEAL::p_unit=0.86,  p_real=2.7,  p_re_unit=0.86
 DEAL::Mapping1d-0-Q1
 DEAL:Mapping1d-0-Q1::1.0 2.0
 DEAL:Mapping1d-0-Q1::1.3 2.0
@@ -26,6 +27,7 @@ DEAL:Mapping1d-0-Q1::3.0 2.0
 DEAL:Mapping1d-0-Q1::
 DEAL:Mapping1d-0-Q1::
 DEAL::  area=2.0
+DEAL::p_unit=0.86,  p_real=2.7,  p_re_unit=0.86
 DEAL::Mapping1d-0-Cartesian
 DEAL:Mapping1d-0-Cartesian::1.0 2.0
 DEAL:Mapping1d-0-Cartesian::1.3 2.0
@@ -38,6 +40,7 @@ DEAL:Mapping1d-0-Cartesian::3.0 2.0
 DEAL:Mapping1d-0-Cartesian::
 DEAL:Mapping1d-0-Cartesian::
 DEAL::  area=2.0
+DEAL::p_unit=0.86,  p_real=2.7,  p_re_unit=0.86
 DEAL::dim=2
 DEAL::Triangulation0:
 DEAL::exact_area=9.0
@@ -2174,6 +2177,7 @@ DEAL:MappingSubface3d-3-Q1fixed::-1.4 -0.64 -0.18 -0.88 -0.35 -0.32
 DEAL:MappingSubface3d-3-Q1fixed::-1.4 -0.65 -0.038     -0.88 -0.36 -0.32
 DEAL:MappingSubface3d-3-Q1fixed::
 DEAL:MappingSubface3d-3-Q1fixed::
+DEAL::p_unit=0.86 0.57 0.71,  p_real=-0.20 -0.65 -0.42,  p_re_unit=0.86 0.57 0.71
 DEAL::Mapping3d-3-Q1
 DEAL:Mapping3d-3-Q1::-1.0 -1.0 -1.0 0.83
 DEAL:Mapping3d-3-Q1::-1.0 -1.0 -0.86 0.88
@@ -3392,6 +3396,7 @@ DEAL:MappingSubface3d-3-Q1::-1.4 -0.64 -0.18      -0.88 -0.35 -0.32
 DEAL:MappingSubface3d-3-Q1::-1.4 -0.65 -0.038  -0.88 -0.36 -0.32
 DEAL:MappingSubface3d-3-Q1::
 DEAL:MappingSubface3d-3-Q1::
+DEAL::p_unit=0.86 0.57 0.71,  p_real=-0.20 -0.65 -0.42,  p_re_unit=0.86 0.57 0.71
 DEAL::Mapping3d-3-Q2
 DEAL:Mapping3d-3-Q2::-1.0 -1.0 -1.0 0.024
 DEAL:Mapping3d-3-Q2::-1.1 -1.1 -0.87 0.013
@@ -4610,6 +4615,7 @@ DEAL:MappingSubface3d-3-Q2::-1.6 -0.70 -0.22      -0.91 -0.40 -0.13
 DEAL:MappingSubface3d-3-Q2::-1.6 -0.70 -0.047  -0.91 -0.41 -0.045
 DEAL:MappingSubface3d-3-Q2::
 DEAL:MappingSubface3d-3-Q2::
+DEAL::p_unit=0.86 0.57 0.71,  p_real=-0.20 -0.67 -0.42,  p_re_unit=0.86 0.57 0.71
 DEAL::Mapping3d-3-Q3
 DEAL:Mapping3d-3-Q3::-1.0 -1.0 -1.0 0.0066
 DEAL:Mapping3d-3-Q3::-1.1 -1.1 -0.87 0.0085
@@ -5828,6 +5834,7 @@ DEAL:MappingSubface3d-3-Q3::-1.6 -0.70 -0.21      -0.91 -0.41 -0.12
 DEAL:MappingSubface3d-3-Q3::-1.6 -0.71 -0.045  -0.91 -0.41 -0.022
 DEAL:MappingSubface3d-3-Q3::
 DEAL:MappingSubface3d-3-Q3::
+DEAL::p_unit=0.86 0.57 0.71,  p_real=-0.22 -0.68 -0.44,  p_re_unit=0.86 0.57 0.71
 DEAL::Triangulation4:
 DEAL::exact_area=4.5
 DEAL::Mapping3d-4-Cartesian
@@ -7048,3 +7055,4 @@ DEAL:MappingSubface3d-4-Cartesian::1.0 3.2 5.5    -1.0 0.0 0.0
 DEAL:MappingSubface3d-4-Cartesian::1.0 3.2 5.9 -1.0 0.0 0.0
 DEAL:MappingSubface3d-4-Cartesian::
 DEAL:MappingSubface3d-4-Cartesian::
+DEAL::p_unit=0.86 0.57 0.71,  p_real=1.9 3.4 5.1,  p_re_unit=0.86 0.57 0.71

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.