ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/sequentialProps/SequentialProps.cpp
(Generate patch)

Comparing trunk/src/applications/sequentialProps/SequentialProps.cpp (file contents):
Revision 2024 by gezelter, Thu Oct 16 19:13:51 2014 UTC vs.
Revision 2081 by gezelter, Tue Mar 17 18:22:18 2015 UTC

# Line 51 | Line 51
51  
52   #include "applications/sequentialProps/SequentialPropsCmd.h"
53   #include "applications/sequentialProps/SequentialAnalyzer.hpp"
54 < #include "applications/sequentialProps/DensityAnalyzer.hpp"
54 > #include "applications/sequentialProps/CenterOfMass.hpp"
55 > #include "applications/sequentialProps/ContactAngle1.hpp"
56 > #include "applications/sequentialProps/ContactAngle2.hpp"
57  
58   using namespace OpenMD;
59  
# Line 104 | Line 106 | int main(int argc, char* argv[]){
106    SimCreator creator;
107    SimInfo* info = creator.createSim(dumpFileName, false);
108  
109 <  SequentialAnalyzer* analyzer;
110 <  if(args_info.density_given){
111 <    analyzer = new DensityAnalyzer(info, dumpFileName, sele1);
109 >  SequentialAnalyzer* analyzer = NULL;
110 >  if(args_info.com_given){
111 >    analyzer = new CenterOfMass(info, dumpFileName, sele1);
112 >  } else if(args_info.ca1_given){
113 >    RealType solidZ(0.0);
114 >    if (args_info.referenceZ_given)
115 >        solidZ = args_info.referenceZ_arg;
116 >    else {
117 >      sprintf( painCave.errMsg,
118 >               "--referenceZ must be set if --ca1 is used\n");
119 >      painCave.severity = OPENMD_ERROR;
120 >      painCave.isFatal = 1;
121 >      simError();
122 >    }
123 >    RealType dropletR(0.0);
124 >    if (args_info.dropletR_given)
125 >        dropletR = args_info.dropletR_arg;
126 >    else {
127 >      sprintf( painCave.errMsg,
128 >               "--dropletR must be set if --ca1 is used\n");
129 >      painCave.severity = OPENMD_ERROR;
130 >      painCave.isFatal = 1;
131 >      simError();
132 >    }
133 >
134 >    analyzer = new ContactAngle1(info, dumpFileName, sele1, solidZ, dropletR);
135 >  } else if(args_info.ca2_given){
136 >    RealType solidZ(0.0);
137 >    if (args_info.referenceZ_given)
138 >        solidZ = args_info.referenceZ_arg;
139 >    else {
140 >      sprintf( painCave.errMsg,
141 >               "--referenceZ must be set if --ca2 is used\n");
142 >      painCave.severity = OPENMD_ERROR;
143 >      painCave.isFatal = 1;
144 >      simError();
145 >    }
146 >    RealType centroidX(0.0);
147 >    if (args_info.centroidX_given)
148 >        centroidX = args_info.centroidX_arg;
149 >    else {
150 >      sprintf( painCave.errMsg,
151 >               "--centroidX must be set if --ca2 is used\n");
152 >      painCave.severity = OPENMD_ERROR;
153 >      painCave.isFatal = 1;
154 >      simError();
155 >    }
156 >    RealType centroidY(0.0);
157 >    if (args_info.centroidY_given)
158 >        centroidY = args_info.centroidY_arg;
159 >    else {
160 >      sprintf( painCave.errMsg,
161 >               "--centroidY must be set if --ca2 is used\n");
162 >      painCave.severity = OPENMD_ERROR;
163 >      painCave.isFatal = 1;
164 >      simError();
165 >    }
166 >    RealType threshDens(0.0);
167 >    if (args_info.threshDens_given)
168 >        threshDens = args_info.threshDens_arg;
169 >    else {
170 >      sprintf( painCave.errMsg,
171 >               "--threshDens must be set if --ca2 is used\n");
172 >      painCave.severity = OPENMD_ERROR;
173 >      painCave.isFatal = 1;
174 >      simError();
175 >    }
176 >    RealType bufferLength(0.0);
177 >    if (args_info.bufferLength_given)
178 >        bufferLength = args_info.bufferLength_arg;
179 >    else {
180 >      sprintf( painCave.errMsg,
181 >               "--bufferLength must be set if --ca2 is used\n");
182 >      painCave.severity = OPENMD_ERROR;
183 >      painCave.isFatal = 1;
184 >      simError();
185 >    }
186 >
187 >    analyzer = new ContactAngle2(info, dumpFileName, sele1, solidZ, centroidX, centroidY,
188 >                                 threshDens, bufferLength, args_info.nbins_arg,
189 >                                 args_info.nbins_z_arg);
190    }
191  
192    if (args_info.output_given) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines