Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

implicit.c File Reference

#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_meshdata_types.h"
#include "BLI_threads.h"
#include "BLI_math.h"
#include "BLI_linklist.h"
#include "BLI_utildefines.h"
#include "BKE_cloth.h"
#include "BKE_collision.h"
#include "BKE_effect.h"
#include "BKE_global.h"
#include <sys/time.h>

Go to the source code of this file.

Classes

struct  fmatrix3x3
struct  Implicit_Data
struct  HairGridVert

Defines

#define CLOTH_OPENMP_LIMIT   512
#define HAIR_GRID_INDEX(vec, min, max, axis)   (int)( (vec[axis] - min[axis]) / (max[axis] - min[axis]) * 9.99f );

Typedefs

typedef float lfVector [3]
typedef struct fmatrix3x3 fmatrix3x3
typedef struct Implicit_Data Implicit_Data
typedef struct HairGridVert HairGridVert

Functions

void itstart (void)
static void itend (void)
double itval (void)
DO_INLINE void mul_fvector_S (float to[3], float from[3], float scalar)
DO_INLINE void cross_fvector (float to[3], float vectorA[3], float vectorB[3])
DO_INLINE void mul_fvectorT_fvector (float to[3][3], float vectorA[3], float vectorB[3])
DO_INLINE void mul_fvectorT_fvectorS (float to[3][3], float vectorA[3], float vectorB[3], float aS)
static void print_fvector (float m3[3])
DO_INLINE void print_lfvector (float(*fLongVector)[3], unsigned int verts)
DO_INLINE lfVectorcreate_lfvector (unsigned int verts)
DO_INLINE void del_lfvector (float(*fLongVector)[3])
DO_INLINE void cp_lfvector (float(*to)[3], float(*from)[3], unsigned int verts)
DO_INLINE void init_lfvector (float(*fLongVector)[3], float vector[3], unsigned int verts)
DO_INLINE void zero_lfvector (float(*to)[3], unsigned int verts)
DO_INLINE void mul_lfvectorS (float(*to)[3], float(*fLongVector)[3], float scalar, unsigned int verts)
DO_INLINE void submul_lfvectorS (float(*to)[3], float(*fLongVector)[3], float scalar, unsigned int verts)
DO_INLINE float dot_lfvector (float(*fLongVectorA)[3], float(*fLongVectorB)[3], unsigned int verts)
DO_INLINE void add_lfvector_lfvector (float(*to)[3], float(*fLongVectorA)[3], float(*fLongVectorB)[3], unsigned int verts)
DO_INLINE void add_lfvector_lfvectorS (float(*to)[3], float(*fLongVectorA)[3], float(*fLongVectorB)[3], float bS, unsigned int verts)
DO_INLINE void add_lfvectorS_lfvectorS (float(*to)[3], float(*fLongVectorA)[3], float aS, float(*fLongVectorB)[3], float bS, unsigned int verts)
DO_INLINE void sub_lfvector_lfvectorS (float(*to)[3], float(*fLongVectorA)[3], float(*fLongVectorB)[3], float bS, unsigned int verts)
DO_INLINE void sub_lfvector_lfvector (float(*to)[3], float(*fLongVectorA)[3], float(*fLongVectorB)[3], unsigned int verts)
DO_INLINE void cp_fmatrix (float to[3][3], float from[3][3])
DO_INLINE void initdiag_fmatrixS (float to[3][3], float aS)
DO_INLINE float det_fmatrix (float m[3][3])
DO_INLINE void inverse_fmatrix (float to[3][3], float from[3][3])
DO_INLINE void mul_fmatrix_S (float matrix[3][3], float scalar)
DO_INLINE void mul_fvector_fmatrix (float *to, float *from, float matrix[3][3])
DO_INLINE void mul_fmatrix_fvector (float *to, float matrix[3][3], float *from)
DO_INLINE void mul_fmatrix_fmatrix (float to[3][3], float matrixA[3][3], float matrixB[3][3])
DO_INLINE void add_fmatrix_fmatrix (float to[3][3], float matrixA[3][3], float matrixB[3][3])
DO_INLINE void addadd_fmatrix_fmatrix (float to[3][3], float matrixA[3][3], float matrixB[3][3])
DO_INLINE void addsub_fmatrixS_fmatrixS (float to[3][3], float matrixA[3][3], float aS, float matrixB[3][3], float bS)
DO_INLINE void subadd_fmatrix_fmatrix (float to[3][3], float matrixA[3][3], float matrixB[3][3])
DO_INLINE void subadd_fmatrixS_fmatrixS (float to[3][3], float matrixA[3][3], float aS, float matrixB[3][3], float bS)
DO_INLINE void sub_fmatrix_fmatrix (float to[3][3], float matrixA[3][3], float matrixB[3][3])
DO_INLINE void addsub_fmatrix_fmatrix (float to[3][3], float matrixA[3][3], float matrixB[3][3])
DO_INLINE void muladd_fvector_fmatrix (float to[3], float from[3], float matrix[3][3])
DO_INLINE void muladd_fmatrix_fmatrix (float to[3][3], float matrixA[3][3], float matrixB[3][3])
DO_INLINE void mulsub_fvector_fmatrix (float to[3], float from[3], float matrix[3][3])
DO_INLINE void mulsub_fmatrix_fmatrix (float to[3][3], float matrixA[3][3], float matrixB[3][3])
DO_INLINE void muladd_fmatrix_fvector (float to[3], float matrix[3][3], float from[3])
DO_INLINE void mulsub_fmatrix_fvector (float to[3], float matrix[3][3], float from[3])
DO_INLINE fmatrix3x3create_bfmatrix (unsigned int verts, unsigned int springs)
DO_INLINE void del_bfmatrix (fmatrix3x3 *matrix)
DO_INLINE void cp_bfmatrix (fmatrix3x3 *to, fmatrix3x3 *from)
DO_INLINE void init_bfmatrix (fmatrix3x3 *matrix, float m3[3][3])
DO_INLINE void initdiag_bfmatrix (fmatrix3x3 *matrix, float m3[3][3])
DO_INLINE void mul_bfmatrix_S (fmatrix3x3 *matrix, float scalar)
DO_INLINE void mul_bfmatrix_lfvector (float(*to)[3], fmatrix3x3 *from, lfVector *fLongVector)
DO_INLINE void mul_prevfmatrix_lfvector (float(*to)[3], fmatrix3x3 *from, lfVector *fLongVector)
DO_INLINE void add_bfmatrix_bfmatrix (fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix)
DO_INLINE void addadd_bfmatrix_bfmatrix (fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix)
DO_INLINE void subadd_bfmatrix_bfmatrix (fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix)
DO_INLINE void sub_bfmatrix_bfmatrix (fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix)
DO_INLINE void sub_bfmatrix_Smatrix (fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix)
DO_INLINE void addsub_bfmatrix_bfmatrix (fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix)
DO_INLINE void subadd_bfmatrixS_bfmatrixS (fmatrix3x3 *to, fmatrix3x3 *from, float aS, fmatrix3x3 *matrix, float bS)
int implicit_init (Object *UNUSED(ob), ClothModifierData *clmd)
int implicit_free (ClothModifierData *clmd)
DO_INLINE float fb (float length, float L)
DO_INLINE float fbderiv (float length, float L)
DO_INLINE float fbstar (float length, float L, float kb, float cb)
DO_INLINE float fbstar_jacobi (float length, float L, float kb, float cb)
DO_INLINE void filter (lfVector *V, fmatrix3x3 *S)
static int cg_filtered (lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S)
DO_INLINE void BuildPPinv (fmatrix3x3 *lA, fmatrix3x3 *P, fmatrix3x3 *Pinv)
DO_INLINE void dfdx_spring_type1 (float to[3][3], float extent[3], float length, float L, float dot, float k)
DO_INLINE void dfdx_spring_type2 (float to[3][3], float dir[3], float length, float L, float k, float cb)
DO_INLINE void dfdv_damp (float to[3][3], float dir[3], float damping)
DO_INLINE void dfdx_spring (float to[3][3], float dir[3], float length, float L, float k)
DO_INLINE void dfdx_damp (float to[3][3], float dir[3], float length, const float vel[3], float rest, float damping)
DO_INLINE void cloth_calc_spring_force (ClothModifierData *clmd, ClothSpring *s, lfVector *UNUSED(lF), lfVector *X, lfVector *V, fmatrix3x3 *UNUSED(dFdV), fmatrix3x3 *UNUSED(dFdX), float time)
DO_INLINE void cloth_apply_spring_force (ClothModifierData *UNUSED(clmd), ClothSpring *s, lfVector *lF, lfVector *UNUSED(X), lfVector *UNUSED(V), fmatrix3x3 *dFdV, fmatrix3x3 *dFdX)
static void CalcFloat (float *v1, float *v2, float *v3, float *n)
static void CalcFloat4 (float *v1, float *v2, float *v3, float *v4, float *n)
static float calculateVertexWindForce (float wind[3], float vertexnormal[3])
static void hair_velocity_smoothing (ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *lV, unsigned int numverts)
static void cloth_calc_force (ClothModifierData *clmd, float UNUSED(frame), lfVector *lF, lfVector *lX, lfVector *lV, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, ListBase *effectors, float time, fmatrix3x3 *M)
static void simulate_implicit_euler (lfVector *Vnew, lfVector *UNUSED(lX), lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV, fmatrix3x3 *UNUSED(P), fmatrix3x3 *UNUSED(Pinv), fmatrix3x3 *M, fmatrix3x3 *UNUSED(bigI))
int cloth_calc_helper_forces (Object *UNUSED(ob), ClothModifierData *clmd, float(*initial_cos)[3], float UNUSED(step), float dt)
int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors)
void implicit_set_positions (ClothModifierData *clmd)

