// preamble
if (flags.write_preamble)
{
- time_t time1= time (0);
- tm *time = localtime(&time1);
+ std::time_t time1= std::time (0);
+ std::tm *time = std::localtime(&time1);
out << "# This file was generated by the deal.II library." << std::endl
<< "# Date = "
<< time->tm_year+1900 << "/"
// block this to have local
// variables destroyed after
// use
- const time_t time1= time (0);
- const tm *time = localtime(&time1);
+ const std::time_t time1= std::time (0);
+ const std::tm *time = std::localtime(&time1);
out << "# This file was generated by the deal.II library." << std::endl
<< "# Date = "
<< time->tm_year+1900 << "/"
{
// block this to have local
// variables destroyed after use
- const time_t time1= time (0);
- const tm *time = localtime(&time1);
+ const std::time_t time1= std::time (0);
+ const std::tm *time = std::localtime(&time1);
out << "/* This file was generated by the deal.II library." << std::endl
<< " Date = "
<< time->tm_year+1900 << "/"
nrml[i*(n_subdivisions+1)+j](1)=h1(2)*h2(0)-h1(0)*h2(2);
nrml[i*(n_subdivisions+1)+j](2)=h1(0)*h2(1)-h1(1)*h2(0);
- // normalize Vektor
- double norm=sqrt(
- pow(nrml[i*(n_subdivisions+1)+j](0),2.)+
- pow(nrml[i*(n_subdivisions+1)+j](1),2.)+
- pow(nrml[i*(n_subdivisions+1)+j](2),2.));
+ // normalize Vector
+ double norm=std::sqrt(
+ std::pow(nrml[i*(n_subdivisions+1)+j](0),2.)+
+ std::pow(nrml[i*(n_subdivisions+1)+j](1),2.)+
+ std::pow(nrml[i*(n_subdivisions+1)+j](2),2.));
if (nrml[i*(n_subdivisions+1)+j](1)<0)
norm*=-1.;
EpsCell2d eps_cell;
//TODO:[?] Unify the various places where PI is defined to a central instance
const double pi = 3.141592653589793238462;
- const double cx = -cos(pi-flags.azimut_angle * 2*pi / 360.),
- cz = -cos(flags.turn_angle * 2*pi / 360.),
- sx = sin(pi-flags.azimut_angle * 2*pi / 360.),
- sz = sin(flags.turn_angle * 2*pi / 360.);
+ const double cx = -std::cos(pi-flags.azimut_angle * 2*pi / 360.),
+ cz = -std::cos(flags.turn_angle * 2*pi / 360.),
+ sx = std::sin(pi-flags.azimut_angle * 2*pi / 360.),
+ sz = std::sin(flags.turn_angle * 2*pi / 360.);
for (unsigned int vertex=0; vertex<4; ++vertex)
{
const double x = points[vertex](0),
// block this to have local
// variables destroyed after
// use
- time_t time1= time (0);
- tm *time = localtime(&time1);
+ std::time_t time1= std::time (0);
+ std::tm *time = std::localtime(&time1);
out << "%!PS-Adobe-2.0 EPSF-1.2" << std::endl
<< "%%Title: deal.II Output" << std::endl
<< "%%Creator: the deal.II library" << std::endl
// d>spacedim. write zeros instead
{
const unsigned int n_points
- = static_cast<unsigned int>(pow (static_cast<double>(n_subdivisions+1), dim));
+ = static_cast<unsigned int>(std::pow (static_cast<double>(n_subdivisions+1), dim));
for (unsigned int i=0; i<n_points; ++i)
out << "0 ";
};
// preamble
if (true)
{
- time_t time1= time (0);
- tm *time = localtime(&time1);
+ std::time_t time1= std::time (0);
+ std::tm *time = std::localtime(&time1);
out << "# vtk DataFile Version 3.0"
<< std::endl
<< "This file was generated by the deal.II library on "
switch(dim)
{
case 1:
- return cos(M_PI_2*p(0));
+ return std::cos(M_PI_2*p(0));
case 2:
- return cos(M_PI_2*p(0)) * cos(M_PI_2*p(1));
+ return std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1));
case 3:
- return cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2));
+ return std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
default:
Assert(false, ExcNotImplemented());
}
switch(dim)
{
case 1:
- values[i] = cos(M_PI_2*p(0));
+ values[i] = std::cos(M_PI_2*p(0));
break;
case 2:
- values[i] = cos(M_PI_2*p(0)) * cos(M_PI_2*p(1));
+ values[i] = std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1));
break;
case 3:
- values[i] = cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2));
+ values[i] = std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
break;
default:
Assert(false, ExcNotImplemented());
switch(dim)
{
case 1:
- return -M_PI_2*M_PI_2* cos(M_PI_2*p(0));
+ return -M_PI_2*M_PI_2* std::cos(M_PI_2*p(0));
case 2:
- return -2*M_PI_2*M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1));
+ return -2*M_PI_2*M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1));
case 3:
- return -3*M_PI_2*M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2));
+ return -3*M_PI_2*M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
default:
Assert(false, ExcNotImplemented());
}
switch(dim)
{
case 1:
- values[i] = -M_PI_2*M_PI_2* cos(M_PI_2*p(0));
+ values[i] = -M_PI_2*M_PI_2* std::cos(M_PI_2*p(0));
break;
case 2:
- values[i] = -2*M_PI_2*M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1));
+ values[i] = -2*M_PI_2*M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1));
break;
case 3:
- values[i] = -3*M_PI_2*M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2));
+ values[i] = -3*M_PI_2*M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
break;
default:
Assert(false, ExcNotImplemented());
switch(dim)
{
case 1:
- result[0] = -M_PI_2* sin(M_PI_2*p(0));
+ result[0] = -M_PI_2* std::sin(M_PI_2*p(0));
break;
case 2:
- result[0] = -M_PI_2* sin(M_PI_2*p(0)) * cos(M_PI_2*p(1));
- result[1] = -M_PI_2* cos(M_PI_2*p(0)) * sin(M_PI_2*p(1));
+ result[0] = -M_PI_2* std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1));
+ result[1] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1));
break;
case 3:
- result[0] = -M_PI_2* sin(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2));
- result[1] = -M_PI_2* cos(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * cos(M_PI_2*p(2));
- result[2] = -M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * sin(M_PI_2*p(2));
+ result[0] = -M_PI_2* std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
+ result[1] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
+ result[2] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::sin(M_PI_2*p(2));
break;
default:
Assert(false, ExcNotImplemented());
switch(dim)
{
case 1:
- gradients[i][0] = -M_PI_2* sin(M_PI_2*p(0));
+ gradients[i][0] = -M_PI_2* std::sin(M_PI_2*p(0));
break;
case 2:
- gradients[i][0] = -M_PI_2* sin(M_PI_2*p(0)) * cos(M_PI_2*p(1));
- gradients[i][1] = -M_PI_2* cos(M_PI_2*p(0)) * sin(M_PI_2*p(1));
+ gradients[i][0] = -M_PI_2* std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1));
+ gradients[i][1] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1));
break;
case 3:
- gradients[i][0] = -M_PI_2* sin(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2));
- gradients[i][1] = -M_PI_2* cos(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * cos(M_PI_2*p(2));
- gradients[i][2] = -M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * sin(M_PI_2*p(2));
+ gradients[i][0] = -M_PI_2* std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
+ gradients[i][1] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
+ gradients[i][2] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::sin(M_PI_2*p(2));
break;
default:
Assert(false, ExcNotImplemented());
switch(dim)
{
case 1:
- result[0][0] = -pi2* cos(M_PI_2*p(0));
+ result[0][0] = -pi2* std::cos(M_PI_2*p(0));
break;
case 2:
if (true)
{
- const double coco = -pi2*cos(M_PI_2*p(0)) * cos(M_PI_2*p(1));
- const double sisi = pi2*sin(M_PI_2*p(0)) * sin(M_PI_2*p(1));
+ const double coco = -pi2*std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1));
+ const double sisi = pi2*std::sin(M_PI_2*p(0)) * std::sin(M_PI_2*p(1));
result[0][0] = coco;
result[1][1] = coco;
result[0][1] = sisi;
case 3:
if (true)
{
- const double cococo = -pi2*cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2));
- const double sisico = pi2*sin(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * cos(M_PI_2*p(2));
- const double sicosi = pi2*sin(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * sin(M_PI_2*p(2));
- const double cosisi = pi2*cos(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * sin(M_PI_2*p(2));
+ const double cococo = -pi2*std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
+ const double sisico = pi2*std::sin(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
+ const double sicosi = pi2*std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::sin(M_PI_2*p(2));
+ const double cosisi = pi2*std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::sin(M_PI_2*p(2));
result[0][0] = cococo;
result[1][1] = cococo;
switch(dim)
{
case 1:
- hessians[i][0][0] = -pi2* cos(M_PI_2*p(0));
+ hessians[i][0][0] = -pi2* std::cos(M_PI_2*p(0));
break;
case 2:
if (true)
{
- const double coco = -pi2*cos(M_PI_2*p(0)) * cos(M_PI_2*p(1));
- const double sisi = pi2*sin(M_PI_2*p(0)) * sin(M_PI_2*p(1));
+ const double coco = -pi2*std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1));
+ const double sisi = pi2*std::sin(M_PI_2*p(0)) * std::sin(M_PI_2*p(1));
hessians[i][0][0] = coco;
hessians[i][1][1] = coco;
hessians[i][0][1] = sisi;
case 3:
if (true)
{
- const double cococo = -pi2*cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2));
- const double sisico = pi2*sin(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * cos(M_PI_2*p(2));
- const double sicosi = pi2*sin(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * sin(M_PI_2*p(2));
- const double cosisi = pi2*cos(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * sin(M_PI_2*p(2));
+ const double cococo = -pi2*std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
+ const double sisico = pi2*std::sin(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::cos(M_PI_2*p(2));
+ const double sicosi = pi2*std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::sin(M_PI_2*p(2));
+ const double cosisi = pi2*std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::sin(M_PI_2*p(2));
hessians[i][0][0] = cococo;
hessians[i][1][1] = cococo;
switch(dim)
{
case 1:
- return exp(p(0));
+ return std::exp(p(0));
case 2:
- return exp(p(0)) * exp(p(1));
+ return std::exp(p(0)) * std::exp(p(1));
case 3:
- return exp(p(0)) * exp(p(1)) * exp(p(2));
+ return std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2));
default:
Assert(false, ExcNotImplemented());
}
switch(dim)
{
case 1:
- values[i] = exp(p(0));
+ values[i] = std::exp(p(0));
break;
case 2:
- values[i] = exp(p(0)) * exp(p(1));
+ values[i] = std::exp(p(0)) * std::exp(p(1));
break;
case 3:
- values[i] = exp(p(0)) * exp(p(1)) * exp(p(2));
+ values[i] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2));
break;
default:
Assert(false, ExcNotImplemented());
switch(dim)
{
case 1:
- return exp(p(0));
+ return std::exp(p(0));
case 2:
- return 2 * exp(p(0)) * exp(p(1));
+ return 2 * std::exp(p(0)) * std::exp(p(1));
case 3:
- return 3 * exp(p(0)) * exp(p(1)) * exp(p(2));
+ return 3 * std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2));
default:
Assert(false, ExcNotImplemented());
}
switch(dim)
{
case 1:
- values[i] = exp(p(0));
+ values[i] = std::exp(p(0));
break;
case 2:
- values[i] = 2 * exp(p(0)) * exp(p(1));
+ values[i] = 2 * std::exp(p(0)) * std::exp(p(1));
break;
case 3:
- values[i] = 3 * exp(p(0)) * exp(p(1)) * exp(p(2));
+ values[i] = 3 * std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2));
break;
default:
Assert(false, ExcNotImplemented());
switch(dim)
{
case 1:
- result[0] = exp(p(0));
+ result[0] = std::exp(p(0));
break;
case 2:
- result[0] = exp(p(0)) * exp(p(1));
- result[1] = exp(p(0)) * exp(p(1));
+ result[0] = std::exp(p(0)) * std::exp(p(1));
+ result[1] = std::exp(p(0)) * std::exp(p(1));
break;
case 3:
- result[0] = exp(p(0)) * exp(p(1)) * exp(p(2));
- result[1] = exp(p(0)) * exp(p(1)) * exp(p(2));
- result[2] = exp(p(0)) * exp(p(1)) * exp(p(2));
+ result[0] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2));
+ result[1] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2));
+ result[2] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2));
break;
default:
Assert(false, ExcNotImplemented());
switch(dim)
{
case 1:
- gradients[i][0] = exp(p(0));
+ gradients[i][0] = std::exp(p(0));
break;
case 2:
- gradients[i][0] = exp(p(0)) * exp(p(1));
- gradients[i][1] = exp(p(0)) * exp(p(1));
+ gradients[i][0] = std::exp(p(0)) * std::exp(p(1));
+ gradients[i][1] = std::exp(p(0)) * std::exp(p(1));
break;
case 3:
- gradients[i][0] = exp(p(0)) * exp(p(1)) * exp(p(2));
- gradients[i][1] = exp(p(0)) * exp(p(1)) * exp(p(2));
- gradients[i][2] = exp(p(0)) * exp(p(1)) * exp(p(2));
+ gradients[i][0] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2));
+ gradients[i][1] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2));
+ gradients[i][2] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2));
break;
default:
Assert(false, ExcNotImplemented());
if ((x>=0) && (y>=0))
return 0.;
- double phi = atan2(y,-x)+M_PI;
+ double phi = std::atan2(y,-x)+M_PI;
double r2 = x*x+y*y;
- return pow(r2,1./3.) * sin(2./3.*phi);
+ return std::pow(r2,1./3.) * std::sin(2./3.*phi);
}
values[i] = 0.;
else
{
- double phi = atan2(y,-x)+M_PI;
+ double phi = std::atan2(y,-x)+M_PI;
double r2 = x*x+y*y;
- values[i] = pow(r2,1./3.) * sin(2./3.*phi);
+ values[i] = std::pow(r2,1./3.) * std::sin(2./3.*phi);
}
}
}
{
double x = p(0);
double y = p(1);
- double phi = atan2(y,-x)+M_PI;
- double r43 = pow(x*x+y*y,2./3.);
+ double phi = std::atan2(y,-x)+M_PI;
+ double r43 = std::pow(x*x+y*y,2./3.);
Tensor<1,2> result;
- result[0] = 2./3.*(sin(2./3.*phi)*x + cos(2./3.*phi)*y)/r43;
- result[1] = 2./3.*(sin(2./3.*phi)*y - cos(2./3.*phi)*x)/r43;
+ result[0] = 2./3.*(std::sin(2./3.*phi)*x + std::cos(2./3.*phi)*y)/r43;
+ result[1] = 2./3.*(std::sin(2./3.*phi)*y - std::cos(2./3.*phi)*x)/r43;
return result;
}
const Point<2>& p = points[i];
double x = p(0);
double y = p(1);
- double phi = atan2(y,-x)+M_PI;
- double r43 = pow(x*x+y*y,2./3.);
+ double phi = std::atan2(y,-x)+M_PI;
+ double r43 = std::pow(x*x+y*y,2./3.);
- gradients[i][0] = 2./3.*(sin(2./3.*phi)*x + cos(2./3.*phi)*y)/r43;
- gradients[i][1] = 2./3.*(sin(2./3.*phi)*y - cos(2./3.*phi)*x)/r43;
+ gradients[i][0] = 2./3.*(std::sin(2./3.*phi)*x + std::cos(2./3.*phi)*y)/r43;
+ gradients[i][1] = 2./3.*(std::sin(2./3.*phi)*y - std::cos(2./3.*phi)*x)/r43;
}
}
double x = p(0);
double y = p(1);
- double phi = atan2(x,y)+M_PI;
+ double phi = std::atan2(x,y)+M_PI;
double r2 = x*x+y*y;
- return pow(r2,.25) * sin(.5*phi);
+ return std::pow(r2,.25) * std::sin(.5*phi);
}
double x = points[i](0);
double y = points[i](1);
- double phi = atan2(x,y)+M_PI;
+ double phi = std::atan2(x,y)+M_PI;
double r2 = x*x+y*y;
- values[i] = pow(r2,.25) * sin(.5*phi);
+ values[i] = std::pow(r2,.25) * std::sin(.5*phi);
}
}
{
double x = p(0);
double y = p(1);
- double phi = atan2(x,y)+M_PI;
- double r64 = pow(x*x+y*y,3./4.);
+ double phi = std::atan2(x,y)+M_PI;
+ double r64 = std::pow(x*x+y*y,3./4.);
Tensor<1,2> result;
- result[0] = 1./2.*(sin(1./2.*phi)*x + cos(1./2.*phi)*y)/r64;
- result[1] = 1./2.*(sin(1./2.*phi)*y - cos(1./2.*phi)*x)/r64;
+ result[0] = 1./2.*(std::sin(1./2.*phi)*x + std::cos(1./2.*phi)*y)/r64;
+ result[1] = 1./2.*(std::sin(1./2.*phi)*y - std::cos(1./2.*phi)*x)/r64;
return result;
}
const Point<2>& p = points[i];
double x = p(0);
double y = p(1);
- double phi = atan2(x,y)+M_PI;
- double r64 = pow(x*x+y*y,3./4.);
+ double phi = std::atan2(x,y)+M_PI;
+ double r64 = std::pow(x*x+y*y,3./4.);
- gradients[i][0] = 1./2.*(sin(1./2.*phi)*x + cos(1./2.*phi)*y)/r64;
- gradients[i][1] = 1./2.*(sin(1./2.*phi)*y - cos(1./2.*phi)*x)/r64;
+ gradients[i][0] = 1./2.*(std::sin(1./2.*phi)*x + std::cos(1./2.*phi)*y)/r64;
+ gradients[i][1] = 1./2.*(std::sin(1./2.*phi)*y - std::cos(1./2.*phi)*x)/r64;
}
}
angle = 0;
break;
case 2:
- angle = atan2(direction(0),direction(1));
+ angle = std::atan2(direction(0),direction(1));
break;
case 3:
Assert(false, ExcNotImplemented());
}
- sine = sin(angle);
- cosine = cos(angle);
+ sine = std::sin(angle);
+ cosine = std::cos(angle);
}
const unsigned int) const
{
double x = steepness*(-cosine*p(0)+sine*p(1));
- return -atan(x);
+ return -std::atan(x);
}
for (unsigned int i=0;i<p.size();++i)
{
double x = steepness*(-cosine*p[i](0)+sine*p[i](1));
- values[i] = -atan(x);
+ values[i] = -std::atan(x);
}
}