NeoPZ
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
TFad< Num, T > Class Template Reference

#include <tfad.h>

Inheritance diagram for TFad< Num, T >:
[legend]
Collaboration diagram for TFad< Num, T >:
[legend]

Public Types

typedef T value_type
 
typedef GetArithmeticType< T >::type arithmetic_type
 

Public Member Functions

void copy (const TFad< Num, T > &rhs)
 
 TFad ()
 
 TFad (const T &x)
 
 TFad (const T &x, const int i)
 
 TFad (const TFad< Num, T > &x)
 
template<class ExprT >
 TFad (const TFadExpr< ExprT > &fadexpr)
 
 ~TFad ()
 
void diff (const int ith, const int n)
 
const T & val () const
 
T & val ()
 
bool hasFastAccess () const
 
T & fastAccessDx (int i)
 
const T & fastAccessDx (int i) const
 
const T & d (int i) const
 
const T dx (int i) const
 
dx (int i)
 
int size () const
 
TFad< Num, T > & operator= (const T &val)
 
TFad< Num, T > & operator= (const TFad< Num, T > &rhs)
 
template<class ExprT >
TFad< Num, T > & operator= (const TFadExpr< ExprT > &fadexpr)
 
TFadExpr< TFadUnaryPlus< TFad< Num, T > > > operator+ () const
 
TFadExpr< TFadUnaryMin< TFad< Num, T > > > operator- () const
 
TFad< Num, T > & operator+= (const T &x)
 
TFad< Num, T > & operator-= (const T &x)
 
TFad< Num, T > & operator*= (const T &x)
 
TFad< Num, T > & operator/= (const T &x)
 
TFad< Num, T > & operator+= (const TFad< Num, T > &x)
 
TFad< Num, T > & operator-= (const TFad< Num, T > &x)
 
TFad< Num, T > & operator*= (const TFad< Num, T > &x)
 
TFad< Num, T > & operator/= (const TFad< Num, T > &x)
 
template<class ExprT >
TFad< Num, T > & operator*= (const TFadExpr< ExprT > &fadexpr)
 
template<class ExprT >
TFad< Num, T > & operator/= (const TFadExpr< ExprT > &fadexpr)
 
template<class ExprT >
TFad< Num, T > & operator+= (const TFadExpr< ExprT > &fadexpr)
 
template<class ExprT >
TFad< Num, T > & operator-= (const TFadExpr< ExprT > &fadexpr)
 
int ClassId () const override
 Define the class id associated with the class. More...
 
template<typename TEMP = void>
std::enable_if< is_arithmetic_pz< T >::value, TEMP >::type Read (TPZStream &buf, void *context)
 read objects from the stream More...
 
template<typename TEMP = void>
std::enable_if< is_arithmetic_pz< T >::value, TEMP >::type Write (TPZStream &buf, int withclassid) const
 Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More...
 
template<typename TEMP = void>
std::enable_if<!is_arithmetic_pz< T >::value, TEMP >::type Read (TPZStream &buf, void *context)
 read objects from the stream More...
 
template<typename TEMP = void>
std::enable_if<!is_arithmetic_pz< T >::value, TEMP >::type Write (TPZStream &buf, int withclassid) const
 Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More...
 
- Public Member Functions inherited from TPZSavable
 TPZSavable ()
 
virtual ~TPZSavable ()
 
virtual std::list< std::map< std::string, uint64_t > > VersionHistory () const
 
virtual std::pair< std::string, uint64_t > Version () const
 
virtual bool Compare (TPZSavable *copy, bool override=false)
 Compares the object for identity with the object pointed to, eventually copy the object. More...
 
virtual bool Compare (TPZSavable *copy, bool override=false) const
 Compares the object for identity with the object pointed to, eventually copy the object. More...
 
- Public Member Functions inherited from TPZRegisterClassId
template<typename T >
 TPZRegisterClassId (int(T::*)() const)
 
 TPZRegisterClassId ()=default
 