Variables

static struct timeval _itstart _itend
static struct timezone itz
static float I [3][3] = {{1,0,0},{0,1,0},{0,0,1}}
static float ZERO [3][3] = {{0,0,0}, {0,0,0}, {0,0,0}}

Detailed Description

Definition in file implicit.c.


Define Documentation

#define CLOTH_OPENMP_LIMIT   512

Definition at line 51 of file implicit.c.

#define HAIR_GRID_INDEX (   vec,
  min,
  max,
  axis 
)    (int)( (vec[axis] - min[axis]) / (max[axis] - min[axis]) * 9.99f );

Definition at line 1426 of file implicit.c.

Referenced by hair_velocity_smoothing().


Typedef Documentation

typedef struct fmatrix3x3 fmatrix3x3
typedef struct HairGridVert HairGridVert
typedef struct Implicit_Data Implicit_Data
typedef float lfVector[3]

Definition at line 112 of file implicit.c.


Function Documentation

DO_INLINE void add_bfmatrix_bfmatrix ( fmatrix3x3 to,
fmatrix3x3 from,
fmatrix3x3 matrix 
)

Definition at line 638 of file implicit.c.

References add_fmatrix_fmatrix(), fmatrix3x3::scount, and fmatrix3x3::vcount.

DO_INLINE void add_fmatrix_fmatrix ( float  to[3][3],
float  matrixA[3][3],
float  matrixB[3][3] 
)

