// $Id$
// Version: $Name$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* influence on the function execution..
*/
static void parse_tecplot_header(std::string &header,
- unsigned int (&tecplot2deal)[dim],
+ std::vector<unsigned int> &tecplot2deal,
unsigned int &n_vars,
unsigned int &n_vertices,
unsigned int &n_cells,
- unsigned int (&IJK)[dim],
+ std::vector<unsigned int> &IJK,
bool &structured,
bool &blocked);
template <int dim>
void GridIn<dim>::parse_tecplot_header(std::string &header,
- unsigned int (&tecplot2deal)[dim],
+ std::vector<unsigned int> &tecplot2deal,
unsigned int &n_vars,
unsigned int &n_vertices,
unsigned int &n_cells,
- unsigned int (&IJK)[dim],
+ std::vector<unsigned int> &IJK,
bool &structured,
bool &blocked)
{
+ Assert(tecplot2deal.size()==dim, ExcInternalError());
+ Assert(IJK.size()==dim, ExcInternalError());
// initialize the output variables
n_vars=0;
n_vertices=0;
// tecplot itself accepts entries like
// 'J=20' instead of 'E=20'. therefore,
// take the max of IJK
- n_cells=*std::max_element(IJK,IJK+dim);
+ n_cells=*std::max_element(IJK.begin(),IJK.end());
AssertThrow(n_cells>0,
ExcMessage("Tecplot file does not contain a complete and consistent set of parameters"));
}
// now create some variables holding
// important information on the mesh, get
// this information from the header string
- unsigned int tecplot2deal[dim],
- n_vars,
+ std::vector<unsigned int> tecplot2deal(dim);
+ std::vector<unsigned int> IJK(dim);
+ unsigned int n_vars,
n_vertices,
- n_cells,
- IJK[dim];
+ n_cells;
bool structured,
blocked;