16#ifndef dealii_base_parsed_convergence_table_h
17#define dealii_base_parsed_convergence_table_h
176 const std::vector<std::set<VectorTools::NormType>> &list_of_error_norms = {
245 const std::vector<std::set<VectorTools::NormType>> &list_of_error_norms,
273 template <
int dim,
int spacedim,
typename VectorType>
276 const VectorType & solution,
283 template <
int dim,
int spacedim,
typename VectorType>
287 const VectorType & solution,
359 const std::function<
double()> &custom_function,
360 const bool compute_rate =
true);
365 template <
int dim,
int spacedim,
typename VectorType>
375 template <
int dim,
int spacedim,
typename VectorType>
425 std::map<std::string, std::pair<std::function<double()>,
bool>>
481template <
int dim,
int spacedim,
typename VectorType>
484 const VectorType & solution1,
485 const VectorType & solution2,
490 VectorType solution(solution1);
491 solution -= solution2;
501template <
int dim,
int spacedim,
typename VectorType>
505 const VectorType & solution1,
506 const VectorType & solution2,
511 VectorType solution(solution1);
512 solution -= solution2;
523template <
int dim,
int spacedim,
typename VectorType>
526 const VectorType & solution,
539template <
int dim,
int spacedim,
typename VectorType>
543 const VectorType & solution,
556 const unsigned int n_dofs = dh.
n_dofs();
565 else if (col ==
"dofs")
574 zero_components(n_components,
579 weight_components(n_components,
582 if (weight !=
nullptr)
586 for (
auto &f : weight_components)
592 for (
unsigned int i = 0; i < n_components; ++i)
594 return weight->
value(p, i);
601 std::map<VectorTools::NormType, double> errors;
610 auto components_expr = zero_components;
611 for (
unsigned int i = 0; i < n_components; ++i)
613 components_expr[i] = weight_components[i];
623 for (
const auto &
norm : norms)
625 difference_per_cell = 0;
655 const double custom_error = extra_col.second.first();
657 std::string name = extra_col.first;
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
const Triangulation< dim, spacedim > & get_triangulation() const
types::global_dof_index n_dofs() const
const unsigned int degree
unsigned int n_components() const
const unsigned int n_components
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const
The ParsedConvergenceTable class.
void add_extra_column(const std::string &column_name, const std::function< double()> &custom_function, const bool compute_rate=true)
void difference(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &, const VectorType &, const VectorType &, const Function< spacedim > *weight=nullptr)
void difference(const DoFHandler< dim, spacedim > &, const VectorType &, const VectorType &, const Function< spacedim > *weight=nullptr)
void add_parameters(ParameterHandler &prm)
void error_from_exact(const Mapping< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &vspace, const VectorType &solution, const Function< spacedim > &exact, const Function< spacedim > *weight=nullptr)
void error_from_exact(const DoFHandler< dim, spacedim > &vspace, const VectorType &solution, const Function< spacedim > &exact, const Function< spacedim > *weight=nullptr)
std::string error_file_name
void prepare_table_for_output()
const std::vector< std::string > component_names
std::set< std::string > extra_columns
ParsedConvergenceTable(const std::vector< std::string > &component_names={"u"}, const std::vector< std::set< VectorTools::NormType > > &list_of_error_norms={ {VectorTools::H1_norm, VectorTools::L2_norm, VectorTools::Linfty_norm}})
const std::vector< std::string > unique_component_names
std::vector< std::set< VectorTools::NormType > > norms_per_unique_component
const std::vector< ComponentMask > unique_component_masks
std::map< std::string, std::pair< std::function< double()>, bool > > extra_column_functions
void set_tex_format(const std::string &key, const std::string &format="c")
void add_value(const std::string &key, const T value)
void set_tex_caption(const std::string &key, const std::string &tex_caption)
void set_scientific(const std::string &key, const bool scientific)
void set_precision(const std::string &key, const unsigned int precision)
virtual types::global_cell_index n_global_active_cells() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
std::string to_string(const T &t)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define AssertThrow(cond, exc)
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
double norm(const FEValuesBase< dim > &fe, const ArrayView< const std::vector< Tensor< 1, dim > > > &Du)
unsigned int n_active_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)