Definition at line 415 of file implicit.c.

References VECADD.

Referenced by add_bfmatrix_bfmatrix(), cloth_apply_spring_force(), and dfdx_spring_type1().

DO_INLINE void add_lfvector_lfvector ( float(*)  to[3],
float(*)  fLongVectorA[3],
float(*)  fLongVectorB[3],
unsigned int  verts 
)

Definition at line 258 of file implicit.c.

References i, and VECADD.

Referenced by cg_filtered(), mul_bfmatrix_lfvector(), and simulate_implicit_euler().

DO_INLINE void add_lfvector_lfvectorS ( float(*)  to[3],
float(*)  fLongVectorA[3],
float(*)  fLongVectorB[3],
float  bS,
unsigned int  verts 
)

Definition at line 269 of file implicit.c.

References i, and VECADDS.

Referenced by cg_filtered(), and implicit_solver().

DO_INLINE void add_lfvectorS_lfvectorS ( float(*)  to[3],
float(*)  fLongVectorA[3],
float  aS,
float(*)  fLongVectorB[3],
float  bS,
unsigned int  verts 
)

Definition at line 280 of file implicit.c.

References i, and VECADDSS.

Referenced by simulate_implicit_euler().

DO_INLINE void addadd_bfmatrix_bfmatrix ( fmatrix3x3 to,
fmatrix3x3 from,
fmatrix3x3 matrix 
)

Definition at line 650 of file implicit.c.

References addadd_fmatrix_fmatrix(), fmatrix3x3::scount, and fmatrix3x3::vcount.

DO_INLINE void addadd_fmatrix_fmatrix ( float  to[3][3],
float  matrixA[3][3],
float  matrixB[3][3] 
)

