www.cemf.ir
internalPointsKernels.cpp
Go to the documentation of this file.
1
/*------------------------------- phasicFlow ---------------------------------
2
O C enter of
3
O O E ngineering and
4
O O M ultiscale modeling of
5
OOOOOOO F luid flow
6
------------------------------------------------------------------------------
7
Copyright (C): www.cemf.ir
8
email: hamid.r.norouzi AT gmail.com
9
------------------------------------------------------------------------------
10
Licence:
11
This file is part of phasicFlow code. It is a free software for simulating
12
granular and multiphase flows. You can redistribute it and/or modify it under
13
the terms of GNU General Public License v3 or any other later versions.
14
15
phasicFlow is distributed to help others in their research in the field of
16
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
19
-----------------------------------------------------------------------------*/
20
21
#include "
internalPointsKernels.hpp
"
22
23
void
pFlow::internalPointsKernels::changePosition
24
(
25
deviceViewType1D<realx3>
points,
26
deviceViewType1D<uint32>
indices,
27
realx3
transferVector
28
)
29
{
30
auto
s =
static_cast<
uint32
>
(indices.size());
31
if
(s==0u)
return
;
32
33
Kokkos::parallel_for
34
(
35
"internalPointsKernels::changePosition"
,
36
deviceRPolicyStatic
(0u, s),
37
LAMBDA_HD
(
uint32
i)
38
{
39
points[indices[i]] += transferVector;
40
}
41
);
42
Kokkos::fence();
43
44
}
pFlow::uint32
unsigned int uint32
Definition:
builtinTypes.hpp:56
pFlow::deviceViewType1D
Kokkos::View< T * > deviceViewType1D
1D array (vector) with default device (memory space and execution space)
Definition:
KokkosTypes.hpp:121
pFlow::internalPointsKernels::changePosition
void changePosition(deviceViewType1D< realx3 > points, deviceViewType1D< uint32 > indices, realx3 transferVector)
Definition:
internalPointsKernels.cpp:24
internalPointsKernels.hpp
LAMBDA_HD
#define LAMBDA_HD
Definition:
pFlowMacros.hpp:58
pFlow::deviceRPolicyStatic
Kokkos::RangePolicy< Kokkos::DefaultExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< pFlow::uint32 > > deviceRPolicyStatic
Definition:
KokkosTypes.hpp:66
pFlow::triple< real >
src
phasicFlow
structuredData
pointStructure
internalPoints
internalPointsKernels.cpp
Generated by
1.8.17