From: bangerth Date: Tue, 4 May 2010 19:23:14 +0000 (+0000) Subject: Merge r21057 which inadvertently was fixed on a branch, not on mainline. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31eeaf470cdec9f3ccd6090ea1e8099dcdc9b64c;p=dealii-svn.git Merge r21057 which inadvertently was fixed on a branch, not on mainline. git-svn-id: https://svn.dealii.org/trunk@21065 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 01677aa7b8..b8c0a2084e 100644 --- a/deal.II/deal.II/source/grid/grid_in.cc +++ b/deal.II/deal.II/source/grid/grid_in.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -51,7 +51,7 @@ void GridIn::read_ucd (std::istream &in) { Assert (tria != 0, ExcNoTriangulationSelected()); AssertThrow (in, ExcIO()); - + // skip comments at start of file skip_comment_lines (in, '#'); @@ -73,8 +73,8 @@ void GridIn::read_ucd (std::istream &in) // in ucd-file (key) and in the // vertices vector std::map vertex_indices; - - for (unsigned int vertex=0; vertex::read_ucd (std::istream &in) std::vector > cells; SubCellData subcelldata; - for (unsigned int cell=0; cell::read_ucd (std::istream &in) // should still be input here, // so check this: AssertThrow (in, ExcIO()); - + std::string cell_type; int material_id; - + in >> dummy // cell number >> material_id; in >> cell_type; @@ -130,7 +130,7 @@ void GridIn::read_ucd (std::istream &in) if (vertex_indices.find (cells.back().vertices[i]) != vertex_indices.end()) // vertex with this index exists cells.back().vertices[i] = vertex_indices[cells.back().vertices[i]]; - else + else { // no such vertex index AssertThrow (false, ExcInvalidVertexIndex(cell, cells.back().vertices[i])); @@ -154,7 +154,7 @@ void GridIn::read_ucd (std::istream &in) // vertex with this index exists subcelldata.boundary_lines.back().vertices[i] = vertex_indices[subcelldata.boundary_lines.back().vertices[i]]; - else + else { // no such vertex index AssertThrow (false, @@ -173,9 +173,9 @@ void GridIn::read_ucd (std::istream &in) >> subcelldata.boundary_quads.back().vertices[1] >> subcelldata.boundary_quads.back().vertices[2] >> subcelldata.boundary_quads.back().vertices[3]; - + subcelldata.boundary_quads.back().material_id = material_id; - + // transform from ucd to // consecutive numbering for (unsigned int i=0; i<4; ++i) @@ -193,14 +193,14 @@ void GridIn::read_ucd (std::istream &in) subcelldata.boundary_quads.back().vertices[i] = numbers::invalid_unsigned_int; }; - + } else // cannot read this AssertThrow (false, ExcUnknownIdentifier(cell_type)); }; - + // check that no forbidden arrays are used Assert (subcelldata.check_consistency(dim), ExcInternalError()); @@ -224,7 +224,7 @@ void GridIn::read_dbmesh (std::istream &in) Assert (dim==2, ExcNotImplemented()); AssertThrow (in, ExcIO()); - + // skip comments at start of file skip_comment_lines (in, '#'); @@ -265,10 +265,10 @@ void GridIn::read_dbmesh (std::istream &in) // now read vertices getline (in, line); AssertThrow (line=="Vertices", ExcInvalidDBMESHInput(line)); - + unsigned int n_vertices; double dummy; - + in >> n_vertices; std::vector > vertices (n_vertices); for (unsigned int vertex=0; vertex::read_dbmesh (std::istream &in) // discard the input getline (in, line); AssertThrow (line=="Edges", ExcInvalidDBMESHInput(line)); - + unsigned int n_edges; in >> n_edges; for (unsigned int edge=0; edge::read_dbmesh (std::istream &in) // discard the input getline (in, line); AssertThrow (line=="CrackedEdges", ExcInvalidDBMESHInput(line)); - + in >> n_edges; for (unsigned int edge=0; edge::read_dbmesh (std::istream &in) SubCellData subcelldata; unsigned int n_cells; in >> n_cells; - for (unsigned int cell=0; cell::read_dbmesh (std::istream &in) for (unsigned int i=0; i::vertices_per_cell; ++i) { in >> cells.back().vertices[i]; - + AssertThrow ((cells.back().vertices[i] >= 1) && (static_cast(cells.back().vertices[i]) <= vertices.size()), ExcInvalidVertexIndex(cell, cells.back().vertices[i])); - + --cells.back().vertices[i]; }; @@ -356,7 +356,7 @@ void GridIn::read_dbmesh (std::istream &in) AssertThrow (in, ExcInvalidDBMeshFormat()); skip_empty_lines(in); - + // then there are again a whole lot // of fields of which I have no @@ -368,7 +368,7 @@ void GridIn::read_dbmesh (std::istream &in) // ok, so we are not at the end of // the file, that's it, mostly - + // check that no forbidden arrays are used Assert (subcelldata.check_consistency(dim), ExcInternalError()); @@ -424,7 +424,7 @@ void GridIn<2>::read_xda (std::istream &in) std::vector > cells (n_cells); SubCellData subcelldata; - for (unsigned int cell=0; cell::read_xda (std::istream &in) AssertThrow (in, ExcIO()); Assert (GeometryInfo<2>::vertices_per_cell == 4, ExcInternalError()); - + for (unsigned int i=0; i<4; ++i) in >> cells[cell].vertices[i]; }; - + // set up array of vertices std::vector > vertices (n_vertices); - for (unsigned int vertex=0; vertex::read_xda (std::istream &in) AssertThrow (in, ExcIO()); static const unsigned int xda_to_dealII_map[] = {0,1,5,4,3,2,6,7}; - + std::string line; // skip comments at start of file getline (in, line); @@ -502,7 +502,7 @@ void GridIn<3>::read_xda (std::istream &in) std::vector > cells (n_cells); SubCellData subcelldata; - for (unsigned int cell=0; cell::read_xda (std::istream &in) AssertThrow (in, ExcIO()); Assert(GeometryInfo<3>::vertices_per_cell == 8, ExcInternalError()); - + unsigned int xda_ordered_nodes[8]; - + for (unsigned int i=0; i<8; ++i) in >> xda_ordered_nodes[i]; @@ -523,10 +523,10 @@ void GridIn<3>::read_xda (std::istream &in) }; - + // set up array of vertices std::vector > vertices (n_vertices); - for (unsigned int vertex=0; vertex::read_msh (std::istream &in) unsigned int n_cells; unsigned int dummy; std::string line; - + in >> line; // first determine file format @@ -598,10 +598,25 @@ void GridIn::read_msh (std::istream &in) ExcInvalidGMSHInput(line)); in >> line; + // if the next block is of kind + // $PhysicalNames, ignore it + if (line == "$PhysicalNames") + { + do + { + in >> line; + } + while (line != "$EndPhysicalNames"); + in >> line; + } + + // but the next thing should, + // in any case, be the list of + // nodes: AssertThrow (line == "$Nodes", ExcInvalidGMSHInput(line)); } - + // now read the nodes list in >> n_vertices; std::vector > vertices (n_vertices); @@ -609,8 +624,8 @@ void GridIn::read_msh (std::istream &in) // in msh-file (nod) and in the // vertices vector std::map vertex_indices; - - for (unsigned int vertex=0; vertex::read_msh (std::istream &in) // read vertex in >> vertex_number >> x[0] >> x[1] >> x[2]; - + for (unsigned int d=0; d::read_msh (std::istream &in) static const std::string end_nodes_marker[] = {"$ENDNOD", "$EndNodes" }; AssertThrow (line==end_nodes_marker[gmsh_file_format-1], ExcInvalidGMSHInput(line)); - + // Now read in next bit in >> line; static const std::string begin_elements_marker[] = {"$ELM", "$Elements" }; @@ -638,12 +653,12 @@ void GridIn::read_msh (std::istream &in) ExcInvalidGMSHInput(line)); in >> n_cells; - + // set up array of cells std::vector > cells; SubCellData subcelldata; - for (unsigned int cell=0; cell::read_msh (std::istream &in) // should still be input here, // so check this: AssertThrow (in, ExcIO()); - + unsigned int cell_type; unsigned int material_id; unsigned int nod_num; @@ -668,7 +683,7 @@ void GridIn::read_msh (std::istream &in) (version 1) or the first tag (version 2, if any tag is given at all) as material id. */ - + in >> dummy // ELM-NUMBER >> cell_type; // ELM-TYPE @@ -681,7 +696,7 @@ void GridIn::read_msh (std::istream &in) >> nod_num; break; } - + case 2: { // read the tags; ignore @@ -692,7 +707,7 @@ void GridIn::read_msh (std::istream &in) in >> material_id; else material_id = 0; - + for (unsigned int i=1; i> dummy; @@ -704,23 +719,23 @@ void GridIn::read_msh (std::istream &in) default: AssertThrow (false, ExcNotImplemented()); } - - + + /* `ELM-TYPE' defines the geometrical type of the N-th element: `1' Line (2 nodes, 1 edge). - + `3' Quadrangle (4 nodes, 4 edges). - + `5' Hexahedron (8 nodes, 12 edges, 6 faces). - + `15' Point (1 node). */ - + if (((cell_type == 1) && (dim == 1)) || ((cell_type == 3) && (dim == 2)) || ((cell_type == 5) && (dim == 3))) @@ -729,7 +744,7 @@ void GridIn::read_msh (std::istream &in) AssertThrow (nod_num == GeometryInfo::vertices_per_cell, ExcMessage ("Number of nodes does not coincide with the " "number required for this object")); - + // allocate and read indices cells.push_back (CellData()); for (unsigned int i=0; i::vertices_per_cell; ++i) @@ -743,7 +758,7 @@ void GridIn::read_msh (std::istream &in) AssertThrow (vertex_indices.find (cells.back().vertices[i]) != vertex_indices.end(), ExcInvalidVertexIndex(cell, cells.back().vertices[i])); - + // vertex with this index exists cells.back().vertices[i] = vertex_indices[cells.back().vertices[i]]; } @@ -765,7 +780,7 @@ void GridIn::read_msh (std::istream &in) // vertex with this index exists subcelldata.boundary_lines.back().vertices[i] = vertex_indices[subcelldata.boundary_lines.back().vertices[i]]; - else + else { // no such vertex index AssertThrow (false, @@ -784,9 +799,9 @@ void GridIn::read_msh (std::istream &in) >> subcelldata.boundary_quads.back().vertices[1] >> subcelldata.boundary_quads.back().vertices[2] >> subcelldata.boundary_quads.back().vertices[3]; - + subcelldata.boundary_quads.back().material_id = material_id; - + // transform from gmsh to // consecutive numbering for (unsigned int i=0; i<4; ++i) @@ -804,7 +819,7 @@ void GridIn::read_msh (std::istream &in) subcelldata.boundary_quads.back().vertices[i] = numbers::invalid_unsigned_int; }; - + } else if (cell_type == 15) @@ -838,7 +853,7 @@ void GridIn::read_msh (std::istream &in) static const std::string end_elements_marker[] = {"$ENDELM", "$EndElements" }; AssertThrow (line==end_elements_marker[gmsh_file_format-1], ExcInvalidGMSHInput(line)); - + // check that no forbidden arrays are used Assert (subcelldata.check_consistency(dim), ExcInternalError()); @@ -847,7 +862,7 @@ void GridIn::read_msh (std::istream &in) // check that we actually read some // cells. AssertThrow(cells.size() > 0, ExcGmshNoCellInformation()); - + // do some clean-up on // vertices... GridTools::delete_unused_vertices (vertices, cells, subcelldata); @@ -933,7 +948,7 @@ void GridIn<2>::read_netcdf (const std::string &filename) // to find the right value for // coord, and setting x2d and y2d // accordingly. - + // First, open the file NcFile nc (filename.c_str()); AssertThrow(nc.is_valid(), ExcIO()); @@ -959,7 +974,7 @@ void GridIn<2>::read_netcdf (const std::string &filename) // use &* to convert // vector::iterator to int * marker_var->get(&*marker.begin(), n_markers); - + if (output) { std::cout << "n_cell=" << n_cells << std::endl; @@ -995,7 +1010,7 @@ void GridIn<2>::read_netcdf (const std::string &filename) // different AssertThrow(n_bquads_per_bmarker.find(marker[i])== n_bquads_per_bmarker.end(), ExcIO()); - + n_bquads_per_bmarker[marker[i]]= count(bmarker.begin(), bmarker.end(), marker[i]); } @@ -1029,7 +1044,7 @@ void GridIn<2>::read_netcdf (const std::string &filename) AssertThrow(quad_vertices_dim->is_valid(), ExcIO()); const unsigned int vertices_per_quad=quad_vertices_dim->size(); AssertThrow(vertices_per_quad==GeometryInfo::vertices_per_cell, ExcIO()); - + NcVar *vertex_indices_var=nc.get_var("points_of_surfacequadrilaterals"); AssertThrow(vertex_indices_var->is_valid(), ExcIO()); AssertThrow(vertex_indices_var->num_dims()==2, ExcIO()); @@ -1107,7 +1122,7 @@ void GridIn<2>::read_netcdf (const std::string &filename) zero_plane=false; break; } - + if (zero_plane) zero_plane_markers[bmarker[quad]]=true; } @@ -1135,7 +1150,7 @@ void GridIn<2>::read_netcdf (const std::string &filename) zero_plane=true; break; } - + if (zero_plane) { for (unsigned int i=0; i::read_netcdf (const std::string &filename) SubCellData subcelldata; GridTools::delete_unused_vertices(vertices, cells, subcelldata); GridReordering::reorder_cells (cells); - tria->create_triangulation_compatibility (vertices, cells, subcelldata); + tria->create_triangulation_compatibility (vertices, cells, subcelldata); #endif } @@ -1175,7 +1190,7 @@ void GridIn<3>::read_netcdf (const std::string &filename) Assert (tria != 0, ExcNoTriangulationSelected()); // this function assumes the TAU // grid format. - + // First, open the file NcFile nc (filename.c_str()); AssertThrow(nc.is_valid(), ExcIO()); @@ -1183,7 +1198,7 @@ void GridIn<3>::read_netcdf (const std::string &filename) // then read n_cells NcDim *elements_dim=nc.get_dim("no_of_elements"); AssertThrow(elements_dim->is_valid(), ExcIO()); - const unsigned int n_cells=elements_dim->size(); + const unsigned int n_cells=elements_dim->size(); if (output) std::cout << "n_cell=" << n_cells << std::endl; // and n_hexes @@ -1192,7 +1207,7 @@ void GridIn<3>::read_netcdf (const std::string &filename) const unsigned int n_hexes=hexes_dim->size(); AssertThrow(n_hexes==n_cells, ExcMessage("deal.II can handle purely hexaedral grids, only.")); - + // next we read // int points_of_hexaeders( // no_of_hexaeders, @@ -1201,7 +1216,7 @@ void GridIn<3>::read_netcdf (const std::string &filename) AssertThrow(hex_vertices_dim->is_valid(), ExcIO()); const unsigned int vertices_per_hex=hex_vertices_dim->size(); AssertThrow(vertices_per_hex==GeometryInfo::vertices_per_cell, ExcIO()); - + NcVar *vertex_indices_var=nc.get_var("points_of_hexaeders"); AssertThrow(vertex_indices_var->is_valid(), ExcIO()); AssertThrow(vertex_indices_var->num_dims()==2, ExcIO()); @@ -1289,7 +1304,7 @@ void GridIn<3>::read_netcdf (const std::string &filename) // we read the vertex indices of // the boundary quadrilaterals and // their boundary markers - + // first we read // int points_of_surfacequadrilaterals( // no_of_surfacequadrilaterals, @@ -1298,7 +1313,7 @@ void GridIn<3>::read_netcdf (const std::string &filename) AssertThrow(quad_vertices_dim->is_valid(), ExcIO()); const unsigned int vertices_per_quad=quad_vertices_dim->size(); AssertThrow(vertices_per_quad==GeometryInfo::vertices_per_face, ExcIO()); - + NcVar *bvertex_indices_var=nc.get_var("points_of_surfacequadrilaterals"); AssertThrow(bvertex_indices_var->is_valid(), ExcIO()); AssertThrow(bvertex_indices_var->num_dims()==2, ExcIO()); @@ -1361,7 +1376,7 @@ void GridIn<3>::read_netcdf (const std::string &filename) GridTools::delete_unused_vertices(vertices, cells, subcelldata); GridReordering::invert_all_cells_of_negative_grid (vertices, cells); GridReordering::reorder_cells (cells); - tria->create_triangulation_compatibility (vertices, cells, subcelldata); + tria->create_triangulation_compatibility (vertices, cells, subcelldata); #endif } @@ -1394,20 +1409,20 @@ void GridIn::parse_tecplot_header(std::string &header, } structured=true; blocked=false; - + // convert the string to upper case std::transform(header.begin(),header.end(),header.begin(),::toupper); - + // replace all tabs, commas, newlines by // whitespaces std::replace(header.begin(),header.end(),'\t',' '); std::replace(header.begin(),header.end(),',',' '); std::replace(header.begin(),header.end(),'\n',' '); - + // now remove whitespace in front of and // after '=' std::string::size_type pos=header.find("="); - + while(pos!=static_cast(std::string::npos)) if(header[pos+1]==' ') header.erase(pos+1,1); @@ -1418,7 +1433,7 @@ void GridIn::parse_tecplot_header(std::string &header, } else pos=header.find("=",++pos); - + // split the string into individual entries std::vector entries=Utilities::break_text_into_lines(header,1,' '); @@ -1461,7 +1476,7 @@ void GridIn::parse_tecplot_header(std::string &header, // set i back, so that the next // string is treated correctly --i; - + AssertThrow(n_vars>=dim, ExcMessage("Tecplot file must contain at least one variable for each dimension")); for (unsigned int i=1; i::parse_tecplot_header(std::string &header, else if (Utilities::match_at_string_start(entries[i],"E=")) n_cells=Utilities::get_integer_at_position(entries[i],2).first; } - + // now we have read all the fields we are // interested in. do some checks and // calculate the variables @@ -1575,13 +1590,13 @@ void GridIn<2>::read_tecplot (std::istream &in) const unsigned int spacedim=2; Assert (tria != 0, ExcNoTriangulationSelected()); AssertThrow (in, ExcIO()); - + // skip comments at start of file skip_comment_lines (in, '#'); // some strings for parsing the header std::string line, header; - + // first, concatenate all header lines // create a searchstring with almost all // letters. exclude e and E from the letters @@ -1595,7 +1610,7 @@ void GridIn<2>::read_tecplot (std::istream &in) header+=" "+line; getline(in,line); } - + // now create some variables holding // important information on the mesh, get // this information from the header string @@ -1610,7 +1625,7 @@ void GridIn<2>::read_tecplot (std::istream &in) parse_tecplot_header(header, tecplot2deal,n_vars,n_vertices,n_cells,IJK, structured,blocked); - + // reserve space for vertices. note, that in // tecplot vertices are ordered beginning // with 1, whereas in deal all indices start @@ -1637,7 +1652,7 @@ void GridIn<2>::read_tecplot (std::istream &in) // which is the first index to read in // the loop (see below) unsigned int next_index=0; - + // note, that we have already read the // first line containing the first variable if (tecplot2deal[0]==0) @@ -1671,7 +1686,7 @@ void GridIn<2>::read_tecplot (std::istream &in) // variables) if (next_index==dim && structured) break; - + if (i==tecplot2deal[next_index]) { // we need this line, read it in @@ -1696,7 +1711,7 @@ void GridIn<2>::read_tecplot (std::istream &in) // next and so on. create a vector to // hold these components std::vector vars(n_vars); - + // now fill the first vertex. note, that we // have already read the first line // containing the first vertex @@ -1704,7 +1719,7 @@ void GridIn<2>::read_tecplot (std::istream &in) char *endptr; for (unsigned int d=0; d::read_tecplot (std::istream &in) vertices[v](i)=vars[tecplot2deal[i]]; } } - + if (structured) { // this is the part of the code that only // works in 2d unsigned int I=IJK[0], J=IJK[1]; - + unsigned int cell=0; // set up array of cells - for (unsigned int j=0; j::read_tecplot (std::istream &in) // set up array of cells, unstructured // mode, so the connectivity is // explicitly given - for (unsigned int i=0; i::read_tecplot (std::istream &in) // do some clean-up on vertices GridTools::delete_unused_vertices (vertices, cells, subcelldata); } - + // check that no forbidden arrays are // used. as we do not read in any // subcelldata, nothing should happen here. @@ -1809,9 +1824,9 @@ void GridIn::read_tecplot(std::istream &) template void GridIn::skip_empty_lines (std::istream &in) -{ +{ std::string line; - while (in) + while (in) { // get line getline (in, line); @@ -1848,8 +1863,8 @@ void GridIn::skip_comment_lines (std::istream &in, // the comment starter while (in.get() != '\n') ; - - + + // put back first character of // first non-comment line in.putback (c); @@ -1881,13 +1896,13 @@ GridIn<2>::debug_output_grid (const std::vector > &cells, max_x = vertices[cells[0].vertices[0]](0), min_y = vertices[cells[0].vertices[0]](1), max_y = vertices[cells[0].vertices[0]](1); - + for (unsigned int i=0; i &p = vertices[cells[i].vertices[v]]; - + if (p(0) < min_x) min_x = p(0); if (p(0) > max_x) @@ -1912,24 +1927,24 @@ GridIn<2>::debug_output_grid (const std::vector > &cells, // first two line right direction for (unsigned int f=0; f<2; ++f) out << "set arrow from " - << vertices[cells[i].vertices[f]](0) << ',' + << vertices[cells[i].vertices[f]](0) << ',' << vertices[cells[i].vertices[f]](1) << " to " - << vertices[cells[i].vertices[(f+1)%4]](0) << ',' + << vertices[cells[i].vertices[(f+1)%4]](0) << ',' << vertices[cells[i].vertices[(f+1)%4]](1) << std::endl; // other two lines reverse direction for (unsigned int f=2; f<4; ++f) out << "set arrow from " - << vertices[cells[i].vertices[(f+1)%4]](0) << ',' + << vertices[cells[i].vertices[(f+1)%4]](0) << ',' << vertices[cells[i].vertices[(f+1)%4]](1) << " to " - << vertices[cells[i].vertices[f]](0) << ',' + << vertices[cells[i].vertices[f]](0) << ',' << vertices[cells[i].vertices[f]](1) << std::endl; out << std::endl; }; - + out << std::endl << "set nokey" << std::endl @@ -2031,7 +2046,7 @@ void GridIn::read (const std::string& filename, name = search.find(filename, default_suffix(format)); std::ifstream in(name.c_str()); - + if (format == Default) { const std::string::size_type slashpos = name.find_last_of('/'); @@ -2056,21 +2071,21 @@ void GridIn::read (std::istream& in, { if (format == Default) format = default_format; - + switch (format) { case dbmesh: read_dbmesh (in); return; - + case msh: read_msh (in); return; - + case ucd: read_ucd (in); return; - + case xda: read_xda (in); return; @@ -2084,7 +2099,7 @@ void GridIn::read (std::istream& in, case tecplot: read_tecplot (in); return; - + case Default: break; } @@ -2095,15 +2110,15 @@ void GridIn::read (std::istream& in, template std::string -GridIn::default_suffix (const Format format) +GridIn::default_suffix (const Format format) { - switch (format) + switch (format) { case dbmesh: return ".dbmesh"; - case msh: + case msh: return ".msh"; - case ucd: + case ucd: return ".inp"; case xda: return ".xda"; @@ -2111,8 +2126,8 @@ GridIn::default_suffix (const Format format) return ".nc"; case tecplot: return ".dat"; - default: - Assert (false, ExcNotImplemented()); + default: + Assert (false, ExcNotImplemented()); return ".unknown_format"; } } @@ -2128,7 +2143,7 @@ GridIn::parse_format (const std::string &format_name) if (format_name == "msh") return msh; - + if (format_name == "inp") return ucd; @@ -2170,7 +2185,7 @@ GridIn::parse_format (const std::string &format_name) template -std::string GridIn::get_format_names () +std::string GridIn::get_format_names () { return "dbmesh|msh|ucd|xda|netcdf|tecplot"; } diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index b0f0bbadd2..4af4eb986b 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -620,6 +620,12 @@ inconvenience this causes.