Definition at line 422 of file implicit.c.

References VECADDADD.

Referenced by addadd_bfmatrix_bfmatrix().

DO_INLINE void addsub_bfmatrix_bfmatrix ( fmatrix3x3 to,
fmatrix3x3 from,
fmatrix3x3 matrix 
)

Definition at line 698 of file implicit.c.

References addsub_fmatrix_fmatrix(), fmatrix3x3::scount, and fmatrix3x3::vcount.

DO_INLINE void addsub_fmatrix_fmatrix ( float  to[3][3],
float  matrixA[3][3],
float  matrixB[3][3] 
)

Definition at line 457 of file implicit.c.

References VECADDSUB.

Referenced by addsub_bfmatrix_bfmatrix().

DO_INLINE void addsub_fmatrixS_fmatrixS ( float  to[3][3],
float  matrixA[3][3],
float  aS,
float  matrixB[3][3],
float  bS 
)

Definition at line 429 of file implicit.c.

References VECADDSUBSS.

DO_INLINE void BuildPPinv ( fmatrix3x3 lA,
fmatrix3x3 P,
fmatrix3x3 Pinv 
)

Definition at line 977 of file implicit.c.

References cp_fmatrix(), inverse_fmatrix(), and fmatrix3x3::vcount.

static void CalcFloat ( float *  v1,
float *  v2,
float *  v3,
float *  n 
) [static]

Definition at line 1384 of file implicit.c.

Referenced by cloth_calc_force().

static void CalcFloat4 ( float *  v1,
float *  v2,
float *  v3,
float *  v4,
float *  n 
) [static]

Definition at line 1399 of file implicit.c.

Referenced by cloth_calc_force().

static float calculateVertexWindForce ( float  wind[3],
float  vertexnormal[3] 
) [static]

Definition at line 1417 of file implicit.c.

References INPR.

Referenced by cloth_calc_force().

static int cg_filtered ( lfVector ldV,
fmatrix3x3 lA,
lfVector lB,
lfVector z,
fmatrix3x3 S 
) [static]
DO_INLINE void cloth_apply_spring_force ( ClothModifierData UNUSEDclmd,
ClothSpring s,
lfVector lF,
lfVector UNUSEDX,
lfVector UNUSEDV,
fmatrix3x3 dFdV,
fmatrix3x3 dFdX 
)
static void cloth_calc_force ( ClothModifierData clmd,
float   UNUSEDframe,
lfVector lF,
lfVector lX,
lfVector lV,
fmatrix3x3 dFdV,
fmatrix3x3 dFdX,
ListBase effectors,
float  time,
fmatrix3x3 M 
) [static]
int cloth_calc_helper_forces ( Object UNUSEDob,
ClothModifierData clmd,
float(*)  initial_cos[3],
float   UNUSEDstep,
float  dt 
)
DO_INLINE void cloth_calc_spring_force ( ClothModifierData clmd,
ClothSpring s,
lfVector UNUSEDlF,
lfVector X,
lfVector V,
fmatrix3x3 UNUSEDdFdV,
fmatrix3x3 UNUSEDdFdX,
float  time 
)
DO_INLINE void cp_bfmatrix ( fmatrix3x3 to,
fmatrix3x3 from 
)

Definition at line 546 of file implicit.c.

Referenced by simulate_implicit_euler().

DO_INLINE void cp_fmatrix ( float  to[3][3],
float  from[3][3] 
)
DO_INLINE void cp_lfvector ( float(*)  to[3],
float(*)  from[3],
unsigned int  verts 
)

Definition at line 203 of file implicit.c.

Referenced by cg_filtered(), implicit_solver(), and simulate_implicit_euler().

DO_INLINE fmatrix3x3* create_bfmatrix ( unsigned int  verts,
unsigned int  springs 
)

Definition at line 528 of file implicit.c.

References MEM_callocN(), fmatrix3x3::scount, and fmatrix3x3::vcount.

Referenced by implicit_init().

DO_INLINE lfVector* create_lfvector ( unsigned int  verts)
DO_INLINE void cross_fvector ( float  to[3],
float  vectorA[3],
float  vectorB[3] 
)

Definition at line 142 of file implicit.c.

DO_INLINE void del_bfmatrix ( fmatrix3x3 matrix)

Definition at line 537 of file implicit.c.

References MEM_freeN(), and NULL.

