// factor == k * (k-1) * ... * (k-j+1) / j! = k! / (k-j)! / j!
if (c == 0)
{
- dofs_subcell[c](j, k) =
- ((k + j) % 2 == 0) ?
- std::pow(.5, static_cast<double>(k)) * factor :
- -std::pow(.5, static_cast<double>(k)) * factor;
- dofs_cell[c](j, k) =
- std::pow(2., static_cast<double>(j)) * factor;
+ dofs_subcell[c](j, k) = ((k + j) % 2 == 0) ?
+ Utilities::pow(.5, k) * factor :
+ -Utilities::pow(.5, k) * factor;
+ dofs_cell[c](j, k) = Utilities::pow(2, j) * factor;
}
else
{
- dofs_subcell[c](j, k) =
- std::pow(.5, static_cast<double>(k)) * factor;
- dofs_cell[c](j, k) =
- ((k + j) % 2 == 0) ?
- std::pow(2., static_cast<double>(j)) * factor :
- -std::pow(2., static_cast<double>(j)) * factor;
+ dofs_subcell[c](j, k) = Utilities::pow(.5, k) * factor;
+ dofs_cell[c](j, k) = ((k + j) % 2 == 0) ?
+ Utilities::pow(2, j) * factor :
+ -Utilities::pow(2, j) * factor;
}
}
}
for (unsigned int i = 2; i < this->n_dofs_per_face(face_no);
++i)
{
- interpolation_matrix(i, i) = std::pow(0.5, i);
+ interpolation_matrix(i, i) = Utilities::pow(0.5, i);
factorial_i *= i;
int factorial_j = factorial_i;
int factorial_ij = 1;
if (((i + j) & 1) != 0u)
interpolation_matrix(i, j) =
- -1.0 * std::pow(0.5, j) * factorial_j /
+ -1.0 * Utilities::pow(0.5, j) * factorial_j /
(factorial_i * factorial_ij);
else
interpolation_matrix(i, j) =
- std::pow(0.5, j) * factorial_j /
+ Utilities::pow(0.5, j) * factorial_j /
(factorial_i * factorial_ij);
}
}
for (unsigned int i = 2; i < this->n_dofs_per_face(face_no);
++i)
{
- interpolation_matrix(i, i) = std::pow(0.5, i);
+ interpolation_matrix(i, i) = Utilities::pow(0.5, i);
factorial_i *= i;
int factorial_j = factorial_i;
int factorial_ij = 1;
factorial_ij *= j - i;
factorial_j *= j;
interpolation_matrix(i, j) =
- std::pow(0.5, j) * factorial_j /
+ Utilities::pow(0.5, j) * factorial_j /
(factorial_i * factorial_ij);
}
}
for (unsigned int i = 2; i <= this->degree; ++i)
{
- double tmp = std::pow(0.5, i);
- interpolation_matrix(i + 2, i + 2) = tmp;
+ double tmp = Utilities::pow(0.5, i);
+ interpolation_matrix(i + 2, i + 2) = tmp;
interpolation_matrix(i + 2 * source_fe.degree,
i + 2 * this->degree) = tmp;
tmp *= 0.5;
interpolation_matrix(i + (j + 2) * source_fe.degree -
j,
i + (j + 2) * this->degree - j) =
- std::pow(0.5, i + j);
+ Utilities::pow(0.5, i + j);
factorial_k *= j;
int factorial_kl = 1;
int factorial_l = factorial_k;
interpolation_matrix(
i + (j + 2) * source_fe.degree - j,
i + (k + 2) * this->degree - k) =
- -1.0 * std::pow(0.5, i + k) * factorial_l /
- (factorial_k * factorial_kl);
+ -1.0 * Utilities::pow(0.5, i + k) *
+ factorial_l / (factorial_k * factorial_kl);
else
interpolation_matrix(
i + (j + 2) * source_fe.degree - j,
i + (k + 2) * this->degree - k) =
- std::pow(0.5, i + k) * factorial_l /
+ Utilities::pow(0.5, i + k) * factorial_l /
(factorial_k * factorial_kl);
}
}
if (((i + j) & 1) != 0u)
{
- tmp = -1.0 * std::pow(0.5, j) * factorial_j /
- (factorial_i * factorial_ij);
+ tmp = -1.0 * Utilities::pow(0.5, j) *
+ factorial_j / (factorial_i * factorial_ij);
interpolation_matrix(i + 2, j + 2) = tmp;
interpolation_matrix(i + 2 * source_fe.degree,
j + 2 * this->degree) = tmp;
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (k + 2) * this->degree - k) =
- tmp * std::pow(0.5, k);
+ tmp * Utilities::pow(0.5, k);
factorial_k *= k;
int factorial_l = factorial_k;
int factorial_kl = 1;
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
- -1.0 * tmp * std::pow(0.5, l) *
+ -1.0 * tmp * Utilities::pow(0.5, l) *
factorial_l /
(factorial_k * factorial_kl);
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
- tmp * std::pow(0.5, l) * factorial_l /
+ tmp * Utilities::pow(0.5, l) *
+ factorial_l /
(factorial_k * factorial_kl);
}
}
}
else
{
- tmp = std::pow(0.5, j) * factorial_j /
+ tmp = Utilities::pow(0.5, j) * factorial_j /
(factorial_i * factorial_ij);
interpolation_matrix(i + 2, j + 2) = tmp;
interpolation_matrix(i + 2 * source_fe.degree,
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (k + 2) * this->degree - k) =
- tmp * std::pow(0.5, k);
+ tmp * Utilities::pow(0.5, k);
factorial_k *= k;
int factorial_l = factorial_k;
int factorial_kl = 1;
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
- -1.0 * tmp * std::pow(0.5, l) *
+ -1.0 * tmp * Utilities::pow(0.5, l) *
factorial_l /
(factorial_k * factorial_kl);
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
- tmp * std::pow(0.5, l) * factorial_l /
+ tmp * Utilities::pow(0.5, l) *
+ factorial_l /
(factorial_k * factorial_kl);
}
}
for (unsigned int i = 2; i <= this->degree; ++i)
{
- double tmp = std::pow(0.5, i + 1);
- interpolation_matrix(i + 2, i + 2) = tmp;
+ double tmp = Utilities::pow(0.5, i + 1);
+ interpolation_matrix(i + 2, i + 2) = tmp;
interpolation_matrix(i + 2, i + this->degree + 1) = tmp;
interpolation_matrix(i + 3 * source_fe.degree - 1,
i + 2 * this->degree) = tmp;
{
factorial_ij *= j - i;
factorial_j *= j;
- tmp = std::pow(0.5, j) * factorial_j /
+ tmp = Utilities::pow(0.5, j) * factorial_j /
(factorial_i * factorial_ij);
interpolation_matrix(i + 2 * source_fe.degree,
j + 2 * this->degree) = tmp;
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (k + 2) * this->degree - k) =
- tmp * std::pow(0.5, k);
+ tmp * Utilities::pow(0.5, k);
factorial_k *= k;
int factorial_l = factorial_k;
int factorial_kl = 1;
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
- -1.0 * tmp * std::pow(0.5, l) *
+ -1.0 * tmp * Utilities::pow(0.5, l) *
factorial_l /
(factorial_k * factorial_kl);
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
- tmp * std::pow(0.5, l) * factorial_l /
+ tmp * Utilities::pow(0.5, l) *
+ factorial_l /
(factorial_k * factorial_kl);
}
}
interpolation_matrix(i + (j + 2) * source_fe.degree -
j,
i + (j + 2) * this->degree - j) =
- std::pow(0.5, i + j);
+ Utilities::pow(0.5, i + j);
factorial_k *= j;
int factorial_l = factorial_k;
int factorial_kl = 1;
interpolation_matrix(
i + (j + 2) * source_fe.degree - j,
i + (k + 2) * this->degree - k) =
- -1.0 * std::pow(0.5, i + k) * factorial_l /
- (factorial_k * factorial_kl);
+ -1.0 * Utilities::pow(0.5, i + k) *
+ factorial_l / (factorial_k * factorial_kl);
else
interpolation_matrix(
i + (j + 2) * source_fe.degree - j,
i + (k + 2) * this->degree - k) =
- std::pow(0.5, i + k) * factorial_l /
+ Utilities::pow(0.5, i + k) * factorial_l /
(factorial_k * factorial_kl);
}
}
for (unsigned int i = 2; i <= this->degree; ++i)
{
- double tmp = std::pow(0.5, i);
- interpolation_matrix(i + 2, i + 2) = tmp;
+ double tmp = Utilities::pow(0.5, i);
+ interpolation_matrix(i + 2, i + 2) = tmp;
interpolation_matrix(i + 3 * source_fe.degree - 1,
i + 3 * this->degree - 1) = tmp;
tmp *= 0.5;
interpolation_matrix(i + (j + 2) * source_fe.degree -
j,
i + (j + 2) * this->degree - j) =
- std::pow(0.5, i + j);
+ Utilities::pow(0.5, i + j);
factorial_k *= j;
int factorial_kl = 1;
int factorial_l = factorial_k;
interpolation_matrix(
i + (j + 2) * source_fe.degree - j,
i + (k + 2) * this->degree - k) =
- std::pow(0.5, i + k) * factorial_l /
+ Utilities::pow(0.5, i + k) * factorial_l /
(factorial_k * factorial_kl);
}
}
{
factorial_ij *= j - i;
factorial_j *= j;
- tmp = std::pow(0.5, j) * factorial_j /
+ tmp = Utilities::pow(0.5, j) * factorial_j /
(factorial_i * factorial_ij);
interpolation_matrix(i + 2, j + 2) = tmp;
tmp *= -1.0;
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (k + 2) * this->degree - k) =
- tmp * std::pow(0.5, k);
+ tmp * Utilities::pow(0.5, k);
factorial_k *= k;
int factorial_l = factorial_k;
int factorial_kl = 1;
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
- tmp * std::pow(0.5, l) * factorial_l /
+ tmp * Utilities::pow(0.5, l) * factorial_l /
(factorial_k * factorial_kl);
}
}
for (unsigned int i = 2; i <= this->degree; ++i)
{
- double tmp = std::pow(0.5, i + 1);
- interpolation_matrix(i + 2, i + 2) = tmp;
+ double tmp = Utilities::pow(0.5, i + 1);
+ interpolation_matrix(i + 2, i + 2) = tmp;
interpolation_matrix(i + 2, i + this->degree + 1) = tmp;
interpolation_matrix(i + 2 * source_fe.degree,
i + 2 * this->degree) = tmp;
interpolation_matrix(i + (j + 2) * source_fe.degree -
j,
i + (j + 2) * this->degree - j) =
- std::pow(0.5, i + j);
+ Utilities::pow(0.5, i + j);
factorial_k *= j;
int factorial_l = factorial_k;
int factorial_kl = 1;
interpolation_matrix(
i + (j + 2) * source_fe.degree - j,
i + (k + 2) * this->degree - k) =
- std::pow(0.5, i + k) * factorial_l /
+ Utilities::pow(0.5, i + k) * factorial_l /
(factorial_k * factorial_kl);
}
}
{
factorial_ij *= j - i;
factorial_j *= j;
- tmp = std::pow(0.5, j + 1) * factorial_j /
+ tmp = Utilities::pow(0.5, j + 1) * factorial_j /
(factorial_i * factorial_ij);
interpolation_matrix(i + 2, j + 2) = tmp;
interpolation_matrix(i + 2, j + this->degree + 1) =
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (k + 2) * this->degree - k) =
- tmp * std::pow(0.5, k);
+ tmp * Utilities::pow(0.5, k);
factorial_k *= k;
int factorial_l = factorial_k;
int factorial_kl = 1;
interpolation_matrix(
i + (k + 2) * source_fe.degree - k,
j + (l + 2) * this->degree - l) =
- tmp * std::pow(0.5, l) * factorial_l /
+ tmp * Utilities::pow(0.5, l) * factorial_l /
(factorial_k * factorial_kl);
}
}