| 1 | /*
 | 
|---|
| 2 |  * Project: MoleCuilder
 | 
|---|
| 3 |  * Description: creates and alters molecular systems
 | 
|---|
| 4 |  * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
 | 
|---|
| 5 |  * Copyright (C)  2013 Frederik Heber. All rights reserved.
 | 
|---|
| 6 |  * 
 | 
|---|
| 7 |  *
 | 
|---|
| 8 |  *   This file is part of MoleCuilder.
 | 
|---|
| 9 |  *
 | 
|---|
| 10 |  *    MoleCuilder is free software: you can redistribute it and/or modify
 | 
|---|
| 11 |  *    it under the terms of the GNU General Public License as published by
 | 
|---|
| 12 |  *    the Free Software Foundation, either version 2 of the License, or
 | 
|---|
| 13 |  *    (at your option) any later version.
 | 
|---|
| 14 |  *
 | 
|---|
| 15 |  *    MoleCuilder is distributed in the hope that it will be useful,
 | 
|---|
| 16 |  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
| 17 |  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
| 18 |  *    GNU General Public License for more details.
 | 
|---|
| 19 |  *
 | 
|---|
| 20 |  *    You should have received a copy of the GNU General Public License
 | 
|---|
| 21 |  *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
 | 
|---|
| 22 |  */
 | 
|---|
| 23 | 
 | 
|---|
| 24 | /*
 | 
|---|
| 25 |  * FragmentationAutomationAction.cpp
 | 
|---|
| 26 |  *
 | 
|---|
| 27 |  *  Created on: May 18, 2012
 | 
|---|
| 28 |  *      Author: heber
 | 
|---|
| 29 |  */
 | 
|---|
| 30 | 
 | 
|---|
| 31 | // include config.h
 | 
|---|
| 32 | #ifdef HAVE_CONFIG_H
 | 
|---|
| 33 | #include <config.h>
 | 
|---|
| 34 | #endif
 | 
|---|
| 35 | 
 | 
|---|
| 36 | #include <boost/archive/text_iarchive.hpp>
 | 
|---|
| 37 | // boost asio needs specific operator new
 | 
|---|
| 38 | #include <boost/asio.hpp>
 | 
|---|
| 39 | 
 | 
|---|
| 40 | #include "CodePatterns/MemDebug.hpp"
 | 
|---|
| 41 | 
 | 
|---|
| 42 | //// include headers that implement a archive in simple text format
 | 
|---|
| 43 | #include <boost/archive/text_oarchive.hpp>
 | 
|---|
| 44 | #include <boost/archive/text_iarchive.hpp>
 | 
|---|
| 45 | 
 | 
|---|
| 46 | //
 | 
|---|
| 47 | //#include <boost/mpl/remove.hpp>
 | 
|---|
| 48 | //#include <boost/lambda/lambda.hpp>
 | 
|---|
| 49 | 
 | 
|---|
| 50 | //#include <iostream>
 | 
|---|
| 51 | 
 | 
|---|
| 52 | #include "CodePatterns/Assert.hpp"
 | 
|---|
| 53 | #include "CodePatterns/Info.hpp"
 | 
|---|
| 54 | #include "CodePatterns/Log.hpp"
 | 
|---|
| 55 | 
 | 
|---|
| 56 | #ifdef HAVE_JOBMARKET
 | 
|---|
| 57 | #include "JobMarket/Jobs/FragmentJob.hpp"
 | 
|---|
| 58 | #else
 | 
|---|
| 59 | #include "Jobs/JobMarket/FragmentJob.hpp"
 | 
|---|
| 60 | #endif
 | 
|---|
| 61 | 
 | 
|---|
| 62 | #include "Fragmentation/Automation/FragmentJobQueue.hpp"
 | 
|---|
| 63 | #ifdef HAVE_JOBMARKET
 | 
|---|
| 64 | #include "Fragmentation/Automation/MPQCFragmentController.hpp"
 | 
|---|
| 65 | #else
 | 
|---|
| 66 | #include "Fragmentation/Automation/MPQCCommandFragmentController.hpp"
 | 
|---|
| 67 | #endif
 | 
|---|
| 68 | #include "Fragmentation/Summation/Containers/FragmentationChargeDensity.hpp"
 | 
