Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90679369
domain_md1d.hh
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
Sun, Nov 3, 20:02
Size
7 KB
Mime Type
text/x-c++
Expires
Tue, Nov 5, 20:02 (2 d)
Engine
blob
Format
Raw Data
Handle
22118601
Attached To
rLIBMULTISCALE LibMultiScale
domain_md1d.hh
View Options
/**
* @file domain_md1d.hh
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
* @author Srinivasa Babu Ramisetti <srinivasa.ramisetti@epfl.ch>
*
* @date Fri Jan 10 20:47:45 2014
*
* @brief This is the domain for 1d atomic chains
*
* @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.
*
*/
#ifndef __LIBMULTISCALE_DOMAIN_MD1D_HH__
#define __LIBMULTISCALE_DOMAIN_MD1D_HH__
/* -------------------------------------------------------------------------- */
#include "container_md1d.hh"
#include "domain_md.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
/**
* Class DomainAtomic
* domaine atomique
*/
class
DomainMD1D
:
public
DomainAtomic
<
ContainerMD1D
,
1
>
{
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public
:
DomainMD1D
(
DomainID
ID
,
CommGroup
GID
);
/* ------------------------------------------------------------------------ */
/* Typedefs */
/* ------------------------------------------------------------------------ */
typedef
RefMD1D
RefDof
;
typedef
ContainerMD1D
ContainerDofs
;
typedef
ContainerMD1D
::
iterator
IteratorDofs
;
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
void
performStep1
();
void
performStep3
();
void
performStep2
();
void
init
();
//! get the elastic stiffness constant
Real
getElasticConstant
();
//! get R0
Real
getR0
();
int
getNbDofs
();
virtual
bool
isPeriodic
(
UInt
dir
);
protected
:
void
performMigration
(){};
void
p1
();
void
p3
();
//! compute quadratic potential force
void
quadraticForceComputation
();
void
declareParams
();
inline
Real
computeDistance
(
const
Real
&
xi
,
const
Real
&
xj
);
void
correctPBCPositions
();
/* --------------------------------------------------------------------------
*/
// functions for AMELCG
/* --------------------------------------------------------------------------
*/
public
:
//! return product of force by descent direction (for AMELCG)
Real
getFdotDir
()
{
return
0
;
};
//! return max of forces (for AMELCG)
Real
getFMax
()
{
return
0
;
};
//! return max of direction vector (for AMELCG)
Real
getDirMax
()
{
return
0
;
};
//! return norm 2 of forces (for AMELCG)
Real
getFNorm2
()
{
return
0
;
};
//! return stuff for AMELCG
Real
getFdotOldF
()
{
return
0
;
};
//! update direction AMELCG
void
updateDirection
(
Real
beta
){};
//! return stuff for AMELCG
void
saveForceVector
(){};
//! displace in descent direction with given magnitude
void
displaceTowardsDirection
(
Real
alpha
){};
//! get amount of work done by external forces
Real
getExternalWork
()
{
return
0
;
};
//! set amount of work done by external forces
void
setExternalWork
(
Real
work
){};
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
UInt
getDim
();
void
getNeighborList
(
RefAtom
&
atom
,
UInt
count
,
std
::
vector
<
RefAtom
>
&
neigbhor_list
);
void
getDomainDimensions
(
Real
*
xmin
,
Real
*
xmax
);
void
getSubDomainDimensions
(
Real
*
xmin
,
Real
*
xmax
);
//! set current step to a given value
void
setCurrentStep
(
UInt
ts
);
//! get current step to a given value
UInt
getCurrentStep
();
//! set timestep to a given value
void
setTimeStep
(
Real
ts
);
//! GetTimeStep
Real
getTimeStep
();
void
setPeriodicFlag
(
bool
flag
);
void
setReferenceManagerState
(
bool
state
);
Real
getEcin
();
Real
getEpot
();
private
:
Real
getDomainSize
();
void
computeNeighborLists
();
void
computeContribution
(
UInt
i
,
UInt
j
);
/* ------------------------------------------------------------------------ */
/* Friends */
/* ------------------------------------------------------------------------ */
// friend class DomainAtomicInterface;
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private
:
//! the neighbor list
std
::
vector
<
std
::
vector
<
UInt
>>
neighbor_lists
;
//! array to atoms
std
::
vector
<
DOF
>
dofs
;
// timestep
Quantity
<
Time
>
timeStep
;
//! array for constraints
Real
*
stress
;
//! interatomic distance
Quantity
<
Length
>
r0
;
//! cutoff radius
Quantity
<
Length
>
rcut
;
//! epsilon parameter for lennard jones
Quantity
<
Energy
>
epsilon
;
//! sigma parameter for lennard jones
Quantity
<
Length
>
sigma
;
//! equivalent stiffness
Real
stiffness_parameter
;
//! flag to activate periodic boundary conditions
bool
periodic_flag
;
/* ------------------------------------------------------------------------ */
// old material members
/* --------------------------------------------------------------------------
*/
//! per atom mass
Quantity
<
Mass
>
mass
;
//! flag to activate elasticity (linearize LJ)
bool
elastic_flag
;
//! if a shift is requested for the entire set of atoms
Quantity
<
Length
>
shift
;
//! the file to read the atomic points from
std
::
string
atom_file
;
};
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
/* -------------------------------------------------------------------------- */
#endif
/* __LIBMULTISCALE_DOMAIN_MD1D_HH__ */
Event Timeline
Log In to Comment