/**
* Abbreviation for the data type stored by this object.
*/
- using value_type = boost::
- variant<int, unsigned int, unsigned long long int, double, std::string>;
+ using value_type =
+ boost::variant<int, unsigned int, std::uint64_t, double, std::string>;
/**
* Stored value.
char c = 's';
ar &c &*p;
}
- else if (const unsigned long long int *p =
- boost::get<unsigned long long int>(&value))
+ else if (const std::uint64_t *p = boost::get<std::uint64_t>(&value))
{
char c = 'l';
ar &c &*p;
case 'l':
{
- unsigned long long int val;
- ar & val;
+ std::uint64_t val;
+ ar & val;
value = val;
break;
}
* $p_i\in [0,N)$ and $p_i\neq p_j$ for $i\neq j$), produce the reverse
* permutation $q_i=N-1-p_i$.
*/
- std::vector<unsigned long long int>
- reverse_permutation(const std::vector<unsigned long long int> &permutation);
+ std::vector<std::uint64_t>
+ reverse_permutation(const std::vector<std::uint64_t> &permutation);
/**
* Given a permutation vector (i.e. a vector $p_0\ldots p_{N-1}$ where each
* $p_i\in [0,N)$ and $p_i\neq p_j$ for $i\neq j$), produce the inverse
* permutation $q_0\ldots q_{N-1}$ so that $q_{p_i}=p_{q_i}=i$.
*/
- std::vector<unsigned long long int>
- invert_permutation(const std::vector<unsigned long long int> &permutation);
+ std::vector<std::uint64_t>
+ invert_permutation(const std::vector<std::uint64_t> &permutation);
/**
* Given an arbitrary object of type T, use boost::serialization utilities
return out;
}
- std::vector<unsigned long long int>
- reverse_permutation(const std::vector<unsigned long long int> &permutation)
+ std::vector<std::uint64_t>
+ reverse_permutation(const std::vector<std::uint64_t> &permutation)
{
- const unsigned long long int n = permutation.size();
+ const std::uint64_t n = permutation.size();
- std::vector<unsigned long long int> out(n);
- for (unsigned long long int i = 0; i < n; ++i)
+ std::vector<std::uint64_t> out(n);
+ for (std::uint64_t i = 0; i < n; ++i)
out[i] = n - 1 - permutation[i];
return out;
- std::vector<unsigned long long int>
- invert_permutation(const std::vector<unsigned long long int> &permutation)
+ std::vector<std::uint64_t>
+ invert_permutation(const std::vector<std::uint64_t> &permutation)
{
- const unsigned long long int n = permutation.size();
+ const std::uint64_t n = permutation.size();
- std::vector<unsigned long long int> out(n, numbers::invalid_unsigned_int);
+ std::vector<std::uint64_t> out(n, numbers::invalid_dof_index);
- for (unsigned long long int i = 0; i < n; ++i)
+ for (std::uint64_t i = 0; i < n; ++i)
{
AssertIndexRange(permutation[i], n);
out[permutation[i]] = i;
// check that we have actually reached
// all indices
- for (unsigned long long int i = 0; i < n; ++i)
+ for (std::uint64_t i = 0; i < n; ++i)
Assert(out[i] != numbers::invalid_unsigned_int,
ExcMessage("The given input permutation had duplicate entries!"));
std::vector<Integer>
reverse_permutation(const std::vector<Integer> &permutation)
{
- const unsigned int n = permutation.size();
+ const std::size_t n = permutation.size();
std::vector<Integer> out(n);
- for (unsigned int i = 0; i < n; ++i)
+ for (std::size_t i = 0; i < n; ++i)
out[i] = n - 1 - permutation[i];
return out;
std::vector<Integer>
invert_permutation(const std::vector<Integer> &permutation)
{
- const unsigned int n = permutation.size();
+ const std::size_t n = permutation.size();
std::vector<Integer> out(n, numbers::invalid_unsigned_int);
- for (unsigned int i = 0; i < n; ++i)
+ for (std::size_t i = 0; i < n; ++i)
{
AssertIndexRange(permutation[i], n);
out[permutation[i]] = i;
#include "../tests.h"
// test the method evaluate_convergence_rates with key column given by
-// unsigned long long int
+// 64 bit dof indices
int
main()
ConvergenceTable t;
- const unsigned long long int t1 = 100;
- const unsigned long long int t2 = 400;
+ const std::uint64_t t1 = 100;
+ const std::uint64_t t2 = 400;
t.add_value("cells", t1);
t.add_value("error", 0.1);
t.add_value("cells", t2);