Changeset b47f9c for src/Jobs


Ignore:
Timestamp:
Oct 20, 2013, 11:45:34 AM (11 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
5e1443
Parents:
e0cf82
git-author:
Frederik Heber <heber@…> (10/15/13 13:41:44)
git-committer:
Frederik Heber <heber@…> (10/20/13 11:45:34)
Message:

FIX: WindowGrid_converter::addWindowOntoGrid() never used OpenBoundaryConditions branch.

  • We did not use the parameter, it always fell back to default (false).
  • open boundary conditions use one extra grid point right-hand-side layer to account Dirichlet boundary conditions. This has to be skipped when filling the grid.
  • density looks sensible in both cases, in open boundary case neither electron nor nuclei longrange show any (significant) box size dependency.
Location:
src/Jobs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Jobs/InterfaceVMGJob.cpp

    re0cf82 rb47f9c  
    8383  level(levelMax),
    8484  ImportParticles(_ImportParticles),
    85   DoPrintDebug(_DoPrintDebug)
     85  DoPrintDebug(_DoPrintDebug),
     86  OpenBoundaryCondition(boundary[0] == VMG::Open)
    8687{
    8788  for (size_t i=0;i<3;++i) {
     
    160161      grid,
    161162      sampled_input,
    162       1.);
     163      1.,
     164      OpenBoundaryCondition);
    163165
    164166  if (DoPrintDebug) {
     
    207209  Particle::CommMPI& comm = *dynamic_cast<Particle::CommMPI*>(MG::GetComm());
    208210
    209   const Index begin_local = grid.Global().LocalBegin() - grid.Local().HaloSize1();
    210   Index i;
    211211
    212212  if (DoPrintDebug) {
     
    223223      grid,
    224224      returndata.sampled_potential,
    225       +1.
     225      +1.,
     226      OpenBoundaryCondition
    226227      );
    227228
     
    270271  Grid& particle_grid = comm.GetParticleGrid();
    271272
    272   for (i.X()=0; i.X()<grid.Local().Size().X(); ++i.X())
    273     for (i.Y()=0; i.Y()<grid.Local().Size().Y(); ++i.Y())
    274       for (i.Z()=0; i.Z()<grid.Local().Size().Z(); ++i.Z())
    275         particle_grid(i + particle_grid.Local().Begin()) = grid.GetVal(i + grid.Local().Begin());
    276 
    277   comm.CommToGhosts(particle_grid);
     273  {
     274    Index i;
     275    for (i.X()=0; i.X()<grid.Local().Size().X(); ++i.X())
     276      for (i.Y()=0; i.Y()<grid.Local().Size().Y(); ++i.Y())
     277        for (i.Z()=0; i.Z()<grid.Local().Size().Z(); ++i.Z())
     278          particle_grid(i + particle_grid.Local().Begin()) = grid.GetVal(i + grid.Local().Begin());
     279    comm.CommToGhosts(particle_grid);
     280  }
    278281
    279282  /*
  • src/Jobs/InterfaceVMGJob.hpp

    re0cf82 rb47f9c  
    8585  //!> whether we do print grid for debug visualization or not
    8686  const bool DoPrintDebug;
     87
     88  //!> open boundary conditions or not
     89  const bool OpenBoundaryCondition;
    8790};
    8891
  • src/Jobs/WindowGrid_converter.cpp

    re0cf82 rb47f9c  
    230230  if (OpenBoundaryConditions) {
    231231    const VMG::Index size = window.Local().Size();
    232     const VMG::Index halosize = window.Local().HaloSize1();
     232    const VMG::Index boundary1size = window.Local().BoundarySize1();
     233    const VMG::Index boundary2size = window.Local().BoundarySize2();
     234    const VMG::Index halo1size = window.Local().HaloSize1();
     235    const VMG::Index halo2size = window.Local().HaloSize2();
     236    // this mimicks VMG::GridIndexTranslations::EndOffset()
     237    const size_t off = OpenBoundaryConditions ? 1 : 0;
    233238    for (size_t i=0;i<3;++i)
    234       pre_offset[i] += size[i] / 4;
     239      pre_offset[i] += (size[i] - off) / 4;
    235240    for (size_t i=0;i<3;++i)
    236       total[i] = size[i];
     241      total[i] = (size[i]);
    237242    for (size_t i=0;i<3;++i)
    238       post_offset[i] = size[i] - pre_offset[i] - length[i];
     243      post_offset[i] = (size[i]) - pre_offset[i] - length[i];
    239244  }
    240245
Note: See TracChangeset for help on using the changeset viewer.