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
7be65314
Commit
7be65314
authored
9 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Lid driven cavity working
parent
64d29477
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/FiniteDifference/eq_unit_test.hpp
+2
-2
2 additions, 2 deletions
src/FiniteDifference/eq_unit_test.hpp
src/Vector/Vector_eigen.hpp
+7
-1
7 additions, 1 deletion
src/Vector/Vector_eigen.hpp
with
9 additions
and
3 deletions
src/FiniteDifference/eq_unit_test.hpp
+
2
−
2
View file @
7be65314
...
...
@@ -110,12 +110,12 @@ BOOST_AUTO_TEST_SUITE( eq_test_suite )
BOOST_AUTO_TEST_CASE
(
lid_driven_cavity
)
{
// Domain
Box
<
2
,
float
>
domain
({
0.0
,
0.0
},{
1
.0
,
1.0
});
Box
<
2
,
float
>
domain
({
0.0
,
0.0
},{
3
.0
,
1.0
});
// Ghost
Ghost
<
2
,
float
>
g
(
0.01
);
long
int
sz
[]
=
{
8
,
8
};
long
int
sz
[]
=
{
256
,
64
};
size_t
szu
[
2
];
szu
[
0
]
=
(
size_t
)
sz
[
0
];
szu
[
1
]
=
(
size_t
)
sz
[
1
];
...
...
This diff is collapsed.
Click to expand it.
src/Vector/Vector_eigen.hpp
+
7
−
1
View file @
7be65314
...
...
@@ -123,12 +123,18 @@ class Vector<T,Eigen::Matrix<T, Eigen::Dynamic, 1>>
// set the staggered position of the property
openfpm
::
vector
<
comb
<
scheme
::
Sys_eqs_typ
::
dims
>>
stag_pos
[
sizeof
...(
pos
)];
// interpolation points for each property
openfpm
::
vector
<
std
::
vector
<
comb
<
scheme
::
Sys_eqs_typ
::
dims
>>>
interp_pos
[
sizeof
...(
pos
)];
// fill the staggered position vector for each property
stag_set_position
<
scheme
::
Sys_eqs_typ
::
dims
,
typename
Grid_dst
::
value_type
::
type
>
ssp
(
stag_pos
);
typedef
boost
::
mpl
::
vector_c
<
unsigned
int
,
pos
...
>
v_pos_type
;
boost
::
mpl
::
for_each_ref
<
v_pos_type
>
(
ssp
);
interp_points
<
scheme
::
Sys_eqs_typ
::
dims
,
v_pos_type
,
typename
Grid_dst
::
value_type
::
type
>
itp
(
interp_pos
,
stag_pos
);
boost
::
mpl
::
for_each_ref
<
v_pos_type
>
(
itp
);
// shift the start and stop by the padding
grid_key_dx
<
scheme
::
Sys_eqs_typ
::
dims
>
start_k
=
grid_key_dx
<
scheme
::
Sys_eqs_typ
::
dims
>
(
start
)
+
pd
.
getKP1
();
grid_key_dx
<
scheme
::
Sys_eqs_typ
::
dims
>
stop_k
=
grid_key_dx
<
scheme
::
Sys_eqs_typ
::
dims
>
(
stop
)
+
pd
.
getKP1
();
...
...
@@ -154,7 +160,7 @@ class Vector<T,Eigen::Matrix<T, Eigen::Dynamic, 1>>
// Transform this id into an id for the Eigen vector
interp_ele
<
scheme
,
Grid_dst
,
Eigen
::
Matrix
<
T
,
Eigen
::
Dynamic
,
1
>
,
T
,
sizeof
...(
pos
)
>
cp
(
key_dst
,
g_dst
,
v
,
key_src
,
g_map
,
stag
_pos
);
interp_ele
<
scheme
,
Grid_dst
,
Eigen
::
Matrix
<
T
,
Eigen
::
Dynamic
,
1
>
,
T
,
sizeof
...(
pos
)
>
cp
(
key_dst
,
g_dst
,
v
,
key_src
,
g_map
,
interp
_pos
);
boost
::
mpl
::
for_each_ref
<
boost
::
mpl
::
range_c
<
int
,
0
,
v_size
::
value
>>
(
cp
);
...
...
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