00001 /* -*- C++ -*- */ 00002 /* 00003 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00004 * 00005 * Fehmi Cirak 00006 * California Institute of Technology 00007 * (C) 2005 All Rights Reserved 00008 * 00009 * <LicenseText> 00010 * 00011 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00012 */ 00013 #ifndef MATERIALCIFACE_H 00014 #define MATERIALCIFACE_H 00015 00016 00017 /* The trick for calling C++ classes from C is described in C++ FAQ's */ 00018 #ifdef __cplusplus 00019 #define DECLARE_EXTERN extern "C" 00020 namespace shells { 00021 class MaterialBase; 00022 } 00023 using shells::MaterialBase; 00024 #else 00025 #define DECLARE_EXTERN extern 00026 struct MaterialBase; 00027 typedef struct MaterialBase MaterialBase; 00028 #endif 00029 00030 DECLARE_EXTERN MaterialBase * getFromMaterialCont(int matType); 00031 00032 DECLARE_EXTERN void updateStress(MaterialBase *mat, 00033 double * stress, 00034 double * gstrain, 00035 double dtime, 00036 double * history, 00037 double * gstrainPrv); 00038 00039 DECLARE_EXTERN double materialDensity(MaterialBase *mat); 00040 00041 DECLARE_EXTERN double materialYoungsModulus(MaterialBase *mat); 00042 00043 DECLARE_EXTERN int materialHistoryParameters(MaterialBase *mat); 00044 00045 DECLARE_EXTERN void materialInitializeInternal(MaterialBase *mat, 00046 double * internal); 00047 00048 #ifdef __cplusplus 00049 #endif 00050 #undef DECLARE_EXTERN 00051 00052 #endif 00053