Referenced by implicit_free().

DO_INLINE void del_lfvector ( float(*)  fLongVector[3])
DO_INLINE float det_fmatrix ( float  m[3][3])

Definition at line 343 of file implicit.c.

Referenced by inverse_fmatrix().

DO_INLINE void dfdv_damp ( float  to[3][3],
float  dir[3],
float  damping 
)

Definition at line 1195 of file implicit.c.

References mul_fvectorT_fvectorS().

Referenced by cloth_calc_spring_force().

DO_INLINE void dfdx_damp ( float  to[3][3],
float  dir[3],
float  length,
const float  vel[3],
float  rest,
float  damping 
)

Definition at line 1215 of file implicit.c.

References INPR, MAX2, mul_fmatrix_S(), mul_fvectorT_fvector(), and sub_fmatrix_fmatrix().

DO_INLINE void dfdx_spring ( float  to[3][3],
float  dir[3],
float  length,
float  L,
float  k 
)

Definition at line 1202 of file implicit.c.

References mul_fmatrix_S(), mul_fvectorT_fvector(), and sub_fmatrix_fmatrix().

Referenced by cloth_calc_spring_force().

DO_INLINE void dfdx_spring_type1 ( float  to[3][3],
float  extent[3],
float  length,
float  L,
float  dot,
float  k 
)
DO_INLINE void dfdx_spring_type2 ( float  to[3][3],
float  dir[3],
float  length,
float  L,
float  k,
float  cb 
)

Definition at line 1189 of file implicit.c.

References fbstar_jacobi(), and mul_fvectorT_fvectorS().

Referenced by cloth_calc_spring_force().

DO_INLINE float dot_lfvector ( float(*)  fLongVectorA[3],
float(*)  fLongVectorB[3],
unsigned int  verts 
)

Definition at line 242 of file implicit.c.

References i, and INPR.

Referenced by cg_filtered().

DO_INLINE float fb ( float  length,
float  L 
)
DO_INLINE float fbderiv ( float  length,
float  L 
)

Definition at line 865 of file implicit.c.

References L, and pow().

Referenced by fbstar_jacobi().

DO_INLINE float fbstar ( float  length,
float  L,
float  kb,
float  cb 
)

Definition at line 872 of file implicit.c.

References fb(), and L.

Referenced by cloth_calc_spring_force(), and fbstar_jacobi().

DO_INLINE float fbstar_jacobi ( float  length,
float  L,
float  kb,
float  cb 
)

Definition at line 885 of file implicit.c.

References fb(), fbderiv(), fbstar(), and L.

Referenced by dfdx_spring_type2().

DO_INLINE void filter ( lfVector V,
fmatrix3x3 S 
)

Definition at line 900 of file implicit.c.

References mul_fvector_fmatrix(), and fmatrix3x3::vcount.

