/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * CalculateCellVolumeAction.cpp * * Created on: Oct 12, 2011 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "CodePatterns/MemDebug.hpp" #include "CodePatterns/Log.hpp" #include "Box.hpp" #include "LinearAlgebra/RealSpaceMatrix.hpp" #include "World.hpp" #include #include #include "CalculateCellVolumeAction.hpp" using namespace MoleCuilder; // and construct the stuff #include "CalculateCellVolumeAction.def" #include "Reaction_impl_pre.hpp" #include "Reaction_impl.hpp" /** =========== define the function ====================== */ double * AnalysisCalculateCellVolumeAction::doCalc() { // calculate volume from Box Box &B = World::getInstance().getDomain(); const RealSpaceMatrix &M = B.getM(); const double volume = M.determinant(); LOG(0, "RESULT: The current box volume is " << volume << "."); return (new double(volume)); } /** =========== end of function ====================== */