Page MenuHomec4science

domain_interface.cc
No OneTemporary

File Metadata

Created
Sun, Nov 3, 20:31

domain_interface.cc

/**
* @file domain_interface.cc
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @date Mon Sep 08 23:45:56 2014
*
* @brief This is the interface to all domain (model/plugins)
*
* @section LICENSE
*
* Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* LibMultiScale is free software: you can redistribute it and/or modify it
* under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* LibMultiScale is distributed in the hope that it will be useful, but
* WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with LibMultiScale. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "domain_interface.hh"
#include "cube.hh"
#include "lm_common.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
/* -------------------------------------------------------------------------- */
DomainInterface::DomainInterface(CommGroup &group) {
this->setCommGroup(group);
// restartfile = "";
}
/* -------------------------------------------------------------------------- */
DomainInterface::~DomainInterface() {}
/* -------------------------------------------------------------------------- */
bool DomainInterface::shouldRestart() { return restartfile.size(); }
/* -------------------------------------------------------------------------- */
const std::string &DomainInterface::getRestartFile() { return restartfile; }
/* -------------------------------------------------------------------------- */
void DomainInterface::printself(std::ostream &os) const {
os << "Domain " << this->getID();
}
/* -------------------------------------------------------------------------- */
/* LMDESC DomainInterface
This section describe the section that is associated
with every model.
*/
void DomainInterface::declareParams() {
/* LMKEYWORD RESTART_FILE
Specifies a filename to perform a restart just after initialization.
*/
this->parseKeyword("RESTART_FILE", restartfile, "");
/* LMKEYWORD RESTART_CONTINUE_IF_NOTFOUND
Set a flag that allow RESTART routine to ignore the absence of a file
while restarting. If the restart file is not existing no restart
procedure is launched at and a warning message is outputed.
*/
this->parseTag("RESTART_CONTINUE_IF_NOTFOUND", restart_continue_if_notfound,
false);
}
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__

Event Timeline