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
ffd07f29
Commit
ffd07f29
authored
7 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Fixing OpenFPM latest modules
parent
cd9afeba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
example/Grid/3_gray_scott/main.cpp
+6
-0
6 additions, 0 deletions
example/Grid/3_gray_scott/main.cpp
example/Grid/3_gray_scott_3d/main.cpp
+19
-13
19 additions, 13 deletions
example/Grid/3_gray_scott_3d/main.cpp
with
25 additions
and
13 deletions
example/Grid/3_gray_scott/main.cpp
+
6
−
0
View file @
ffd07f29
...
...
@@ -39,6 +39,12 @@ constexpr int y = 1;
* We also define an init function. This function initialize the species U and V. In the following we are going into the
* detail of this function
*
* In figure is the final solution of the problem
*
* \htmlonly
* <img src="http://ppmcore.mpi-cbg.de/web/images/examples/gray_scott_2d/2D_gray_scott.jpg"/>
* \endhtmlonly
*
* \snippet Grid/3_gray_scott/main.cpp init fun
* \snippet Grid/3_gray_scott/main.cpp end fun
*
...
...
This diff is collapsed.
Click to expand it.
example/Grid/3_gray_scott_3d/main.cpp
+
19
−
13
View file @
ffd07f29
...
...
@@ -3,13 +3,20 @@
#include
"timer.hpp"
/*!
* \page Grid_3_gs_3D Grid 3 Gray Scott in 3D
*
* \page Grid_3_gs_3D Gray Scott in 3D
*
* # Solving a gray scott-system in 3D # {#e3_gs_gray_scott}
*
* This example is just an extension of the 2D Gray scott example.
* Here we show how to solve a non-linear reaction diffusion system in 3D
*
* In figure is the final solution of the problem
*
* \htmlonly
* <img src="http://ppmcore.mpi-cbg.de/web/images/examples/gray_scott_3d/gs_alpha.png"/>
* \endhtmlonly
*
* \see \ref Grid_2_solve_eq
*
* \snippet Grid/3_gray_scott/main.cpp constants
...
...
@@ -25,6 +32,7 @@ constexpr int x = 0;
constexpr
int
y
=
1
;
constexpr
int
z
=
2
;
//! \cond [constants] \endcond
void
init
(
grid_dist_id
<
3
,
double
,
aggregate
<
double
,
double
>
>
&
Old
,
grid_dist_id
<
3
,
double
,
aggregate
<
double
,
double
>
>
&
New
,
Box
<
3
,
double
>
&
domain
)
{
...
...
@@ -46,16 +54,16 @@ void init(grid_dist_id<3,double,aggregate<double,double> > & Old, grid_dist_id<3
++
it
;
}
long
int
x_start
=
Old
.
size
(
0
)
*
1.55
f
/
domain
.
getHigh
(
0
);
long
int
y_start
=
Old
.
size
(
1
)
*
1.55
f
/
domain
.
getHigh
(
1
);
long
int
z_start
=
Old
.
size
(
1
)
*
1.55
f
/
domain
.
getHigh
(
2
);
long
int
x_start
=
Old
.
size
(
0
)
*
1.55
f
/
domain
.
getHigh
(
0
);
long
int
y_start
=
Old
.
size
(
1
)
*
1.55
f
/
domain
.
getHigh
(
1
);
long
int
z_start
=
Old
.
size
(
1
)
*
1.55
f
/
domain
.
getHigh
(
2
);
long
int
x_stop
=
Old
.
size
(
0
)
*
1.85
f
/
domain
.
getHigh
(
0
);
long
int
y_stop
=
Old
.
size
(
1
)
*
1.85
f
/
domain
.
getHigh
(
1
);
long
int
z_stop
=
Old
.
size
(
1
)
*
1.85
f
/
domain
.
getHigh
(
2
);
long
int
x_stop
=
Old
.
size
(
0
)
*
1.85
f
/
domain
.
getHigh
(
0
);
long
int
y_stop
=
Old
.
size
(
1
)
*
1.85
f
/
domain
.
getHigh
(
1
);
long
int
z_stop
=
Old
.
size
(
1
)
*
1.85
f
/
domain
.
getHigh
(
2
);
grid_key_dx
<
3
>
start
({
x_start
,
y_start
,
z_start
});
grid_key_dx
<
3
>
stop
({
x_stop
,
y_stop
,
z_stop
});
grid_key_dx
<
3
>
start
({
x_start
,
y_start
,
z_start
});
grid_key_dx
<
3
>
stop
({
x_stop
,
y_stop
,
z_stop
});
auto
it_init
=
Old
.
getSubDomainIterator
(
start
,
stop
);
while
(
it_init
.
isNext
())
...
...
@@ -69,8 +77,6 @@ void init(grid_dist_id<3,double,aggregate<double,double> > & Old, grid_dist_id<3
}
}
//! \cond [end fun] \endcond
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -107,7 +113,7 @@ int main(int argc, char* argv[])
//! \cond [init lib] \endcond
/*!
* \page Grid_3_gs_3D
Grid 3
Gray Scott
* \page Grid_3_gs_3D Gray Scott
in 3D
*
* Here we create 2 distributed grid in 2D Old and New. In particular because we want that
* the second grid is distributed across processors in the same way we pass the decomposition
...
...
@@ -208,7 +214,7 @@ int main(int argc, char* argv[])
//! \cond [time stepping] \endcond
/*!
* \page Grid_3_gs_3D
Grid 3
Gray Scott
* \page Grid_3_gs_3D Gray Scott
in 3D
*
* ## Finalize ##
*
...
...
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