From: leicht Date: Wed, 21 Feb 2007 16:40:46 +0000 (+0000) Subject: Change default coordinates for GridIn::read_tecplot to something more sensible, i... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9b2b1e5426416d9b5bccd2faf4c41b7208da039;p=dealii-svn.git Change default coordinates for GridIn::read_tecplot to something more sensible, i.e. use x in 1d, x and y in 2d and x, y and z in 3d and ignore other variables. git-svn-id: https://svn.dealii.org/trunk@14492 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/grid_in.cc b/deal.II/deal.II/source/grid/grid_in.cc index 9f5d677396..839256c987 100644 --- a/deal.II/deal.II/source/grid/grid_in.cc +++ b/deal.II/deal.II/source/grid/grid_in.cc @@ -1314,28 +1314,20 @@ void GridIn::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; }