Page MenuHomec4science

coupling_dd_md.hh
No OneTemporary

File Metadata

Created
Thu, May 23, 08:32

coupling_dd_md.hh

/**
* @file coupling_dd_md.hh
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @date Wed May 22 17:37:59 2013
*
* @brief Coupling object between atomistic and dislocation dynamics
*
* @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/>.
*
*/
#ifndef __LIBMULTISCALE_COUPLING_DD_MD_HH__
#define __LIBMULTISCALE_COUPLING_DD_MD_HH__
/* -------------------------------------------------------------------------- */
#include "coupling.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
/** this class represent a low-level coupling zone between dd and md.
The Needleman Method for instance is based on it */
template <typename DomainDD, typename DomainMD, UInt Dim>
class CouplingDDMD : public Coupling<DomainDD, DomainMD, Dim> {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
CouplingDDMD<DomainDD, DomainMD, Dim>(const std::string &name,
DomainInterface &DD_dom,
DomainInterface &MD_dom)
: Coupling<DomainDD, DomainMD, Dim>(name, DD_dom, MD_dom) {
comm_group_dd = DD_dom.getGroupID();
comm_group_atomic = MD_dom.getGroupID();
is_in_dd = Communicator::getCommunicator().amIinGroup(comm_group_dd);
is_in_atomic =
Communicator::getCommunicator().amIinGroup(comm_group_atomic);
};
virtual ~CouplingDDMD() {}
/* ------------------------------------------------------------------------ */
/* Typedefs */
/* ------------------------------------------------------------------------ */
typedef typename DomainDD::RefNode RefDDNode;
typedef typename DomainDD::ContainerNodes ContainerDDNodes;
typedef typename DomainDD::IteratorNodes IteratorDDNodes;
typedef typename DomainMD::RefAtom RefAtom;
typedef typename DomainMD::ContainerAtoms ContainerAtoms;
typedef typename DomainMD::IteratorAtoms IteratorAtoms;
typedef ContainerArray<RefAtom> ContainerAtomsSubset;
typedef ContainerArray<RefDDNode> ContainerNodesSubset;
typedef typename ContainerArray<RefDDNode>::iterator IteratorNodesSubset;
typedef typename ContainerArray<RefAtom>::iterator IteratorAtomsSubset;
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
//! group ID of the continuum side
CommGroup comm_group_dd;
//! group IF of the atomic side
CommGroup comm_group_atomic;
//! flag if in group continuum
bool is_in_dd;
//! flag if in group atomic
bool is_in_atomic;
};
__END_LIBMULTISCALE__
#endif /* __LIBMULTISCALE_COUPLING_DD_MD_HH__ */

Event Timeline