Referenced by achannel_setting_flush_widget_cb(), actkeys_framejump_exec(), actkeys_mselect_column(), actkeys_select_leftright(), actkeys_select_linked_exec(), ANIM_deselect_anim_channels(), ANIM_editkeyframes_refresh(), ANIM_sync_animchannels_to_data(), animchannels_delete_exec(), animchannels_enable_exec(), animchannels_rearrange_exec(), animchannels_visibility_set_exec(), animchannels_visibility_toggle_exec(), bake_graph_curves(), borderselect_action(), borderselect_anim_channels(), borderselect_graphkeys(), borderselect_nla_strips(), cg_filtered(), clean_action_keys(), clean_graph_keys(), columnselect_action_keys(), columnselect_graph_keys(), copy_action_keys(), copy_graph_keys(), createTransActionData(), createTransNlaData(), delete_action_keys(), delete_graph_keys(), deselect_action_keys(), deselect_graph_keys(), deselect_nla_strips(), draw_channel_names(), draw_channel_strips(), draw_nla_channel_list(), draw_nla_main_data(), duplicate_action_keys(), duplicate_graph_keys(), ED_nla_postop_refresh(), filelist_setfilter(), get_active_fcurve_channel(), get_graph_keyframe_extents(), get_keyframe_extents(), get_nearest_fcurve_verts_list(), get_nlastrip_extents(), graph_draw_channel_names(), graph_draw_curves(), graph_fmodifier_add_exec(), graph_fmodifier_paste_exec(), graph_refresh(), graphkeys_euler_filter_exec(), graphkeys_framejump_exec(), graphkeys_mselect_column(), graphkeys_select_leftright(), graphkeys_select_linked_exec(), graphkeys_smooth_exec(), graphop_editable_keyframes_poll(), graphop_selected_fcurve_poll(), graphop_visible_keyframes_poll(), IMB_filter_extend(), insert_action_keys(), insert_graph_keys(), markers_selectkeys_between(), mirror_action_keys(), mirror_graph_keys(), mouse_action_keys(), mouse_anim_channels(), mouse_graph_keys(), mouse_nla_channels(), mouse_nla_strips(), nla_fmodifier_add_exec(), nla_fmodifier_copy_exec(), nla_fmodifier_paste_exec(), nla_panel_context(), nlaedit_add_actionclip_exec(), nlaedit_add_meta_exec(), nlaedit_add_sound_exec(), nlaedit_add_tracks_exec(), nlaedit_add_transition_exec(), nlaedit_apply_scale_exec(), nlaedit_bake_exec(), nlaedit_clear_scale_exec(), nlaedit_delete_exec(), nlaedit_delete_tracks_exec(), nlaedit_disable_tweakmode_exec(), nlaedit_duplicate_exec(), nlaedit_enable_tweakmode_exec(), nlaedit_move_down_exec(), nlaedit_move_up_exec(), nlaedit_remove_meta_exec(), nlaedit_select_leftright(), nlaedit_snap_exec(), nlaedit_split_exec(), nlaedit_swap_exec(), nlaedit_sync_actlen_exec(), nlaedit_toggle_mute_exec(), ob_keyframes_loop(), ob_to_keylist(), paste_action_keys(), paste_graph_keys(), posttrans_action_clean(), rename_anim_channels(), RVBlurBitmap2_byte(), RVBlurBitmap2_float(), sample_action_keys(), sample_graph_keys(), scene_keyframes_loop(), scene_to_keylist(), select_moreless_action_keys(), select_moreless_graph_keys(), setexpo_action_keys(), setexpo_graph_keys(), setflag_anim_channels(), sethandles_action_keys(), sethandles_graph_keys(), setipo_action_keys(), setipo_graph_keys(), setkeytype_action_keys(), snap_action_keys(), snap_graph_keys(), special_aftertrans_update(), summary_keyframes_loop(), summary_to_keylist(), and KX_ConstraintActuator::Update().

static void hair_velocity_smoothing ( ClothModifierData clmd,
lfVector lF,
lfVector lX,
lfVector lV,
unsigned int  numverts 
) [static]
int implicit_free ( ClothModifierData clmd)
int implicit_init ( Object UNUSEDob,
ClothModifierData clmd 
)
void implicit_set_positions ( ClothModifierData clmd)
int implicit_solver ( Object ob,
float  frame,
ClothModifierData clmd,
ListBase effectors 
)
DO_INLINE void init_bfmatrix ( fmatrix3x3 matrix,
float  m3[3][3] 
)

Definition at line 554 of file implicit.c.

References cp_fmatrix(), i, fmatrix3x3::scount, and fmatrix3x3::vcount.

Referenced by cloth_calc_force().

DO_INLINE void init_lfvector ( float(*)  fLongVector[3],
float  vector[3],
unsigned int  verts 
)

Definition at line 208 of file implicit.c.

References i, and VECCOPY.

Referenced by cloth_calc_force().

DO_INLINE void initdiag_bfmatrix ( fmatrix3x3 matrix,
float  m3[3][3] 
)

Definition at line 566 of file implicit.c.

References cp_fmatrix(), i, fmatrix3x3::scount, and fmatrix3x3::vcount.

Referenced by cloth_calc_force(), and implicit_init().

DO_INLINE void initdiag_fmatrixS ( float  to[3][3],
float  aS 
)

Definition at line 333 of file implicit.c.

References cp_fmatrix().

Referenced by implicit_init().

DO_INLINE void inverse_fmatrix ( float  to[3][3],
float  from[3][3] 
)

Definition at line 349 of file implicit.c.

References simple_enum_gen::d, det_fmatrix(), and i.

Referenced by BuildPPinv().

static void itend ( void  ) [static]

Definition at line 88 of file implicit.c.

References _itend, and itz.

Referenced by simulate_implicit_euler().

void itstart ( void  )

Definition at line 84 of file implicit.c.

References itz.

