--- trunk/OOPSE/libmdtools/fortranWrapDefines.hpp 2003/07/17 20:32:24 635 +++ trunk/OOPSE/libmdtools/fortranWrapDefines.hpp 2004/06/01 18:42:58 1214 @@ -1,34 +1,110 @@ #ifndef __FORTRAN_WRAP_DEFINES_H__ #define __FORTRAN_WRAP_DEFINES_H__ -// this defines some function lists, that are too long to keep track -// of everywhere +#define __C +#include "fSimulation.h" -#define makeAtypeList ( int* unique_ident, int* isLJ, int* isSticky, int* isDipole, int* isGB, int* isEAM,double* lj_epslon, double* lj_sigma, double* dipole_moment, int* status ) +// here we declare the function pointer typedefs for fortran functions -#define newEAMtype_List ( double* lattice_constant, int* eam_nrho,double* eam_drho,int* eam_nr, double* eam_dr, double* eam_rcut, double* eam_rvals, double* eam_rhovals, double* eam_Frhovals, int* eam_ident, int* status ) +extern "C" { + typedef void (*makeAtype_TD) ( int* unique_ident, + int* isLJ, + int* isSticky, + int* isDipole, + int* isGB, + int* isEAM, + int* isCharge, + double* lj_epslon, + double* lj_sigma, + double* charge, + double* dipole_moment, + int* status ); + typedef void (*newEAMtype_TD)( double* lattice_constant, + int* eam_nrho, + double* eam_drho, + int* eam_nr, + double* eam_dr, + double* eam_rcut, + double* eam_rvals, + double* eam_rhovals, + double* eam_Frhovals, + int* eam_ident, + int* status ); + + typedef void (*initFortranFF_TD)( int* LJ_mix_policy, + int* useReactionField, + int *isError ); + + typedef void (*doForceLoop_TD)( double* positionArray, + double* rcArray, + double* RotationMatrixArray, + double* unitVectorArray_l, + double* forceArray, + double *torqueArray, + double* StressTensor, + double* potentialEnergy, + short int* doPotentialCalc, + short int* doStressCalc, + int* isError ); + + typedef void (*set_sticky_params_TD)( double* sticky_w0, + double* sticky_v0, + double* sticky_v0p, + double* sticky_rl, + double* sticky_ru, + double* sticky_rlp, + double* sticky_rup ); -#define initFortranFFList ( int* LJ_mix_policy, int* useReactionField, int *isError ) + typedef void (*set_gb_pair_params_TD)( double* GB_sigma, + double* GB_l2b_ratio, + double* GB_eps, + double* GB_eps_ratio, + double* GB_mu, + double* GB_nu ); -#define doForceLoopList ( double* positionArray, double* RotationMatrixArray, double* unitVectorArray_l, double* forceArray, double *torqueArray, double* StressTensor, double* potentialEnergy, short int* doPotentialCalc, short int* doStressCalc, int* isError ) + typedef void (*setFortranSim_TD)( simtype* the_Info, + int* nGlobal, + int* nLocal, + int* identArray, + int* nLocalExcludes, + int* excludesLocalArray, + int* nGlobalExcludes, + int* excludesGlobalArray, + int* molMembershipArray, + double* mfact, + int* ngroup, + int* globalGroupMembership, + int* isError ); -#define set_sticky_params_List ( double* sticky_w0, double* sticky_v0, double* sticky_v0p, double* sticky_rl, double* sticky_ru, double* sticky_rlp, double* sticky_rup ) + typedef void (*setFortranBox_TD) ( double *Hmat, + double *HmatI, + int* orthoRhombic ); -#define set_gb_pair_params_List ( double* GB_sigma, double* GB_l2b_ratio, double* GB_eps, double* GB_eps_ratio, double* GB_mu, double* GB_nu ) + typedef void (*notifyFortranCutOff_TD) ( double *rCut, + double *rSw, + double *rList ); +} -#define setFortranSimList ( simtype* the_Info, int* nGlobal, int* nLocal, int* identArray, int* nLocalExcludes, int* excludesLocalArray, int* nGloabalsExcludes, int* excludesGlobalArray, int* molMembershipArray, int* isError ) -#define setFortranBoxList ( double *Hmat, double *HmatI, int* orthoRhombic ) -// BoxArray is a length 3 array +#ifdef IS_MPI -#define notifyFortranCutOffList ( double *rCut, double *rList, double *ecr, double *est ) +#include "mpiComponentPlan.h" -#ifdef IS_MPI -#define setFortranMPIlist (mpiSimData* the_mpiPlug, int *nLocal, int* globalIndexArray, int* isError ) +extern "C" { + + typedef void (*setFortranMPI_TD)( mpiSimData* the_mpiPlug, + int* nLocal, + int* globalAtomIndex, + int* nGroupsLocal, + int* globalGroupIndex, + int* isError ); + +} + #endif // is_mpi #endif // frotranWrapDefines.hpp