teqp 0.22.0
Loading...
Searching...
No Matches
derivs.hpp File Reference
#include <map>
#include <tuple>
#include <numeric>
#include <concepts>
#include "teqp/types.hpp"
#include "teqp/exceptions.hpp"
#include <autodiff/forward/dual.hpp>
#include <autodiff/forward/dual/eigen.hpp>
#include <autodiff/forward/real.hpp>
#include <autodiff/forward/real/eigen.hpp>

Go to the source code of this file.

Classes

struct  teqp::wrt_helper
 
struct  teqp::TDXDerivatives< Model, Scalar, VectorType >
 
struct  teqp::VirialDerivatives< Model, Scalar, VectorType >
 
struct  teqp::IsochoricDerivatives< Model, Scalar, VectorType >
 
class  teqp::DerivativeHolderSquare< Nderivsmax >
 

Namespaces

namespace  teqp
 

Concepts

concept  teqp::CallableAlpha
 
concept  teqp::CallableAlphar
 
concept  teqp::CallableAlpharTauDelta
 

Macros

#define get_ATrhoXi_runtime_combinations
 
#define X(a, b, c)   if (iT == a && iD == b && iXi == c) { return get_ATrhoXi<a,b,c>(w, T, rho, molefrac, i); }
 
#define get_ATrhoXiXj_runtime_combinations
 
#define X(a, b, c, d)   if (iT == a && iD == b && iXi == c && iXj == d) { return get_ATrhoXiXj<a,b,c,d>(w, T, rho, molefrac, i, j); }
 
#define get_ATrhoXiXjXk_runtime_combinations
 
#define X(a, b, c, d, e)   if (iT == a && iD == b && iXi == c && iXj == d && iXk == e) { return get_ATrhoXiXjXk<a,b,c,d,e>(w, T, rho, molefrac, i, j, k); }
 
#define X(a, b, c)   if (iT == a && iD == b && iXi == c) { return get_AtaudeltaXi<a,b,c>(w, tau, delta, molefrac, i); }
 
#define X(a, b, c, d)   if (iT == a && iD == b && iXi == c && iXj == d) { return get_AtaudeltaXiXj<a,b,c,d>(w, tau, delta, molefrac, i, j); }
 
#define X(a, b, c, d, e)   if (iT == a && iD == b && iXi == c && iXj == d && iXk == e) { return get_AtaudeltaXiXjXk<a,b,c,d,e>(w, tau, delta, molefrac, i, j, k); }
 

Enumerations

enum class  teqp::ADBackends { teqp::autodiff }
 

Functions

template<typename TType , typename ContainerType , typename FuncType >
ContainerType::value_type teqp::derivT (const FuncType &f, TType T, const ContainerType &rho)
 Given a function, use complex step derivatives to calculate the derivative with respect to the first variable which here is temperature.
 
template<typename TType , typename ContainerType , typename FuncType , typename Integer >
ContainerType::value_type teqp::derivrhoi (const FuncType &f, TType T, const ContainerType &rho, Integer i)
 Given a function, use complex step derivatives to calculate the derivative with respect to the given composition variable.
 
template<typename T , size_t ... I>
auto teqp::build_duplicated_tuple_impl (const T &val, std::index_sequence< I... >)
 
template<int N, typename T >
auto teqp::build_duplicated_tuple (const T &val)
 A function to generate a tuple of N repeated copies of argument val at compile-time.
 

Macro Definition Documentation

◆ get_ATrhoXi_runtime_combinations

#define get_ATrhoXi_runtime_combinations
Value:
X(0,0,1) \
X(0,0,2) \
X(0,0,3) \
X(1,0,0) \
X(1,0,1) \
X(1,0,2) \
X(1,0,3) \
X(0,1,0) \
X(0,1,1) \
X(0,1,2) \
X(0,1,3) \
X(2,0,0) \
X(2,0,1) \
X(2,0,2) \
X(2,0,3) \
X(1,1,0) \
X(1,1,1) \
X(1,1,2) \
X(1,1,3) \
X(0,2,0) \
X(0,2,1) \
X(0,2,2) \
X(0,2,3)
#define X(a, b, c)

Definition at line 261 of file derivs.hpp.

◆ get_ATrhoXiXj_runtime_combinations

#define get_ATrhoXiXj_runtime_combinations
Value:
X(0,0,1,0) \
X(0,0,2,0) \
X(0,0,0,1) \
X(0,0,0,2) \
X(0,0,1,1) \
X(1,0,1,0) \
X(1,0,2,0) \
X(1,0,0,1) \
X(1,0,0,2) \
X(1,0,1,1) \
X(0,1,1,0) \
X(0,1,2,0) \
X(0,1,0,1) \
X(0,1,0,2) \
X(0,1,1,1)

Definition at line 294 of file derivs.hpp.

◆ get_ATrhoXiXjXk_runtime_combinations

#define get_ATrhoXiXjXk_runtime_combinations
Value:
X(0,0,0,1,1) \
X(0,0,1,0,1) \
X(0,0,1,1,0) \
X(0,0,1,1,1) \
X(1,0,0,1,1) \
X(1,0,1,0,1) \
X(1,0,1,1,0) \
X(1,0,1,1,1) \
X(0,1,0,1,1) \
X(0,1,1,0,1) \
X(0,1,1,1,0) \
X(0,1,1,1,1)

Definition at line 319 of file derivs.hpp.

◆ X [1/6]

#define X ( a,
b,
c )   if (iT == a && iD == b && iXi == c) { return get_ATrhoXi<a,b,c>(w, T, rho, molefrac, i); }

◆ X [2/6]

#define X ( a,
b,
c )   if (iT == a && iD == b && iXi == c) { return get_AtaudeltaXi<a,b,c>(w, tau, delta, molefrac, i); }

◆ X [3/6]

#define X ( a,
b,
c,
d )   if (iT == a && iD == b && iXi == c && iXj == d) { return get_ATrhoXiXj<a,b,c,d>(w, T, rho, molefrac, i, j); }

◆ X [4/6]

#define X ( a,
b,
c,
d )   if (iT == a && iD == b && iXi == c && iXj == d) { return get_AtaudeltaXiXj<a,b,c,d>(w, tau, delta, molefrac, i, j); }

◆ X [5/6]

#define X ( a,
b,
c,
d,
e )   if (iT == a && iD == b && iXi == c && iXj == d && iXk == e) { return get_ATrhoXiXjXk<a,b,c,d,e>(w, T, rho, molefrac, i, j, k); }

◆ X [6/6]

#define X ( a,
b,
c,
d,
e )   if (iT == a && iD == b && iXi == c && iXj == d && iXk == e) { return get_AtaudeltaXiXjXk<a,b,c,d,e>(w, tau, delta, molefrac, i, j, k); }