Referenced by simulate_implicit_euler().

double itval ( void  )

Definition at line 92 of file implicit.c.

References _itend.

DO_INLINE void mul_bfmatrix_lfvector ( float(*)  to[3],
fmatrix3x3 from,
lfVector fLongVector 
)
DO_INLINE void mul_bfmatrix_S ( fmatrix3x3 matrix,
float  scalar 
)

Definition at line 582 of file implicit.c.

References mul_fmatrix_S(), fmatrix3x3::scount, and fmatrix3x3::vcount.

DO_INLINE void mul_fmatrix_fmatrix ( float  to[3][3],
float  matrixA[3][3],
float  matrixB[3][3] 
)

Definition at line 408 of file implicit.c.

References mul_fvector_fmatrix().

DO_INLINE void mul_fmatrix_fvector ( float *  to,
float  matrix[3][3],
float *  from 
)

Definition at line 400 of file implicit.c.

References INPR.

Referenced by cloth_calc_force(), and mul_prevfmatrix_lfvector().

DO_INLINE void mul_fmatrix_S ( float  matrix[3][3],
float  scalar 
)

Definition at line 382 of file implicit.c.

References mul_fvector_S().

Referenced by dfdx_damp(), dfdx_spring(), dfdx_spring_type1(), and mul_bfmatrix_S().

DO_INLINE void mul_fvector_fmatrix ( float *  to,
float *  from,
float  matrix[3][3] 
)

Definition at line 391 of file implicit.c.

Referenced by filter(), and mul_fmatrix_fmatrix().

DO_INLINE void mul_fvector_S ( float  to[3],
float  from[3],
float  scalar 
)
DO_INLINE void mul_fvectorT_fvector ( float  to[3][3],
float  vectorA[3],
float  vectorB[3] 
)

Definition at line 150 of file implicit.c.

References mul_fvector_S().

Referenced by dfdx_damp(), dfdx_spring(), and mul_fvectorT_fvectorS().

DO_INLINE void mul_fvectorT_fvectorS ( float  to[3][3],
float  vectorA[3],
float  vectorB[3],
float  aS 
)

Definition at line 158 of file implicit.c.

References mul_fvector_S(), and mul_fvectorT_fvector().

Referenced by dfdv_damp(), dfdx_spring_type1(), and dfdx_spring_type2().

DO_INLINE void mul_lfvectorS ( float(*)  to[3],
float(*)  fLongVector[3],
float  scalar,
unsigned int  verts 
)

Definition at line 222 of file implicit.c.

References i, and mul_fvector_S().

DO_INLINE void mul_prevfmatrix_lfvector ( float(*)  to[3],
fmatrix3x3 from,
lfVector fLongVector 
)

Definition at line 627 of file implicit.c.

References mul_fmatrix_fvector(), and fmatrix3x3::vcount.

DO_INLINE void muladd_fmatrix_fmatrix ( float  to[3][3],
float  matrixA[3][3],
float  matrixB[3][3] 
)

Definition at line 474 of file implicit.c.

References muladd_fvector_fmatrix().

DO_INLINE void muladd_fmatrix_fvector ( float  to[3],
float  matrix[3][3],
float  from[3] 
)

Definition at line 496 of file implicit.c.

References INPR.

Referenced by mul_bfmatrix_lfvector().

DO_INLINE void muladd_fvector_fmatrix ( float  to[3],
float  from[3],
float  matrix[3][3] 
)

Definition at line 467 of file implicit.c.

Referenced by muladd_fmatrix_fmatrix().

DO_INLINE void mulsub_fmatrix_fmatrix ( float  to[3][3],
float  matrixA[3][3],
float  matrixB[3][3] 
)

Definition at line 488 of file implicit.c.

References mulsub_fvector_fmatrix().

DO_INLINE void mulsub_fmatrix_fvector ( float  to[3],
float  matrix[3][3],
float  from[3] 
)

Definition at line 503 of file implicit.c.

References INPR.

DO_INLINE void mulsub_fvector_fmatrix ( float  to[3],
float  from[3],
float  matrix[3][3] 
)

Definition at line 481 of file implicit.c.

Referenced by mulsub_fmatrix_fmatrix().

static void print_fvector ( float  m3[3]) [static]

Definition at line 169 of file implicit.c.

Referenced by print_lfvector().

