MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr > Class Template Reference

#include <gradient.h>

Collaboration diagram for grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >:

Public Types

typedef GradientSizeHelper
< LhsExpr::iDimension,
RhsExpr::iDimension >
::GradientType 
GradientType
 
typedef
GradientType::scalar_func_type 
scalar_func_type
 
typedef
GradientType::scalar_deriv_type 
scalar_deriv_type
 
typedef
GradientType::vector_deriv_type 
vector_deriv_type
 

Public Member Functions

 BoolExpr (const LhsExpr &u, const RhsExpr &v)
 
bool dGetValue () const
 
 operator bool () const
 
scalar_deriv_type dGetDerivativeLocal (index_type iLocalDof) const
 
vector_deriv_type dGetDerivativeLocalVector (index_type iLocalDof) const
 
index_type iGetStartIndexLocal () const
 
index_type iGetEndIndexLocal () const
 
index_type iGetStartIndexLocalVector () const
 
index_type iGetEndIndexLocalVector () const
 
LocalDofMappGetDofMap () const
 
void Compute () const
 

Static Public Member Functions

static index_type iGetMaxDerivatives ()
 

Static Public Attributes

static const bool bAlias = LhsExpr::bAlias || RhsExpr::bAlias
 
static const index_type iMaxDerivatives = MaxDerivatives<LhsExpr, RhsExpr>::iMaxDerivatives
 
static const bool bVectorize = true
 
static const index_type iDimension = GradientType::iDimension
 

Private Member Functions

bool bHaveReferenceTo (const void *p) const
 

Private Attributes

const LhsExpr oU
 
const RhsExpr oV
 

Detailed Description

template<typename BoolFunc, typename LhsExpr, typename RhsExpr>
class grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >

Definition at line 1666 of file gradient.h.

Member Typedef Documentation

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
typedef GradientSizeHelper<LhsExpr::iDimension, RhsExpr::iDimension>::GradientType grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::GradientType

Definition at line 1671 of file gradient.h.

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
typedef GradientType::scalar_deriv_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::scalar_deriv_type

Definition at line 1674 of file gradient.h.

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
typedef GradientType::scalar_func_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::scalar_func_type

Definition at line 1673 of file gradient.h.

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
typedef GradientType::vector_deriv_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::vector_deriv_type

Definition at line 1675 of file gradient.h.

Constructor & Destructor Documentation

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::BoolExpr ( const LhsExpr &  u,
const RhsExpr &  v 
)
inline

Definition at line 1677 of file gradient.h.

1678  :oU(u), oV(v) {
1679  }
const RhsExpr oV
Definition: gradient.h:1745
const LhsExpr oU
Definition: gradient.h:1744

Member Function Documentation

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
bool grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::bHaveReferenceTo ( const void *  p) const
inlineprivate

Definition at line 1739 of file gradient.h.

References grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::oU, and grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::oV.

1739  {
1740  return oU.bHaveReferenceTo(p) || oV.bHaveReferenceTo(p);
1741  }
const RhsExpr oV
Definition: gradient.h:1745
const LhsExpr oU
Definition: gradient.h:1744
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
void grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::Compute ( ) const
inline

Definition at line 1735 of file gradient.h.

1735  {
1736  }
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
scalar_deriv_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::dGetDerivativeLocal ( index_type  iLocalDof) const
inline

Definition at line 1695 of file gradient.h.

1695  {
1696  return scalar_deriv_type();
1697  }
GradientType::scalar_deriv_type scalar_deriv_type
Definition: gradient.h:1674
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
vector_deriv_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::dGetDerivativeLocalVector ( index_type  iLocalDof) const
inline

Definition at line 1699 of file gradient.h.

1699  {
1700  return vector_deriv_type();
1701  }
GradientType::vector_deriv_type vector_deriv_type
Definition: gradient.h:1675
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
bool grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::dGetValue ( ) const
inline

Definition at line 1681 of file gradient.h.

References grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::oU, and grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::oV.

Referenced by grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::operator bool().

1681  {
1682  oU.Compute();
1683  oV.Compute();
1684 
1685  const scalar_func_type u = oU.dGetValue();
1686  const scalar_func_type v = oV.dGetValue();
1687 
1688  return BoolFunc::f(u, v);
1689  }
const RhsExpr oV
Definition: gradient.h:1745
const LhsExpr oU
Definition: gradient.h:1744
GradientType::scalar_func_type scalar_func_type
Definition: gradient.h:1673
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
index_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::iGetEndIndexLocal ( ) const
inline

Definition at line 1707 of file gradient.h.

1707  {
1708  return 0;
1709  }
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
index_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::iGetEndIndexLocalVector ( ) const
inline

Definition at line 1715 of file gradient.h.

1715  {
1716  return 0;
1717  }
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
static index_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::iGetMaxDerivatives ( )
inlinestatic

Definition at line 1731 of file gradient.h.

References grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::iMaxDerivatives.

1731  {
1732  return iMaxDerivatives;
1733  }
static const index_type iMaxDerivatives
Definition: gradient.h:1669
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
index_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::iGetStartIndexLocal ( ) const
inline

Definition at line 1703 of file gradient.h.

1703  {
1704  return std::numeric_limits<index_type>::max();
1705  }
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
index_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::iGetStartIndexLocalVector ( ) const
inline

Definition at line 1711 of file gradient.h.

1711  {
1712  return std::numeric_limits<index_type>::max();
1713  }
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::operator bool ( ) const
inline

Definition at line 1691 of file gradient.h.

References grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::dGetValue().

1691  {
1692  return dGetValue();
1693  }
bool dGetValue() const
Definition: gradient.h:1681

Here is the call graph for this function:

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
LocalDofMap* grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::pGetDofMap ( ) const
inline

Definition at line 1719 of file gradient.h.

References GRADIENT_ASSERT, grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::oU, and grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::oV.

1719  {
1720  LocalDofMap* pDofMap = oU.pGetDofMap();
1721 
1722  if (pDofMap == 0) {
1723  pDofMap = oV.pGetDofMap();
1724  } else {
1725  GRADIENT_ASSERT(oV.pGetDofMap() == 0 || pDofMap == oV.pGetDofMap());
1726  }
1727 
1728  return pDofMap;
1729  }
const RhsExpr oV
Definition: gradient.h:1745
const LhsExpr oU
Definition: gradient.h:1744
#define GRADIENT_ASSERT(expr)
Definition: gradient.h:74

Member Data Documentation

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
const bool grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::bAlias = LhsExpr::bAlias || RhsExpr::bAlias
static

Definition at line 1668 of file gradient.h.

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
const bool grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::bVectorize = true
static

Definition at line 1670 of file gradient.h.

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
const index_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::iDimension = GradientType::iDimension
static

Definition at line 1672 of file gradient.h.

template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
const index_type grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::iMaxDerivatives = MaxDerivatives<LhsExpr, RhsExpr>::iMaxDerivatives
static
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
const LhsExpr grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::oU
private
template<typename BoolFunc , typename LhsExpr , typename RhsExpr >
const RhsExpr grad::BoolExpr< BoolFunc, LhsExpr, RhsExpr >::oV
private

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