Changeset ee9018 for src


Ignore:
Timestamp:
Aug 15, 2013, 8:41:17 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:
f6c19d
Parents:
d9d028
git-author:
Frederik Heber <heber@…> (04/15/13 19:03:31)
git-committer:
Frederik Heber <heber@…> (08/15/13 08:41:17)
Message:

InterfaceVMGJob now may also use open boundary (FAS instead of CS).

  • so far, according to Julian, only order 2 is implemented correctly.
  • we choose between open and periodic boundary conditions by a parameter in VMGJob.
  • VMGFragmentController uses the parameter when instantating VMGJobs.
Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Automation/VMGFragmentController.cpp

    rd9d028 ree9018  
    7575    const TreatGrid_t _TreatGrid,
    7676    const MPQCData::DoValenceOnly_t _DoValenceOnly,
    77     const bool _DoPrintDebug)
     77    const bool _DoPrintDebug,
     78    const bool _OpenBoundaryConditions)
    7879{
    7980  std::vector<FragmentJob::ptr> jobs;
     
    9798            interpolation_degree,
    9899            _SampleParticles == DoSampleParticles,
    99             _DoPrintDebug) );
     100            _DoPrintDebug,
     101            _OpenBoundaryConditions) );
    100102    jobs.push_back(testJob);
    101103  }
     
    143145            interpolation_degree,
    144146            _SampleParticles == DoSampleParticles,
    145             _DoPrintDebug) );
     147            _DoPrintDebug,
     148            _OpenBoundaryConditions) );
    146149    jobs.push_back(testJob);
    147150  }
  • src/Fragmentation/Automation/VMGFragmentController.hpp

    rd9d028 ree9018  
    6161   * \param _DoValenceOnly whether to neglect core electron and nuclei charges
    6262   * \param _DoPrintDebug whether we do print grid for debug visualization or not
     63   * \param _OpenBoundaryConditions whether we have open (true) or periodic (false)
     64   *        boundary conditions
    6365   */
    6466  bool createLongRangeJobs(
     
    7072      const TreatGrid_t _TreatGrid,
    7173      const MPQCData::DoValenceOnly_t _DoValenceOnly,
    72       const bool _DoPrintDebug);
     74      const bool _DoPrintDebug,
     75      const bool _OpenBoundaryConditions = false);
    7376
    7477  /** Get results of finished long-range jobs.
  • src/Jobs/InterfaceVMGJob.hpp

    rd9d028 ree9018  
    5353      const ImportParticles_t _ImportParticles=DoImportParticles,
    5454      const bool _DoPrintDebug=false,
    55       int coarseningSteps=0,
     55      int coarseningSteps=9,
    5656      double alpha=1.6
    5757      );
  • src/Jobs/VMGJob.cpp

    rd9d028 ree9018  
    5454#include "comm/comm_serial.hpp"
    5555#endif
     56// periodic boundary conditions
    5657#include "cycles/cycle_cs_periodic.hpp"
    5758#include "discretization/discretization_poisson_fd.hpp"
     59#include "level/level_operator_cs.hpp"
     60#include "smoother/gsrb_poisson_4.hpp"
     61#include "solver/solver_singular.hpp"
     62// open boundary conditions
     63#include "cycles/cycle_fas_dirichlet.hpp"
     64#include "discretization/discretization_poisson_fv.hpp"
    5865#include "grid/multigrid.hpp"
    5966//#include "grid/tempgrid.hpp"
    60 #include "level/level_operator_cs.hpp"
     67#include "level/level_operator_fas.hpp"
    6168#include "level/stencils.hpp"
    62 #include "smoother/gsrb_poisson_4.hpp"
     69#include "smoother/gsrb_poisson_2.hpp"
    6370#include "solver/givens.hpp"
    64 //#include "solver/solver_regular.hpp"
    65 #include "solver/solver_singular.hpp"
     71#include "solver/solver_regular.hpp"
    6672#include "units/particle/comm_mpi_particle.hpp"
    6773
     
    8591    const size_t _interpolation_degree,
    8692    const bool _DoImportParticles,
    87     const bool _DoPrintDebug) :
     93    const bool _DoPrintDebug,
     94    const bool _OpenBoundaryConditions) :
    8895  FragmentJob(_JobId),
    8996  density_grid(_density_grid),
     
    94101  DoImportParticles(_DoImportParticles),
    95102  DoPrintDebug(_DoPrintDebug),
     103  OpenBoundaryConditions(_OpenBoundaryConditions),
    96104  returndata(static_cast<const SamplingGridProperties &>(_density_grid)),
    97105  particles()
     
    104112  DoImportParticles(true),
    105113  DoPrintDebug(false),
     114  OpenBoundaryConditions(false),
    106115  particles()
    107116{}
     
    201210void VMGJob::InitVMG()
    202211{
    203   // TODO: As a matter of fact should use open boundary conditions
    204   const Boundary boundary(Periodic, Periodic, Periodic);
     212  Boundary *boundary = NULL;
     213  if (OpenBoundaryConditions)
     214    boundary = new Boundary(Open, Open, Open);
     215  else
     216    boundary = new Boundary(Periodic, Periodic, Periodic);
    205217
    206218  /*
    207219   * Choose multigrid components (self-registering)
    208220   */
     221
    209222#ifdef HAVE_MPI
    210   new Particle::CommMPI(boundary, new DomainDecompositionMPI());
     223  new Particle::CommMPI(*boundary, new DomainDecompositionMPI());
    211224#else
    212   new CommSerial(boundary);
    213 #endif
    214   new DiscretizationPoissonFD(4);
     225  new CommSerial(*boundary);
     226#endif
     227  if (OpenBoundaryConditions)
     228    new DiscretizationPoissonFV(2);
     229  else
     230    new DiscretizationPoissonFD(4);
    215231  new VMGInterfaces::InterfaceVMGJob(
    216232      density_grid,
     
    218234      particle_positions,
    219235      particle_charges,
    220       boundary,
     236      *boundary,
    221237      2,
    222238      density_grid.level,
     
    228244          : VMGInterfaces::InterfaceVMGJob::DontImportParticles,
    229245      DoPrintDebug);
    230   new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
    231   new Givens<SolverSingular>();
    232246  const int cycle_type = 1; // V-type
    233   new CycleCSPeriodic(cycle_type);
    234   new GaussSeidelRBPoisson4();
     247  if (OpenBoundaryConditions) {
     248    new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear);
     249    new Givens<SolverRegular>();
     250    new CycleFASDirichlet(cycle_type);
     251    new GaussSeidelRBPoisson2();
     252  } else {
     253    new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
     254    new Givens<SolverSingular>();
     255    new CycleCSPeriodic(cycle_type);
     256    new GaussSeidelRBPoisson4();
     257  }
     258  delete boundary;
    235259
    236260  /*
  • src/Jobs/VMGJob.hpp

    rd9d028 ree9018  
    5252      const size_t _interpolation_degree,
    5353      const bool _DoImportParticles=true,
    54       const bool _DoPrintDebug=false
     54      const bool _DoPrintDebug=false,
     55      const bool _OpenBoundaryConditions=false
    5556      );
    5657  virtual ~VMGJob();
     
    7879  //!> whether we do print grid for debug visualization or not
    7980  const bool DoPrintDebug;
     81  //!> whether we have open (true) boundary conditions or periodic (false)
     82  const bool OpenBoundaryConditions;
    8083
    8184private:
Note: See TracChangeset for help on using the changeset viewer.