|---|
| 69 | #include "Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp"
 | 
|---|
| 70 | #include "Fragmentation/Summation/Containers/FragmentationResultContainer.hpp"
 | 
|---|
| 71 | #include "Fragmentation/Summation/Containers/FragmentationShortRangeResults.hpp"
 | 
|---|
| 72 | #include "Fragmentation/Summation/Containers/MPQCData.hpp"
 | 
|---|
| 73 | #include "Fragmentation/KeySetsContainer.hpp"
 | 
|---|
| 74 | #if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
 | 
|---|
| 75 | #include "Fragmentation/Automation/VMGDebugGridFragmentController.hpp"
 | 
|---|
| 76 | #include "Fragmentation/Automation/VMGFragmentController.hpp"
 | 
|---|
| 77 | #include "Fragmentation/Summation/Containers/VMGData.hpp"
 | 
|---|
| 78 | #include "Fragmentation/Summation/Containers/VMGDataFused.hpp"
 | 
|---|
| 79 | #include "Fragmentation/Summation/Containers/VMGDataMap.hpp"
 | 
|---|
| 80 | #include "Fragmentation/Summation/Containers/VMGData_printKeyNames.hpp"
 | 
|---|
| 81 | #endif
 | 
|---|
| 82 | #include "World.hpp"
 | 
|---|
| 83 | 
 | 
|---|
| 84 | #include <boost/bind.hpp>
 | 
|---|
| 85 | #include <boost/thread.hpp>
 | 
|---|
| 86 | #include <fstream>
 | 
|---|
| 87 | #include <iostream>
 | 
|---|
| 88 | #include <string>
 | 
|---|
| 89 | #include <vector>
 | 
|---|
| 90 | 
 | 
|---|
| 91 | #include <boost/mpl/for_each.hpp>
 | 
|---|
| 92 | 
 | 
|---|
| 93 | #include "Actions/FragmentationAction/FragmentationAutomationAction.hpp"
 | 
|---|
| 94 | 
 | 
|---|
| 95 | using namespace MoleCuilder;
 | 
|---|
| 96 | 
 | 
|---|
| 97 | // and construct the stuff
 | 
|---|
| 98 | #include "FragmentationAutomationAction.def"
 | 
|---|
| 99 | #include "Action_impl_pre.hpp"
 | 
|---|
| 100 | /** =========== define the function ====================== */
 | 
|---|
| 101 | 
 | 
|---|
| 102 | class controller_AddOn;
 | 
|---|
| 103 | 
 | 
|---|
| 104 | // needs to be defined for using the FragmentController
 | 
|---|
| 105 | controller_AddOn *getAddOn()
 | 
|---|
| 106 | {
 | 
|---|
| 107 |   return NULL;
 | 
|---|
| 108 | }
 | 
|---|
| 109 | 
 | 
|---|
| 110 | static void updateSteps(Process &p, const size_t step, const size_t total)
 | 
|---|
| 111 | {
 | 
|---|
| 112 |   LOG(1, "There are " << step << " steps out of " << total << " done.");
 | 
|---|
| 113 |   p.setCurrStep(step);
 | 
|---|
| 114 | }
 | 
|---|
| 115 | 
 | 
