ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/UseTheForce/DarkSide/fMnMInteractions.h
Revision: 3439
Committed: Thu Jul 31 18:40:21 2008 UTC (17 years ago) by gezelter
Content type: text/plain
File size: 1383 byte(s)
Log Message:
fixed a strange compiler structure alignment problem with the
intel Mac compiler  (structs that cross between C and fortran
appear to need 8-byte boundary alignment on this compiler).

File Contents

# User Rev Content
1 chuckv 3165 #ifdef __C
2     #ifndef __FMNMINTERACTIONS
3     #define __FMNMINTERACTIONS
4    
5     #define MNM_NUM_MNM_TYPES 4
6     #define MNM_LENNARDJONES 1
7     #define MNM_REPULSIVEMORSE 2
8     #define MNM_SHIFTEDMORSE 3
9     #define MNM_MAW 4
10    
11 gezelter 3439 // dummy integer below is a workaround for
12     // a bug in the intel compiler, which can't
13     // seem to pack structs the same way on C and
14     // fortran.
15    
16 chuckv 3165 typedef struct{
17     int MNMInteractionType;
18 gezelter 3439 int dummy;
19 chuckv 3165 int metal_atid;
20     int nonmetal_atid;
21     RealType R0;
22     RealType D0;
23     RealType beta0;
24     RealType betaH;
25 gezelter 3385 RealType ca1;
26     RealType cb1;
27 chuckv 3165 RealType sigma;
28     RealType epsilon;
29     } MNMtype;
30    
31    
32     #endif
33     #endif /*__C*/
34    
35     #ifdef __FORTRAN90
36    
37     INTEGER, PARAMETER:: MNM_NUM_MNM_TYPES = 4
38     INTEGER, PARAMETER:: MNM_LENNARDJONES = 1
39     INTEGER, PARAMETER:: MNM_REPULSIVEMORSE = 2
40     INTEGER, PARAMETER:: MNM_SHIFTEDMORSE = 3
41     INTEGER, PARAMETER:: MNM_MAW = 4
42    
43 gezelter 3439 ! dummy integer below is a workaround for
44     ! a bug in the intel compiler, which can't
45     ! seem to pack structs the same way on C and
46     ! fortran.
47    
48 chuckv 3165 type :: MNMtype
49     SEQUENCE
50     integer :: MNMInteractionType
51 gezelter 3439 integer :: dummy
52 chuckv 3165 integer :: metal_atid;
53     integer :: nonmetal_atid;
54     real(kind=dp) :: R0
55     real(kind=dp) :: D0
56     real(kind=dp) :: beta0
57     real(kind=dp) :: betaH
58 gezelter 3385 real(kind=dp) :: ca1
59     real(kind=dp) :: cb1
60 chuckv 3165 real(kind=dp) :: sigma
61     real(kind=dp) :: epsilon
62     end type MNMtype
63    
64     #endif