24 const std::string &data_column_key,
25 const std::string &reference_column_key,
27 const unsigned int dim)
33 if (rate_mode ==
none)
40 std::vector<internal::TableEntry> &entries =
columns[data_column_key].entries;
41 std::vector<internal::TableEntry> &ref_entries =
42 columns[reference_column_key].entries;
43 std::string rate_key = data_column_key +
"...";
45 const unsigned int n = entries.size();
46 const unsigned int n_ref = ref_entries.size();
49 std::vector<double> values(n);
50 std::vector<double> ref_values(n_ref);
52 for (
unsigned int i = 0; i < n; ++i)
54 values[i] = entries[i].get_numeric_value();
55 ref_values[i] = ref_entries[i].get_numeric_value();
58 unsigned int no_rate_entries = 0;
64 rate_key +=
"red.rate";
65 no_rate_entries =
columns[rate_key].entries.size();
67 for (
unsigned int i = no_rate_entries; i < n; ++i)
77 values[i - 1] / values[i] * ref_values[i] /
83 rate_key +=
"red.rate.log2";
84 no_rate_entries =
columns[rate_key].entries.size();
86 for (
unsigned int i = no_rate_entries; i < n; ++i)
96 dim *
std::log(std::fabs(values[i - 1] / values[i])) /
98 std::fabs(ref_values[i] / ref_values[i - 1])));
110 const std::string &superkey = data_column_key;
118 if (no_rate_entries == 0)
136 std::vector<internal::TableEntry> &entries =
columns[data_column_key].entries;
137 std::string rate_key = data_column_key +
"...";
139 const unsigned int n = entries.size();
141 std::vector<double> values(n);
142 for (
unsigned int i = 0; i < n; ++i)
143 values[i] = entries[i].get_numeric_value();
145 unsigned int no_rate_entries = 0;
153 rate_key +=
"red.rate";
154 no_rate_entries =
columns[rate_key].entries.size();
156 for (
unsigned int i = no_rate_entries; i < n; ++i)
165 add_value(rate_key, values[i - 1] / values[i]);
171 rate_key +=
"red.rate.log2";
172 no_rate_entries =
columns[rate_key].entries.size();
174 for (
unsigned int i = no_rate_entries; i < n; ++i)
184 std::log(std::fabs(values[i - 1] / values[i])) /
199 const std::string &superkey = data_column_key;
209 if (no_rate_entries == 0)
219 const std::string &key)
223 const std::map<std::string, Column>::iterator col_iter =
columns.find(key);
224 col_iter->second.flag = 1;
231 const std::string &reference_column_key,
234 for (std::map<std::string, Column>::const_iterator col_iter =
columns.begin();
237 if (col_iter->second.flag == 0u)
239 reference_column_key,
248 for (std::map<std::string, Column>::const_iterator col_iter =
columns.begin();
251 if (col_iter->second.flag == 0u)
void evaluate_all_convergence_rates(const std::string &reference_column_key, const RateMode rate_mode)
void evaluate_convergence_rates(const std::string &data_column_key, const std::string &reference_column_key, const RateMode rate_mode, const unsigned int dim=2)
void omit_column_from_convergence_rate_evaluation(const std::string &key)
void set_tex_supercaption(const std::string &superkey, const std::string &tex_supercaption)
void set_auto_fill_mode(const bool state)
void add_value(const std::string &key, const T value)
std::map< std::string, std::vector< std::string > > supercolumns
void add_column_to_supercolumn(const std::string &key, const std::string &superkey)
void set_precision(const std::string &key, const unsigned int precision)
std::map< std::string, Column > columns
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcColumnNotExistent(std::string arg1)
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define AssertThrow(cond, exc)
::VectorizedArray< Number, width > log(const ::VectorizedArray< Number, width > &)