public:
/**
* The enum type given to the class functions to decide on the scaling
- * factors of the facial integrals.
+ * factors of the face integrals.
*/
enum Strategy
{
class KellyErrorEstimator<1,spacedim>
{
public:
+ /**
+ * The enum type given to the class functions to decide on the scaling
+ * factors of the face integrals.
+ */
+ enum Strategy
+ {
+ //! Kelly error estimator with the factor $\frac {h_K}{24}$.
+ cell_diameter_over_24 = 0,
+ //! the boundary residual estimator with the factor $\frac {h_F}{2 max(p^+,p^-)}$.
+ face_diameter_over_twice_max_degree,
+ //! Kelly error estimator with the factor $h_K$.
+ cell_diameter
+ };
+
/**
* Implementation of the error estimator described above. You may give a
* coefficient, but there is a default value which denotes the constant
const Function<spacedim> *coefficient = nullptr,
const unsigned int n_threads = numbers::invalid_unsigned_int,
const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Call the @p estimate function, see above, with
const Function<spacedim> *coefficients = nullptr,
const unsigned int n_threads = numbers::invalid_unsigned_int,
const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Same function as above, but accepts more than one solution vectors and
const Function<spacedim> *coefficients = 0,
const unsigned int n_threads = numbers::invalid_unsigned_int,
const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Call the @p estimate function, see above, with
const Function<spacedim> *coefficients = 0,
const unsigned int n_threads = numbers::invalid_unsigned_int,
const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
const Function<spacedim> *coefficients = 0,
const unsigned int n_threads = numbers::invalid_unsigned_int,
const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
const Function<spacedim> *coefficients = 0,
const unsigned int n_threads = numbers::invalid_unsigned_int,
const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
const Function<spacedim> *coefficients = 0,
const unsigned int n_threads = numbers::invalid_unsigned_int,
const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
const Function<spacedim> *coefficients = 0,
const unsigned int n_threads = numbers::invalid_unsigned_int,
const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
- const types::material_id material_id = numbers::invalid_material_id);
+ const types::material_id material_id = numbers::invalid_material_id,
+ const Strategy strategy = cell_diameter_over_24);
/**
* Exception
const Function<spacedim> *coefficients,
const unsigned int n_threads,
const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const types::material_id material_id,
+ const Strategy strategy)
{
// just pass on to the other function
const std::vector<const InputVector *> solutions (1, &solution);
std::vector<Vector<float>*> errors (1, &error);
estimate (mapping, dof_handler, quadrature, neumann_bc, solutions, errors,
- component_mask, coefficients, n_threads, subdomain_id, material_id);
+ component_mask, coefficients, n_threads, subdomain_id, material_id,strategy);
}
const Function<spacedim> *coefficients,
const unsigned int n_threads,
const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const types::material_id material_id,
+ const Strategy strategy)
{
estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solution,
- error, component_mask, coefficients, n_threads, subdomain_id, material_id);
+ error, component_mask, coefficients, n_threads, subdomain_id, material_id,strategy);
}
const Function<spacedim> *coefficients,
const unsigned int n_threads,
const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const types::material_id material_id,
+ const Strategy strategy)
{
estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solutions,
- errors, component_mask, coefficients, n_threads, subdomain_id, material_id);
+ errors, component_mask, coefficients, n_threads, subdomain_id, material_id,strategy);
}
const Function<spacedim> *coefficients,
const unsigned int n_threads,
const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const types::material_id material_id,
+ const Strategy strategy)
{
// just pass on to the other function
const std::vector<const InputVector *> solutions (1, &solution);
std::vector<Vector<float>*> errors (1, &error);
estimate (mapping, dof_handler, quadrature, neumann_bc, solutions, errors,
- component_mask, coefficients, n_threads, subdomain_id, material_id);
+ component_mask, coefficients, n_threads, subdomain_id, material_id, strategy);
}
const Function<spacedim> *coefficients,
const unsigned int n_threads,
const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const types::material_id material_id,
+ const Strategy strategy)
{
estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solution,
- error, component_mask, coefficients, n_threads, subdomain_id, material_id);
+ error, component_mask, coefficients, n_threads, subdomain_id, material_id,strategy);
}
const Function<spacedim> *coefficients,
const unsigned int n_threads,
const types::subdomain_id subdomain_id,
- const types::material_id material_id)
+ const types::material_id material_id,
+ const Strategy strategy)
{
estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solutions,
- errors, component_mask, coefficients, n_threads, subdomain_id, material_id);
+ errors, component_mask, coefficients, n_threads, subdomain_id, material_id,strategy);
}
const Function<spacedim> * /*coefficient*/,
const unsigned int,
const types::subdomain_id /*subdomain_id*/,
- const types::material_id /*material_id*/)
+ const types::material_id /*material_id*/,
+ const Strategy /*strategy*/)
{
Assert (false, ExcInternalError());
}
const Function<spacedim> *coefficient,
const unsigned int,
const types::subdomain_id subdomain_id_,
- const types::material_id material_id)
+ const types::material_id material_id,
+ const Strategy strategy)
{
+ AssertThrow(strategy==cell_diameter_over_24, ExcNotImplemented());
typedef typename InputVector::value_type number;
#ifdef DEAL_II_WITH_P4EST
if (dynamic_cast<const parallel::distributed::Triangulation<1,spacedim>*>
const Function<deal_II_space_dimension> *,
const unsigned int,
const types::subdomain_id,
- const types::material_id);
+ const types::material_id,
+ const Strategy);
template
void
const Function<deal_II_space_dimension> *,
const unsigned int,
const types::subdomain_id,
- const types::material_id);
+ const types::material_id,
+ const Strategy);
template
void
const Function<deal_II_space_dimension> *,
const unsigned int,
const types::subdomain_id,
- const types::material_id);
+ const types::material_id,
+ const Strategy);
template
void
const Function<deal_II_space_dimension> *,
const unsigned int,
const types::subdomain_id,
- const types::material_id);
+ const types::material_id,
+ const Strategy);
template
void
const Function<deal_II_space_dimension> *,
const unsigned int,
const types::subdomain_id,
- const types::material_id);
+ const types::material_id,
+ const Strategy);
template
void
const Function<deal_II_space_dimension> *,
const unsigned int,
const types::subdomain_id,
- const types::material_id);
+ const types::material_id,
+ const Strategy);
template
void
const Function<deal_II_space_dimension> *,
const unsigned int,
const types::subdomain_id,
- const types::material_id);
+ const types::material_id,
+ const Strategy);
template
void
const Function<deal_II_space_dimension> *,
const unsigned int,
const types::subdomain_id,
- const types::material_id);
+ const types::material_id,
+ const Strategy);
#endif
}