DO_INLINE void print_lfvector ( float(*)  fLongVector[3],
unsigned int  verts 
)

Definition at line 178 of file implicit.c.

References i, and print_fvector().

static void simulate_implicit_euler ( lfVector Vnew,
lfVector UNUSEDlX,
lfVector lV,
lfVector lF,
fmatrix3x3 dFdV,
fmatrix3x3 dFdX,
float  dt,
fmatrix3x3 A,
lfVector B,
lfVector dV,
fmatrix3x3 S,
lfVector z,
lfVector olddV,
fmatrix3x3 UNUSEDP,
fmatrix3x3 UNUSEDPinv,
fmatrix3x3 M,
fmatrix3x3 UNUSEDbigI 
) [static]
DO_INLINE void sub_bfmatrix_bfmatrix ( fmatrix3x3 to,
fmatrix3x3 from,
fmatrix3x3 matrix 
)

Definition at line 674 of file implicit.c.

References fmatrix3x3::scount, sub_fmatrix_fmatrix(), and fmatrix3x3::vcount.

DO_INLINE void sub_bfmatrix_Smatrix ( fmatrix3x3 to,
fmatrix3x3 from,
fmatrix3x3 matrix 
)

Definition at line 686 of file implicit.c.

References sub_fmatrix_fmatrix(), and fmatrix3x3::vcount.

DO_INLINE void sub_fmatrix_fmatrix ( float  to[3][3],
float  matrixA[3][3],
float  matrixB[3][3] 
)
DO_INLINE void sub_lfvector_lfvector ( float(*)  to[3],
float(*)  fLongVectorA[3],
float(*)  fLongVectorB[3],
unsigned int  verts 
)

Definition at line 300 of file implicit.c.

References i, and VECSUB.

Referenced by cg_filtered().

DO_INLINE void sub_lfvector_lfvectorS ( float(*)  to[3],
float(*)  fLongVectorA[3],
float(*)  fLongVectorB[3],
float  bS,
unsigned int  verts 
)

Definition at line 290 of file implicit.c.

References i, and VECSUBS.

Referenced by cg_filtered().

DO_INLINE void subadd_bfmatrix_bfmatrix ( fmatrix3x3 to,
fmatrix3x3 from,
fmatrix3x3 matrix 
)

Definition at line 662 of file implicit.c.

References fmatrix3x3::scount, subadd_fmatrix_fmatrix(), and fmatrix3x3::vcount.

DO_INLINE void subadd_bfmatrixS_bfmatrixS ( fmatrix3x3 to,
fmatrix3x3 from,
float  aS,
fmatrix3x3 matrix,
float  bS 
)

Definition at line 712 of file implicit.c.

References fmatrix3x3::scount, subadd_fmatrixS_fmatrixS(), and fmatrix3x3::vcount.

Referenced by simulate_implicit_euler().

DO_INLINE void subadd_fmatrix_fmatrix ( float  to[3][3],
float  matrixA[3][3],
float  matrixB[3][3] 
)

Definition at line 436 of file implicit.c.

References VECSUBADD.

Referenced by subadd_bfmatrix_bfmatrix().

DO_INLINE void subadd_fmatrixS_fmatrixS ( float  to[3][3],
float  matrixA[3][3],
float  aS,
float  matrixB[3][3],
float  bS 
)

Definition at line 443 of file implicit.c.

References VECSUBADDSS.

Referenced by subadd_bfmatrixS_bfmatrixS().

DO_INLINE void submul_lfvectorS ( float(*)  to[3],
float(*)  fLongVector[3],
float  scalar,
unsigned int  verts 
)

Definition at line 233 of file implicit.c.

References i, and VECSUBMUL.

Referenced by cloth_calc_force().

DO_INLINE void zero_lfvector ( float(*)  to[3],
unsigned int  verts 
)

Definition at line 217 of file implicit.c.

Referenced by implicit_init(), mul_bfmatrix_lfvector(), and simulate_implicit_euler().


Variable Documentation

struct timeval _itstart _itend [static]

Definition at line 82 of file implicit.c.

Referenced by itend(), and itval().

float I[3][3] = {{1,0,0},{0,1,0},{0,0,1}} [static]

Definition at line 101 of file implicit.c.

struct timezone itz [static]

Definition at line 83 of file implicit.c.

Referenced by itend(), and itstart().

float ZERO[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}} [static]

Definition at line 102 of file implicit.c.