<li> New: The VectorTools::integrate_difference() function can now
also compute the $H_\text{div}$ seminorm, using the
- VectorTools::NormType::Hdiv_seminorm argument.
+ VectorTools::Hdiv_seminorm argument.
<br>
(Zhen Tao, Arezou Ghesmati, Wolfgang Bangerth, 2015/04/17)
</li>
* @param[in] norm_type To determine thresholds, combined errors on
* subsets of cells are calculated as norms of the criteria on these
* cells. Different types of norms can be used for this purpose, from
- * which VectorTools::NormType::L1_norm and
- * VectorTools::NormType::L2_norm are currently supported.
+ * which VectorTools::L1_norm and
+ * VectorTools::L2_norm are currently supported.
*/
template <int dim, typename Number, int spacedim>
void
const dealii::Vector<Number> &criteria,
const double top_fraction_of_error,
const double bottom_fraction_of_error,
- const VectorTools::NormType norm_type = VectorTools::NormType::L1_norm);
+ const VectorTools::NormType norm_type = VectorTools::L1_norm);
} // namespace GridRefinement
} // namespace distributed
} // namespace parallel
* @param[in] norm_type To determine thresholds, combined errors on
* subsets of cells are calculated as norms of the criteria on these
* cells. Different types of norms can be used for this purpose, from
- * which VectorTools::NormType::L1_norm and
- * VectorTools::NormType::L2_norm are currently supported.
+ * which VectorTools::L1_norm and
+ * VectorTools::L2_norm are currently supported.
*/
template <int dim, typename Number, int spacedim>
void
const double top_fraction,
const double bottom_fraction,
const unsigned int max_n_cells = std::numeric_limits<unsigned int>::max(),
- const VectorTools::NormType norm_type = VectorTools::NormType::L1_norm);
+ const VectorTools::NormType norm_type = VectorTools::L1_norm);
switch (norm_type)
{
- case VectorTools::NormType::L1_norm:
+ case VectorTools::L1_norm:
// evaluate norms on subsets and compare them as
// c_0 + c_1 + ... < fraction * l1-norm(c)
refine_and_coarsen_fixed_fraction_via_l1_norm(
bottom_fraction_of_error);
break;
- case VectorTools::NormType::L2_norm:
+ case VectorTools::L2_norm:
{
// we do not want to evaluate norms on subsets as:
// sqrt(c_0^2 + c_1^2 + ...) < fraction * l2-norm(c)
switch (norm_type)
{
- case VectorTools::NormType::L1_norm:
+ case VectorTools::L1_norm:
// evaluate norms on subsets and compare them as
// c_0 + c_1 + ... < fraction * l1-norm(c)
refine_and_coarsen_fixed_fraction_via_l1_norm(
tria, criteria, top_fraction, bottom_fraction, max_n_cells);
break;
- case VectorTools::NormType::L2_norm:
+ case VectorTools::L2_norm:
{
// we do not want to evaluate norms on subsets as:
// sqrt(c_0^2 + c_1^2 + ...) < fraction * l2-norm(c)
0.3,
0.3,
std::numeric_limits<unsigned int>::max(),
- VectorTools::NormType::L1_norm);
+ VectorTools::L1_norm);
count_flags(tria);
deallog << std::endl;
0.3,
0.3,
std::numeric_limits<unsigned int>::max(),
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
count_flags(tria);
deallog << std::endl;
}
0.3,
0.3,
std::numeric_limits<unsigned int>::max(),
- VectorTools::NormType::L1_norm);
+ VectorTools::L1_norm);
count_flags(tria);
deallog << std::endl;
0.3,
0.3,
std::numeric_limits<unsigned int>::max(),
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
count_flags(tria);
deallog << std::endl;
}
Functions::ZeroFunction<dim>(),
difference,
quad,
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
const double error =
- VectorTools::compute_global_error(tria,
- difference,
- VectorTools::NormType::L2_norm);
+ VectorTools::compute_global_error(tria, difference, VectorTools::L2_norm);
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
printf("Error %f.\n", error);
ManufacturedSolution<dim>(),
errors,
QIterated<dim>(QTrapezoid<1>(), 4),
- VectorTools::NormType::Linfty_norm);
+ VectorTools::Linfty_norm);
double max_cell_error = 1.0;
if (errors.begin() != errors.end())
max_cell_error = *std::max_element(errors.begin(), errors.end());
deallog << "l1-norm: ";
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_fraction(
- tria, indicator, 0.3, 0.3, VectorTools::NormType::L1_norm);
+ tria, indicator, 0.3, 0.3, VectorTools::L1_norm);
count_flags(tria);
deallog << std::endl;
deallog << "l2-norm: ";
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_fraction(
- tria, indicator, 0.3, 0.3, VectorTools::NormType::L2_norm);
+ tria, indicator, 0.3, 0.3, VectorTools::L2_norm);
count_flags(tria);
deallog << std::endl;
}
deallog << "l1-norm: ";
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_fraction(
- tria, indicator, 0.3, 0.3, VectorTools::NormType::L1_norm);
+ tria, indicator, 0.3, 0.3, VectorTools::L1_norm);
count_flags(tria);
deallog << std::endl;
deallog << "l2-norm: ";
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_fraction(
- tria, indicator, 0.3, 0.3, VectorTools::NormType::L2_norm);
+ tria, indicator, 0.3, 0.3, VectorTools::L2_norm);
count_flags(tria);
deallog << std::endl;
}
ManufacturedSolution<dim>(),
errors,
QIterated<dim>(QTrapezoid<1>(), 4),
- VectorTools::NormType::Linfty_norm);
+ VectorTools::Linfty_norm);
double max_cell_error = 1.0;
if (errors.begin() != errors.end())
max_cell_error = *std::max_element(errors.begin(), errors.end());
AnalyticalFunction<dim>(),
difference,
quadrature_2,
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
double error =
- VectorTools::compute_global_error(tria_2,
- difference,
- VectorTools::NormType::L2_norm);
+ VectorTools::compute_global_error(tria_2, difference, VectorTools::L2_norm);
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD))
Functions::CosineFunction<2>(),
difference,
quadrature_2,
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
double error =
- VectorTools::compute_global_error(tria_2,
- difference,
- VectorTools::NormType::L2_norm);
+ VectorTools::compute_global_error(tria_2, difference, VectorTools::L2_norm);
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD))
AnalyticalFunction<dim>(),
difference,
quadrature_2,
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
double error =
- VectorTools::compute_global_error(tria_2,
- difference,
- VectorTools::NormType::L2_norm);
+ VectorTools::compute_global_error(tria_2, difference, VectorTools::L2_norm);
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD))
Functions::ZeroFunction<dim>(),
difference,
quads,
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
std::tuple<unsigned int, double, double, double> result(
reduction_control.last_step(),
x.linfty_norm(),
VectorTools::compute_global_error(tria,
difference,
- VectorTools::NormType::L2_norm));
+ VectorTools::L2_norm));
return result;
};
Functions::ZeroFunction<dim>(),
difference,
quadrature,
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
deallog << VectorTools::compute_global_error(tria,
difference,
- VectorTools::NormType::L2_norm)
+ VectorTools::L2_norm)
<< std::endl;
return {reduction_control.last_step(), reduction_control.last_value()};
Functions::ZeroFunction<dim>(),
difference,
quads,
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
const double error =
- VectorTools::compute_global_error(tria,
- difference,
- VectorTools::NormType::L2_norm);
+ VectorTools::compute_global_error(tria, difference, VectorTools::L2_norm);
if (error < 0.042)
deallog << "OK" << std::endl;
Functions::ZeroFunction<dim>(),
difference,
quad,
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
- deallog << VectorTools::compute_global_error(
- tria, difference, VectorTools::NormType::L2_norm)
+ deallog << VectorTools::compute_global_error(tria,
+ difference,
+ VectorTools::L2_norm)
<< std::endl;
DataOut<dim> data_out;
Functions::ZeroFunction<dim>(),
difference,
quadrature_formula,
- VectorTools::NormType::L2_norm);
+ VectorTools::L2_norm);
deallog << VectorTools::compute_global_error(triangulation,
difference,
- VectorTools::NormType::L2_norm)
+ VectorTools::L2_norm)
<< std::endl;
}