Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91280585
bond_harmonic_kokkos.h
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
Sat, Nov 9, 15:20
Size
2 KB
Mime Type
text/x-c
Expires
Mon, Nov 11, 15:20 (2 d)
Engine
blob
Format
Raw Data
Handle
22145688
Attached To
rLAMMPS lammps
bond_harmonic_kokkos.h
View Options
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef BOND_CLASS
BondStyle
(
harmonic
/
kk
,
BondHarmonicKokkos
<
LMPDeviceType
>
)
BondStyle
(
harmonic
/
kk
/
device
,
BondHarmonicKokkos
<
LMPDeviceType
>
)
BondStyle
(
harmonic
/
kk
/
host
,
BondHarmonicKokkos
<
LMPHostType
>
)
#else
#ifndef LMP_BOND_HARMONIC_KOKKOS_H
#define LMP_BOND_HARMONIC_KOKKOS_H
#include "bond_harmonic.h"
#include "kokkos_type.h"
namespace
LAMMPS_NS
{
template
<
int
NEWTON_BOND
,
int
EVFLAG
>
struct
TagBondHarmonicCompute
{};
template
<
class
DeviceType
>
class
BondHarmonicKokkos
:
public
BondHarmonic
{
public:
typedef
DeviceType
device_type
;
typedef
EV_FLOAT
value_type
;
BondHarmonicKokkos
(
class
LAMMPS
*
);
virtual
~
BondHarmonicKokkos
();
virtual
void
compute
(
int
,
int
);
virtual
void
coeff
(
int
,
char
**
);
template
<
int
NEWTON_BOND
,
int
EVFLAG
>
KOKKOS_INLINE_FUNCTION
void
operator
()(
TagBondHarmonicCompute
<
NEWTON_BOND
,
EVFLAG
>
,
const
int
&
,
EV_FLOAT
&
)
const
;
template
<
int
NEWTON_BOND
,
int
EVFLAG
>
KOKKOS_INLINE_FUNCTION
void
operator
()(
TagBondHarmonicCompute
<
NEWTON_BOND
,
EVFLAG
>
,
const
int
&
)
const
;
//template<int NEWTON_BOND>
KOKKOS_INLINE_FUNCTION
void
ev_tally
(
EV_FLOAT
&
ev
,
const
int
&
i
,
const
int
&
j
,
const
F_FLOAT
&
ebond
,
const
F_FLOAT
&
fbond
,
const
F_FLOAT
&
delx
,
const
F_FLOAT
&
dely
,
const
F_FLOAT
&
delz
)
const
;
protected:
class
NeighborKokkos
*
neighborKK
;
typedef
ArrayTypes
<
DeviceType
>
AT
;
typename
AT
::
t_x_array_randomread
x
;
typename
Kokkos
::
View
<
double
*
[
3
],
typename
AT
::
t_f_array
::
array_layout
,
DeviceType
,
Kokkos
::
MemoryTraits
<
Kokkos
::
Atomic
>
>
f
;
typename
AT
::
t_int_2d
bondlist
;
Kokkos
::
DualView
<
E_FLOAT
*
,
Kokkos
::
LayoutRight
,
DeviceType
>
k_eatom
;
Kokkos
::
DualView
<
F_FLOAT
*
[
6
],
Kokkos
::
LayoutRight
,
DeviceType
>
k_vatom
;
Kokkos
::
View
<
E_FLOAT
*
,
Kokkos
::
LayoutRight
,
DeviceType
,
Kokkos
::
MemoryTraits
<
Kokkos
::
Atomic
>
>
d_eatom
;
Kokkos
::
View
<
F_FLOAT
*
[
6
],
Kokkos
::
LayoutRight
,
DeviceType
,
Kokkos
::
MemoryTraits
<
Kokkos
::
Atomic
>
>
d_vatom
;
int
nlocal
,
newton_bond
;
int
eflag
,
vflag
;
typename
AT
::
t_ffloat_1d
d_k
;
typename
AT
::
t_ffloat_1d
d_r0
;
virtual
void
allocate
();
};
}
#endif
#endif
/* ERROR/WARNING messages:
*/
Event Timeline
Log In to Comment