// Define some constants that will be used by the function parser
std::map<std::string, double> constants;
- constants["pi"] = M_PI;
+ constants["pi"] = numbers::PI;
// Define the variables that will be used inside the expressions
std::string variables = "x,y";
// Test for a number of points, every ten degrees
for (unsigned int i=0; i<200; i++)
{
- Point<2> p(std::sin((double)i/100.*M_PI), std::cos((double)i/100.*M_PI));
+ Point<2> p(std::sin((double)i/100.*numbers::PI), std::cos((double)i/100.*PI));
p *= 1.-1e-8;
std::pair<Triangulation<2>::active_cell_iterator, Point<2> > cell
double delta=0.;
for (unsigned int di=0; di<i; ++di)
{
- delta = values[j](di) - std::cos(M_PI*(i+1)*vertices[j][di])*t;
+ delta = values[j](di) - std::cos(numbers::PI*(i+1)*vertices[j][di])*t;
if (std::abs(delta) > 1e-10)
deallog << "p(" << di << "): " << vertices[j] << ", delta: "
<< delta << std::endl;
MappingQ1Eulerian<2> mapping_euler (deformation, *dof_handler_def);
// Try rotating the elements
- for (double rotat = 0; rotat < 2 * M_PI; rotat += 0.25 * M_PI)
+ for (double rotat = 0; rotat < 2 * numbers::PI; rotat += 0.25 * numbers::PI)
{
// Rotate element
VectorTools::project (*dof_handler_def, hn_constraints_def,
Point<dim>(0,0) :
Point<dim>(0,0,0));
const double dist = p.distance(origin);
- if (dist<0.25/M_PI)
+ if (dist<0.25/numbers::PI)
{
cell->set_refine_flag ();
cell_refined = true;
Point<dim>(0,0) :
Point<dim>(0,0,0));
const double dist = p.distance(origin);
- if (dist<0.25/M_PI)
+ if (dist<0.25/numbers::PI)
{
cell->set_refine_flag ();
cell_refined = true;
Point<dim>(0,0) :
Point<dim>(0,0,0));
const double dist = p.distance(origin);
- if (dist<0.25/M_PI)
+ if (dist<0.25/numbers::PI)
{
cell->set_refine_flag ();
cell_refined = true;
Point<dim>(0,0) :
Point<dim>(0,0,0));
const double dist = p.distance(origin);
- if (dist<0.25/M_PI)
+ if (dist<0.25/numbers::PI)
{
cell->set_refine_flag ();
cell_refined = true;
#include <deal.II/base/function.h>
#include <deal.II/base/logstream.h>
#include <deal.II/base/utilities.h>
+#include <deal.II/base/numbers.h>
#include <deal.II/lac/constraint_matrix.h>
#include <deal.II/lac/vector.h>
Point<dim>(0,0) :
Point<dim>(0,0,0));
const double dist = p.distance(origin);
- if(dist<0.25/M_PI)
+ if(dist<0.25/numbers::PI)
{
cell->set_refine_flag ();
cell_refined = true;
Point<dim>(0,0) :
Point<dim>(0,0,0));
const double dist = p.distance(origin);
- if (dist<0.25/M_PI)
+ if (dist<0.25/numbers::PI)
{
cell->set_refine_flag ();
cell_refined = true;