ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/SimInfo.cpp
Revision: 368
Committed: Thu Mar 20 00:02:39 2003 UTC (21 years, 4 months ago) by chuckv
File size: 1456 byte(s)
Log Message:
Fixed bugs. Single version now runs w/o segfault. Still a conservation of energy bug.
do_Forces.F90: Fixed pot not being passed to do_pair.
neighborLists.F90: Fixed bugs in checkNeighborLists
atype_module.F90: Fixed bug with allocating atypes on each new_atype call.Now checks to see if atypes is null, then calles initialize(16).
vector_class.F90: Fixed some bugs with how MatchList was being allocated.

File Contents

# User Rev Content
1 mmeineke 270 #include <cstdlib>
2 chuckv 290 #include <cstring>
3 mmeineke 270
4 chuckv 290
5 mmeineke 270 #include "SimInfo.hpp"
6 mmeineke 285 #define __C
7     #include "fSimulation.h"
8 chuckv 290 #include "simError.h"
9    
10 mmeineke 294 #include <fortranWrappers.hpp>
11 mmeineke 270
12     SimInfo* currentInfo;
13    
14     SimInfo::SimInfo(){
15     excludes = NULL;
16     n_constraints = 0;
17     n_oriented = 0;
18     n_dipoles = 0;
19     the_integrator = NULL;
20     setTemp = 0;
21     thermalTime = 0.0;
22    
23 mmeineke 362 usePBC = 0;
24     useLJ = 0;
25     useSticky = 0;
26 mmeineke 365 useDipole = 0;
27 mmeineke 362 useReactionField = 0;
28     useGB = 0;
29     useEAM = 0;
30    
31    
32    
33 mmeineke 294 wrapMeSimInfo( this );
34 mmeineke 270 }
35    
36     void SimInfo::refreshSim(){
37    
38 chuckv 290 simtype fInfo;
39     int isError;
40 mmeineke 285
41 chuckv 290 fInfo.box[0] = box_x;
42     fInfo.box[1] = box_y;
43     fInfo.box[2] = box_z;
44    
45     fInfo.rlist = rList;
46     fInfo.rcut = rCut;
47 mmeineke 348 fInfo.SIM_uses_PBC = usePBC;
48 mmeineke 362 fInfo.SIM_uses_LJ = useLJ;
49     fInfo.SIM_uses_sticky = useSticky;
50 mmeineke 365 fInfo.SIM_uses_dipoles = useDipole;
51 mmeineke 362 fInfo.SIM_uses_RF = useReactionField;
52     fInfo.SIM_uses_GB = useGB;
53     fInfo.SIM_uses_EAM = useEAM;
54 chuckv 290
55 mmeineke 362
56 chuckv 290 isError = 0;
57    
58 chuckv 368 fInfo;
59     n_atoms;
60     identArray;
61     n_exclude;
62     excludes;
63     nGlobalExcludes;
64     globalExcludes;
65     isError;
66    
67     setFsimulation( &fInfo, &n_atoms, identArray, &n_exclude, excludes, &nGlobalExcludes, globalExcludes, &isError );
68    
69 chuckv 290 if( isError ){
70    
71     sprintf( painCave.errMsg,
72     "There was an error setting the simulation information in fortran.\n" );
73     painCave.isFatal = 1;
74     simError();
75     }
76    
77     #ifdef IS_MPI
78     sprintf( checkPointMsg,
79     "succesfully sent the simulation information to fortran.\n");
80     MPIcheckPoint();
81     #endif // is_mpi
82 mmeineke 270 }
83