|---|
| 116 | ActionState::ptr FragmentationFragmentationAutomationAction::performCall() {
 | 
|---|
| 117 |   boost::asio::io_service io_service;
 | 
|---|
| 118 | 
 | 
|---|
| 119 |   // TODO: Have io_service run in second thread and merge with current again eventually
 | 
|---|
| 120 | 
 | 
|---|
| 121 |   FragmentationResultContainer &container =
 | 
|---|
| 122 |       FragmentationResultContainer::getInstance();
 | 
|---|
| 123 |   const KeySetsContainer& keysets = FragmentJobQueue::getInstance().getKeySets();
 | 
|---|
| 124 |   const KeySetsContainer& forcekeysets = FragmentJobQueue::getInstance().getFullKeySets();
 | 
|---|
| 125 | 
 | 
|---|
| 126 |   size_t Exitflag = 0;
 | 
|---|
| 127 |   std::map<JobId_t, MPQCData> shortrangedata;
 | 
|---|
| 128 | #ifdef HAVE_JOBMARKET
 | 
|---|
| 129 |   {
 | 
|---|
| 130 |     const size_t NumberJobs = FragmentJobQueue::getInstance().size();
 | 
|---|
| 131 |     MPQCFragmentController mpqccontroller(io_service);
 | 
|---|
| 132 |     mpqccontroller.setHost(params.host.get());
 | 
|---|
| 133 |     mpqccontroller.setPort(params.port.get());
 | 
|---|
| 134 |     // Phase One: obtain ids
 | 
|---|
| 135 |     mpqccontroller.requestIds(NumberJobs);
 | 
|---|
| 136 | 
 | 
|---|
| 137 |     // Phase Two: add MPQCJobs and send
 | 
|---|
| 138 |     const bool AddJobsStatus = mpqccontroller.addJobsFromQueue(
 | 
|---|
| 139 |         params.DoLongrange.get() ? MPQCData::DoSampleDensity : MPQCData::DontSampleDensity,
 | 
|---|
| 140 |         params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly
 | 
|---|
| 141 |         );
 | 
|---|
| 142 |     if (AddJobsStatus)
 | 
|---|
| 143 |       LOG(1, "INFO: Added jobs from FragmentJobsQueue.");
 | 
|---|
| 144 |     else {
 | 
|---|
| 145 |       ELOG(1, "Adding jobs failed.");
 | 
|---|
| 146 |       return Action::failure;
 | 
|---|
| 147 |     }
 | 
|---|
| 148 |     mpqccontroller.run();
 | 
|---|
| 149 | 
 | 
|---|
| 150 |     // Phase Three: calculate result
 | 
|---|
| 151 |     setMaxSteps(NumberJobs);
 | 
|---|
| 152 |     mpqccontroller.setUpdateHandler(
 | 
|---|
| 153 |         boost::bind(&updateSteps, boost::ref(*this), _1, _2)
 | 
|---|
| 154 |         );
 | 
|---|
| 155 |     start();
 | 
|---|
| 156 |     boost::thread wait_thread(
 | 
|---|
| 157 |         boost::bind(&MPQCFragmentController::waitforResults, boost::ref(mpqccontroller), boost::cref(NumberJobs))
 | 
|---|
| 158 |     );
 | 
|---|
| 159 |     wait_thread.join();
 | 
|---|
| 160 |     stop();
 | 
|---|
| 161 |     mpqccontroller.getResults(shortrangedata);
 | 
|---|
| 162 | 
 | 
|---|
| 163 |     Exitflag += mpqccontroller.getExitflag();
 | 
|---|
| 164 |   }
 | 
|---|
| 165 | #else
 | 
|---|
| 166 |   {
 | 
|---|
| 167 |     const size_t NumberJobs = FragmentJobQueue::getInstance().size();
 | 
|---|
| 168 |     MPQCCommandFragmentController mpqccontroller;
 | 
|---|
| 169 |     // Phase One: obtain ids: not needed, we have infinite pool
 | 
|---|
| 170 | 
 | 
|---|
| 171 |     // Phase Two: add MPQCJobs and send
 | 
|---|
| 172 |     const size_t NoJobs = mpqccontroller.addJobsFromQueue(
 | 
|---|
| 173 |         params.DoLongrange.get() ? MPQCData::DoSampleDensity : MPQCData::DontSampleDensity,
 | 
|---|
| 174 |         params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
 | 
|---|
| 175 |         params.executable.get().string()
 | 
|---|
| 176 |         );
 | 
|---|
| 177 |     LOG(1, "INFO: Added " << NoJobs << " from FragmentJobsQueue.");
 | 
|---|
| 178 | 
 | 
|---|
| 179 |     // prepare process
 | 
|---|
| 180 |     setMaxSteps(NumberJobs);
 | 
|---|
| 181 |     mpqccontroller.setUpdateHandler(
 | 
|---|
| 182 |         boost::bind(&updateSteps, boost::ref(*this), _1, _2)
 | 
|---|
| 183 |         );
 | 
|---|
| 184 |     start();
 | 
|---|
| 185 |     mpqccontroller.run();
 | 
|---|
| 186 |     stop();
 | 
|---|
| 187 | 
 | 
|---|
| 188 |     // get back the results and place them in shortrangedata
 | 
|---|
| 189 |     mpqccontroller.getResults(shortrangedata);
 | 
|---|
| 190 |     ASSERT( shortrangedata.size() == NumberJobs,
 | 
|---|
| 191 |         "FragmentationFragmentationAutomationAction::performCall() - number of converted results "
 | 
|---|
| 192 |         +toString(shortrangedata.size())+" and number of jobs "+toString(NumberJobs)+ " differ.");
 | 
|---|
| 193 | 
 | 
|---|
| 194 |     Exitflag += mpqccontroller.getExitflag();
 | 
|---|
| 195 |   }
 | 
|---|
| 196 | #endif
 | 
|---|
| 197 | 
 | 
|---|
| 198 | #if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
 | 
|---|
| 199 |   if (params.DoLongrange.get()) {
 | 
|---|
| 200 |   if ( World::getInstance().getAllAtoms().size() == 0) {
 | 
|---|
| 201 |     STATUS("Please load the full molecule into the world before starting this action.");
 | 
|---|
| 202 |     return Action::failure;
 | 
|---|
| 203 |   }
 | 
|---|
| 204 | 
 | 
|---|
| 205 |   // obtain combined charge density
 | 
|---|
| 206 |   FragmentationChargeDensity summedChargeDensity(
 | 
|---|
| 207 |       shortrangedata,
 | 
|---|
| 208 |       FragmentJobQueue::getInstance().getKeySets());
 | 
|---|
| 209 |   const std::vector<SamplingGrid> full_sample = summedChargeDensity.getFullSampledGrid();
 | 
|---|
| 210 |   LOG(1, "INFO: There are " << shortrangedata.size() << " short-range and "
 | 
|---|
| 211 |       << full_sample.size() << " level-wise long-range jobs.");
 | 
|---|
| 212 | 
 | 
|---|
| 213 |   // check boundary conditions
 | 
|---|
| 214 |   const BoundaryConditions::Conditions_t &conditions =
 | 
|---|
| 215 |       World::getInstance().getDomain().getConditions();
 | 
|---|
| 216 |   const bool OpenBoundaryConditions =
 | 
|---|
| 217 |       !((conditions[0] == BoundaryConditions::Wrap) &&
 | 
|---|
| 218 |       (conditions[1] == BoundaryConditions::Wrap) &&
 | 
|---|
| 219 |       (conditions[2] == BoundaryConditions::Wrap));
 | 
|---|
| 220 |   LOG(1, std::string("INFO: Using ") 
 | 
|---|
| 221 |       << (OpenBoundaryConditions ? "open" : "periodic")
 | 
|---|
| 222 |       << " boundary conditions.");
 | 
|---|
| 223 | 
 | 
|---|
| 224 |   // Phase Four: obtain more ids
 | 
|---|
| 225 |   std::map<JobId_t, VMGData> longrangedata;
 | 
|---|
| 226 |   {
 | 
|---|
| 227 |     VMGFragmentController vmgcontroller(io_service);
 | 
|---|
| 228 |     vmgcontroller.setHost(params.host.get());
 | 
|---|
| 229 |     vmgcontroller.setPort(params.port.get());
 | 
|---|
| 230 |     const size_t NoJobs = shortrangedata.size()+full_sample.size();
 | 
|---|
| 231 |     vmgcontroller.requestIds(2*NoJobs);
 | 
|---|
| 232 | 
 | 
|---|
| 233 |     // Phase Five a: create VMGJobs for electronic charge distribution
 | 
|---|
| 234 |     const size_t near_field_cells = params.near_field_cells.get();
 | 
|---|
| 235 |     const size_t interpolation_degree = params.interpolation_degree.get();
 | 
|---|
| 236 |     if (!vmgcontroller.createLongRangeJobs(
 | 
|---|
| 237 |         shortrangedata,
 | 
|---|
| 238 |         full_sample,
 | 
|---|
| 239 |         near_field_cells,
 | 
|---|
| 240 |         interpolation_degree,
 | 
|---|
| 241 |         VMGFragmentController::DontSampleParticles,
 | 
|---|
| 242 |         VMGFragmentController::DoTreatGrid,
 | 
|---|
| 243 |         params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
 | 
|---|
| 244 |         params.DoPrintDebug.get(),
 | 
|---|
| 245 |         OpenBoundaryConditions)) {
 | 
|---|
| 246 |       STATUS("Could not create long-range jobs for electronic charge distribution.");
 | 
|---|
| 247 |       return Action::failure;
 | 
|---|
| 248 |     }
 | 
|---|
| 249 | 
 | 
|---|
| 250 |     // Phase Six a: calculate result
 | 
|---|
| 251 |     vmgcontroller.waitforResults(NoJobs);
 | 
|---|
| 252 |     vmgcontroller.getResults(longrangedata);
 | 
|---|
| 253 |     ASSERT( NoJobs == longrangedata.size(),
 | 
|---|
| 254 |         "FragmentationFragmentationAutomationAction::performCall() - number of MPQCresults+"
 | 
|---|
| 255 |         +toString(full_sample.size())+"="+toString(NoJobs)
 | 
|---|
| 256 |         +" and first VMGresults "+toString(longrangedata.size())+" don't match.");
 | 
|---|
| 257 |     Exitflag += vmgcontroller.getExitflag();
 | 
|---|
| 258 | 
 | 
|---|
| 259 |     {
 | 
|---|
| 260 |       std::map<JobId_t, VMGData> longrangedata_both;
 | 
|---|
| 261 |       // Phase Five b: create VMGJobs for nuclei charge distributions
 | 
|---|
| 262 |       const size_t near_field_cells = params.near_field_cells.get();
 | 
|---|
| 263 |       const size_t interpolation_degree = params.interpolation_degree.get();
 | 
|---|
| 264 |       if (!vmgcontroller.createLongRangeJobs(
 | 
|---|
| 265 |           shortrangedata,
 | 
|---|
| 266 |           full_sample,
 | 
|---|
| 267 |           near_field_cells,
 | 
|---|
| 268 |           interpolation_degree,
 | 
|---|
| 269 |           VMGFragmentController::DoSampleParticles,
 | 
|---|
| 270 |           VMGFragmentController::DoTreatGrid,
 | 
|---|
| 271 |           params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
 | 
|---|
| 272 |           params.DoPrintDebug.get(),
 | 
|---|
| 273 |           OpenBoundaryConditions)) {
 | 
|---|
| 274 |         STATUS("Could not create long-range jobs for nuclei charge distribution.");
 | 
|---|
| 275 |         return Action::failure;
 | 
|---|
| 276 |       }
 | 
|---|
| 277 | 
 | 
|---|
| 278 |       // Phase Six b: calculate result
 | 
|---|
| 279 |       vmgcontroller.waitforResults(NoJobs);
 | 
|---|
| 280 |       vmgcontroller.getResults(longrangedata_both);
 | 
|---|
| 281 |       ASSERT( NoJobs == longrangedata_both.size(),
 | 
|---|
| 282 |           "FragmentationFragmentationAutomationAction::performCall() - number of MPQCresults+"
 | 
|---|
| 283 |           +toString(full_sample.size())+"="+toString(NoJobs)
 | 
|---|
| 284 |           +" and second VMGresults "+toString(longrangedata_both.size())+" don't match.");
 | 
|---|
| 285 |       Exitflag += vmgcontroller.getExitflag();
 | 
|---|
| 286 | 
 | 
|---|
| 287 |       // go through either data and replace nuclei_long with contribution from both
 | 
|---|
| 288 |       ASSERT( longrangedata.size() == longrangedata_both.size(),
 | 
|---|
| 289 |           "FragmentationFragmentationAutomationAction::performCall() - longrange results have different sizes.");
 | 
|---|
| 290 |       std::map<JobId_t, VMGData>::iterator destiter = longrangedata.begin();
 | 
|---|
| 291 |       std::map<JobId_t, VMGData>::const_iterator srciter = longrangedata_both.begin();
 | 
|---|
| 292 |       for (;destiter != longrangedata.end(); ++srciter, ++destiter) {
 | 
|---|
| 293 |         destiter->second.both_sampled_potential = srciter->second.sampled_potential;
 | 
|---|
| 294 |         destiter->second.nuclei_long = srciter->second.nuclei_long;
 | 
|---|
| 295 |       }
 | 
|---|
| 296 |     }
 | 
|---|
| 297 |   }
 | 
|---|
| 298 | 
 | 
|---|
| 299 |   if (params.DoPrintDebug.get()) {
 | 
|---|
| 300 |     std::map<JobId_t, std::string> debugData;
 | 
|---|
| 301 |     {
 | 
|---|
| 302 |       if (!full_sample.empty()) {
 | 
|---|
| 303 |         // create debug jobs for each level to print the summed-up potential to vtk files
 | 
|---|
| 304 |         VMGDebugGridFragmentController debugcontroller(io_service);
 | 
|---|
| 305 |         debugcontroller.setHost(params.host.get());
 | 
|---|
| 306 |         debugcontroller.setPort(params.port.get());
 | 
|---|
| 307 |         debugcontroller.requestIds(full_sample.size());
 | 
|---|
| 308 |         if (!debugcontroller.createDebugJobs(full_sample, OpenBoundaryConditions)) {
 | 
|---|
| 309 |           STATUS("Could not create debug jobs.");
 | 
|---|
| 310 |           return Action::failure;
 | 
|---|
| 311 |         }
 | 
|---|
| 312 |         debugcontroller.waitforResults(full_sample.size());
 | 
|---|
| 313 |         debugcontroller.getResults(debugData);
 | 
|---|
| 314 |         Exitflag += debugcontroller.getExitflag();
 | 
|---|
| 315 |       }
 | 
|---|
| 316 |     }
 | 
|---|
| 317 |   }
 | 
|---|
| 318 |   container.addFullResults(keysets, forcekeysets, shortrangedata, longrangedata);
 | 
|---|
| 319 |   } else {
 | 
|---|
| 320 |     container.addShortRangeResults(keysets, forcekeysets, shortrangedata);
 | 
|---|
| 321 |   }
 | 
|---|
| 322 | #else
 | 
|---|
| 323 |   container.addShortRangeResults(keysets, forcekeysets, shortrangedata);
 | 
|---|
| 324 | #endif
 | 
|---|
| 325 | 
 | 
|---|
| 326 |   // now clear all present jobs as we are done
 | 
|---|
| 327 |   FragmentJobQueue::getInstance().clear();
 | 
|---|
| 328 | 
 | 
|---|
| 329 |   // if file is given, advise results container to store to file
 | 
|---|
| 330 |   if (!params.resultsfile.get().empty()) {
 | 
|---|
| 331 |     boost::filesystem::path resultsfile = params.resultsfile.get();
 | 
|---|
| 332 |     std::ofstream returnstream(resultsfile.string().c_str());
 | 
|---|
| 333 |     if (returnstream.good()) {
 | 
|---|
| 334 |       boost::archive::text_oarchive oa(returnstream);
 | 
|---|
| 335 |       oa << container;
 | 
|---|
| 336 |     }
 | 
|---|
| 337 |     Exitflag += (int)(!returnstream.good());
 | 
|---|
| 338 |     returnstream.close();
 | 
|---|
| 339 |   }
 | 
|---|
| 340 | 
 | 
|---|
| 341 |   if (Exitflag != 0)
 | 
|---|
| 342 |     STATUS("Controller has returned failure.");
 | 
|---|
| 343 |   return (Exitflag == 0) ? Action::success : Action::failure;
 | 
|---|
| 344 | }
 | 
|---|
| 345 | 
 | 
|---|
| 346 | ActionState::ptr FragmentationFragmentationAutomationAction::performUndo(ActionState::ptr _state) {
 | 
|---|
| 347 |   return Action::success;
 | 
|---|
| 348 | }
 | 
|---|
| 349 | 
 | 
|---|
| 350 | ActionState::ptr FragmentationFragmentationAutomationAction::performRedo(ActionState::ptr _state){
 | 
|---|
| 351 |   return Action::success;
 | 
|---|
| 352 | }
 | 
|---|
| 353 | 
 | 
|---|
| 354 | bool FragmentationFragmentationAutomationAction::canUndo() {
 | 
|---|
| 355 |   return false;
 | 
|---|
| 356 | }
 | 
|---|
| 357 | 
 | 
|---|
| 358 | bool FragmentationFragmentationAutomationAction::shouldUndo() {
 | 
|---|
| 359 |   return false;
 | 
|---|
| 360 | }
 | 
|---|
| 361 | /** =========== end of function ====================== */
 | 
|---|