DiFfRG
|
#include <DiFfRG/common/complex_math.hh>
#include <DiFfRG/common/cuda_prefix.hh>
#include <DiFfRG/common/utils.hh>
#include <cmath>
#include <type_traits>
#include <Eigen/Dense>
#include <autodiff/forward/real.hpp>
#include <deal.II/lac/block_vector.h>
#include <deal.II/lac/vector.h>
Go to the source code of this file.
Namespaces | |
namespace | DiFfRG |
Functions | |
template<size_t N, typename T > | |
bool | DiFfRG::isfinite (const autodiff::Real< N, T > &x) |
Finite-ness check for autodiff::real. | |
template<int n, typename NumberType > requires requires(NumberType x) { x *x; NumberType(1.) / x; } | |
constexpr __forceinline__ __host__ __device__ NumberType | DiFfRG::powr (const NumberType x) |
A compile-time evaluatable power function for whole number exponents. | |
template<typename NT > | |
constexpr __forceinline__ __host__ __device__ double | DiFfRG::V_d (NT d) |
Volume of a d-dimensional sphere. | |
template<typename NT1 , typename NT2 > | |
constexpr __forceinline__ __host__ __device__ double | DiFfRG::V_d (NT1 d, NT2 extent) |
Volume of a d-dimensional sphere with extent. | |
template<typename NT > | |
constexpr __forceinline__ __host__ __device__ double | DiFfRG::S_d (NT d) |
Surface of a d-dimensional sphere. | |
template<typename NT > | |
consteval NT | DiFfRG::S_d_prec (uint d) |
Surface of a d-dimensional sphere (precompiled) | |
template<typename NumberType > requires requires(NumberType x) { x >= 0; } | |
constexpr __forceinline__ __host__ __device__ auto | DiFfRG::heaviside_theta (const NumberType x) |
A compile-time evaluatable theta function. | |
template<typename NumberType > requires requires(NumberType x) { x >= 0; } | |
constexpr __forceinline__ __host__ __device__ auto | DiFfRG::sign (const NumberType x) |
A compile-time evaluatable sign function. | |
template<typename T1 , typename T2 , typename T3 > requires (std::is_floating_point<T1>::value || std::is_same_v<T1, autodiff::real> || is_complex<T1>::value) && (std::is_floating_point<T2>::value || std::is_same_v<T2, autodiff::real> || is_complex<T2>::value) && std::is_floating_point<T3>::value | |
bool __forceinline__ __host__ __device__ | DiFfRG::is_close (T1 a, T2 b, T3 eps_) |
Function to evaluate whether two floats are equal to numerical precision. Tests for both relative and absolute equality. | |
template<typename T1 , typename T2 > requires (std::is_floating_point<T1>::value || std::is_same_v<T1, autodiff::real> || is_complex<T1>::value) && (std::is_floating_point<T2>::value || std::is_same_v<T2, autodiff::real> || is_complex<T1>::value) | |
bool __forceinline__ __host__ __device__ | DiFfRG::is_close (T1 a, T2 b) |
Function to evaluate whether two floats are equal to numerical precision. Tests for both relative and absolute equality. | |
template<uint n, typename NT , typename A1 , typename A2 > requires requires(A1 a1, A2 a2) { a1[0] * a2[0]; } | |
NT | DiFfRG::dot (const A1 &a1, const A2 &a2) |
A dot product which takes the dot product between a1 and a2, assuming each has n entries which can be accessed via the [] operator. | |
void | DiFfRG::dealii_to_eigen (const dealii::Vector< double > &dealii, Eigen::VectorXd &eigen) |
Converts a dealii vector to an Eigen vector. | |
void | DiFfRG::dealii_to_eigen (const dealii::BlockVector< double > &dealii, Eigen::VectorXd &eigen) |
Converts a dealii block vector to an Eigen vector. | |
void | DiFfRG::eigen_to_dealii (const Eigen::VectorXd &eigen, dealii::Vector< double > &dealii) |
Converts an Eigen vector to a dealii vector. | |
void | DiFfRG::eigen_to_dealii (const Eigen::VectorXd &eigen, dealii::BlockVector< double > &dealii) |
Converts an Eigen vector to a dealii block vector. | |