Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_numerics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_numerics
Commits
8633d177
Commit
8633d177
authored
2 years ago
by
Abhinav Singh
Browse files
Options
Downloads
Patches
Plain Diff
Some updates and fixes
parent
ab5e15b8
No related branches found
Branches containing commit
No related tags found
1 merge request
!15
FD_solver to develop Upstream
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/DCPSE/DCPSE_op/DCPSE_op.hpp
+73
-0
73 additions, 0 deletions
src/DCPSE/DCPSE_op/DCPSE_op.hpp
src/DCPSE/Dcpse.hpp
+1
-1
1 addition, 1 deletion
src/DCPSE/Dcpse.hpp
src/Operators/Vector/cuda/vector_dist_operators_cuda.cuh
+3
-3
3 additions, 3 deletions
src/Operators/Vector/cuda/vector_dist_operators_cuda.cuh
with
77 additions
and
4 deletions
src/DCPSE/DCPSE_op/DCPSE_op.hpp
+
73
−
0
View file @
8633d177
...
...
@@ -2547,6 +2547,76 @@ public:
}
};
template
<
template
<
unsigned
int
,
typename
,
typename
...
>
class
Dcpse_type
=
Dcpse
>
class
Derivative_G_T
{
void
*
dcpse
;
public:
template
<
typename
particles_type
>
Derivative_G_T
(
particles_type
&
parts
,
unsigned
int
ord
,
typename
particles_type
::
stype
rCut
,
const
Point
<
particles_type
::
dims
,
unsigned
int
>
&
p
,
double
oversampling_factor
=
dcpse_oversampling_factor
,
support_options
opt
=
support_options
::
RADIUS
)
{
dcpse
=
new
Dcpse_type
<
particles_type
::
dims
,
particles_type
>
(
parts
,
p
,
ord
,
rCut
,
oversampling_factor
,
opt
);
}
template
<
typename
operand_type
>
vector_dist_expression_op
<
operand_type
,
Dcpse_type
<
operand_type
::
vtype
::
dims
,
typename
operand_type
::
vtype
>
,
VECT_DCPSE
>
operator
()(
operand_type
arg
)
{
typedef
Dcpse_type
<
operand_type
::
vtype
::
dims
,
typename
operand_type
::
vtype
>
dcpse_type
;
return
vector_dist_expression_op
<
operand_type
,
dcpse_type
,
VECT_DCPSE
>
(
arg
,
*
(
dcpse_type
*
)
dcpse
);
}
template
<
typename
particles_type
>
void
checkMomenta
(
particles_type
&
particles
)
{
auto
dcpse_temp
=
(
Dcpse_type
<
particles_type
::
dims
,
particles_type
>
*
)
dcpse
;
dcpse_temp
->
checkMomenta
(
particles
);
}
template
<
unsigned
int
prp
,
typename
particles_type
>
void
DrawKernel
(
particles_type
&
particles
,
int
k
)
{
auto
dcpse_temp
=
(
Dcpse_type
<
particles_type
::
dims
,
particles_type
>
*
)
dcpse
;
dcpse_temp
->
template
DrawKernel
<
prp
>(
particles
,
k
);
}
/*! \brief Method for Saving the DCPSE Operator.
*
* \param parts particle set
* \param file name for data to be saved.
*/
template
<
typename
particles_type
>
void
save
(
particles_type
&
particles
,
const
std
::
string
&
file
)
{
auto
dcpse_temp
=
(
Dcpse_type
<
particles_type
::
dims
,
particles_type
>
*
)
dcpse
;
dcpse_temp
->
save
(
file
);
}
/*! \brief Method for Loading the DCPSE Operator.
*
* \param parts particle set
* \param file name for data to be loaded from.
*/
template
<
typename
particles_type
>
void
load
(
particles_type
&
particles
,
const
std
::
string
&
file
)
{
auto
dcpse_temp
=
(
Dcpse_type
<
particles_type
::
dims
,
particles_type
>
*
)
dcpse
;
dcpse_temp
->
load
(
file
);
}
/*! \brief Method for Updating the DCPSE Operator by recomputing DCPSE Kernels.
*
*
* \param parts particle set
*/
template
<
typename
particles_type
>
void
update
(
particles_type
&
particles
)
{
auto
dcpse_temp
=
(
Dcpse_type
<
particles_type
::
dims
,
particles_type
>
*
)
dcpse
;
dcpse_temp
->
initializeUpdate
(
particles
);
}
};
//typedef PPInterpolation_T<Dcpse> PPInterpolation;
typedef
Derivative_x_T
<
Dcpse
>
Derivative_x
;
typedef
Derivative_y_T
<
Dcpse
>
Derivative_y
;
...
...
@@ -2569,6 +2639,8 @@ typedef Derivative_yyy_T<Dcpse> Derivative_yyy;
typedef
Derivative_xxxx_T
<
Dcpse
>
Derivative_xxxx
;
typedef
Derivative_yyyy_T
<
Dcpse
>
Derivative_yyyy
;
typedef
Derivative_xxyy_T
<
Dcpse
>
Derivative_xxyy
;
typedef
Derivative_G_T
<
Dcpse
>
Derivative_G
;
#if defined(__NVCC__)
typedef
Derivative_x_T
<
Dcpse_gpu
>
Derivative_x_gpu
;
...
...
@@ -2589,6 +2661,7 @@ typedef Derivative_xxx_T<Dcpse_gpu> Derivative_xxx_gpu;
typedef
Derivative_xxy_T
<
Dcpse_gpu
>
Derivative_xxy_gpu
;
typedef
Derivative_yyx_T
<
Dcpse_gpu
>
Derivative_yyx_gpu
;
typedef
Derivative_yyy_T
<
Dcpse_gpu
>
Derivative_yyy_gpu
;
typedef
Derivative_G_T
<
Dcpse_gpu
>
Derivative_G_gpu
;
#endif
...
...
This diff is collapsed.
Click to expand it.
src/DCPSE/Dcpse.hpp
+
1
−
1
View file @
8633d177
...
...
@@ -75,7 +75,7 @@ private:
vector_type
&
particlesFrom
;
vector_type2
&
particlesTo
;
double
rCut
,
supportSizeFactor
,
nSpacing
;
double
rCut
,
supportSizeFactor
=
1
,
nSpacing
;
unsigned
int
convergenceOrder
,
nCount
;
bool
isSurfaceDerivative
=
false
;
...
...
This diff is collapsed.
Click to expand it.
src/Operators/Vector/cuda/vector_dist_operators_cuda.cuh
+
3
−
3
View file @
8633d177
...
...
@@ -26,11 +26,11 @@ struct SubsetSelector_impl<true>
{
template
<
typename
particle_type
,
typename
subset_type
>
static
void
check
(
particle_type
&
particles
,
subset_type
&
particle_subset
){
if
(
particles
.
getMapCtr
()
!=
particle_subset
.
getUpdateCtr
())
//This getMapCtr needs to be created or fixed for cuda!
/*
if(particles.getMapCtr()!=particle_subset.getUpdateCtr())
{
std::cerr<<__FILE__<<":"<<__LINE__<<" Error: You forgot a subset update after map."<<std::endl;
}
}
*/
}
};
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment