MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
grad::ApplyDerivativeHelper< false > Struct Template Reference

#include <gradient.h>

Static Public Member Functions

template<typename MapVectorType , typename Expression >
static void ApplyDerivative (MapVectorType &ad, const GradientExpression< Expression > &f)
 
template<typename MapVectorType , typename Expression >
static void ApplyBinaryFunction1 (MapVectorType &ad, const GradientExpression< Expression > &f, const index_type iStartLocal, const index_type iEndLocal, const scalar_deriv_type df_du, const scalar_deriv_type df_dv)
 

Detailed Description

template<>
struct grad::ApplyDerivativeHelper< false >

Definition at line 2154 of file gradient.h.

Member Function Documentation

template<typename MapVectorType , typename Expression >
static void grad::ApplyDerivativeHelper< false >::ApplyBinaryFunction1 ( MapVectorType &  ad,
const GradientExpression< Expression > &  f,
const index_type  iStartLocal,
const index_type  iEndLocal,
const scalar_deriv_type  df_du,
const scalar_deriv_type  df_dv 
)
inlinestatic

Definition at line 2163 of file gradient.h.

2168  {
2169  for (index_type i = iStartLocal; i < iEndLocal; ++i) {
2170  const scalar_deriv_type ud = ad.dGetLocalVector(i);
2171  const scalar_deriv_type vd = f.dGetDerivativeLocal(i);
2172  ad.SetLocalVector(i, df_du * ud + df_dv * vd);
2173  }
2174  }
integer index_type
Definition: gradient.h:104
doublereal scalar_deriv_type
Definition: gradient.h:347
template<typename MapVectorType , typename Expression >
static void grad::ApplyDerivativeHelper< false >::ApplyDerivative ( MapVectorType &  ad,
const GradientExpression< Expression > &  f 
)
inlinestatic

Definition at line 2156 of file gradient.h.

2156  {
2157  for (index_type i = ad.iGetStartIndexLocal(); i < ad.iGetEndIndexLocal(); ++i) {
2158  ad.SetLocalVector(i, f.dGetDerivativeLocal(i));
2159  }
2160  }
integer index_type
Definition: gradient.h:104

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