Page MenuHomec4science

domain_lammps_compound.cc
No OneTemporary

File Metadata

Created
Sun, Oct 20, 09:04

domain_lammps_compound.cc

/**
* @file domain_lammps_compound.cc
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
* @author Till Junge <till.junge@epfl.ch>
*
* @date Tue Jan 21 09:03:57 2014
*
* @brief This is the generic LAMMPS model capable of static/dynamic modelling
*
* @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 "lm_common.hh"
#include "domain_lammps_compound.hh"
#include "communicator.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
/* -------------------------------------------------------------------------- */
template <UInt Dim>
DomainLammpsCompound<Dim>::DomainLammpsCompound(DomainID ID,CommGroup GID):
DomainLammps<Dim>(ID,GID),
DomainLammpsDynamic<Dim>(ID, GID),
DomainLammpsMinimize<Dim>(ID, GID),
is_static(false) {
}
/* -------------------------------------------------------------------------- */
template <UInt Dim>
DomainLammpsCompound<Dim>::~DomainLammpsCompound(){
}
/* -------------------------------------------------------------------------- */
template <UInt Dim>
void DomainLammpsCompound<Dim>::init(){
if (!Communicator::getCommunicator().amIinGroup(this->getGroupID())) return;
DomainLammps<Dim>::init();
if (!this->is_static) {
DomainLammpsDynamic<Dim>::init();
}
else {
DomainLammpsMinimize<Dim>::init();
}
}
/* -------------------------------------------------------------------------- */
template <UInt Dim>
void DomainLammpsCompound<Dim>::performStep1(){
if (!this->is_static) {
DomainLammpsDynamic<Dim>::performStep1();
} else {
DomainLammpsMinimize<Dim>::performStep1();
}
}
/* -------------------------------------------------------------------------- */
template <UInt Dim>
void DomainLammpsCompound<Dim>::performStep2(){
if (!this->is_static) {
DomainLammpsDynamic<Dim>::performStep2();
} else {
DomainLammpsMinimize<Dim>::performStep2();
}
}
/* -------------------------------------------------------------------------- */
template <UInt Dim>
void DomainLammpsCompound<Dim>::performStep3(){
if (!this->is_static) {
DomainLammpsDynamic<Dim>::performStep3();
} else {
DomainLammpsMinimize<Dim>::performStep3();
}
}
/* -------------------------------------------------------------------------- */
/* LMDESC LAMMPS
This plugin make the interface with lammps
*/
/* LMHERITANCE domain_lammps */
/* LMEXAMPLE
Section MultiScale AtomsUnits\\
...\\
GEOMETRY myGeom CUBE BBOX -1 1 -1 1 -1 1\\
MODEL LAMMPS md\\
...\\
endSection\\ \\
Section LAMMPS:md AtomsUnits \\
LAMMPS_FILE lammps.in \\
DOMAIN_GEOMETRY 1 \\
endSection
*/
template <UInt Dim>
void DomainLammpsCompound<Dim>::declareParams(){
DomainLammps<Dim>::declareParams();
/* LMKEYWORD IS_STATIC
Specify whether to use molecular dynamics or statics.
Defaults to dynamics
*/
this->parseTag("IS_STATIC", is_static,false);
}
/* -------------------------------------------------------------------------- */
template class DomainLammpsCompound<2>;
template class DomainLammpsCompound<3>;
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
/* -------------------------------------------------------------------------- */

Event Timeline