Protected Attributes

val_
 
dx_ [Num]
 

Friends

ostream & operator<< (ostream &stream, const TFad< Num, T > &x)
 
istream & operator>> (istream &stream, TFad< Num, T > &x)
 

Additional Inherited Members

- Static Public Member Functions inherited from TPZSavable
static std::set< TPZRestoreClassBase * > & RestoreClassSet ()
 This static function guarantees that the gMap object is available when needed. More...
 
static std::map< int, TPZRestore_t > & ClassIdMap ()
 This static function guarantees that the gMap object is available when needed. More...
 
static std::pair< std::string, uint64_t > NeoPZVersion ()
 
static void Register (TPZRestoreClassBase *restore)
 
static void RegisterClassId (int classid, TPZRestore_t fun)
 
static TPZSavableCreateInstance (const int &classId)
 

Detailed Description

template<int Num, class T = float>
class TFad< Num, T >

Definition at line 64 of file tfad.h.

Member Typedef Documentation

◆ arithmetic_type

template<int Num, class T = float>
typedef GetArithmeticType<T>::type TFad< Num, T >::arithmetic_type

Definition at line 67 of file tfad.h.

◆ value_type

template<int Num, class T = float>
typedef T TFad< Num, T >::value_type

Definition at line 66 of file tfad.h.

Constructor & Destructor Documentation

◆ TFad() [1/5]

template<int Num, class T = float>
TFad< Num, T >::TFad ( )
inline

Definition at line 76 of file tfad.h.

◆ TFad() [2/5]

template<int Num, class T = float>
TFad< Num, T >::TFad ( const T &  x)
inline

Definition at line 77 of file tfad.h.

◆ TFad() [3/5]

template<int Num, class T = float>
TFad< Num, T >::TFad ( const T &  x,
const int  i 
)
inline

Definition at line 79 of file tfad.h.

◆ TFad() [4/5]

template<int Num, class T >
TFad< Num, T >::TFad ( const TFad< Num, T > &  x)
inline

Definition at line 180 of file tfad.h.

◆ TFad() [5/5]

template<int Num, class T >
template<class ExprT >
TFad< Num, T >::TFad ( const TFadExpr< ExprT > &  fadexpr)
inline

Definition at line 186 of file tfad.h.

References TFadExpr< T >::dx(), and TFad< Num, T >::dx_.

◆ ~TFad()

template<int Num, class T = float>
TFad< Num, T >::~TFad ( )
inline

Definition at line 83 of file tfad.h.

Member Function Documentation

◆ ClassId()

template<int Num, typename T >
int TFad< Num, T >::ClassId ( ) const
overridevirtual

Define the class id associated with the class.

This id has to be unique for all classes A non unique id is flagged at the startup of the program

Implements TPZSavable.

Definition at line 488 of file tfad.h.

References Hash().

◆ copy()

template<int Num, class T >
void TFad< Num, T >::copy ( const TFad< Num, T > &  rhs)
inline

Definition at line 172 of file tfad.h.

References TFad< Num, T >::dx_, and TFad< Num, T >::val_.

Referenced by TFad< Num, T >::operator=().

◆ d()

template<int Num, class T = float>
const T& TFad< Num, T >::d ( int  i) const
inline

Definition at line 96 of file tfad.h.

Referenced by TPZMatHyperElastic::Contribute().

◆ diff()

template<int Num, class T >
void TFad< Num, T >::diff ( const int  ith,
const int  n 
)
inline

Definition at line 196 of file tfad.h.

References TFad< Num, T >::dx_.

Referenced by main().

◆ dx() [1/2]

template<int Num, class T = float>
const T TFad< Num, T >::dx ( int  i) const
inline

Definition at line 98 of file tfad.h.

◆ dx() [2/2]

template<int Num, class T = float>
T TFad< Num, T >::dx ( int  i)
inline

Definition at line 99 of file tfad.h.