deal.II

    +
  1. +

    Fixed: The GridIn::read_msh function got into trouble if the mesh file + had a section that listed physical names for variables. This is now fixed. +
    + (WB 2010/05/03) +

  2. Improved: DoFHandler iterators now can be assigned from a Triangulation iterator diff --git a/tests/deal.II/grid_in_msh_03.cc b/tests/deal.II/grid_in_msh_03.cc new file mode 100644 index 0000000000..5cebd9072f --- /dev/null +++ b/tests/deal.II/grid_in_msh_03.cc @@ -0,0 +1,70 @@ +//---------------------------- grid_in_msh_03.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2010 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- grid_in_msh_03.cc --------------------------- + +// read a file in the MSH format used by the GMSH program. this +// particular mesh has type-15 cells (nodes) with more than one +// associated vertex. we failed to read the vertices + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +std::ofstream logfile("grid_in_msh_03/output"); + + +template +void check_file (const std::string name, + typename GridIn::Format format) +{ + Triangulation tria; + GridIn gi; + gi.attach_triangulation (tria); + gi.read(name, format); + deallog << name + << '\t' << tria.n_vertices() + << '\t' << tria.n_cells() + << std::endl; + + GridOut grid_out; + grid_out.write_gnuplot (tria, deallog.get_file_stream()); +} + +void filename_resolution() +{ + check_file<2> (std::string("grid_in_msh_03/mesh"), GridIn<2>::msh); +} + + +int main () +{ + deallog << std::setprecision (2); + logfile << std::setprecision (2); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + filename_resolution(); +} + diff --git a/tests/deal.II/grid_in_msh_03/cmp/generic b/tests/deal.II/grid_in_msh_03/cmp/generic new file mode 100644 index 0000000000..63861ee6cc --- /dev/null +++ b/tests/deal.II/grid_in_msh_03/cmp/generic @@ -0,0 +1,569 @@ + +DEAL::grid_in_msh_03/mesh 100 81 +0.0 0.0 0 2 +2.2 0.0 0 2 +2.2 1.1 0 2 +0.0 1.1 0 2 +0.0 0.0 0 2 + + +0.0 1.1 0 2 +2.2 1.1 0 2 +2.2 2.2 0 2 +0.0 2.2 0 2 +0.0 1.1 0 2 + + +0.0 2.2 0 2 +2.2 2.2 0 2 +2.2 3.3 0 2 +0.0 3.3 0 2 +0.0 2.2 0 2 + + +0.0 3.3 0 2 +2.2 3.3 0 2 +2.2 4.4 0 2 +0.0 4.4 0 2 +0.0 3.3 0 2 + + +0.0 4.4 0 2 +2.2 4.4 0 2 +2.2 5.6 0 2 +0.0 5.6 0 2 +0.0 4.4 0 2 + + +0.0 5.6 0 2 +2.2 5.6 0 2 +2.2 6.7 0 2 +0.0 6.7 0 2 +0.0 5.6 0 2 + + +0.0 6.7 0 2 +2.2 6.7 0 2 +2.2 7.8 0 2 +0.0 7.8 0 2 +0.0 6.7 0 2 + + +0.0 7.8 0 2 +2.2 7.8 0 2 +2.2 8.9 0 2 +0.0 8.9 0 2 +0.0 7.8 0 2 + + +0.0 8.9 0 2 +2.2 8.9 0 2 +2.2 10. 0 2 +0.0 10. 0 2 +0.0 8.9 0 2 + + +2.2 0.0 0 2 +4.4 0.0 0 2 +4.4 1.1 0 2 +2.2 1.1 0 2 +2.2 0.0 0 2 + + +2.2 1.1 0 2 +4.4 1.1 0 2 +4.4 2.2 0 2 +2.2 2.2 0 2 +2.2 1.1 0 2 + + +2.2 2.2 0 2 +4.4 2.2 0 2 +4.4 3.3 0 2 +2.2 3.3 0 2 +2.2 2.2 0 2 + + +2.2 3.3 0 2 +4.4 3.3 0 2 +4.4 4.4 0 2 +2.2 4.4 0 2 +2.2 3.3 0 2 + + +2.2 4.4 0 2 +4.4 4.4 0 2 +4.4 5.6 0 2 +2.2 5.6 0 2 +2.2 4.4 0 2 + + +2.2 5.6 0 2 +4.4 5.6 0 2 +4.4 6.7 0 2 +2.2 6.7 0 2 +2.2 5.6 0 2 + + +2.2 6.7 0 2 +4.4 6.7 0 2 +4.4 7.8 0 2 +2.2 7.8 0 2 +2.2 6.7 0 2 + + +2.2 7.8 0 2 +4.4 7.8 0 2 +4.4 8.9 0 2 +2.2 8.9 0 2 +2.2 7.8 0 2 + + +2.2 8.9 0 2 +4.4 8.9 0 2 +4.4 10. 0 2 +2.2 10. 0 2 +2.2 8.9 0 2 + + +4.4 0.0 0 2 +6.7 0.0 0 2 +6.7 1.1 0 2 +4.4 1.1 0 2 +4.4 0.0 0 2 + + +4.4 1.1 0 2 +6.7 1.1 0 2 +6.7 2.2 0 2 +4.4 2.2 0 2 +4.4 1.1 0 2 + + +4.4 2.2 0 2 +6.7 2.2 0 2 +6.7 3.3 0 2 +4.4 3.3 0 2 +4.4 2.2 0 2 + + +4.4 3.3 0 2 +6.7 3.3 0 2 +6.7 4.4 0 2 +4.4 4.4 0 2 +4.4 3.3 0 2 + + +4.4 4.4 0 2 +6.7 4.4 0 2 +6.7 5.6 0 2 +4.4 5.6 0 2 +4.4 4.4 0 2 + + +4.4 5.6 0 2 +6.7 5.6 0 2 +6.7 6.7 0 2 +4.4 6.7 0 2 +4.4 5.6 0 2 + + +4.4 6.7 0 2 +6.7 6.7 0 2 +6.7 7.8 0 2 +4.4 7.8 0 2 +4.4 6.7 0 2 + + +4.4 7.8 0 2 +6.7 7.8 0 2 +6.7 8.9 0 2 +4.4 8.9 0 2 +4.4 7.8 0 2 + + +4.4 8.9 0 2 +6.7 8.9 0 2 +6.7 10. 0 2 +4.4 10. 0 2 +4.4 8.9 0 2 + + +6.7 0.0 0 2 +8.9 0.0 0 2 +8.9 1.1 0 2 +6.7 1.1 0 2 +6.7 0.0 0 2 + + +6.7 1.1 0 2 +8.9 1.1 0 2 +8.9 2.2 0 2 +6.7 2.2 0 2 +6.7 1.1 0 2 + + +6.7 2.2 0 2 +8.9 2.2 0 2 +8.9 3.3 0 2 +6.7 3.3 0 2 +6.7 2.2 0 2 + + +6.7 3.3 0 2 +8.9 3.3 0 2 +8.9 4.4 0 2 +6.7 4.4 0 2 +6.7 3.3 0 2 + + +6.7 4.4 0 2 +8.9 4.4 0 2 +8.9 5.6 0 2 +6.7 5.6 0 2 +6.7 4.4 0 2 + + +6.7 5.6 0 2 +8.9 5.6 0 2 +8.9 6.7 0 2 +6.7 6.7 0 2 +6.7 5.6 0 2 + + +6.7 6.7 0 2 +8.9 6.7 0 2 +8.9 7.8 0 2 +6.7 7.8 0 2 +6.7 6.7 0 2 + + +6.7 7.8 0 2 +8.9 7.8 0 2 +8.9 8.9 0 2 +6.7 8.9 0 2 +6.7 7.8 0 2 + + +6.7 8.9 0 2 +8.9 8.9 0 2 +8.9 10. 0 2 +6.7 10. 0 2 +6.7 8.9 0 2 + + +8.9 0.0 0 2 +11. 0.0 0 2 +11. 1.1 0 2 +8.9 1.1 0 2 +8.9 0.0 0 2 + + +8.9 1.1 0 2 +11. 1.1 0 2 +11. 2.2 0 2 +8.9 2.2 0 2 +8.9 1.1 0 2 + + +8.9 2.2 0 2 +11. 2.2 0 2 +11. 3.3 0 2 +8.9 3.3 0 2 +8.9 2.2 0 2 + + +8.9 3.3 0 2 +11. 3.3 0 2 +11. 4.4 0 2 +8.9 4.4 0 2 +8.9 3.3 0 2 + + +8.9 4.4 0 2 +11. 4.4 0 2 +11. 5.6 0 2 +8.9 5.6 0 2 +8.9 4.4 0 2 + + +8.9 5.6 0 2 +11. 5.6 0 2 +11. 6.7 0 2 +8.9 6.7 0 2 +8.9 5.6 0 2 + + +8.9 6.7 0 2 +11. 6.7 0 2 +11. 7.8 0 2 +8.9 7.8 0 2 +8.9 6.7 0 2 + + +8.9 7.8 0 2 +11. 7.8 0 2 +11. 8.9 0 2 +8.9 8.9 0 2 +8.9 7.8 0 2 + + +8.9 8.9 0 2 +11. 8.9 0 2 +11. 10. 0 2 +8.9 10. 0 2 +8.9 8.9 0 2 + + +11. 0.0 0 2 +13. 0.0 0 2 +13. 1.1 0 2 +11. 1.1 0 2 +11. 0.0 0 2 + + +11. 1.1 0 2 +13. 1.1 0 2 +13. 2.2 0 2 +11. 2.2 0 2 +11. 1.1 0 2 + + +11. 2.2 0 2 +13. 2.2 0 2 +13. 3.3 0 2 +11. 3.3 0 2 +11. 2.2 0 2 + + +11. 3.3 0 2 +13. 3.3 0 2 +13. 4.4 0 2 +11. 4.4 0 2 +11. 3.3 0 2 + + +11. 4.4 0 2 +13. 4.4 0 2 +13. 5.6 0 2 +11. 5.6 0 2 +11. 4.4 0 2 + + +11. 5.6 0 2 +13. 5.6 0 2 +13. 6.7 0 2 +11. 6.7 0 2 +11. 5.6 0 2 + + +11. 6.7 0 2 +13. 6.7 0 2 +13. 7.8 0 2 +11. 7.8 0 2 +11. 6.7 0 2 + + +11. 7.8 0 2 +13. 7.8 0 2 +13. 8.9 0 2 +11. 8.9 0 2 +11. 7.8 0 2 + + +11. 8.9 0 2 +13. 8.9 0 2 +13. 10. 0 2 +11. 10. 0 2 +11. 8.9 0 2 + + +13. 0.0 0 2 +16. 0.0 0 2 +16. 1.1 0 2 +13. 1.1 0 2 +13. 0.0 0 2 + + +13. 1.1 0 2 +16. 1.1 0 2 +16. 2.2 0 2 +13. 2.2 0 2 +13. 1.1 0 2 + + +13. 2.2 0 2 +16. 2.2 0 2 +16. 3.3 0 2 +13. 3.3 0 2 +13. 2.2 0 2 + + +13. 3.3 0 2 +16. 3.3 0 2 +16. 4.4 0 2 +13. 4.4 0 2 +13. 3.3 0 2 + + +13. 4.4 0 2 +16. 4.4 0 2 +16. 5.6 0 2 +13. 5.6 0 2 +13. 4.4 0 2 + + +13. 5.6 0 2 +16. 5.6 0 2 +16. 6.7 0 2 +13. 6.7 0 2 +13. 5.6 0 2 + + +13. 6.7 0 2 +16. 6.7 0 2 +16. 7.8 0 2 +13. 7.8 0 2 +13. 6.7 0 2 + + +13. 7.8 0 2 +16. 7.8 0 2 +16. 8.9 0 2 +13. 8.9 0 2 +13. 7.8 0 2 + + +13. 8.9 0 2 +16. 8.9 0 2 +16. 10. 0 2 +13. 10. 0 2 +13. 8.9 0 2 + + +16. 0.0 0 2 +18. 0.0 0 2 +18. 1.1 0 2 +16. 1.1 0 2 +16. 0.0 0 2 + + +16. 1.1 0 2 +18. 1.1 0 2 +18. 2.2 0 2 +16. 2.2 0 2 +16. 1.1 0 2 + + +16. 2.2 0 2 +18. 2.2 0 2 +18. 3.3 0 2 +16. 3.3 0 2 +16. 2.2 0 2 + + +16. 3.3 0 2 +18. 3.3 0 2 +18. 4.4 0 2 +16. 4.4 0 2 +16. 3.3 0 2 + + +16. 4.4 0 2 +18. 4.4 0 2 +18. 5.6 0 2 +16. 5.6 0 2 +16. 4.4 0 2 + + +16. 5.6 0 2 +18. 5.6 0 2 +18. 6.7 0 2 +16. 6.7 0 2 +16. 5.6 0 2 + + +16. 6.7 0 2 +18. 6.7 0 2 +18. 7.8 0 2 +16. 7.8 0 2 +16. 6.7 0 2 + + +16. 7.8 0 2 +18. 7.8 0 2 +18. 8.9 0 2 +16. 8.9 0 2 +16. 7.8 0 2 + + +16. 8.9 0 2 +18. 8.9 0 2 +18. 10. 0 2 +16. 10. 0 2 +16. 8.9 0 2 + + +18. 0.0 0 2 +20. 0.0 0 2 +20. 1.1 0 2 +18. 1.1 0 2 +18. 0.0 0 2 + + +18. 1.1 0 2 +20. 1.1 0 2 +20. 2.2 0 2 +18. 2.2 0 2 +18. 1.1 0 2 + + +18. 2.2 0 2 +20. 2.2 0 2 +20. 3.3 0 2 +18. 3.3 0 2 +18. 2.2 0 2 + + +18. 3.3 0 2 +20. 3.3 0 2 +20. 4.4 0 2 +18. 4.4 0 2 +18. 3.3 0 2 + + +18. 4.4 0 2 +20. 4.4 0 2 +20. 5.6 0 2 +18. 5.6 0 2 +18. 4.4 0 2 + + +18. 5.6 0 2 +20. 5.6 0 2 +20. 6.7 0 2 +18. 6.7 0 2 +18. 5.6 0 2 + + +18. 6.7 0 2 +20. 6.7 0 2 +20. 7.8 0 2 +18. 7.8 0 2 +18. 6.7 0 2 + + +18. 7.8 0 2 +20. 7.8 0 2 +20. 8.9 0 2 +18. 8.9 0 2 +18. 7.8 0 2 + + +18. 8.9 0 2 +20. 8.9 0 2 +20. 10. 0 2 +18. 10. 0 2 +18. 8.9 0 2 + + diff --git a/tests/deal.II/grid_in_msh_03/mesh.msh b/tests/deal.II/grid_in_msh_03/mesh.msh new file mode 100644 index 0000000000..fa9fb072f8 --- /dev/null +++ b/tests/deal.II/grid_in_msh_03/mesh.msh @@ -0,0 +1,204 @@ +$MeshFormat +2 0 8 +$EndMeshFormat +$PhysicalNames +2 +1 1 "1" +2 2 "This surface" +$EndPhysicalNames +$Nodes +100 +1 0 0 0 +2 20 0 0 +3 20 10 0 +4 0 10 0 +5 2.222222222217813 0 0 +6 4.444444444435626 0 0 +7 6.666666666655381 0 0 +8 8.888888888875783 0 0 +9 11.11111111109865 0 0 +10 13.33333333332399 0 0 +11 15.55555555554933 0 0 +12 17.77777777777466 0 0 +13 20 1.111111111108906 0 +14 20 2.222222222217813 0 +15 20 3.33333333332769 0 +16 20 4.444444444437892 0 +17 20 5.555555555549327 0 +18 20 6.666666666661994 0 +19 20 7.777777777774663 0 +20 20 8.888888888887331 0 +21 17.77777777777839 10 0 +22 15.55555555555679 10 0 +23 13.33333333333518 10 0 +24 11.11111111111358 10 0 +25 8.888888888891973 10 0 +26 6.666666666670369 10 0 +27 4.444444444448146 10 0 +28 2.222222222224073 10 0 +29 0 8.888888888889197 0 +30 0 7.777777777778395 0 +31 0 6.666666666667592 0 +32 0 5.555555555556789 0 +33 0 4.444444444445987 0 +34 0 3.333333333335184 0 +35 0 2.222222222224073 0 +36 0 1.111111111112036 0 +37 2.222222222218642 1.111111111111496 0 +38 2.222222222219417 2.222222222222914 0 +39 2.222222222220129 3.333333333334147 0 +40 2.222222222220792 4.444444444445237 0 +41 2.222222222221424 5.555555555556247 0 +42 2.222222222222049 6.666666666667213 0 +43 2.222222222222688 7.777777777778153 0 +44 2.222222222223361 8.888888888889079 0 +45 4.444444444437504 1.111111111111264 0 +46 4.444444444439081 2.222222222222499 0 +47 4.444444444440458 3.333333333333679 0 +48 4.444444444441706 4.444444444444804 0 +49 4.444444444442881 5.555555555555887 0 +50 4.444444444444038 6.666666666666938 0 +51 4.44444444444524 7.777777777777969 0 +52 4.444444444446567 8.888888888888987 0 +53 6.666666666657572 1.111111111111154 0 +54 6.666666666659543 2.2222222222223 0 +55 6.66666666666131 3.333333333333432 0 +56 6.666666666662916 4.444444444444548 0 +57 6.666666666664412 5.555555555555651 0 +58 6.66666666666585 6.666666666666745 0 +59 6.666666666667285 7.777777777777832 0 +60 6.666666666668773 8.888888888888916 0 +61 8.888888888878521 1.111111111111078 0 +62 8.888888888880823 2.22222222222216 0 +63 8.888888888882811 3.333333333333248 0 +64 8.888888888884571 4.444444444444345 0 +65 8.888888888886175 5.555555555555455 0 +66 8.888888888887676 6.666666666666577 0 +67 8.888888888889122 7.77777777777771 0 +68 8.888888888890547 8.888888888888852 0 +69 11.11111111110122 1.111111111110989 0 +70 11.11111111110336 2.222222222221994 0 +71 11.11111111110522 3.333333333333026 0 +72 11.11111111110686 4.444444444444096 0 +73 11.11111111110835 5.55555555555521 0 +74 11.11111111110973 6.666666666666364 0 +75 11.11111111111104 7.777777777777554 0 +76 11.11111111111232 8.88888888888877 0 +77 13.33333333332558 1.11111111111084 0 +78 13.33333333332708 2.222222222221715 0 +79 13.33333333332847 3.333333333332654 0 +80 13.33333333332975 4.444444444443679 0 +81 13.33333333333094 5.555555555554799 0 +82 13.33333333333206 6.666666666666009 0 +83 13.33333333333313 7.777777777777295 0 +84 13.33333333333417 8.888888888888633 0 +85 15.5555555555503 1.111111111110555 0 +86 15.55555555555125 2.22222222222118 0 +87 15.55555555555216 3.333333333331943 0 +88 15.55555555555302 4.444444444442883 0 +89 15.55555555555383 5.555555555554025 0 +90 15.55555555555461 6.666666666665354 0 +91 15.55555555555535 7.777777777776826 0 +92 15.55555555555608 8.88888888888839 0 +93 17.77777777777513 1.111111111109987 0 +94 17.77777777777559 2.222222222220101 0 +95 17.77777777777604 3.333333333330518 0 +96 17.77777777777647 4.444444444441285 0 +97 17.77777777777688 5.555555555552501 0 +98 17.77777777777728 6.66666666666413 0 +99 17.77777777777766 7.777777777775988 0 +100 17.77777777777803 8.888888888887967 0 +$EndNodes +$Elements +90 +1 1 3 1 2 0 2 13 +2 1 3 1 2 0 13 14 +3 1 3 1 2 0 14 15 +4 1 3 1 2 0 15 16 +5 1 3 1 2 0 16 17 +6 1 3 1 2 0 17 18 +7 1 3 1 2 0 18 19 +8 1 3 1 2 0 19 20 +9 1 3 1 2 0 20 3 +10 3 3 2 1 0 1 5 37 36 +11 3 3 2 1 0 36 37 38 35 +12 3 3 2 1 0 35 38 39 34 +13 3 3 2 1 0 34 39 40 33 +14 3 3 2 1 0 33 40 41 32 +15 3 3 2 1 0 32 41 42 31 +16 3 3 2 1 0 31 42 43 30 +17 3 3 2 1 0 30 43 44 29 +18 3 3 2 1 0 29 44 28 4 +19 3 3 2 1 0 5 6 45 37 +20 3 3 2 1 0 37 45 46 38 +21 3 3 2 1 0 38 46 47 39 +22 3 3 2 1 0 39 47 48 40 +23 3 3 2 1 0 40 48 49 41 +24 3 3 2 1 0 41 49 50 42 +25 3 3 2 1 0 42 50 51 43 +26 3 3 2 1 0 43 51 52 44 +27 3 3 2 1 0 44 52 27 28 +28 3 3 2 1 0 6 7 53 45 +29 3 3 2 1 0 45 53 54 46 +30 3 3 2 1 0 46 54 55 47 +31 3 3 2 1 0 47 55 56 48 +32 3 3 2 1 0 48 56 57 49 +33 3 3 2 1 0 49 57 58 50 +34 3 3 2 1 0 50 58 59 51 +35 3 3 2 1 0 51 59 60 52 +36 3 3 2 1 0 52 60 26 27 +37 3 3 2 1 0 7 8 61 53 +38 3 3 2 1 0 53 61 62 54 +39 3 3 2 1 0 54 62 63 55 +40 3 3 2 1 0 55 63 64 56 +41 3 3 2 1 0 56 64 65 57 +42 3 3 2 1 0 57 65 66 58 +43 3 3 2 1 0 58 66 67 59 +44 3 3 2 1 0 59 67 68 60 +45 3 3 2 1 0 60 68 25 26 +46 3 3 2 1 0 8 9 69 61 +47 3 3 2 1 0 61 69 70 62 +48 3 3 2 1 0 62 70 71 63 +49 3 3 2 1 0 63 71 72 64 +50 3 3 2 1 0 64 72 73 65 +51 3 3 2 1 0 65 73 74 66 +52 3 3 2 1 0 66 74 75 67 +53 3 3 2 1 0 67 75 76 68 +54 3 3 2 1 0 68 76 24 25 +55 3 3 2 1 0 9 10 77 69 +56 3 3 2 1 0 69 77 78 70 +57 3 3 2 1 0 70 78 79 71 +58 3 3 2 1 0 71 79 80 72 +59 3 3 2 1 0 72 80 81 73 +60 3 3 2 1 0 73 81 82 74 +61 3 3 2 1 0 74 82 83 75 +62 3 3 2 1 0 75 83 84 76 +63 3 3 2 1 0 76 84 23 24 +64 3 3 2 1 0 10 11 85 77 +65 3 3 2 1 0 77 85 86 78 +66 3 3 2 1 0 78 86 87 79 +67 3 3 2 1 0 79 87 88 80 +68 3 3 2 1 0 80 88 89 81 +69 3 3 2 1 0 81 89 90 82 +70 3 3 2 1 0 82 90 91 83 +71 3 3 2 1 0 83 91 92 84 +72 3 3 2 1 0 84 92 22 23 +73 3 3 2 1 0 11 12 93 85 +74 3 3 2 1 0 85 93 94 86 +75 3 3 2 1 0 86 94 95 87 +76 3 3 2 1 0 87 95 96 88 +77 3 3 2 1 0 88 96 97 89 +78 3 3 2 1 0 89 97 98 90 +79 3 3 2 1 0 90 98 99 91 +80 3 3 2 1 0 91 99 100 92 +81 3 3 2 1 0 92 100 21 22 +82 3 3 2 1 0 12 2 13 93 +83 3 3 2 1 0 93 13 14 94 +84 3 3 2 1 0 94 14 15 95 +85 3 3 2 1 0 95 15 16 96 +86 3 3 2 1 0 96 16 17 97 +87 3 3 2 1 0 97 17 18 98 +88 3 3 2 1 0 98 18 19 99 +89 3 3 2 1 0 99 19 20 100 +90 3 3 2 1 0 100 20 3 21 +$EndElements