25 const std::string &data_column_key,
26 const std::string &reference_column_key,
28 const unsigned int dim)
34 if (rate_mode ==
none)
41 const std::vector<internal::TableEntry> &entries =
42 columns[data_column_key].entries;
43 const std::vector<internal::TableEntry> &ref_entries =
44 columns[reference_column_key].entries;
45 std::string rate_key = data_column_key +
"...";
47 const unsigned int n = entries.size();
48 const unsigned int n_ref = ref_entries.size();
51 std::vector<double> values(
n);
52 std::vector<double> ref_values(n_ref);
54 for (
unsigned int i = 0; i <
n; ++i)
56 values[i] = entries[i].get_numeric_value();
57 ref_values[i] = ref_entries[i].get_numeric_value();
60 unsigned int no_rate_entries = 0;
66 rate_key +=
"red.rate";
67 no_rate_entries =
columns[rate_key].entries.size();
69 for (
unsigned int i = no_rate_entries; i <
n; ++i)
79 values[i - 1] / values[i] * ref_values[i] /
85 rate_key +=
"red.rate.log2";
86 no_rate_entries =
columns[rate_key].entries.size();
88 for (
unsigned int i = no_rate_entries; i <
n; ++i)
98 dim *
std::log(std::fabs(values[i - 1] / values[i])) /
100 std::fabs(ref_values[i] / ref_values[i - 1])));
112 const std::string &superkey = data_column_key;
120 if (no_rate_entries == 0)
138 const std::vector<internal::TableEntry> &entries =
139 columns[data_column_key].entries;
140 std::string rate_key = data_column_key +
"...";
142 const unsigned int n = entries.size();
144 std::vector<double> values(
n);
145 for (
unsigned int i = 0; i <
n; ++i)
146 values[i] = entries[i].get_numeric_value();
148 unsigned int no_rate_entries = 0;
156 rate_key +=
"red.rate";
157 no_rate_entries =
columns[rate_key].entries.size();
159 for (
unsigned int i = no_rate_entries; i <
n; ++i)
168 add_value(rate_key, values[i - 1] / values[i]);
174 rate_key +=
"red.rate.log2";
175 no_rate_entries =
columns[rate_key].entries.size();
177 for (
unsigned int i = no_rate_entries; i <
n; ++i)
187 std::log(std::fabs(values[i - 1] / values[i])) /
202 const std::string &superkey = data_column_key;
212 if (no_rate_entries == 0)
221ConvergenceTable::omit_column_from_convergence_rate_evaluation(
222 const std::string &key)
226 const std::map<std::string, Column>::iterator col_iter =
columns.find(key);
227 col_iter->second.flag = 1;
234 const std::string &reference_column_key,
237 for (std::map<std::string, Column>::const_iterator col_iter =
columns.begin();
240 if (col_iter->second.flag == 0u)
242 reference_column_key,
251 for (std::map<std::string, Column>::const_iterator col_iter =
columns.begin();
254 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 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 > &)