◆ fastAccessDx() [1/2]

template<int Num, class T = float>
T& TFad< Num, T >::fastAccessDx ( int  i)
inline

Definition at line 94 of file tfad.h.

Referenced by Bench_4_Op().

◆ fastAccessDx() [2/2]

template<int Num, class T = float>
const T& TFad< Num, T >::fastAccessDx ( int  i) const
inline

Definition at line 95 of file tfad.h.

◆ hasFastAccess()

template<int Num, class T = float>
bool TFad< Num, T >::hasFastAccess ( ) const
inline

Definition at line 92 of file tfad.h.

◆ operator*=() [1/3]

template<int Num, class T >
TFad< Num, T > & TFad< Num, T >::operator*= ( const T &  x)
inline

Definition at line 259 of file tfad.h.

References TFad< Num, T >::dx_, TFad< Num, T >::val(), and TFad< Num, T >::val_.

◆ operator*=() [2/3]

template<int Num, class T >
TFad< Num, T > & TFad< Num, T >::operator*= ( const TFad< Num, T > &  x)
inline

Definition at line 300 of file tfad.h.

References TFad< Num, T >::dx_, and TFad< Num, T >::val_.

◆ operator*=() [3/3]

template<int Num, class T >
template<class ExprT >
TFad< Num, T > & TFad< Num, T >::operator*= ( const TFadExpr< ExprT > &  fadexpr)
inline

◆ operator+()

template<int Num, class T >
TFadExpr< TFadUnaryPlus< TFad< Num, T > > > TFad< Num, T >::operator+ ( ) const
inline

Definition at line 233 of file tfad.h.

◆ operator+=() [1/3]

template<int Num, class T >
TFad< Num, T > & TFad< Num, T >::operator+= ( const T &  x)
inline

Definition at line 245 of file tfad.h.

References TFad< Num, T >::val(), and TFad< Num, T >::val_.

◆ operator+=() [2/3]

template<int Num, class T >
TFad< Num, T > & TFad< Num, T >::operator+= ( const TFad< Num, T > &  x)
inline

Definition at line 280 of file tfad.h.

References TFad< Num, T >::dx_, and TFad< Num, T >::val_.

◆ operator+=() [3/3]

template<int Num, class T >
template<class ExprT >
TFad< Num, T > & TFad< Num, T >::operator+= ( const TFadExpr< ExprT > &  fadexpr)
inline

◆ operator-()

template<int Num, class T >
TFadExpr< TFadUnaryMin< TFad< Num, T > > > TFad< Num, T >::operator- ( ) const
inline

Definition at line 239 of file tfad.h.

◆ operator-=() [1/3]

template<int Num, class T >
TFad< Num, T > & TFad< Num, T >::operator-= ( const T &  x)
inline

Definition at line 252 of file tfad.h.

References TFad< Num, T >::val(), and TFad< Num, T >::val_.

◆ operator-=() [2/3]

template<int Num, class T >
TFad< Num, T > & TFad< Num, T >::operator-= ( const TFad< Num, T > &  x)
inline

Definition at line 290 of file tfad.h.

References TFad< Num, T >::dx_, and TFad< Num, T >::val_.

◆ operator-=() [3/3]

template<int Num, class T >
template<class ExprT >
TFad< Num, T > & TFad< Num, T >::operator-= ( const TFadExpr< ExprT > &  fadexpr)
inline

◆ operator/=() [1/3]

template<int Num, class T >
TFad< Num, T > & TFad< Num, T >::operator/= ( const T &  x)
inline

Definition at line 269 of file tfad.h.

References TFad< Num, T >::dx_, TFad< Num, T >::val(), and TFad< Num, T >::val_.

◆ operator/=() [2/3]

template<int Num, class T >
TFad< Num, T > & TFad< Num, T >::operator/= ( const TFad< Num, T > &  x)
inline

Definition at line 310 of file tfad.h.

References TFad< Num, T >::dx_, and TFad< Num, T >::val_.

