// $Id$
// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008 by the deal.II authors
+// Copyright (C) 2000, 2001, 2003, 2004, 2007, 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
{
const FiniteElement<dim>& fe = dof.get_fe();
std::vector<unsigned int> v (fe.dofs_per_cell);
- boost::shared_ptr<FEValues<dim> > fevalues;
+ std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
{
Quadrature<dim> quad(fe.get_unit_support_points());
- fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+ fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
}
for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
Point<dim> p = cell->center();
- if (fevalues != 0)
+ if (fevalues.get() != 0)
fevalues->reinit(cell);
cell->get_dof_indices (v);
for (unsigned int i=0; i<v.size(); ++i)
- if (fevalues != 0)
+ if (fevalues.get() != 0)
deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
else
deallog << p << '\t' << v[i] << std::endl;
{
const FiniteElement<dim>& fe = dof.get_fe();
std::vector<unsigned int> v (fe.dofs_per_cell);
- boost::shared_ptr<FEValues<dim> > fevalues;
+ std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
{
Quadrature<dim> quad(fe.get_unit_support_points());
- fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+ fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
}
for (typename MGDoFHandler<dim>::cell_iterator cell=dof.begin(level);
cell != dof.end(level); ++cell)
{
Point<dim> p = cell->center();
- if (fevalues != 0)
+ if (fevalues.get() != 0)
fevalues->reinit(cell);
cell->get_mg_dof_indices (v);
for (unsigned int i=0; i<v.size(); ++i)
- if (fevalues != 0)
+ if (fevalues.get() != 0)
deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
else
deallog << p << '\t' << v[i] << std::endl;
//----------------------------------------------------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008 by the deal.II authors
+// Copyright (C) 2000, 2001, 2003, 2004, 2007, 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
{
const FiniteElement<dim>& fe = dof.get_fe();
std::vector<unsigned int> v (fe.dofs_per_cell);
- boost::shared_ptr<FEValues<dim> > fevalues;
-
+ std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
+
if (fe.has_support_points())
{
Quadrature<dim> quad(fe.get_unit_support_points());
- fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+ fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
}
-
+
for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
Point<dim> p = cell->center();
- if (fevalues != 0)
+ if (fevalues.get() != 0)
fevalues->reinit(cell);
-
+
cell->get_dof_indices (v);
for (unsigned int i=0; i<v.size(); ++i)
- if (fevalues != 0)
+ if (fevalues.get() != 0)
deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
else
deallog << p << '\t' << v[i] << std::endl;
{
const FiniteElement<dim>& element = dof.get_fe();
deallog << element.get_name() << std::endl;
-
+
DoFRenumbering::Cuthill_McKee(dof);
print_dofs (dof);
}
void
check ()
{
- Triangulation<dim> tr;
+ Triangulation<dim> tr;
GridGenerator::hyper_cube(tr, -1., 1.);
tr.refine_global (1);
tr.begin_active()->set_refine_flag ();
tr.execute_coarsening_and_refinement ();
tr.refine_global(3-dim);
-
+
{
FE_Q<dim> fe(2);
DoFHandler<dim> dof(tr);
{
std::ofstream logfile ("dof_renumbering_03/output");
deallog << std::setprecision (2);
- deallog << std::fixed;
+ deallog << std::fixed;
deallog.attach(logfile);
deallog.depth_console (0);
//----------------------------------------------------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008 by the deal.II authors
+// Copyright (C) 2000, 2001, 2003, 2004, 2007, 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
{
const FiniteElement<dim>& fe = dof.get_fe();
std::vector<unsigned int> v (fe.dofs_per_cell);
- boost::shared_ptr<FEValues<dim> > fevalues;
-
+ std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
+
if (fe.has_support_points())
{
Quadrature<dim> quad(fe.get_unit_support_points());
- fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+ fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
}
-
+
for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
Point<dim> p = cell->center();
- if (fevalues != 0)
+ if (fevalues.get() != 0)
fevalues->reinit(cell);
-
+
cell->get_dof_indices (v);
for (unsigned int i=0; i<v.size(); ++i)
- if (fevalues != 0)
+ if (fevalues.get() != 0)
deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
else
deallog << p << '\t' << v[i] << std::endl;
{
const FiniteElement<dim>& element = dof.get_fe();
deallog << element.get_name() << std::endl;
-
+
DoFRenumbering::boost::Cuthill_McKee(dof);
print_dofs (dof);
}
void
check ()
{
- Triangulation<dim> tr;
+ Triangulation<dim> tr;
GridGenerator::hyper_cube(tr, -1., 1.);
tr.refine_global (1);
tr.begin_active()->set_refine_flag ();
tr.execute_coarsening_and_refinement ();
tr.refine_global(3-dim);
-
+
{
FE_Q<dim> fe(2);
DoFHandler<dim> dof(tr);
{
std::ofstream logfile ("dof_renumbering_04/output");
deallog << std::setprecision (2);
- deallog << std::fixed;
+ deallog << std::fixed;
deallog.attach(logfile);
deallog.depth_console (0);
// $Id$
// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008, 2009 by the deal.II authors
+// Copyright (C) 2000, 2001, 2003, 2004, 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
{
const FiniteElement<dim>& fe = dof.get_fe();
std::vector<unsigned int> v (fe.dofs_per_cell);
- boost::shared_ptr<FEValues<dim> > fevalues;
+ std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
{
Quadrature<dim> quad(fe.get_unit_support_points());
- fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+ fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
}
for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
Point<dim> p = cell->center();
- if (fevalues != 0)
+ if (fevalues.get() != 0)
fevalues->reinit(cell);
cell->get_dof_indices (v);
for (unsigned int i=0; i<v.size(); ++i)
- if (fevalues != 0)
+ if (fevalues.get() != 0)
deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
else
deallog << p << '\t' << v[i] << std::endl;
//----------------------------------------------------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008 by the deal.II authors
+// Copyright (C) 2000, 2001, 2003, 2004, 2007, 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
{
const FiniteElement<dim>& fe = dof.get_fe();
std::vector<unsigned int> v (fe.dofs_per_cell);
- boost::shared_ptr<FEValues<dim> > fevalues;
-
+ std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
+
if (fe.has_support_points())
{
Quadrature<dim> quad(fe.get_unit_support_points());
- fevalues = boost::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
+ fevalues = std_cxx1x::shared_ptr<FEValues<dim> >(new FEValues<dim>(fe, quad, update_q_points));
}
-
+
for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
Point<dim> p = cell->center();
- if (fevalues != 0)
+ if (fevalues.get() != 0)
fevalues->reinit(cell);
-
+
cell->get_dof_indices (v);
for (unsigned int i=0; i<v.size(); ++i)
- if (fevalues != 0)
+ if (fevalues.get() != 0)
deallog << fevalues->quadrature_point(i) << '\t' << v[i] << std::endl;
else
deallog << p << '\t' << v[i] << std::endl;
{
const FiniteElement<dim>& element = dof.get_fe();
deallog << element.get_name() << std::endl;
-
+
DoFRenumbering::boost::minimum_degree(dof);
print_dofs (dof);
}
void
check ()
{
- Triangulation<dim> tr;
+ Triangulation<dim> tr;
GridGenerator::hyper_cube(tr, -1., 1.);
tr.refine_global (1);
tr.begin_active()->set_refine_flag ();
tr.execute_coarsening_and_refinement ();
tr.refine_global(3-dim);
-
+
{
FE_Q<dim> fe(2);
DoFHandler<dim> dof(tr);
{
std::ofstream logfile ("dof_renumbering_06/output");
deallog << std::setprecision (2);
- deallog << std::fixed;
+ deallog << std::fixed;
deallog.attach(logfile);
deallog.depth_console (0);
deallog.attach(logfile);
deallog.depth_console (0);
- std::vector<boost::shared_ptr<FiniteElement<2> > > fe2;
- fe2.push_back(boost::shared_ptr<FiniteElement<2> >(new FE_DGP<2>(1)));
- fe2.push_back(boost::shared_ptr<FiniteElement<2> >(new FE_Q<2>(1)));
+ std::vector<std_cxx1x::shared_ptr<FiniteElement<2> > > fe2;
+ fe2.push_back(std_cxx1x::shared_ptr<FiniteElement<2> >(new FE_DGP<2>(1)));
+ fe2.push_back(std_cxx1x::shared_ptr<FiniteElement<2> >(new FE_Q<2>(1)));
for (unsigned int i=0;i<fe2.size();++i)
test(*fe2[i]);
deallog.attach(logfile);
deallog.depth_console (0);
- std::vector<boost::shared_ptr<FiniteElement<2> > > fe2;
- fe2.push_back(boost::shared_ptr<FiniteElement<2> >(new FE_DGP<2>(1)));
-// fe2.push_back(boost::shared_ptr<FiniteElement<2> >(new FE_Q<2>(1)));
+ std::vector<std_cxx1x::shared_ptr<FiniteElement<2> > > fe2;
+ fe2.push_back(std_cxx1x::shared_ptr<FiniteElement<2> >(new FE_DGP<2>(1)));
+// fe2.push_back(std_cxx1x::shared_ptr<FiniteElement<2> >(new FE_Q<2>(1)));
for (unsigned int i=0;i<fe2.size();++i)
test(*fe2[i]);
// $Id$
// Version: $Name$
//
-// Copyright (C) 2009 by the deal.II authors and Michael Rapson
+// Copyright (C) 2009, 2010 by the deal.II authors and Michael Rapson
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
// check that the assignment operator is valid
test_copy = node_monitor;
- test_copy.add_point(Point<2>::Point(1, 0.2));
+ test_copy.add_point(Point<2>(1, 0.2));
test_copy.add_field_name("Solution");
std::vector < std::vector <Point <dim> > > selected_locations;
test_copy.get_points(selected_locations);
// two alternatives here, adding a point at a time or a vector of points
// 2d points
- std::vector <Point < 2 > > point_vector(5, Point < 2 > ::Point());
- point_vector[0] = Point < 2 > ::Point(0, 0); // some of these points will hit a node, others won't
- point_vector[1] = Point < 2 > ::Point(0.25, 0);
- point_vector[2] = Point < 2 > ::Point(0.25, 0.45);
- point_vector[3] = Point < 2 > ::Point(0.45, 0.45);
- point_vector[4] = Point < 2 > ::Point(0.8, 0.8);
+ std::vector <Point < 2 > > point_vector(5, Point < 2 > ());
+ point_vector[0] = Point < 2 > (0, 0); // some of these points will hit a node, others won't
+ point_vector[1] = Point < 2 > (0.25, 0);
+ point_vector[2] = Point < 2 > (0.25, 0.45);
+ point_vector[3] = Point < 2 > (0.45, 0.45);
+ point_vector[4] = Point < 2 > (0.8, 0.8);
node_monitor.add_points(point_vector);
- node_monitor.add_point(Point<2>::Point(1, 0.2)); // add a single point
+ node_monitor.add_point(Point<2>(1, 0.2)); // add a single point
// MonitorNode requires that the instance is 'closed' before any data is added
// this ensures that points are not added once time starts.