Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82356139
domain_md_interface.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 10, 23:01
Size
6 KB
Mime Type
text/x-c
Expires
Thu, Sep 12, 23:01 (2 d)
Engine
blob
Format
Raw Data
Handle
20685817
Attached To
rLIBMULTISCALE LibMultiScale
domain_md_interface.cc
View Options
/**
* @file domain_md_interface.cc
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @date Wed Sep 10 10:57:06 2014
*
* @brief Common interface to all molecular models
*
* @section LICENSE
*
* Copyright INRIA and CEA
*
* The LibMultiScale is a C++ parallel framework for the multiscale
* coupling methods dedicated to material simulations. This framework
* provides an API which makes it possible to program coupled simulations
* and integration of already existing codes.
*
* This Project was initiated in a collaboration between INRIA Futurs Bordeaux
* within ScAlApplix team and CEA/DPTA Ile de France.
* The project is now continued at the Ecole Polytechnique Fédérale de Lausanne
* within the LSMS/ENAC laboratory.
*
* This software is governed by the CeCILL-C license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL-C
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*
*/
/* -------------------------------------------------------------------------- */
#include "lm_common.hh"
#include "domain_md_interface.hh"
#ifdef LIBMULTISCALE_USE_STAMP
#include "stamp/domain_stamp.hh"
#include "stamp/material_stamp.hh"
#endif //LIBMULTISCALE_USE_STAMP
#ifdef LIBMULTISCALE_USE_LAMMPS
#include "lammps/domain_lammps.hh"
#include "lammps/domain_lammps_minimize.hh"
#include "lammps/domain_lammps_dynamic.hh"
//#include "lammps/material_lammps.hh"
#endif //LAMMPS
#ifdef LIBMULTISCALE_USE_MD1D
#include "1d/domain_md1d.hh"
//#include "1d/material_md1d.hh"
#endif //MD1D
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
// DomainInterface * DomainAtomicInterface::parseLine(stringstream & line,
// const string & default_config,
// UInt Dim,
// Communicator & groups,
// UInt ID,UInt GID){
/* -------------------------------------------------------------------------- */
// DomainInterface * DomainAtomicInterface::build(stringstream & line,
// const string & default_config,
// UInt Dim,
// Communicator & groups,
// UInt ID,UInt GID){
// string key;
// string md_config;
// MDModelType md_code=_NONE;
// Parser::strNext(key,line);
// if(key == "STAMP") md_code = _STAMP;
// else if(key == "LAMMPS") md_code = _LAMMPS;
// else if(key == "LAMMPS_CG") md_code = _LAMMPS_MIN;
// else if(key == "MD1D") md_code = _MD1D;
// else if(key == "DUMMY") md_code = _DUMMY;
// else LM_FATAL("unrecognized MD domain : " << key << " abort");
// Parser::strNext(md_config,line);
// if (md_config[0] == '\0') md_config = default_config;
// return build(md_config,md_code,Dim,groups,ID,GID);
// }
// /* -------------------------------------------------------------------------- */
// DomainInterface * DomainAtomicInterface::build(const string & config_file,
// MDModelType md_code,
// UInt Dim,
// Communicator & groups,
// UInt ID,UInt GID){
// DomainAtomicInterface * dom = NULL;
// MaterialAtomic * mat = NULL;
// switch (md_code){
// case _DUMMY:
// mat = new MaterialDummy();
// mat->loadConfigFile(config_file);
// dom = new DummyMD(*mat,groups,ID,GID);
// if (groups.amIinGroup(GID))
// dom->init();
// break;
// case _STAMP:
// #ifdef LIBMULTISCALE_USE_STAMP
// mat = new MaterialStamp();
// mat->loadConfigFile(config);
// dom = new DomainStamp(*mat,*(new ContainerStamp()),groups,ID,GID);
// if (groups.amIinGroup(GID))
// dom->init();
// #else
// LM_FATAL("Recompile with Stamp support");
// #endif
// break;
// case _LAMMPS:
// #ifdef LIBMULTISCALE_USE_LAMMPS
// mat = new MaterialLammps();
// mat->loadConfigFile(config);
// dom = new DomainLammpsDynamic(*mat,groups,ID,GID);
// DUMP("light object instanciated, checking if i am in group"
// << GID << groups.amIinGroup(GID),DBG_WARNING);
// if (groups.amIinGroup(GID))
// dom->init();
// DUMP("init ok pour lammps",DBG_WARNING);
// #else
// LM_FATAL("Recompile with Lammps support");
// #endif
// break;
// case _LAMMPS_MIN:
// #ifdef LIBMULTISCALE_USE_LAMMPS
// mat = new MaterialLammps();
// mat->loadConfigFile(config);
// dom = new DomainLammpsMinimize(*mat,groups,ID,GID);
// DUMP("light object instanciated, checking if i am in group"
// << GID << groups.amIinGroup(GID),DBG_WARNING);
// if (groups.amIinGroup(GID))
// dom->init();
// DUMP("init ok pour lammps",DBG_WARNING);
// #else
// LM_FATAL("Recompile with Lammps support");
// #endif
// break;
// case _MD1D:
// #ifdef LIBMULTISCALE_USE_MD1D
// mat = new MaterialMD1D();
// mat->loadConfigFile(config_file);
// dom = new DomainMD1D(*mat,groups,ID,GID);
// if (groups.amIinGroup(GID))
// dom->init();
// #else
// LM_FATAL("Recompile with MD1D support");
// #endif
// break;
// default:
// LM_FATAL("unknown domain type : code = " << md_code);
// }
// return dom;
// return NULL;
// }
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
Event Timeline
Log In to Comment