Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79713699
fix_wall_lj93_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
Tue, Aug 27, 21:22
Size
2 KB
Mime Type
text/x-c++
Expires
Thu, Aug 29, 21:22 (2 d)
Engine
blob
Format
Raw Data
Handle
20188738
Attached To
rLAMMPS lammps
fix_wall_lj93_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 FIX_CLASS
FixStyle(wall/lj93/kk,FixWallLJ93Kokkos<LMPDeviceType>)
FixStyle(wall/lj93/kk/device,FixWallLJ93Kokkos<LMPDeviceType>)
FixStyle(wall/lj93/kk/host,FixWallLJ93Kokkos<LMPHostType>)
#else
#ifndef LMP_FIX_WALL_LJ93_KOKKOS_H
#define LMP_FIX_WALL_LJ93_KOKKOS_H
#include "fix_wall_lj93.h"
#include "kokkos_type.h"
namespace LAMMPS_NS {
template <class DeviceType>
class FixWallLJ93Kokkos : public FixWallLJ93 {
public:
typedef DeviceType device_type;
typedef ArrayTypes<DeviceType> AT;
typedef double value_type[];
FixWallLJ93Kokkos(class LAMMPS *, int, char **);
void wall_particle(int, int, double);
int m;
KOKKOS_INLINE_FUNCTION
void wall_particle_item(int, value_type) const;
private:
int dim,side;
double coord;
typename AT::t_x_array x;
typename AT::t_f_array f;
typename AT::t_int_1d mask;
typename AT::t_int_scalar d_oneflag;
};
template <class DeviceType>
struct FixWallLJ93KokkosFunctor {
typedef DeviceType device_type ;
typedef double value_type[];
const int value_count;
FixWallLJ93Kokkos<DeviceType> c;
FixWallLJ93KokkosFunctor(FixWallLJ93Kokkos<DeviceType>* c_ptr):
c(*c_ptr),
value_count(c_ptr->m+1) {}
KOKKOS_INLINE_FUNCTION
void operator()(const int i, value_type ewall) const {
c.wall_particle_item(i,ewall);
}
};
}
#endif
#endif
/* ERROR/WARNING messages:
E: Particle on or inside fix wall surface
Particles must be "exterior" to the wall in order for energy/force to
be calculated.
*/
Event Timeline
Log In to Comment