NEML2 2.0.0
Loading...
Searching...
No Matches
Derivative< N > Class Template Reference

Derivative wrapper. More...

Detailed Description

template<std::size_t N>
class neml2::Derivative< N >

Derivative wrapper.

#include <Derivative.h>

Public Member Functions

 Derivative ()=default
 
 Derivative (const std::array< const VariableBase *, N+1 > &var_and_args, ArrayRef< Size > dep_dims)
 
bool operator== (const Derivative< N > &other) const
 Equality operator (for searching in a container)
 
const Tensortensor () const
 Get the derivative.
 
const Tensorget () const
 Get the derivative in assembly format.
 
void set (const Tensor &val)
 Set the derivative (given in assembly format)
 
const VariableBasevar () const
 Get the variable.
 
std::array< const VariableBase *, N > args () const
 Get the args.
 
Derivativeoperator= (const Tensor &val)
 
Derivativeoperator= (const VariableBase &val)
 

Constructor & Destructor Documentation

◆ Derivative() [1/2]

template<std::size_t N>
Derivative ( )
default

◆ Derivative() [2/2]

template<std::size_t N>
Derivative ( const std::array< const VariableBase *, N+1 > & var_and_args,
ArrayRef< Size > dep_dims )

Member Function Documentation

◆ args()

template<std::size_t N>
std::array< const VariableBase *, N > args ( ) const

Get the args.

◆ get()

template<std::size_t N>
const Tensor & get ( ) const

Get the derivative in assembly format.

◆ operator=() [1/2]

template<std::size_t N>
Derivative< N > & operator= ( const Tensor & val)

Assignment operator

◆ operator=() [2/2]

template<std::size_t N>
Derivative< N > & operator= ( const VariableBase & val)

◆ operator==()

template<std::size_t N>
bool operator== ( const Derivative< N > & other) const

Equality operator (for searching in a container)

◆ set()

template<std::size_t N>
void set ( const Tensor & val)

Set the derivative (given in assembly format)

◆ tensor()

template<std::size_t N>
const Tensor & tensor ( ) const
inline

Get the derivative.

◆ var()

template<std::size_t N>
const VariableBase * var ( ) const
inline

Get the variable.