//
// ---------------------------------------------------------------------
+#include <deal.II/base/numbers.h>
#include <deal.II/base/thread_management.h>
#include <deal.II/base/quadrature.h>
#include <deal.II/base/quadrature_lib.h>
for (unsigned int component=0; component<n_components; ++component)
if (parallel_data.component_mask[component] == true)
for (unsigned int p=0; p<n_q_points; ++p)
- face_integral[n] += Utilities::fixed_power<2>(parallel_data.phi[n][p][component]) *
+ face_integral[n] += numbers::NumberTraits<number>::abs_square(parallel_data.phi[n][p][component]) *
parallel_data.JxW_values[p];
return face_integral;
const types::subdomain_id subdomain_id_,
const types::material_id material_id)
{
+ typedef typename InputVector::value_type number;
#ifdef DEAL_II_WITH_P4EST
if (dynamic_cast<const parallel::distributed::Triangulation<1,spacedim>*>
(&dof_handler.get_triangulation())
//
// for the neighbor gradient, we need several auxiliary fields, depending on
// the way we get it (see below)
- std::vector<std::vector<std::vector<Tensor<1,spacedim,typename InputVector::value_type> > > >
+ std::vector<std::vector<std::vector<Tensor<1,spacedim,number> > > >
gradients_here (n_solution_vectors,
- std::vector<std::vector<Tensor<1,spacedim,typename InputVector::value_type> > >(2, std::vector<Tensor<1,spacedim,typename InputVector::value_type> >(n_components)));
- std::vector<std::vector<std::vector<Tensor<1,spacedim,typename InputVector::value_type> > > >
+ std::vector<std::vector<Tensor<1,spacedim,number> > >(2, std::vector<Tensor<1,spacedim,number> >(n_components)));
+ std::vector<std::vector<std::vector<Tensor<1,spacedim,number> > > >
gradients_neighbor (gradients_here);
- std::vector<Vector<typename InputVector::value_type> >
- grad_neighbor (n_solution_vectors, Vector<typename InputVector::value_type>(n_components));
+ std::vector<Vector<number> >
+ grad_neighbor (n_solution_vectors, Vector<number>(n_components));
// reserve some space for coefficient values at one point. if there is no
// coefficient, then we fill it by unity once and for all and don't set it
if (component_mask[component] == true)
{
// get gradient here
- const double grad_here = gradients_here[s][n][component]
+ const number grad_here = gradients_here[s][n][component]
* normal;
- const double jump = ((grad_here - grad_neighbor[s](component)) *
+ const number jump = ((grad_here - grad_neighbor[s](component)) *
coefficient_values(component));
- (*errors[s])(cell->active_cell_index()) += jump*jump * cell->diameter();
+ (*errors[s])(cell->active_cell_index()) += numbers::NumberTraits<number>::abs_square(jump) * cell->diameter();
}
}