src/pull/constraints.c File Reference

#include "pull.h"
#include "privatePull.h"

Include dependency graph for constraints.c:


Defines

#define NORMALIZE(dir, grad, len)
#define PROBE(v, av, g)
#define SAVE(state, aval, val, grad, pos)
#define RESTORE(aval, val, grad, pos, state)
#define PROBE(l)
#define PROBEG(l, g)
#define MODEWARP(m, p)
#define MODENAVG(pnt, m)
#define PROBE(height, grad, hess, proj)
#define SAVE(state, height, grad, hess, proj, pos)
#define RESTORE(height, grad, hess, proj, pos, state)
#define NORM(d1, d2, pdir, plen, pgrad, grad, hess, proj)

Functions

static int constraintSatIso (pullTask *task, pullPoint *point, double stepMax, unsigned int iterMax, int *constrFailP)
static int constraintSatLapl (pullTask *task, pullPoint *point, double stepMax, unsigned int iterMax, int *constrFailP)
static int probeHeight (pullTask *task, pullPoint *point, double *heightP, double grad[3], double hess[9])
static void creaseProj (pullTask *task, pullPoint *point, int tang2Use, int modeUse, double proj[9])
static int constraintSatHght (pullTask *task, pullPoint *point, int tang2Use, int modeUse, double stepMax, unsigned int iterMax, int *constrFailP)
int _pullConstraintSatisfy (pullTask *task, pullPoint *point, int *constrFailP)
void _pullConstraintTangent (pullTask *task, pullPoint *point, double proj[9])

Define Documentation

#define MODENAVG ( pnt,
 ) 

Value:

( ((pnt)->neighInterNum*(pnt)->neighMode + (m))/       \
    (1 + (pnt)->neighInterNum) )

#define MODEWARP ( m,
 ) 

Value:

(m > 0                                        \
   ? 1 - airIntPow(1-m, p)                      \
   : airIntPow(m+1, p) - 1)

#define NORM ( d1,
d2,
pdir,
plen,
pgrad,
grad,
hess,
proj   ) 

Value:

ELL_3MV_MUL(pgrad, proj, grad);                                     \
  ELL_3V_NORM(pdir, pgrad, plen);                                     \
  if (!(plen)) {                                                      \
    sprintf(err, "%s: got 0 pgrad at (%g,%g,%g,%g) on iter %u\n", me, \
            point->pos[0], point->pos[1], point->pos[2],              \
            point->pos[3], iter);                                     \
    biffAdd(PULL, err); return 1;                                     \
  }                                                                   \
  d1 = ELL_3V_DOT(grad, pdir);                                        \
  d2 = ELL_3MV_CONTR(hess, pdir)

#define NORMALIZE ( dir,
grad,
len   ) 

Value:

ELL_3V_NORM((dir), (grad), (len));                                     \
  if (!(len)) {                                                          \
    sprintf(err, "%s: got zero grad at (%g,%g,%g,%g) on iter %u\n", me,  \
            point->pos[0], point->pos[1], point->pos[2],                 \
            point->pos[3], iter);                                        \
    biffAdd(PULL, err); return 1;                                        \
  }

#define PROBE ( height,
grad,
hess,
proj   ) 

Value:

if (probeHeight(task, point,                          \
                  &(height), (grad), (hess))) {         \
    sprintf(err, "%s: trouble on iter %u", me, iter);   \
    biffAdd(PULL, err); return 1;                       \
  }                                                     \
  creaseProj(task, point, tang2Use, modeUse, proj)

#define PROBE (  ) 

Value:

if (_pullProbe(task, point)) {                   \
      sprintf(err, "%s: on iter %u", me, iter);                    \
      biffAdd(PULL, err); return 1;                                \
    }                                                              \
    (l) = _pullPointScalar(task->pctx, point,                      \
                           pullInfoHeightLaplacian, NULL, NULL);

#define PROBE ( v,
av,
 ) 

Value:

if (_pullProbe(task, point)) {        \
      sprintf(err, "%s: on iter %u", me, iter);                \
      biffAdd(PULL, err); return 1;                            \
    }                                                          \
    (v) = _pullPointScalar(task->pctx, point,                  \
                           pullInfoIsovalue, (g), NULL);       \
    (av) = AIR_ABS(v)

#define PROBEG ( l,
 ) 

Value:

PROBE(l);                                                      \
    _pullPointScalar(task->pctx, point, pullInfoHeight, (g), NULL);

#define RESTORE ( height,
grad,
hess,
proj,
pos,
state   ) 

Value:

height = state[0];                                    \
  ELL_3V_COPY(grad, state + 1);                         \
  ELL_3M_COPY(hess, state + 1 + 3);                     \
  ELL_3M_COPY(proj, state + 1 + 3 + 9);                 \
  ELL_3V_COPY(pos, state + 1 + 3 + 9 + 9)

#define RESTORE ( aval,
val,
grad,
pos,
state   ) 

Value:

aval = state[0];                             \
  val = state[1];                              \
  ELL_3V_COPY(grad, state + 1 + 1);            \
  ELL_3V_COPY(pos, state + 1 + 1 + 3)

#define SAVE ( state,
height,
grad,
hess,
proj,
pos   ) 

Value:

state[0] = height;                               \
  ELL_3V_COPY(state + 1, grad);                    \
  ELL_3M_COPY(state + 1 + 3, hess);                \
  ELL_3M_COPY(state + 1 + 3 + 9, proj);            \
  ELL_3V_COPY(state + 1 + 3 + 9 + 9, pos)

#define SAVE ( state,
aval,
val,
grad,
pos   ) 

Value:

state[0] = aval;                             \
  state[1] = val;                              \
  ELL_3V_COPY(state + 1 + 1, grad);            \
  ELL_3V_COPY(state + 1 + 1 + 3, pos)


Function Documentation

int _pullConstraintSatisfy ( pullTask task,
pullPoint point,
int *  constrFailP 
)

void _pullConstraintTangent ( pullTask task,
pullPoint point,
double  proj[9] 
)

static int constraintSatHght ( pullTask task,
pullPoint point,
int  tang2Use,
int  modeUse,
double  stepMax,
unsigned int  iterMax,
int *  constrFailP 
) [static]

static int constraintSatIso ( pullTask task,
pullPoint point,
double  stepMax,
unsigned int  iterMax,
int *  constrFailP 
) [static]

static int constraintSatLapl ( pullTask task,
pullPoint point,
double  stepMax,
unsigned int  iterMax,
int *  constrFailP 
) [static]

static void creaseProj ( pullTask task,
pullPoint point,
int  tang2Use,
int  modeUse,
double  proj[9] 
) [static]

static int probeHeight ( pullTask task,
pullPoint point,
double *  heightP,
double  grad[3],
double  hess[9] 
) [static]


Generated on Sat May 9 03:55:40 2009 for Teem by  doxygen 1.5.9