/*
 *
 * Copyright 2003-2008 ANSYS, Inc.
 * All Rights Reserved
 */

#define UDF_COMPILER 1

#define EOF (-1)
#define NULL (0)

#define const
#define register


typedef unsigned int size_t;



/* config.h */

#define RP_2D 1
#define RP_3D 0
#define RP_HOST 0
#define RP_NODE 0
#define RP_DOUBLE 1
#define RP_STORE_FACE_AVE 1
#define RP_STORE_CELL_AVE 1
#define RP_NETWORK 1

#define STRUCT_OFF(t,offset,type)((type*)((char *)(t)+offset))
#define STRUCT_REF(t,offset,type)(*STRUCT_OFF(t,offset,type))

#define DOMAIN_C(t)STRUCT_REF(t,0,Thread *)
#define DOMAIN_NOSOLVE_C(t)STRUCT_REF(t,4,Thread *)
#define DOMAIN_NOSOLVE_EXT_C(t)STRUCT_REF(t,8,Thread *)
#define DOMAIN_F(t)STRUCT_REF(t,12,Thread *)
#define DOMAIN_NOSOLVE_F(t)STRUCT_REF(t,16,Thread *)
#define DOMAIN_ID(t)STRUCT_REF(t,1896,int)
#define PHASE_DOMAIN_INDEX(t)STRUCT_REF(t,1900,int)
#define DOMAIN_N_DOMAINS(t)STRUCT_REF(t,1908,int)
#define DOMAIN_SUPER_DOMAIN(t)STRUCT_REF(t,2000,Domain *)
#define DOMAIN_SUB_DOMAIN(t,i)(STRUCT_OFF(t,1912,Domain *)[i])

#define THREAD_STORAGE(t,nv)(STRUCT_OFF(t,56,void *)[nv])
#define THREAD_T0(t)STRUCT_REF(t,51940,Thread *)
#define THREAD_T1(t)STRUCT_REF(t,51944,Thread *)
#define THREAD_NEXT(t)STRUCT_REF(t,51988,Thread *)
#define THREAD_SHADOW(t)STRUCT_REF(t,51992,Thread *)
#define THREAD_ID(t)STRUCT_REF(t,52124,int)
#define THREAD_NAME(t)STRUCT_REF(t,51672,char *)
#define THREAD_N_ELEMENTS(t)STRUCT_REF(t,51932,int)
#define THREAD_FLAGS(t)STRUCT_REF(t,52128,int)
#define THREAD_SUB_THREAD(t,i)(STRUCT_OFF(t,52024,Thread *)[i])
#define THREAD_SUB_THREADS(t)STRUCT_OFF(t,52024,Thread *)
#define THREAD_SUPER_THREAD(t)STRUCT_REF(t,52012,Thread *)
#define THREAD_DOMAIN(t)STRUCT_REF(t,52156,Domain *)
#define THREAD_HEAD(t)STRUCT_REF(t,0,Thread_Head *)
#define THREAD_MATERIAL(t)(STRUCT_REF(THREAD_HEAD(t),49944,Material *))

#define NODE_COORD(v)STRUCT_OFF(v,0,real)

#define P_INIT_DIAM(p)STRUCT_REF(p,432,real)
#define P_INIT_MASS(p)STRUCT_REF(p,448,real)
#define P_INIT_RHO(p)STRUCT_REF(p,440,real)
#define P_INIT_TEMP(p)STRUCT_REF(p,456,real)
#define P_INIT_LF(p)STRUCT_REF(p,472,real)
#define P_VFF(p)STRUCT_REF(p,5848,real)
#define P_DT(p)STRUCT_REF(p,48,real)
#define P_DIAM(p)STRUCT_REF(p,624,real)
#define P_T(p)STRUCT_REF(p,648,real)
#define P_VEL(p)STRUCT_OFF(p,600,real)
#define P_RHO(p)STRUCT_REF(p,632,real)
#define P_LF(p)STRUCT_REF(p,664,real)
#define P_MASS(p)STRUCT_REF(p,640,real)
#define P_TIME(p)STRUCT_REF(p,656,real)
#define P_DIAM0(p)STRUCT_REF(p,528,real)
#define P_VEL0(p)STRUCT_OFF(p,504,real)
#define P_T0(p)STRUCT_REF(p,552,real)
#define P_RHO0(p)STRUCT_REF(p,536,real)
#define P_LF0(p)STRUCT_REF(p,568,real)
#define P_MASS0(p)STRUCT_REF(p,544,real)
#define P_TIME0(p)STRUCT_REF(p,560,real)
#define P_CURRENT_LAW_INDEX(p)STRUCT_REF(p,284,int)
#define P_INJECTION(p)STRUCT_REF(p,368,Injection *)
#define P_EVAP_SPECIES_INDEX(p)STRUCT_REF(P_INJECTION(p),924,int)
#define P_DEVOL_SPECIES_INDEX(p)STRUCT_REF(P_INJECTION(p),928,int)
#define P_OXID_SPECIES_INDEX(p)STRUCT_REF(P_INJECTION(p),932,int)
#define P_PROD_SPECIES_INDEX(p)STRUCT_REF(P_INJECTION(p),936,int)
#define P_LAWS(p,in)STRUCT_OFF(P_INJECTION(p),100,int)[in]

#define MATERIAL_PROPERTY(m)STRUCT_OFF(m,64,Property)
#define PROPERTY_LENGTH 140
#define MATERIAL_PROPERTY_ELEMENT(m,i)((Property *)((char *)MATERIAL_PROPERTY(m)+PROPERTY_LENGTH*i))
#define MATERIAL_PROP(m,i)(STRUCT_REF(MATERIAL_PROPERTY_ELEMENT(m,i),4,float))

#define NW_CELL(n) STRUCT_REF(((char *)network+n*20),16,Network_cell *) 
#define NWC_T(n,c) STRUCT_REF(((char *)NW_CELL(n)+c*352),176,real) 
#define NWE_T(e) STRUCT_REF(((char *)nw_end + e*264),8,real)
