7#ifndef FRICTIONQPOTSPRINGBLOCK_CONFIG_H
8#define FRICTIONQPOTSPRINGBLOCK_CONFIG_H
16#define FRICTIONQPOTSPRINGBLOCK_WARNING_IMPL(message, file, line) \
17 std::cout << std::string(file) + ":" + std::to_string(line) + ": " message ") \n\t";
19#define FRICTIONQPOTSPRINGBLOCK_ASSERT_IMPL(expr, file, line) \
21 throw std::runtime_error( \
22 std::string(file) + ":" + std::to_string(line) + ": assertion failed (" #expr ") \n\t" \
26#ifdef FRICTIONQPOTSPRINGBLOCK_ENABLE_DEBUG
27#define FRICTIONQPOTFEM_ENABLE_ASSERT
37#define FRICTIONQPOTSPRINGBLOCK_REQUIRE(expr) \
38 FRICTIONQPOTSPRINGBLOCK_ASSERT_IMPL(expr, __FILE__, __LINE__)
58#ifdef FRICTIONQPOTSPRINGBLOCK_ENABLE_ASSERT
59#define FRICTIONQPOTSPRINGBLOCK_ASSERT(expr) \
60 FRICTIONQPOTSPRINGBLOCK_ASSERT_IMPL(expr, __FILE__, __LINE__)
62#define FRICTIONQPOTSPRINGBLOCK_ASSERT(expr)
79#ifdef FRICTIONQPOTSPRINGBLOCK_ENABLE_DEBUG
80#define FRICTIONQPOTSPRINGBLOCK_DEBUG(expr) \
81 FRICTIONQPOTSPRINGBLOCK_ASSERT_IMPL(expr, __FILE__, __LINE__)
83#define FRICTIONQPOTSPRINGBLOCK_DEBUG(expr)
95#ifdef FRICTIONQPOTSPRINGBLOCK_DISABLE_WARNING
96#define FRICTIONQPOTSPRINGBLOCK_WARNING(message)
98#define FRICTIONQPOTSPRINGBLOCK_WARNING(message) \
99 FRICTIONQPOTSPRINGBLOCK_WARNING_IMPL(message, __FILE__, __LINE__)
111#ifdef FRICTIONQPOTSPRINGBLOCK_ENABLE_WARNING_PYTHON
112#define FRICTIONQPOTSPRINGBLOCK_WARNING_PYTHON(message) \
113 FRICTIONQPOTSPRINGBLOCK_WARNING_IMPL(message, __FILE__, __LINE__)
115#define FRICTIONQPOTSPRINGBLOCK_WARNING_PYTHON(message)
138#ifndef FRICTIONQPOTSPRINGBLOCK_VERSION
139#define FRICTIONQPOTSPRINGBLOCK_VERSION "@PROJECT_VERSION@"
150namespace array_type {
152#ifdef FRICTIONQPOTSPRINGBLOCK_USE_XTENSOR_PYTHON
157template <
typename T,
size_t N>
158using tensor = xt::pytensor<T, N>;
164using array = xt::pyarray<T>;
171template <
typename T,
size_t N>
196inline std::string
unquote(
const std::string& arg)
198 std::string ret = arg;
199 ret.erase(std::remove(ret.begin(), ret.end(),
'\"'), ret.end());
std::string unquote(const std::string &arg)
Remove quotes from a string.
#define FRICTIONQPOTSPRINGBLOCK_VERSION
Current version.
xt::xtensor< T, N > tensor
Fixed (static) rank array.
xt::xarray< T > array
Arbitrary rank array.
Tensor products / operations.
std::string version()
Return version string, e.g.
ptrdiff_t size_type
Type using for size and shapes of arrays.