ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/utils/nanoBuilder.cpp
(Generate patch)

Comparing trunk/OOPSE/utils/nanoBuilder.cpp (file contents):
Revision 592 by gezelter, Fri Jul 11 14:49:17 2003 UTC vs.
Revision 598 by chuckv, Mon Jul 14 21:35:45 2003 UTC

# Line 14 | Line 14 | nanoBuilder::nanoBuilder(int thisIsRandom, int thisHas
14   #include "sysBuild.hpp"
15   #include "nanoBuilder.hpp"
16  
17 < nanoBuilder::nanoBuilder(int thisIsRandom, int thisHasVacancies,
18 <                         int thisLatticeType, double thisParticleRadius,
19 <                         double thisCoreRadius, double thisVacancyFraction,
20 <                         double thisVacancyRadius,
21 <                         double thisLatticeSpacing,
22 <                         double solute_X,
23 <                         int &hasError){
17 > nanoBuilder::nanoBuilder(int &hasError){
18    int Errors;
19    int foundCore,foundShell;
20    int i;
# Line 55 | Line 49 | nanoBuilder::nanoBuilder(int thisIsRandom, int thisHas
49  
50    hasError = 0;
51    Errors = 0;
52 <
53 <
54 <  isRandom        = thisIsRandom;
55 <  hasVacancies    = thisHasVacancies;
56 <  latticeType     = thisLatticeType;
57 <  particleRadius  = thisParticleRadius;
58 <  coreRadius      = thisCoreRadius;
59 <  vacancyFraction = thisVacancyFraction;
60 <  latticeSpacing  = thisLatticeSpacing;
61 <  soluteX = solute_X; //Mole fraction for random particle.
52 >
53 >  //Initialize class members from bsInfo struct that sysbuilder provides.
54 >  isRandom        = bsInfo.isRandomParticle;
55 >  hasVacancies    = bsInfo.hasVacancies;
56 >  latticeType     = bsInfo.latticeType;
57 >  particleRadius  = bsInfo.particleRadius;
58 >  coreRadius      = bsInfo.coreRadius;
59 >  vacancyFraction = bsInfo.vacancyFraction;
60 >  latticeSpacing  = bsInfo.latticeSpacing;
61 >  soluteX         = bsInfo.soluteX; //Mole fraction for random particle.
62  
63  
64  
# Line 340 | Line 334 | int nanoBuilder::buildNanoParticle( void ){
334      if (! moleculeVector[i].isVacancy) {
335        orientationMunger( A );
336        if( moleculeVector[i].isCore){
337 <        nCoreAtomCounter =+ nCoreModelAtoms;
337 >        nCoreAtomCounter += nCoreModelAtoms;
338          coreLocate->placeMol(moleculeVector[i].pos,A,atoms,nShellAtomCounter);
339        }
340        else {
341 <        nShellAtomCounter =+ nShellModelAtoms;
341 >        nShellAtomCounter += nShellModelAtoms;
342          shellLocate->placeMol(moleculeVector[i].pos,A,atoms,nCoreAtomCounter);
343        }
344        shesActualSizetoMe++;
# Line 395 | Line 389 | void nanoBuilder::buildWithCoreShell(double dist, doub
389      moleculeVector.push_back(myMol);
390      
391      if (dist <= coreRadius){
392 <      coreAtomCount =+ nCoreModelAtoms;
392 >      coreAtomCount += nCoreModelAtoms;
393        moleculeVector[moleculeCount].pos[0] = pos[0];
394        moleculeVector[moleculeCount].pos[1] = pos[1];
395        moleculeVector[moleculeCount].pos[2] = pos[2];
# Line 406 | Line 400 | void nanoBuilder::buildWithCoreShell(double dist, doub
400      }
401      // Place shell
402      else{
403 <      shellAtomCount =+ nShellModelAtoms;
403 >      shellAtomCount += nShellModelAtoms;
404        moleculeVector[moleculeCount].pos[0] = pos[0];
405        moleculeVector[moleculeCount].pos[1] = pos[1];
406        moleculeVector[moleculeCount].pos[2] = pos[2];
# Line 430 | Line 424 | void nanoBuilder::buildWithVacancies(double dist, doub
424      moleculeVector.push_back(myMol);
425      if (dist <= coreRadius){
426          
427 <      coreAtomCount =+ nCoreModelAtoms;
427 >      coreAtomCount += nCoreModelAtoms;
428        moleculeVector[moleculeCount].pos[0] = pos[0];
429        moleculeVector[moleculeCount].pos[1] = pos[1];
430        moleculeVector[moleculeCount].pos[2] = pos[2];
# Line 446 | Line 440 | void nanoBuilder::buildWithVacancies(double dist, doub
440        }
441      } else {
442        // Place shell
443 <      shellAtomCount =+ nShellModelAtoms;
443 >      shellAtomCount += nShellModelAtoms;
444        moleculeVector[moleculeCount].pos[0] = pos[0];
445        moleculeVector[moleculeCount].pos[1] = pos[1];
446        moleculeVector[moleculeCount].pos[2] = pos[2];
# Line 474 | Line 468 | void nanoBuilder::buildNmolParticle(double dist, doubl
468      moleculeVector.push_back(myMol);
469      if (nCoreMolCounter < nCoreMolecules){
470        
471 <      coreAtomCount =+ nCoreModelAtoms;
471 >      coreAtomCount += nCoreModelAtoms;
472        moleculeVector[moleculeCount].pos[0] = pos[0];
473        moleculeVector[moleculeCount].pos[1] = pos[1];
474        moleculeVector[moleculeCount].pos[2] = pos[2];
# Line 484 | Line 478 | void nanoBuilder::buildNmolParticle(double dist, doubl
478        
479        
480      } else {
481 <      shellAtomCount =+ nShellModelAtoms;
481 >      shellAtomCount += nShellModelAtoms;
482        moleculeVector[moleculeCount].pos[0] = pos[0];
483        moleculeVector[moleculeCount].pos[1] = pos[1];
484        moleculeVector[moleculeCount].pos[2] = pos[2];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines