42 #ifndef ___GRADIENT_H_INCLUDED___ 
   43 #define ___GRADIENT_H_INCLUDED___ 
   65 #ifndef GRADIENT_DEBUG 
   67         #define GRADIENT_DEBUG 2 
   69             #define GRADIENT_DEBUG 0 
   73 #if GRADIENT_DEBUG == 0 || defined(DEBUG) 
   74         #define GRADIENT_ASSERT(expr) ASSERT(expr) 
   75 #elif GRADIENT_DEBUG > 0 
   76         #define GRADIENT_ASSERT(expr) assert(expr) 
   79 #if GRADIENT_DEBUG >= 2 
   80 #define GRADIENT_TRACE(expr) \ 
   81                 static_cast<void>(std::cerr << __FILE__ << ":" \ 
   83                                   << __FUNCTION__ << ": " << expr) 
   85 #define GRADIENT_TRACE(expr) static_cast<void>(0) 
   88 #ifndef GRADIENT_MEMORY_STAT 
   90         #define GRADIENT_MEMORY_STAT 1 
   92         #define GRADIENT_MEMORY_STAT 0 
   98         return y > 0. ? std::abs(x) : -std::abs(x);
 
  106 template <index_type N_SIZE>
 
  115 template <
bool bSizeOK>
 
  131     template <
typename T>
 
  137             ? ~T(0) & ~(T(1) << (
sizeof(T) * CHAR_BIT - 1))
 
  143 #ifndef GRADIENT_VECTOR_REGISTER_SIZE 
  144         #define GRADIENT_VECTOR_REGISTER_SIZE 0 
  147 template <
typename T>
 
  150     typedef typename std::allocator<T>::pointer 
pointer;
 
  151     typedef typename std::allocator<T>::size_type 
size_type;
 
  155     typedef typename std::allocator<T>::reference 
reference;
 
  159     template <
typename U>
 
  167             :std::allocator<T>(
a) {
 
  170     template <
typename U>
 
  172             :std::allocator<T>(
a) {
 
  177 #if GRADIENT_MEMORY_STAT > 0 
  181             const pointer pMem = std::allocator<T>::allocate(n, p);
 
  183 #if GRADIENT_DEBUG > 0 
  184             std::memset(pMem, 0xFF, n);
 
  191         std::allocator<T>::deallocate(p, n);
 
  193 #if GRADIENT_MEMORY_STAT > 0 
  199 #if GRADIENT_MEMORY_STAT > 0 
  204         const size_type byte_size = 
sizeof(T) * n + extra_bytes;
 
  208 #if defined(HAVE_POSIX_MEMALIGN) 
  209             if (0 != posix_memalign(&p, alignment, byte_size)) {
 
  212 #elif defined(HAVE_MEMALIGN) 
  213         p = memalign(alignment, byte_size);
 
  214 #elif defined(HAVE_ALIGNED_MALLOC) 
  215         p = _aligned_malloc(byte_size, alignment);
 
  217         p = malloc(byte_size);
 
  220                 throw std::bad_alloc();
 
  223 #if GRADIENT_DEBUG > 0 
  224             const ptrdiff_t alignment_curr = (
reinterpret_cast<const char*
>(p) - reinterpret_cast<const char*>(0)) % 
sizeof(alignment);
 
  226             if (alignment_curr != 0) {
 
  227                 silent_cout(
"address " << p << 
" has invalid alignment " << alignment_curr << std::endl);
 
  232             std::memset(p, 0xFF, byte_size);
 
  234         return reinterpret_cast<T*
>(p);
 
  240 #if defined(HAVE_ALIGNED_MALLOC) 
  246 #if GRADIENT_MEMORY_STAT > 0 
  251 #if GRADIENT_MEMORY_STAT > 0 
  252     static class MemStat {
 
  255         :iCurrMem(0), iMaxMem(0), iNumAlloc(0), iNumDealloc(0) {
 
  260                 silent_cerr(
"GradientAllocator<" << 
typeid(T).name()
 
  262                                 << std::setprecision(3)
 
  263                                 << iMaxMem << std::endl
 
  264                                 << 
"\tiCurrMem=" << iCurrMem << std::endl
 
  265                                 << 
"\tiNumAlloc=" << iNumAlloc << std::endl
 
  266                             << 
"\tiNumDealloc=" << iNumDealloc << std::endl);
 
  269         void Inc(
size_t iSize) {
 
  272                 if (iCurrMem > iMaxMem) {
 
  277         void Dec(
size_t iSize) {
 
  292 #if USE_AUTODIFF > 0 && GRADIENT_VECTOR_REGISTER_SIZE > 0 
  293         void* 
operator new(
size_t size) {
 
  297         void operator delete(
void *p) {
 
  303 #if GRADIENT_MEMORY_STAT > 0 
  304 template <
typename T>
 
  308 template <
typename T>
 
  309     inline void array_fill(T* first, T* 
const last, 
const T& val) {
 
  310         while (first < last) {
 
  315     template <
typename T>
 
  316     inline T* 
array_copy(
const T* first, 
const T* 
const last, T* result) {
 
  317         while (first < last) {
 
  318             *result++ = *first++;
 
  324     template <
typename T>
 
  349 template <
typename T, index_type N_SIZE=0>
 
  353 #if GRADIENT_VECTOR_REGISTER_SIZE > 0 
  357         #warning "vectorization not supported for this compiler" 
  377 template <
typename T, index_type N_SIZE>
 
  388 #if GRADIENT_DEBUG > 0 
  409     template <
typename T2, index_type N_SIZE2>
 
  438     template <
typename T2, index_type N_SIZE2>
 
  558     template <
typename T2, index_type N_SIZE2>
 
  574     template <
typename T2, index_type N_SIZE2>
 
  585 #if GRADIENT_DEBUG > 0 
  586         bool bInvariant()
 const {
 
  614         bool bIsAligned()
 const {
 
  618         const ptrdiff_t alignment = (
reinterpret_cast<const char*
>(
rgArrayVec) - reinterpret_cast<const char*>(0)) % 
sizeof(
vector_type);
 
  620             if (alignment != 0) {
 
  621                 silent_cout(
"address " << 
rgArrayVec << 
" has invalid alignment " << alignment << std::endl);
 
  624 #if defined(WIN32) || defined(__CYGWIN__) 
  630         return alignment == 0;
 
  644 template <
typename T>
 
  656             :pData(pNullData()) {
 
  661             :pData(pNullData()) {
 
  668     template <
typename T2, index_type N_SIZE2>
 
  670             :pData(pNullData()) {
 
  678             :pData(pNullData()) {
 
  679         ReserveMem(iStart, iEnd, RESIZE);
 
  702     template <
typename T2, index_type N_SIZE2>
 
  717         ReserveMem(iStartNew, iEndNew, RESIZE);
 
  728             if (iStartNewVec == 
iGetStartIndexVector() && iEndNewVec - iStartNewVec <= iGetCapacityVector()) {
 
  731                 ReserveMem(iStartNew, iEndNew, RESIZE);
 
  739                         oTmpVec.
ReserveMem(iStartNew, iEndNew, RESIZE);
 
  748                         std::swap(pData, oTmpVec.
pData);
 
  767             if (iCurrCap >= iMaxSize) {
 
  779                 std::swap(pData, oTmpVec.pData);
 
  781                 ReserveMem(0, iMaxSize, RESERVE);
 
  788         return pData->iStart;
 
  796         return pData->iStartVec;
 
  800         return pData->iEndVec;
 
  804         return pData->iEndVec - pData->iStartVec;
 
  808         return pData->iEnd - pData->iStart;
 
  876         return pData->iCapacityVec;
 
  879     template <
typename T2, index_type N_SIZE2>
 
  887             array_copy(v.beginVec(), v.endVec(), beginVec());
 
  906         return pData->rgArray;
 
  914         return pData->rgArray;
 
  922         return pData->rgArrayVec;
 
  930         return pData->rgArrayVec;
 
  938         const index_type iCapCurr = iGetCapacityVector();
 
  943             if (iSizeVec > iCapCurr) {
 
  948                 pData->iCapacityVec = iSizeVec;
 
  953             if (pData == pNullData()) {
 
  959             if (eFlags == RESERVE) {
 
  960                 iStartNew = iEndNew = iStartVec = iEndVec = 0;
 
  963                 pData->iStart = iStartNew;
 
  964                 pData->iEnd = iEndNew;
 
  970             if (pData != pNullData()) {
 
  984         return const_cast<Data*
>(&sNullData);
 
  987 #if GRADIENT_DEBUG > 0 
  988         bool bInvariant()
 const {
 
  992         GRADIENT_ASSERT(pData->iEnd - pData->iStart <= iVectorSize * pData->iCapacityVec);
 
  995         GRADIENT_ASSERT(pData->iEndVec - pData->iStartVec <= pData->iCapacityVec);
 
 1002         const index_type iEndOffset = pData->iEndVec * iVectorSize - pData->iEnd;
 
 1015 template <
typename T>
 
 1042     typedef std::vector<index_type, GradientAllocator<index_type> > 
VectorType;
 
 1047                                  std::less<index_type>,
 
 1141         os << i - dof.
BeginLocal() << 
"->" << *i << std::endl;
 
 1153 template <index_type N_SIZE>
 
 1161         template <index_type N_SIZE2>
 
 1176         ResizeReset(pMap, iStartGlobal, iEndGlobal, s, dVal);
 
 1199         index_type iFirstIndex = std::numeric_limits<index_type>::max(), iLastIndex = 0;
 
 1201         for (
index_type iGlobal = iStartGlobal; iGlobal < iEndGlobal; ++iGlobal) {
 
 1204             if (iLocal < iFirstIndex) {
 
 1205                 iFirstIndex = iLocal;
 
 1208             if (iLocal > iLastIndex) {
 
 1209                 iLastIndex = iLocal;
 
 1283 template <
typename Expression>
 
 1297     template <
typename Expr>
 
 1303     template <
typename LhsExpr, 
typename RhsExpr>
 
 1311 template <
typename LhsExpr, 
typename RhsExpr>
 
 1314                         ? LhsExpr::iMaxDerivatives : RhsExpr::iMaxDerivatives;
 
 1317 template <index_type N_SIZE1, index_type N_SIZE2>
 
 1323 template <
typename BinFunc, 
typename LhsExpr, 
typename RhsExpr>
 
 1326         static const bool bAlias = LhsExpr::bAlias || RhsExpr::bAlias;
 
 1329                                                                         && LhsExpr::bVectorize && RhsExpr::bVectorize && BinFunc::bVectorize;
 
 1341 #if GRADIENT_DEBUG > 0 
 1374         return std::min(
oU.iGetStartIndexLocal(), 
oV.iGetStartIndexLocal());
 
 1378         return std::max(
oU.iGetEndIndexLocal(), 
oV.iGetEndIndexLocal());
 
 1382         return std::min(
oU.iGetStartIndexLocalVector(), 
oV.iGetStartIndexLocalVector());
 
 1386         return std::max(
oU.iGetEndIndexLocalVector(), 
oV.iGetEndIndexLocalVector());
 
 1393             pDofMap = 
oV.pGetDofMap();
 
 1402         return oU.bHaveReferenceTo(p) || 
oV.bHaveReferenceTo(p);
 
 1420         f = BinFunc::f(u, v);
 
 1421         df_du = BinFunc::df_du(u, v);
 
 1422         df_dv = BinFunc::df_dv(u, v);
 
 1426     template <
typename T>
 
 1438 template <
typename UnFunc, 
typename Expr>
 
 1443         static const bool bVectorize = Expr::bVectorize && UnFunc::bVectorize;
 
 1452 #if GRADIENT_DEBUG > 0 
 1483         return oU.iGetStartIndexLocal();
 
 1487         return oU.iGetEndIndexLocal();
 
 1491         return oU.iGetStartIndexLocalVector();
 
 1495         return oU.iGetEndIndexLocalVector();
 
 1499         return oU.pGetDofMap();
 
 1503         return oU.bHaveReferenceTo(p);
 
 1519         df_du = UnFunc::df_du(u);
 
 1524     template <
typename T>
 
 1527         return df_du * du_dX;
 
 1536 template <
typename T, 
bool ALIAS=false>
 
 1554         return oG.dGetValue();
 
 1558         return oG.dGetDerivativeLocal(iLocalDof);
 
 1562         return oG.dGetDerivativeLocalVector(iLocalVecDof);
 
 1566         return oG.iGetStartIndexLocal();
 
 1570         return oG.iGetEndIndexLocal();
 
 1574         return oG.iGetStartIndexLocalVector();
 
 1578         return oG.iGetEndIndexLocalVector();
 
 1582         return oG.pGetDofMap();
 
 1590         return oG.iGetMaxDerivatives();
 
 1599 template <
typename T>
 
 1632         return std::numeric_limits<index_type>::max();
 
 1640         return std::numeric_limits<index_type>::max();
 
 1665 template <
typename BoolFunc, 
typename LhsExpr, 
typename RhsExpr>
 
 1668         static const bool bAlias = LhsExpr::bAlias || RhsExpr::bAlias;
 
 1688         return BoolFunc::f(u, v);
 
 1704         return std::numeric_limits<index_type>::max();
 
 1712         return std::numeric_limits<index_type>::max();
 
 1723             pDofMap = 
oV.pGetDofMap();
 
 1740         return oU.bHaveReferenceTo(p) || 
oV.bHaveReferenceTo(p);
 
 1812         return -u / (v * v);
 
 1825         return v * 
pow(u, v - 1.);
 
 1829         return pow(u, v) * 
log(u);
 
 1842         return v / (v * v + u * u);
 
 1846         return -u / (v * v + u * u);
 
 1889         return 1. / (2. * 
sqrt(u));
 
 1955         return 1. + tan_u * tan_u;
 
 1995         return 1. - tanh_u * tanh_u;
 
 2008         return 1. / 
sqrt(1 - u * u);
 
 2021         return -1. / 
sqrt(1 - u * u);
 
 2034         return 1. / (1. + u * u);
 
 2041         static const bool bVectorize = 
false;
 
 2048         return 1. / 
sqrt(1. + u * u);
 
 2056         static const bool bVectorize = 
false;
 
 2063         return 1. / 
sqrt(u * u - 1.);
 
 2071         static const bool bVectorize = 
false;
 
 2078         return 1. / (1. - u * u);
 
 2150 template <
bool bVectorize>
 
 2155     template <
typename MapVectorType, 
typename Expression>
 
 2157         for (
index_type i = ad.iGetStartIndexLocal(); i < ad.iGetEndIndexLocal(); ++i) {
 
 2158                 ad.SetLocalVector(i, f.dGetDerivativeLocal(i));
 
 2162     template <
typename MapVectorType, 
typename Expression>
 
 2169                 for (
index_type i = iStartLocal; i < iEndLocal; ++i) {
 
 2172                         ad.SetLocalVector(i, df_du * ud + df_dv * vd);
 
 2179     template <
typename MapVectorType, 
typename Expression>
 
 2181         for (
index_type i = ad.iGetStartIndexLocalVector(); i < ad.iGetEndIndexLocalVector(); ++i) {
 
 2182                 ad.SetLocalVectorVector(i, f.dGetDerivativeLocalVector(i));
 
 2186     template <
typename MapVectorType, 
typename Expression>
 
 2195         const index_type iStartLocalVec = RangeVectorType::iRoundStartIndexVector(iStartLocal);
 
 2196         const index_type iEndLocalVec = RangeVectorType::iRoundEndIndexVector(iEndLocal);
 
 2198                 for (
index_type i = iStartLocalVec; i < iEndLocalVec; ++i) {
 
 2199                         const vector_deriv_type ud = ad.dGetLocalVectorVector(i);
 
 2200                         const vector_deriv_type vd = f.dGetDerivativeLocalVector(i);
 
 2201                         ad.SetLocalVectorVector(i, df_du * ud + df_dv * vd);
 
 2206 template <
bool ALIAS>
 
 2211         template <
typename GradientType, 
typename Expression>
 
 2216     template <
typename BinFunc, 
typename GradientType, 
typename Expression>
 
 2218         g.ApplyBinaryFunctionNoAlias(f, bfunc);
 
 2224         template <
typename GradientType, 
typename Expression>
 
 2226                 g.ApplyWithAlias(f);
 
 2229     template <
typename BinFunc, 
typename GradientType, 
typename Expression>
 
 2231         g.ApplyBinaryFunctionWithAlias(f, bfunc);
 
 2235 template <index_type N_SIZE>
 
 2261     template <index_type N_SIZE2>
 
 2267     template <index_type N_SIZE2>
 
 2269 #if GRADIENT_DEBUG > 0 
 2275     template <
typename Expression>
 
 2288     template <index_type N_SIZE2>
 
 2292         index_type iFirstLocal = std::numeric_limits<index_type>::max();
 
 2299         for (
index_type i = g.iGetStartIndexLocal(); i < g.iGetEndIndexLocal(); ++i) {
 
 2300                 if (g.dGetDerivativeLocal(i) == 0.) {
 
 2312                 if (iLocal < iFirstLocal) {
 
 2313                         iFirstLocal = iLocal;
 
 2316                 if (iLocal > iLastLocal) {
 
 2317                         iLastLocal = iLocal;
 
 2323         if (iLastLocal <= iFirstLocal) {
 
 2324                 iFirstLocal = iLastLocal = 0;
 
 2335                 for (
index_type i = iFirstLocal; i < iLastLocal; ++i) {
 
 2346                         ad.SetLocalVector(i, g.dGetDerivativeLocal(iLocal2));
 
 2349 #if GRADIENT_DEBUG > 0 
 2350                 for (
index_type i = iFirstLocal; i < iLastLocal; ++i) {
 
 2352                         const index_type iLocal2 = g.pGetDofMap()->iGetLocalIndex(iGlobal);
 
 2358                 for (
index_type i = g.iGetStartIndexLocal(); i < g.iGetEndIndexLocal(); ++i) {
 
 2359                         if (g.dGetDerivativeLocal(i) != 0.) {
 
 2360                                 const index_type iGlobal = g.iGetGlobalDof(i);
 
 2382     template <
typename Expression>
 
 2389     template <index_type N_SIZE2>
 
 2392         ad = g.GetDerivativeLocal();
 
 2448     template <
typename Expression>
 
 2450         ApplyBinaryFunction<FuncPlus>(f);
 
 2454     template <
typename Expression>
 
 2456         ApplyBinaryFunction<FuncMinus>(f);
 
 2460     template <
typename Expression>
 
 2462         ApplyBinaryFunction<FuncMult>(f);
 
 2466     template <
typename Expression>
 
 2468         ApplyBinaryFunction<FuncDiv>(f);
 
 2486                 ad.SetLocalVector(i, 
ad.dGetLocalVector(i) * d);
 
 2496                 ad.SetLocalVector(i, 
ad.dGetLocalVector(i) / d);
 
 2519         return ad.dGetLocalVector(iLocalDof);
 
 2525         return ad.dGetLocalVectorVector(iLocalVecDof);
 
 2535         return ad.dGetGlobalVector(iGlobalDof);
 
 2539         ad.ResizeReset(pMap, iStartGlobal, iEndGlobal, s, dVal);
 
 2543         ad.ResizeReset(pMap, iStartLocal, iEndLocal, s, dVal);
 
 2557         ad.SetLocalVector(iLocalDof, dCoef);
 
 2563         ad.SetLocalVectorVector(iLocalVecDof, dVec);
 
 2569         ad.SetGlobalVector(iGlobalDof, dCoef);
 
 2573         return ad.iGetGlobalDof(iLocalDof);
 
 2577         return ad.iGetStartIndexLocal();
 
 2581         return ad.iGetEndIndexLocal();
 
 2585         return ad.iGetStartIndexLocalVector();
 
 2589         return ad.iGetEndIndexLocalVector();
 
 2597         return ad.iGetMaxSize();
 
 2601         return ad.iGetMaxSizeVector();
 
 2621     template <
typename Expression>
 
 2627         return ad.pGetDofMap();
 
 2638     template <
typename Expression>
 
 2652     template <
typename Expression>
 
 2660     template <
typename Expression>
 
 2671     template <
typename BinFunc, 
typename Expression>
 
 2676     template <
typename BinFunc, 
typename Expression>
 
 2686         if (pDofMap2 == 0) {
 
 2699                 a = BinFunc::f(u, v);
 
 2703                 const index_type iStartFunc = f.iGetStartIndexLocal();
 
 2704                 const index_type iEndFunc = f.iGetEndIndexLocal();
 
 2706         if (pDofMap == pDofMap2) {
 
 2714                                         iStartLocal = iStartFunc;
 
 2715                                         iEndLocal = iEndFunc;
 
 2720                         index_type iFirstLocal = std::numeric_limits<index_type>::max();
 
 2723                 for (
index_type i = iStartFunc; i < iEndFunc; ++i) {
 
 2724                         if (f.dGetDerivativeLocal(i) == 0.) {
 
 2736                         const index_type iLocal = pDofMap->AllocateLocalDof(iGlobal);
 
 2738                         if (iLocal < iFirstLocal) {
 
 2739                                 iFirstLocal = iLocal;
 
 2742                         if (iLocal > iLastLocal) {
 
 2743                                 iLastLocal = iLocal;
 
 2749                 if (iLastLocal <= iFirstLocal) {
 
 2751                         iFirstLocal = std::numeric_limits<index_type>::max();
 
 2759                         ad.ResizePreserve(pDofMap,
 
 2760                                                           std::min(
ad.iGetStartIndexLocal(), iFirstLocal),
 
 2761                                                           std::max(
ad.iGetEndIndexLocal(), iLastLocal),
 
 2766                         GRADIENT_TRACE(
"ad=" << 
ad.iGetStartIndexLocal() << 
":" << 
ad.iGetEndIndexLocal() << std::endl);
 
 2770                                 for (
index_type i = iStartFunc; i < iEndFunc; ++i) {
 
 2779                                         const index_type iLocal = pDofMap->iGetLocalIndex(iGlobal);
 
 2785                                         GRADIENT_TRACE(
"i=" << i << 
" iLocal=" << iLocal << 
" ud=" << ud << 
" vd=" << vd << std::endl);
 
 2787                                         ad.SetLocalVector(iLocal, ud + df_dv * vd);
 
 2791                                         for (
index_type i = 
ad.iGetStartIndexLocal(); i < 
ad.iGetEndIndexLocal(); ++i) {
 
 2793                                                 const index_type iGlobal = pDofMap->iGetGlobalDof(i);
 
 2803                                                         vd = f.dGetDerivativeLocal(iLocal2);
 
 2806                                         GRADIENT_TRACE(
"i=" << i << 
" iLocal2=" << iLocal2 << 
" ud=" << ud << 
" vd=" << vd << std::endl);
 
 2808                                                 ad.SetLocalVector(i, df_du * ud + df_dv * vd);
 
 2814     template <
typename BinFunc, 
typename Expression>
 
 2831 template <index_type N_SIZE1, index_type N_SIZE2>
 
 2833         g1.Copy(g2, pDofMap);
 
 2840 template <index_type N_SIZE>
 
 2849 template <index_type N_SIZE>
 
 2851         return g.dGetValue();
 
 2854 template <index_type N_SIZE>
 
 2860 template <
typename T1, 
typename T2>
 
 2865 template <index_type N_SIZE>
 
 2876 template <index_type N_SIZE>
 
 2877 inline std::ostream& operator<<(std::ostream& os, const Gradient<N_SIZE>& f) {
 
 2878     os << std::setw(12) << f.dGetValue();
 
 2881     os << 
" [" << f.iGetStartIndexLocal() << 
"->" << f.iGetEndIndexLocal() << 
"]";
 
 2889                 os << std::setw(3) << iGlobal << 
":" << std::setw(12) << f.dGetDerivativeLocal(iLocal) << 
" ";
 
 2899 #define GRADIENT_DEFINE_BINARY_FUNCTION(ExpressionName, FunctionName, FunctionClass) \ 
 2900     template <typename LhsExpr, typename RhsExpr> \ 
 2901     inline GradientExpression<ExpressionName<FunctionClass, LhsExpr, RhsExpr> > \ 
 2902     FunctionName(const GradientExpression<LhsExpr>& u, const GradientExpression<RhsExpr>& v) { \ 
 2903         return GradientExpression<ExpressionName<FunctionClass, LhsExpr, RhsExpr> >(u, v); \ 
 2906     template <index_type N_SIZE, typename LhsExpr> \ 
 2907     inline GradientExpression<ExpressionName<FunctionClass, LhsExpr, DirectExpr<Gradient<N_SIZE> > > > \ 
 2908     FunctionName(const GradientExpression<LhsExpr>& u, const Gradient<N_SIZE>& v) { \ 
 2909         return GradientExpression<ExpressionName<FunctionClass, LhsExpr, DirectExpr<Gradient<N_SIZE> > > >(u, v); \ 
 2912     template <typename LhsExpr> \ 
 2913     inline GradientExpression<ExpressionName<FunctionClass, LhsExpr, ConstExpr<typename LhsExpr::GradientType> > > \ 
 2914     FunctionName(const GradientExpression<LhsExpr>& u, scalar_func_type v) { \ 
 2915         return GradientExpression<ExpressionName<FunctionClass, LhsExpr, ConstExpr<typename LhsExpr::GradientType> > >(u, v); \ 
 2917     template <index_type N_SIZE, typename RhsExpr> \ 
 2918     inline GradientExpression<ExpressionName<FunctionClass, DirectExpr<Gradient<N_SIZE> >, RhsExpr> > \ 
 2919     FunctionName(const Gradient<N_SIZE>& u, const GradientExpression<RhsExpr>& v) { \ 
 2920         return GradientExpression<ExpressionName<FunctionClass, DirectExpr<Gradient<N_SIZE> >, RhsExpr> >(u, v); \ 
 2922     template <typename RhsExpr> \ 
 2923     inline GradientExpression<ExpressionName<FunctionClass, ConstExpr<typename RhsExpr::GradientType>, RhsExpr> > \ 
 2924     FunctionName(scalar_func_type u, const GradientExpression<RhsExpr>& v) { \ 
 2925         return GradientExpression<ExpressionName<FunctionClass, ConstExpr<typename RhsExpr::GradientType>, RhsExpr> >(u, v); \ 
 2927     template <index_type N_SIZE> \ 
 2928     inline GradientExpression<ExpressionName<FunctionClass, DirectExpr<Gradient<N_SIZE> >, DirectExpr<Gradient<N_SIZE> > > > \ 
 2929     FunctionName(const Gradient<N_SIZE>& u, const Gradient<N_SIZE>& v) { \ 
 2930         return GradientExpression<ExpressionName<FunctionClass, DirectExpr<Gradient<N_SIZE> >, DirectExpr<Gradient<N_SIZE> > > > (u, v); \ 
 2932     template <index_type N_SIZE> \ 
 2933     inline GradientExpression<ExpressionName<FunctionClass, DirectExpr<Gradient<N_SIZE> >, ConstExpr<Gradient<N_SIZE> > > > \ 
 2934     FunctionName(const Gradient<N_SIZE>& u, scalar_func_type v) { \ 
 2935         return GradientExpression<ExpressionName<FunctionClass, DirectExpr<Gradient<N_SIZE> >, ConstExpr<Gradient<N_SIZE> > > >(u, v); \ 
 2938     template <index_type N_SIZE> \ 
 2939     inline GradientExpression<ExpressionName<FunctionClass, ConstExpr<Gradient<N_SIZE> >, DirectExpr<Gradient<N_SIZE> > > > \ 
 2940     FunctionName(scalar_func_type u, const Gradient<N_SIZE>& v) { \ 
 2941         return GradientExpression<ExpressionName<FunctionClass, ConstExpr<Gradient<N_SIZE> >, DirectExpr<Gradient<N_SIZE> > > >(u, v); \ 
 2944 #define GRADIENT_DEFINE_UNARY_FUNCTION(FunctionName, FunctionClass) \ 
 2945     template <typename Expr> \ 
 2946     inline GradientExpression<UnaryExpr<FunctionClass, Expr> > \ 
 2947     FunctionName(const GradientExpression<Expr>& u) { \ 
 2948         return GradientExpression<UnaryExpr<FunctionClass, Expr> >(u); \ 
 2951     template <index_type N_SIZE> \ 
 2952     inline GradientExpression<UnaryExpr<FunctionClass, DirectExpr<Gradient<N_SIZE> > > > \ 
 2953     FunctionName(const Gradient<N_SIZE>& u) { \ 
 2954         return GradientExpression<UnaryExpr<FunctionClass, DirectExpr<Gradient<N_SIZE> > > >(u); \ 
 2999 #undef GRADIENT_DEFINE_BINARY_FUNCTION 
 3000 #undef GRADIENT_DEFINE_UNARY_FUNCTION 
GradientExpression< UnaryExpr< FuncTanh, Expr > > tanh(const GradientExpression< Expr > &u)
 
void SetVectorValue(index_type i, const vector_type &d)
 
GradientExpression< UnaryExpr< FuncExp, Expr > > exp(const GradientExpression< Expr > &u)
 
index_type iGetEndIndexLocalVector() const 
 
static scalar_deriv_type df_du(scalar_func_type u)
 
void SetDerivativeLocal(index_type iLocalDof, scalar_deriv_type dCoef)
 
scalar_deriv_type dGetDerivativeGlobal(index_type iGlobalDof) const 
 
RangeVector< scalar_deriv_type, N_SIZE > RangeVectorType
 
void ResizeReset(index_type iStartNew, index_type iEndNew, const scalar_type &dVal)
 
bool bHaveReferenceTo(const void *p) const 
 
const scalar_func_type dConst
 
void SetValue(scalar_func_type dVal)
 
bool bIsEqual(const Gradient &g) const 
 
index_type iGetEndIndex() const 
 
scalar_func_type dGetValue(scalar_func_type d)
 
static const bool bVectorize
 
Gradient & operator=(const Gradient< N_SIZE2 > &g)
 
GradientType::vector_deriv_type vector_deriv_type
 
index_type iGetCapacityVector() const 
 
MapVector(LocalDofMap *pMap, index_type iLocal, LocalScope, scalar_func_type dVal)
 
static scalar_deriv_type df_du(scalar_func_type u)
 
void ResizePreserve(index_type iStartNew, index_type iEndNew)
 
Gradient & operator+=(scalar_func_type d)
 
index_type iGetStartIndexLocal() const 
 
static const bool bVectorize
 
static scalar_deriv_type df_du(scalar_func_type u)
 
Gradient & operator/=(const GradientExpression< Expression > &f)
 
bool bHaveReferenceTo(const void *p) const 
 
scalar_deriv_type dGetDerivativeLocal(index_type iLocalDof) const 
 
static index_type iGetMaxDerivatives()
 
index_type iGetSize() const 
 
void Initialize(index_type iStartNew, index_type iEndNew, const scalar_type &dVal)
 
GradientExpression< UnaryExpr< FuncAsin, Expr > > asin(const GradientExpression< Expr > &u)
 
static scalar_deriv_type df_du(scalar_func_type u, scalar_func_type v)
 
std::allocator< T >::const_reference const_reference
 
static scalar_deriv_type df_du(scalar_func_type u, scalar_func_type v)
 
Expression::scalar_func_type scalar_func_type
 
static index_type iGetMaxSizeVector()
 
index_type iGetStartIndexLocalVector() const 
 
index_type iGetStartIndex() const 
 
scalar_type rgArray[iMaxSize]
 
scalar_deriv_type dGetGlobalVector(index_type iGlobalDof) const 
 
GradientType::vector_deriv_type vector_deriv_type
 
static const bool bVectorize
 
static scalar_deriv_type df_du(scalar_func_type u)
 
GradientExpression< BinaryExpr< FuncPow, LhsExpr, RhsExpr > > pow(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
 
MapVector(LocalDofMap *pMap, index_type iGlobal, GlobalScope s, scalar_func_type dVal)
 
std::allocator< T >::size_type size_type
 
static const index_type iMaxSizeVector
 
static index_type iGetMaxDerivatives()
 
void Reserve(index_type iMaxSizeNew)
 
#define MBDYN_EXCEPT_ARGS
 
RangeVector & operator=(const RangeVector &v)
 
static const index_type DYNAMIC_SIZE
 
static scalar_deriv_type df_dv(scalar_func_type u, scalar_func_type v)
 
GradientExpression(const Expression &u)
 
GradientExpression< UnaryExpr< FuncSin, Expr > > sin(const GradientExpression< Expr > &u)
 
index_type iGetEndIndexLocal() const 
 
void SetDerivativeLocalVector(index_type iLocalVecDof, vector_deriv_type dVec)
 
static const bool bVectorize
 
static const index_type iMaxDerivatives
 
static void ApplyBinaryFunction(GradientType &g, const GradientExpression< Expression > &f, const BinFunc &bfunc)
 
static const index_type iVectorSize
 
static const index_type iDimension
 
void ApplyBinaryFunctionWithAlias(const GradientExpression< Expression > &f, const BinFunc &)
 
index_type iGetMaxSizeVector() const 
 
static scalar_func_type f(scalar_func_type u)
 
GradientType::scalar_deriv_type scalar_deriv_type
 
static const index_type iDimension
 
static const index_type iDimension
 
index_type iGetEndIndexLocal() const 
 
static const bool bVectorize
 
RangeVectorBase< T, 0 >::vector_type vector_type
 
static const index_type iMaxDerivatives
 
GradientAllocator< U > other
 
static scalar_func_type f(scalar_func_type u)
 
const RangeVectorType & GetLocalVector() const 
 
void Reserve(index_type iMaxSize)
 
GradientType::vector_deriv_type vector_deriv_type
 
static void deallocate_aligned(pointer p, size_type n)
 
GradientType::scalar_func_type scalar_func_type
 
void SetGlobalVector(index_type iGlobalDof, scalar_deriv_type dValue)
 
index_type iGetMaxDerivatives() const 
 
static const bool bVectorize
 
static void ApplyExpression(GradientType &g, const GradientExpression< Expression > &f)
 
index_type iGetStartIndexLocalVector() const 
 
static const index_type iDimension
 
static scalar_deriv_type df_du(scalar_func_type u, scalar_func_type v)
 
static scalar_func_type f(scalar_func_type u)
 
static void ApplyDerivative(MapVectorType &ad, const GradientExpression< Expression > &f)
 
bool bHaveReferenceTo(const void *p) const 
 
void SetVectorValue(index_type i, const vector_type &d)
 
index_type iGetSizeVector() const 
 
grad::scalar_func_type scalar_func_type
 
#define GRADIENT_VECTOR_REGISTER_SIZE
 
static scalar_func_type f(scalar_func_type u)
 
index_type iGetSizeVector() const 
 
static scalar_deriv_type df_du(scalar_func_type u)
 
void Copy(const Gradient< N_SIZE2 > &g, LocalDofMap *pDofMap)
 
static scalar_deriv_type df_du(scalar_func_type u)
 
index_type iGetEndIndexLocalVector() const 
 
static scalar_func_type f(scalar_func_type u)
 
VectorType oLocalToGlobal
 
#define GRADIENT_DEFINE_BINARY_FUNCTION(ExpressionName, FunctionName, FunctionClass)
 
index_type iGetEndIndexLocalVector() const 
 
static const bool bVectorize
 
index_type iGetStartIndexLocalVector() const 
 
static scalar_func_type f(scalar_func_type u)
 
static const MapVector Zero
 
static const index_type iMaxDerivatives
 
bool bHaveReferenceTo(const void *p) const 
 
static const index_type iMaxDerivatives
 
vector_type GetVectorValue(index_type i) const 
 
static scalar_deriv_type df_du(scalar_func_type u)
 
vector_type dGetLocalVectorVector(index_type i) const 
 
scalar_deriv_type dGetDerivativeLocal(index_type iLocalDof) const 
 
Expression::GradientType GradientType
 
void ReserveMem(index_type iStartNew, index_type iEndNew, MemFlags eFlags=RESIZE)
 
const vector_type * endVec() const 
 
GradientType::scalar_deriv_type scalar_deriv_type
 
scalar_func_type dGetValue() const 
 
MapVector(LocalDofMap *pMap, index_type iStartGlobal, index_type iEndGlobal, GlobalScope s, scalar_func_type dVal)
 
static const bool bVectorize
 
void ResizeReset(LocalDofMap *pMap, index_type iStartLocal, index_type iEndLocal, LocalScope, scalar_func_type dVal)
 
index_type iGetEndIndexLocalVector() const 
 
static const bool bVectorize
 
scalar_deriv_type dGetDerivativeLocal(index_type iLocalDof) const 
 
LocalDofMap(index_type iMaxSize=0)
 
RangeVector(index_type iStartNew, index_type iEndNew, const scalar_type &dVal)
 
static const bool bVectorize
 
static const bool bVectorize
 
index_type iGetEndIndexLocal() const 
 
static scalar_func_type f(scalar_func_type u)
 
BoolExpr(const LhsExpr &u, const RhsExpr &v)
 
void SetValue(index_type i, const scalar_type &d)
 
GradientType::scalar_func_type scalar_func_type
 
VectorType::const_iterator LocalIterator
 
Gradient(const GradientExpression< Expression > &f)
 
index_type iGetStartIndexLocal() const 
 
RangeVectorBase< T, N_SIZE >::vector_type vector_type
 
static bool bUseDynamicMem()
 
Gradient & operator/=(scalar_func_type d)
 
RangeVector(index_type iStart, index_type iEnd, const scalar_type &dVal)
 
static const bool bVectorize
 
static scalar_deriv_type df_dv(scalar_func_type u, scalar_func_type v)
 
index_type iGetEndIndexLocalVector() const 
 
index_type iGetEndIndexVector() const 
 
Gradient & operator*=(const Gradient &g)
 
scalar_deriv_type dGetDerivativeLocal(index_type iLocalDof) const 
 
static scalar_func_type f(scalar_func_type u)
 
static const bool bVectorize
 
static const bool bVectorize
 
GradientExpression< UnaryExpr< FuncFabs, Expr > > fabs(const GradientExpression< Expr > &u)
 
Expression::vector_deriv_type vector_deriv_type
 
index_type iGetMaxDerivativesVector() const 
 
T::GradientType GradientType
 
index_type iGetEndIndexLocal() const 
 
GradientType::scalar_deriv_type scalar_deriv_type
 
void ResizeReset(index_type iStartNew, index_type iEndNew, const T &dVal)
 
Gradient(const Gradient &g)
 
void deallocate(pointer p, size_type n)
 
static scalar_deriv_type df_du(scalar_func_type u)
 
static scalar_func_type f(scalar_func_type u)
 
#define GRADIENT_TRACE(expr)
 
static scalar_deriv_type df_dv(scalar_func_type u, scalar_func_type v)
 
static scalar_deriv_type df_du(scalar_func_type u, scalar_func_type v)
 
GradientType::vector_deriv_type vector_deriv_type
 
Gradient & operator+=(const Gradient &g)
 
static index_type iGetMaxSizeVector()
 
pointer allocate(size_type n, const void *p=0)
 
LocalDofMap * pGetDofMap() const 
 
static scalar_func_type f(scalar_func_type u, scalar_func_type v)
 
static index_type iRoundEndIndexVector(index_type iEnd)
 
index_type iGetSize() const 
 
Gradient(scalar_func_type a=0., LocalDofMap *pDofMap=0)
 
index_type iGetStartIndexLocal() const 
 
static const index_type iMaxDerivatives
 
index_type iGetStartIndexVector() const 
 
index_type iGetStartIndexLocalVector() const 
 
Gradient & operator*=(const GradientExpression< Expression > &f)
 
Expr::GradientType GradientType
 
static index_type iGetMaxSize()
 
static index_type iRoundStartIndexVector(index_type iStart)
 
void func(const T &u, const T &v, const T &w, doublereal e, T &f)
 
static scalar_deriv_type df_du(scalar_func_type u)
 
static scalar_deriv_type df_du(scalar_func_type u)
 
std::allocator< T >::reference reference
 
void SetDerivativeGlobal(index_type iGlobalDof, scalar_deriv_type dCoef)
 
GradientExpression< UnaryExpr< FuncCosh, Expr > > cosh(const GradientExpression< Expr > &u)
 
GlobalIterator BeginGlobal() const 
 
GradientExpression< UnaryExpr< FuncSinh, Expr > > sinh(const GradientExpression< Expr > &u)
 
LocalDofMap * pGetDofMap() const 
 
bool bHaveReferenceTo(const void *p) const 
 
MapVectorType::scalar_type scalar_deriv_type
 
VectorType::size_type size_type
 
void DerivativeResizeReset(LocalDofMap *pMap, index_type iGlobal, MapVectorBase::GlobalScope s, scalar_deriv_type dVal)
 
const MapVector< N_SIZE > & GetDerivativeLocal() const 
 
Gradient< iDimension > GradientType
 
index_type iGetEndIndexVector() const 
 
index_type iGetSizeVector() const 
 
enum FunctionCall GetLastCall() const 
 
static scalar_func_type f(scalar_func_type u, scalar_func_type v)
 
index_type iGetLocalSize() const 
 
LocalIterator EndLocal() const 
 
static const index_type iDimension
 
scalar_type GetValue(index_type i) const 
 
GradientType::scalar_func_type scalar_func_type
 
index_type iGetStartIndexLocal() const 
 
LocalDofMap * pGetDofMap() const 
 
RangeVectorType::scalar_type scalar_type
 
LocalDofMap * pGetDofMap() const 
 
MapVector(LocalDofMap *pMap=0, index_type iStartLocal=0, index_type iEndLocal=0, LocalScope=LOCAL, scalar_func_type dVal=0.)
 
static scalar_func_type f(scalar_func_type u)
 
static void ApplyDerivative(MapVectorType &ad, const GradientExpression< Expression > &f)
 
static const bool bVectorize
 
GradientType::scalar_deriv_type scalar_deriv_type
 
static scalar_func_type f(scalar_func_type u)
 
void SetLocalVector(index_type i, scalar_type dValue)
 
GradientExpression< UnaryExpr< FuncLog, Expr > > log(const GradientExpression< Expr > &u)
 
void CopyData(const RangeVector< T2, N_SIZE2 > &v)
 
ConstExpr(scalar_func_type a)
 
void ApplyBinaryFunction(const GradientExpression< Expression > &f)
 
static void ApplyExpression(GradientType &g, const GradientExpression< Expression > &f)
 
enum FunctionCall eLastCall
 
void Reset(scalar_func_type &d)
 
static const bool bVectorize
 
static scalar_func_type f(scalar_func_type u, scalar_func_type v)
 
static const char * dof[]
 
Gradient & operator=(const Gradient &g)
 
void ApplyNoAlias(const GradientExpression< Expression > &f)
 
GradientSizeHelper< LhsExpr::iDimension, RhsExpr::iDimension >::GradientType GradientType
 
GradientAllocator(const GradientAllocator< U > &a)
 
void ApplyDerivative(const GradientExpression< Expression > &f)
 
#define GRADIENT_DEFINE_UNARY_FUNCTION(FunctionName, FunctionClass)
 
doublereal copysign(doublereal x, doublereal y)
 
scalar_func_type dGetValue() const 
 
RangeVector & operator=(const RangeVector &v)
 
static void ApplyBinaryFunction1(MapVectorType &ad, const GradientExpression< Expression > &f, const index_type iStartLocal, const index_type iEndLocal, const typename GradientExpression< Expression >::scalar_deriv_type df_du, const typename GradientExpression< Expression >::scalar_deriv_type df_dv)
 
void SetValuePreserve(scalar_func_type dVal)
 
void Reserve(index_type iSize)
 
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)
 
static T * allocate_aligned(size_type alignment, size_t n, size_type extra_bytes=0u)
 
GradientSizeHelper< LhsExpr::iDimension, RhsExpr::iDimension >::GradientType GradientType
 
void ApplyBinaryFunctionNoAlias(const GradientExpression< Expression > &f, const BinFunc &)
 
LocalIterator BeginLocal() const 
 
LocalDofMap * pGetDofMap() const 
 
index_type iGetGlobalDof(index_type iLocal) const 
 
index_type iGetEndIndexLocal() const 
 
std::allocator< T >::pointer pointer
 
static scalar_deriv_type df_du(scalar_func_type u, scalar_func_type v)
 
static const bool bVectorize
 
void DerivativeResizeReset(LocalDofMap *pMap, index_type iStartLocal, index_type iEndLocal, MapVectorBase::LocalScope s, scalar_deriv_type dVal)
 
void ApplyWithAlias(const GradientExpression< Expression > &f)
 
std::allocator< T >::const_pointer const_pointer
 
void DerivativeResizeReset(LocalDofMap *pMap, index_type iLocal, MapVectorBase::LocalScope s, scalar_deriv_type dVal)
 
const scalar_type * begin() const 
 
const scalar_type * end() const 
 
static const index_type iDimension
 
static scalar_func_type f(scalar_func_type u)
 
void Copy(scalar_func_type &d1, const scalar_func_type &d2, LocalDofMap *)
 
void Reset(enum FunctionCall func=UNKNOWN_FUNC)
 
vector_deriv_type dGetDerivativeLocalVector(index_type iLocalVecDof) const 
 
RangeVectorBase< T, N_SIZE >::scalar_type scalar_type
 
scalar_func_type dGetValue() const 
 
Gradient(scalar_func_type a, const MapVectorType &da)
 
std::map< index_type, index_type, std::less< index_type >, GradientAllocator< std::pair< index_type, index_type > > > MapType
 
index_type iGetStartIndexLocalVector() const 
 
index_type iGetStartIndexLocal() const 
 
Gradient & operator*=(scalar_func_type d)
 
Gradient & operator+=(const GradientExpression< Expression > &f)
 
Gradient & operator/=(const Gradient &g)
 
void SetLocalVectorVector(index_type i, vector_type dVector)
 
GradientType::scalar_deriv_type scalar_deriv_type
 
static scalar_func_type f(scalar_func_type u)
 
void Initialize(index_type iStart, index_type iEnd, const scalar_type &dVal)
 
index_type iGetEndIndexLocalVector() const 
 
static const index_type iMaxDerivatives
 
static bool bUseDynamicMem()
 
static const index_type iDimension
 
const vector_type * beginVec() const 
 
static scalar_func_type f(scalar_func_type u, scalar_func_type v)
 
void CopyData(const RangeVector &v)
 
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
 
RangeVector(const RangeVector &v)
 
vector_deriv_type dGetDerivativeLocalVector(index_type iLocalVecDof) const 
 
Gradient & operator-=(const Gradient &g)
 
MapVector(const MapVector< N_SIZE2 > &v)
 
void Copy(const RangeVector< T2, N_SIZE2 > &v)
 
std::vector< index_type, GradientAllocator< index_type > > VectorType
 
vector_deriv_type dGetDerivativeLocalVector(index_type iLocalVecDof) const 
 
RangeVector(const RangeVector< T2, N_SIZE2 > &v)
 
void DerivativeResizeReset(LocalDofMap *pMap, index_type iStartGlobal, index_type iEndGlobal, MapVectorBase::GlobalScope s, scalar_deriv_type dVal)
 
static scalar_deriv_type df_dv(scalar_func_type u, scalar_func_type v)
 
vector_type rgArrayVec[iMaxSizeVector]
 
doublereal scalar_deriv_type
 
static bool f(scalar_func_type u, scalar_func_type v)
 
std::allocator< T >::value_type value_type
 
GradientAllocator(const GradientAllocator &a)
 
static index_type iGetMaxSize()
 
index_type iGetEndIndexLocalVector() const 
 
static bool f(scalar_func_type u, scalar_func_type v)
 
index_type iGetGlobalDof(index_type iLocalDof) const 
 
bool bIsEqual(const GradientExpression< Expression > &g) const 
 
static const index_type iMaxSize
 
static const bool bVectorize
 
static const bool bVectorize
 
Gradient(const Gradient< N_SIZE2 > &g)
 
static index_type iGetMaxDerivatives()
 
index_type iGetStartIndexVector() const 
 
index_type iGetMaxSize() const 
 
vector_deriv_type dGetDerivativeLocalVector(index_type iLocalVecDof) const 
 
static bool f(scalar_func_type u, scalar_func_type v)
 
scalar_deriv_type dGetDerivativeLocal(index_type iLocalDof) const 
 
GlobalIterator EndGlobal() const 
 
T EvalDeriv(T du_dX, T dv_dX) const 
 
void ResizeReset(LocalDofMap *pMap, index_type iStartGlobal, index_type iEndGlobal, GlobalScope, scalar_func_type dVal)
 
GradientExpression< DirectExpr< Gradient< N_SIZE >, true > > Alias(const Gradient< N_SIZE > &g)
 
index_type iGetEndIndexLocal() const 
 
MapType::const_iterator GlobalIterator
 
static const bool bVectorize
 
index_type iGetStartIndex() const 
 
static scalar_func_type f(scalar_func_type u, scalar_func_type v)
 
LocalDofMap * pGetDofMap() const 
 
static const bool bVectorize
 
GradientType::scalar_func_type scalar_func_type
 
static const bool bVectorize
 
static scalar_deriv_type df_du(scalar_func_type u, scalar_func_type v)
 
vector_type GetVectorValue(index_type i) const 
 
Gradient & operator=(const GradientExpression< Expression > &f)
 
static const Data sNullData
 
Expression::scalar_deriv_type scalar_deriv_type
 
Gradient & operator-=(scalar_func_type d)
 
GradientExpression(const Expr &u)
 
index_type AllocateLocalDof(index_type iGlobal)
 
RangeVector & operator=(const RangeVector< T2, N_SIZE2 > &v)
 
static index_type iGetMaxDerivatives()
 
index_type iGetStartIndexLocalVector() const 
 
Gradient & operator=(scalar_func_type d)
 
std::ostream & operator<<(std::ostream &os, const LocalDofMap &dof)
 
RangeVector & operator=(const RangeVector< T2, N_SIZE2 > &v)
 
GradientExpression< UnaryExpr< FuncAcos, Expr > > acos(const GradientExpression< Expr > &u)
 
static const bool bVectorize
 
bool bHaveReferenceTo(const void *p) const 
 
MapVector< N_SIZE > MapVectorType
 
index_type iGetLocalIndex(index_type iGlobal) const 
 
static const index_type INVALID_INDEX
 
void Reserve(index_type iSize)
 
RangeVectorBase< scalar_func_type >::vector_type vector_deriv_type
 
BinaryExpr(const LhsExpr &u, const RhsExpr &v)
 
static void ApplyBinaryFunction(GradientType &g, const GradientExpression< Expression > &f, const BinFunc &bfunc)
 
scalar_type dGetLocalVector(index_type i) const 
 
Gradient & operator-=(const GradientExpression< Expression > &f)
 
bool bUseDynamicMem() const 
 
index_type iGetCapacity() const 
 
GradientType::vector_deriv_type vector_deriv_type
 
index_type iGetSize() const 
 
static scalar_deriv_type df_du(scalar_func_type u)
 
void Copy(const RangeVector< T2, N_SIZE2 > &v)
 
T EvalDeriv(T du_dX) const 
 
Gradient(const Gradient< N_SIZE2 > &g, LocalDofMap *pDofMap)
 
static scalar_func_type f(scalar_func_type u, scalar_func_type v)
 
static scalar_deriv_type df_du(scalar_func_type u)
 
GradientExpression< UnaryExpr< FuncCos, Expr > > cos(const GradientExpression< Expr > &u)
 
static bool f(scalar_func_type u, scalar_func_type v)
 
static const index_type iMaxDerivatives
 
static scalar_deriv_type df_dv(scalar_func_type u, scalar_func_type v)
 
GradientExpression(const LhsExpr &u, const RhsExpr &v)
 
scalar_func_type dGetValue() const 
 
static const doublereal a
 
static scalar_deriv_type df_du(scalar_func_type u, scalar_func_type v)
 
index_type iGetGlobalDof(index_type iLocalDof) const 
 
static const int iVectorSize
 
index_type iGetStartIndexLocal() const 
 
index_type iGetStartIndexLocal() const 
 
static const bool bVectorize
 
scalar_type GetValue(index_type i) const 
 
GradientExpression< UnaryExpr< FuncAtan, Expr > > atan(const GradientExpression< Expr > &u)
 
index_type iGetStartIndexLocalVector() const 
 
RangeVectorType::vector_type vector_type
 
void ResizePreserve(LocalDofMap *pMap, index_type iStartLocal, index_type iEndLocal, LocalScope)
 
static const bool bVectorize
 
GradientExpression< BinaryExpr< FuncCopysign, LhsExpr, RhsExpr > > copysign(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
 
static bool f(scalar_func_type u, scalar_func_type v)
 
static const bool bVectorize
 
doublereal scalar_func_type
 
static scalar_func_type f(scalar_func_type u)
 
scalar_deriv_type dGetDerivativeLocal(index_type iLocalDof) const 
 
MapVectorType::vector_type vector_deriv_type
 
static const bool bVectorize
 
void Convert(scalar_func_type &d, const Gradient< N_SIZE > &g)
 
RangeVector(const RangeVector &v)
 
GradientExpression< BinaryExpr< FuncAtan2, LhsExpr, RhsExpr > > atan2(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
 
static const bool bVectorize
 
static const bool bVectorize
 
T * array_copy(const T *first, const T *const last, T *result)
 
RangeVector(const RangeVector< T2, N_SIZE2 > &v)
 
static bool f(scalar_func_type u, scalar_func_type v)
 
index_type iGetEndIndexLocal() const 
 
GradientExpression< UnaryExpr< FuncTan, Expr > > tan(const GradientExpression< Expr > &u)
 
GradientType::scalar_func_type scalar_func_type
 
#define GRADIENT_ASSERT(expr)
 
static scalar_deriv_type df_dv(scalar_func_type u, scalar_func_type v)
 
static const index_type iDimension
 
static const bool bVectorize
 
static scalar_deriv_type df_du(scalar_func_type u)
 
RangeVectorBase< T, 0 >::scalar_type scalar_type
 
static const bool bVectorize
 
void SetValue(index_type i, const scalar_type &d)
 
vector_deriv_type dGetDerivativeLocalVector(index_type iLocalDof) const 
 
static const bool bVectorize
 
index_type iGetMaxDerivatives() const 
 
vector_deriv_type dGetDerivativeLocalVector(index_type iLocalVecDof) const 
 
std::allocator< T >::difference_type difference_type
 
index_type iGetEndIndex() const 
 
void array_fill(T *first, T *const last, const T &val)
 
LocalDofMap * pGetDofMap() const 
 
static scalar_deriv_type df_dv(scalar_func_type u, scalar_func_type v)
 
static Data * pNullData()
 
void ResizePreserve(index_type iStartNew, index_type iEndNew)
 
void Copy(const RangeVector &v)
 
static scalar_deriv_type df_du(scalar_func_type u)
 
static scalar_func_type f(scalar_func_type u, scalar_func_type v)
 
scalar_func_type dGetValue() const