]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Change default coordinates for GridIn::read_tecplot to something more sensible, i...
authorleicht <leicht@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 21 Feb 2007 16:40:46 +0000 (16:40 +0000)
committerleicht <leicht@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 21 Feb 2007 16:40:46 +0000 (16:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@14492 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_in.cc

index 9f5d677396ec35a9f457afbf5d3b0d307d3a6251..839256c987e0b5f4d60572b9f18e5dc19b8bc207 100644 (file)
@@ -1314,28 +1314,20 @@ void GridIn<dim>::parse_tecplot_header(std::string &header,
                tecplot2deal[0]=n_vars;
              else if (entries[i]=="\"Y\"")
                {
-                 AssertThrow(dim>1,
-                             ExcMessage("Tecplot file contains Y data, which is not possible for 1d plot"));
+                                                  // we assume, that y contains
+                                                  // zero data in 1d, so do
+                                                  // nothing
+               if (dim>1)
                  tecplot2deal[1]=n_vars;
                }
              else if (entries[i]=="\"Z\"")
-               switch (dim)
-                 {
-                   case 1:
-                         AssertThrow(false,
-                                     ExcMessage("Tecplot file contains Y data, which is not possible for 1d plot"));
-                         break;
-                   case 2:
-                                                          // we assume, that z
-                                                          // contains the data
-                                                          // which is intended
-                                                          // as y in deal
-                         tecplot2deal[1]=n_vars;
-                         break;
-                   case 3:
-                         tecplot2deal[2]=n_vars;
-                         break;
-                 }
+               {
+                                                  // we assume, that z contains
+                                                  // zero data in 1d and 2d, so
+                                                  // do nothing
+                 if (dim>2)
+                   tecplot2deal[2]=n_vars;
+               }
              ++n_vars;
              ++i;
            }

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.