mptensor v0.6.0
Parallel Library for Tensor Network Methods
Loading...
Searching...
No Matches
test_functions.hpp File Reference
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <type_traits>
#include <mptensor/mptensor.hpp>
#include "mpi_helpers.hpp"
Include dependency graph for test_functions.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mptensor_test
 
namespace  mptensor_test::detail
 

Functions

double mptensor_test::detail::coord (const Index &idx, const Shape &shape, std::size_t k)
 
template<typename T >
T mptensor_test::func2_1 (const Index &idx, const Shape &shape)
 Analytic matrix element (legacy func2_1 / cfunc2_1).
 
template<typename T >
T mptensor_test::func4_1 (const Index &idx, const Shape &shape)
 Analytic rank-4 element (legacy func4_1 / cfunc4_1).
 
template<typename T >
T mptensor_test::func4_2 (const Index &idx, const Shape &shape)
 Analytic rank-4 element (legacy func4_2 / cfunc4_2).
 
double mptensor_test::conj_value (double x)
 Complex conjugate that keeps double as double.
 
complex mptensor_test::conj_value (const complex &x)
 
template<typename TensorType , typename F >
void mptensor_test::fill_tensor (TensorType &t, F f)
 Set every local element to f(global_index, shape).
 
template<typename TensorType , typename F >
double mptensor_test::max_error (const TensorType &t, F exact)
 Maximum over all ranks of |t[idx] - exact(idx)|. Collective.
 

Variables

constexpr int mptensor_test::kL = 10
 Base size of test tensors (legacy default N).
 
constexpr double mptensor_test::kEps = 1.0e-10
 Default tolerance.