Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_pdata
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_pdata
Commits
9034c2b1
Commit
9034c2b1
authored
8 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Adding missing files
parent
bc68ad93
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/DLB/LB_Model.hpp
+58
-0
58 additions, 0 deletions
src/DLB/LB_Model.hpp
with
58 additions
and
0 deletions
src/DLB/LB_Model.hpp
0 → 100644
+
58
−
0
View file @
9034c2b1
/*
* LB_Model.hpp
*
* Created on: Jan 18, 2017
* Author: i-bird
*/
#ifndef SRC_DLB_LB_MODEL_HPP_
#define SRC_DLB_LB_MODEL_HPP_
/*! \brief Linear model
*
* The linear model count each particle as weight one
*
*/
struct
ModelLin
{
size_t
factor
=
1
;
ModelLin
(
size_t
factor
)
:
factor
(
factor
)
{}
ModelLin
()
{}
template
<
typename
Decomposition
,
typename
vector
>
inline
void
addComputation
(
Decomposition
&
dec
,
const
vector
&
vd
,
size_t
v
,
size_t
p
)
{
dec
.
addComputationCost
(
v
,
1
);
}
template
<
typename
Decomposition
>
inline
void
applyModel
(
Decomposition
&
dec
,
size_t
v
)
{
dec
.
setSubSubDomainComputationCost
(
v
,
dec
.
getSubSubDomainComputationCost
(
v
));
}
};
/*! \brief Linear model
*
* The linear model count each particle as weight one
*
*/
struct
ModelSquare
{
size_t
factor
=
1
;
template
<
typename
Decomposition
,
typename
vector
>
inline
void
addComputation
(
Decomposition
&
dec
,
const
vector
&
vd
,
size_t
v
,
size_t
p
)
{
dec
.
addComputationCost
(
v
,
1
);
}
template
<
typename
Decomposition
>
inline
void
applyModel
(
Decomposition
&
dec
,
size_t
v
)
{
dec
.
setSubSubDomainComputationCost
(
v
,
dec
.
getSubSubDomainComputationCost
(
v
)
*
dec
.
getSubSubDomainComputationCost
(
v
));
}
};
#endif
/* SRC_DLB_LB_MODEL_HPP_ */
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