int
main()
{
- ofstream logfile ("derivatives.output");
+ std::ofstream logfile ("derivatives.output");
logfile.precision (2);
- logfile.setf(ios::fixed);
+ logfile.setf(std::ios::fixed);
deallog.attach(logfile);
deallog.depth_console(0);
template <int dim>
inline void
-check_support (FiniteElement<dim>& finel, const char* name)
+check_support (const FiniteElement<dim>& finel, const char* name)
{
Triangulation<dim> tr;
GridGenerator::hyper_cube(tr, 0., 1.);
DoFHandler<dim> dof (tr);
dof.distribute_dofs (finel);
- cout << name << '<' << dim << '>' << " cell support points" << std::endl;
+ std::cout << name << '<' << dim << '>' << " cell support points" << std::endl;
- vector<Point<dim> > cell_points (finel.dofs_per_cell);
- finel.get_unit_support_points (cell_points);
+ const std::vector<Point<dim> > &cell_points = finel.get_unit_support_points ();
for (unsigned int k=0;k<cell_points.size();++k)
- cout << setprecision(3) << cell_points[k] << std::endl;
+ std::cout << std::setprecision(3) << cell_points[k] << std::endl;
- vector<Point<dim-1> > face_points;
- finel.get_unit_face_support_points (face_points);
- const vector<double> dummy_weights (face_points.size());
+ const std::vector<Point<dim-1> > &face_points = finel.get_unit_face_support_points ();
+ const std::vector<double> dummy_weights (face_points.size());
Quadrature<dim-1> q(face_points, dummy_weights);
QProjector<dim> qp(q, false);
unsigned int j=0;
for (unsigned int i=0;i<GeometryInfo<dim>::faces_per_cell;++i)
{
- cout << name << '<' << dim << '>' << " face " << i << " support points" << std::endl;
+ std::cout << name << '<' << dim << '>' << " face " << i << " support points" << std::endl;
for (unsigned int k=0;k<face_points.size();++k)
- cout << setprecision(3) << qp.point(j++)
+ std::cout << std::setprecision(3) << qp.point(j++)
<< std::endl;
}
}
inline void
check_matrices (FiniteElement<dim>& fe, const char* name)
{
- cout << name << '<' << dim << '>' << " constraint " << std::endl;
- fe.constraints().print_formatted (cout, 7, false, 10, "~");
+ std::cout << name << '<' << dim << '>' << " constraint " << std::endl;
+ fe.constraints().print_formatted (std::cout, 7, false, 10, "~");
for (unsigned int i=0;i<GeometryInfo<dim>::children_per_cell;++i)
{
- cout << name << '<' << dim << '>' << " restriction " << i << std::endl;
- fe.restrict(i).print_formatted (cout, 3, false, 6, "~");
- cout << name << '<' << dim << '>' << " embedding " << i << std::endl;
- fe.prolongate(i).print_formatted (cout, 3, false, 6, "~");
+ std::cout << name << '<' << dim << '>' << " restriction " << i << std::endl;
+ fe.restrict(i).print_formatted (std::cout, 3, false, 6, "~");
+ std::cout << name << '<' << dim << '>' << " embedding " << i << std::endl;
+ fe.prolongate(i).print_formatted (std::cout, 3, false, 6, "~");
}
}
}
template <int dim>
-void loop (vector<FiniteElement<dim> *> elements,
+void loop (std::vector<FiniteElement<dim> *> elements,
const Mapping<dim>& mapping,
Triangulation<dim>& tr)
{
QGauss<dim> gauss (4);
- FiniteElement<dim>** elementp = elements.begin ();
- FiniteElement<dim>** end = elements.end ();
+ typename std::vector<FiniteElement<dim> *>::iterator elementp = elements.begin ();
+ typename std::vector<FiniteElement<dim> *>::iterator end = elements.end ();
for (;elementp != end; ++elementp)
{
const FiniteElement<dim>& element = **elementp;
char dofs[20];
- ostrstream ost (dofs, 19);
- ost << element.n_dofs_per_cell() << ends;
+ std::ostrstream ost (dofs, 19);
+ ost << element.n_dofs_per_cell() << std::ends;
deallog.push(dofs);
int main ()
{
- ofstream of ("performance.log");
+ std::ofstream of ("performance.log");
deallog.attach (of);
deallog.log_execution_time(true);
deallog.log_time_differences(true);
MappingQ1<2> mapping;
MappingQ<2> mappingq1(1);
MappingQ<2> mappingq2(2);
- vector<FiniteElement<2>*> el2d;
+ std::vector<FiniteElement<2>*> el2d;
el2d.push_back (new FE_Q<2> (1));
el2d.push_back (new FE_Q<2> (2));
el2d.push_back (new FE_Q<2> (3));
sprintf(fname, "Shapes%dd-%s.output", dim, name);
std::ofstream gnuplot(fname);
- gnuplot.setf(ios::fixed);
+ gnuplot.setf(std::ios::fixed);
gnuplot.precision (PRECISION);
unsigned int k=0;
| update_q_points));
sprintf(fname, "ShapesFace%dd-%s.output", dim, name);
- ofstream gnuplot(fname);
- gnuplot.setf(ios::fixed);
+ std::ofstream gnuplot(fname);
+ gnuplot.setf(std::ios::fixed);
gnuplot.precision (PRECISION);
for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
coincide=false;
if (!coincide)
- deallog << "Error in fe.shape_value for " << name << endl;
+ deallog << "Error in fe.shape_value for " << name << std::endl;
coincide=true;
for (unsigned int x=0; x<q.n_quadrature_points; ++x)
}
if (!coincide)
- deallog << "Error in fe.shape_grad for " << name << endl;
+ deallog << "Error in fe.shape_grad for " << name << std::endl;
coincide=true;
double max_diff=0.;
}
if (!coincide)
- deallog << "Error in fe.shape_grad_grad for " << name << endl
- << "max_diff=" << max_diff << endl;
+ deallog << "Error in fe.shape_grad_grad for " << name << std::endl
+ << "max_diff=" << max_diff << std::endl;
}
int
main()
{
- ofstream logfile ("shapes.output");
+ std::ofstream logfile ("shapes.output");
logfile.precision (PRECISION);
- logfile.setf(ios::fixed);
+ logfile.setf(std::ios::fixed);
deallog.attach(logfile);
deallog.depth_console(0);
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
template<int dim>
inline void
-print_matrix(ostream& of,
+print_matrix(std::ostream& of,
Triangulation<dim>& tr,
unsigned int level,
const FiniteElement<dim>& finel,
GridGenerator::hyper_cube(tr, -1., 1.);
tr.refine_global(2);
- ofstream of("transfer.dat");
+ std::ofstream of("transfer.dat");
TEST(1,FEQ1<2>);
TEST(1,FEQ2<2>);