Changeset c52e08


Ignore:
Timestamp:
Feb 22, 2012, 11:28:42 AM (13 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:
7b9fe0
Parents:
d66cb7
git-author:
Frederik Heber <heber@…> (01/03/12 11:22:24)
git-committer:
Frederik Heber <heber@…> (02/22/12 11:28:42)
Message:

Added new action SetBoundaryConditionsAction.

Files:
8 added
11 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/GlobalListOfActions.hpp

    rd66cb7 rc52e08  
    7272        (WorldCenterOnEdge) \
    7373        (WorldSetWorldTime) \
     74        (WorldSetBoundaryConditions) \
    7475        (WorldOutput) \
    7576        (WorldSetDefaultName) \
  • src/Actions/Makefile.am

    rd66cb7 rc52e08  
    389389  Actions/WorldAction/RepeatBoxAction.cpp \
    390390  Actions/WorldAction/ScaleBoxAction.cpp \
     391  Actions/WorldAction/SetBoundaryConditionsAction.cpp \
    391392  Actions/WorldAction/SetDefaultNameAction.cpp \
    392393  Actions/WorldAction/SetWorldTimeAction.cpp
     
    401402  Actions/WorldAction/RepeatBoxAction.hpp \
    402403  Actions/WorldAction/ScaleBoxAction.hpp \
     404  Actions/WorldAction/SetBoundaryConditionsAction.hpp \
    403405  Actions/WorldAction/SetDefaultNameAction.hpp \
    404406  Actions/WorldAction/SetWorldTimeAction.hpp
     
    413415  Actions/WorldAction/RepeatBoxAction.def \
    414416  Actions/WorldAction/ScaleBoxAction.def \
     417  Actions/WorldAction/SetBoundaryConditionsAction.def \
    415418  Actions/WorldAction/SetDefaultNameAction.def \
    416419  Actions/WorldAction/SetWorldTimeAction.def
     
    484487#       echo "#include \"Actions/Action_impl_undef.hpp\"" >>$@;
    485488
    486 AllActionHeaders.hpp: $(ACTIONPROTOTYPESHEADER)
     489AllActionHeaders.hpp: $(ACTIONPROTOTYPESHEADER) Actions/GlobalListOfActions.hpp
    487490        echo "#ifndef ALLACTIONHEADERS_HPP_" >$@; \
    488491        echo "#define ALLACTIONHEADERS_HPP_" >>$@; \
     
    496499
    497500if CONDPYTHON
    498 AllActionPython.hpp: $(ACTIONPROTOTYPESHEADER)
     501AllActionPython.hpp: $(ACTIONPROTOTYPESHEADER) Actions/GlobalListOfActions.hpp
    499502        echo "#ifndef ALLACTIONPYTHON_HPP_" >$@; \
    500503        echo "#define ALLACTIONPYTHON_HPP_" >>$@; \
  • src/Box.cpp

    rd66cb7 rc52e08  
    2323
    2424#include <cmath>
     25#include <cstdlib>
    2526#include <iostream>
    26 #include <cstdlib>
     27#include <sstream>
    2728
    2829#include "CodePatterns/Assert.hpp"
     
    304305}
    305306
    306 const BoundaryConditions::Conditions_t Box::getConditions() const
     307const std::string Box::getConditionNames() const
     308{
     309  std::stringstream outputstream;
     310  outputstream << conditions;
     311  return outputstream.str();
     312}
     313
     314const BoundaryConditions::Conditions_t & Box::getConditions() const
    307315{
    308316  return conditions.get();
    309317}
    310318
    311 void Box::setCondition(size_t i, const BoundaryConditions::BoundaryCondition_t condition)
     319const BoundaryConditions::BoundaryCondition_t Box::getCondition(size_t i) const
     320{
     321  return conditions.get(i);
     322}
     323
     324void Box::setCondition(size_t i, const BoundaryConditions::BoundaryCondition_t _condition)
    312325{
    313326  OBSERVE;
    314327  NOTIFY(BoundaryConditionsChanged);
    315   conditions.set(i, condition);
     328  conditions.set(i, _condition);
     329}
     330
     331void Box::setConditions(const BoundaryConditions::Conditions_t & _conditions)
     332{
     333  OBSERVE;
     334  NOTIFY(BoundaryConditionsChanged);
     335  conditions.set(_conditions);
     336}
     337
     338void Box::setConditions(const std::string & _conditions)
     339{
     340  OBSERVE;
     341  NOTIFY(BoundaryConditionsChanged);
     342  std::stringstream inputstream(_conditions);
     343  inputstream >> conditions;
    316344}
    317345
  • src/Box.hpp

    rd66cb7 rc52e08  
    116116  Shape getShape() const;
    117117
    118   const BoundaryConditions::Conditions_t getConditions() const;
    119   void setCondition(size_t i,const BoundaryConditions::BoundaryCondition_t condition);
     118  const std::string getConditionNames() const;
     119  const BoundaryConditions::Conditions_t & getConditions() const;
     120  const BoundaryConditions::BoundaryCondition_t getCondition(size_t i) const;
     121  void setCondition(size_t i,const BoundaryConditions::BoundaryCondition_t _condition);
     122  void setConditions(const BoundaryConditions::Conditions_t & _conditions);
     123  void setConditions(const std::string & _conditions);
    120124
    121125  const std::vector<std::pair<Plane,Plane> > getBoundingPlanes() const;
  • src/Box_BoundaryConditions.cpp

    rd66cb7 rc52e08  
    129129  EnumToStringMap::const_iterator iter = ConverterBiMap.find(condition);
    130130  ASSERT(iter != ConverterBiMap.end(),
    131       "BCContainer::getEnum() - enum "+toString(condition)+" is unknown for any enum name.");
     131      "BCContainer::getName() - enum "+toString(condition)+" is unknown for any enum name.");
    132132  return iter->second;
    133133}
  • src/Box_BoundaryConditions.hpp

    rd66cb7 rc52e08  
    6161    const BoundaryCondition_t &getEnum(const std::string &condition) const;
    6262
     63
    6364  private:
    6465    //!> typedef for the internal enum to string map
  • src/LinkedCell/unittests/stubs/ObserverBoxStub.cpp

    rd66cb7 rc52e08  
    5656}
    5757
    58 const BoundaryConditions::Conditions_t Box::getConditions() const
     58Vector Box::WrapPeriodically(const Vector &point) const{
     59  return point;
     60}
     61
     62const BoundaryConditions::Conditions_t & Box::getConditions() const
    5963{
    6064  return conditions.get();
     65}
     66
     67double Box::periodicDistanceSquared(const Vector &point1,const Vector &point2) const
     68{
     69  return point1.DistanceSquared(point2);
    6170}
    6271
  • tests/Python/AllActions/options.dat

    rd66cb7 rc52e08  
    151151select-molecules-by-formula     "H2O"
    152152select-molecules-by-name        "water"
     153set-boundary-conditions "Wrap, Wrap, Wrap"
    153154set-parser-parameters   "basis = 4-31G"
    154155set-parser-parameters   "basis = 4-31G;maxiter=499;theory=CLKS;"
  • tests/regression/Domain/testsuite-domain.at

    rd66cb7 rc52e08  
    2121# duplicating box
    2222m4_include([Domain/RepeatBox/testsuite-domain-repeat-box.at])
     23
     24# set boundary conditions
     25m4_include([Domain/SetBoundaryConditions/testsuite-domain-set-boundary-conditions.at])
  • tests/regression/Graph/testsuite-graph.at

    rd66cb7 rc52e08  
    77m4_include([Graph/SubgraphDissection/testsuite-graph-subgraph-dissection.at])
    88
     9# Subgraph dissection with specific boundary conditions
     10m4_include([Graph/SubgraphDissection-BoundaryConditions/testsuite-graph-subgraph-dissection_boundary-conditions.at])
  • tests/regression/Makefile.am

    rd66cb7 rc52e08  
    5454        $(srcdir)/Domain/CenterOnEdge/testsuite-domain-center-on-edge.at \
    5555        $(srcdir)/Domain/ScaleBox/testsuite-domain-scale-box.at \
     56        $(srcdir)/Domain/SetBoundaryConditions/testsuite-domain-set-boundary-conditions.at \
    5657        $(srcdir)/Domain/RepeatBox/testsuite-domain-repeat-box.at \
    5758        $(srcdir)/Filling/testsuite-filling.at \
     
    6566        $(srcdir)/Graph/DepthFirstSearch/testsuite-graph-depth-first-search.at \
    6667        $(srcdir)/Graph/SubgraphDissection/testsuite-graph-subgraph-dissection.at \
     68        $(srcdir)/Graph/SubgraphDissection-BoundaryConditions/testsuite-graph-subgraph-dissection_boundary-conditions.at \
    6769        $(srcdir)/Molecules/testsuite-molecules.at \
    6870        $(srcdir)/Molecules/BondFile/testsuite-molecules-fragmentation-bond-file.at \
Note: See TracChangeset for help on using the changeset viewer.