◆ operator/=() [3/3]

template<int Num, class T >
template<class ExprT >
TFad< Num, T > & TFad< Num, T >::operator/= ( const TFadExpr< ExprT > &  fadexpr)
inline

◆ operator=() [1/3]

template<int Num, class T >
TFad< Num, T > & TFad< Num, T >::operator= ( const T &  val)
inline

Definition at line 205 of file tfad.h.

References TFad< Num, T >::dx_, TFad< Num, T >::val(), and TFad< Num, T >::val_.

◆ operator=() [2/3]

template<int Num, class T >
TFad< Num, T > & TFad< Num, T >::operator= ( const TFad< Num, T > &  rhs)
inline

Definition at line 215 of file tfad.h.

References TFad< Num, T >::copy().

◆ operator=() [3/3]

template<int Num, class T >
template<class ExprT >
TFad< Num, T > & TFad< Num, T >::operator= ( const TFadExpr< ExprT > &  fadexpr)
inline

◆ Read() [1/2]

template<int Num, class T = float>
template<typename TEMP = void>
std::enable_if<is_arithmetic_pz<T>::value, TEMP>::type TFad< Num, T >::Read ( TPZStream buf,
void *  context 
)
inlinevirtual

read objects from the stream

Reimplemented from TPZSavable.

Definition at line 129 of file tfad.h.

References TPZStream::Read().

◆ Read() [2/2]

template<int Num, class T = float>
template<typename TEMP = void>
std::enable_if<!is_arithmetic_pz<T>::value, TEMP>::type TFad< Num, T >::Read ( TPZStream buf,
void *  context 
)
inlinevirtual

read objects from the stream

Reimplemented from TPZSavable.

Definition at line 143 of file tfad.h.

◆ size()

template<int Num, class T = float>
int TFad< Num, T >::size ( ) const
inline

Definition at line 101 of file tfad.h.

References operator+(), operator-(), operator-=(), and val().

◆ val() [1/2]

template<int Num, class T = float>
const T& TFad< Num, T >::val ( ) const
inline

◆ val() [2/2]

template<int Num, class T = float>
T& TFad< Num, T >::val ( )
inline

Definition at line 90 of file tfad.h.

◆ Write() [1/2]

template<int Num, class T = float>
template<typename TEMP = void>
std::enable_if<is_arithmetic_pz<T>::value, TEMP>::type TFad< Num, T >::Write ( TPZStream buf,
int  withclassid 
) const
inlinevirtual

Writes this object to the TPZStream buffer. Include the classid if withclassid = true.

Writes this object to the TPZStream buffer. Include the classid if withclassid = true

Reimplemented from TPZSavable.

Definition at line 136 of file tfad.h.

References TPZStream::Write().

◆ Write() [2/2]

template<int Num, class T = float>
template<typename TEMP = void>
std::enable_if<!is_arithmetic_pz<T>::value, TEMP>::type TFad< Num, T >::Write ( TPZStream buf,
int  withclassid 
) const
inlinevirtual

Writes this object to the TPZStream buffer. Include the classid if withclassid = true.

Writes this object to the TPZStream buffer. Include the classid if withclassid = true

Reimplemented from TPZSavable.

Definition at line 152 of file tfad.h.

Friends And Related Function Documentation

◆ operator<<

template<int Num, class T = float>
ostream& operator<< ( ostream &  stream,
const TFad< Num, T > &  x 
)
friend

Definition at line 159 of file tfad.h.

◆ operator>>

template<int Num, class T = float>
istream& operator>> ( istream &  stream,
TFad< Num, T > &  x 
)
friend

Definition at line 164 of file tfad.h.

Member Data Documentation

◆ dx_

template<int Num, class T = float>
T TFad< Num, T >::dx_[Num]
protected

◆ val_

template<int Num, class T = float>
T TFad< Num, T >::val_
protected

The documentation for this class was generated from the following file: