Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openfpm_pdata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
argupta
openfpm_pdata
Commits
daf36c05
Commit
daf36c05
authored
8 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Make ghost put test stringer
parent
2bd620dd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+2
-2
2 additions, 2 deletions
CHANGELOG.md
script/install_PETSC.sh
+5
-2
5 additions, 2 deletions
script/install_PETSC.sh
src/Vector/vector_dist_unit_test.hpp
+93
-36
93 additions, 36 deletions
src/Vector/vector_dist_unit_test.hpp
with
100 additions
and
40 deletions
CHANGELOG.md
+
2
−
2
View file @
daf36c05
...
@@ -8,8 +8,8 @@ All notable changes to this project will be documented in this file.
...
@@ -8,8 +8,8 @@ All notable changes to this project will be documented in this file.
-
Full-Support for complex property on vector-dist (Serialization) + example
-
Full-Support for complex property on vector-dist (Serialization) + example
### Fixed
### Fixed
-
Installation in case of
MPI
preinstalled
PETSC fail
-
Installation
PETSC installation fail
in case of preinstalled
MPI
-
vector_dist with negative domain
-
vector_dist with negative domain
(Now supported)
-
Grid 1D fixing
-
Grid 1D fixing
### Changed
### Changed
...
...
This diff is collapsed.
Click to expand it.
script/install_PETSC.sh
+
5
−
2
View file @
daf36c05
...
@@ -57,6 +57,9 @@ fi
...
@@ -57,6 +57,9 @@ fi
if
[
-d
"
$1
/MPI"
]
;
then
if
[
-d
"
$1
/MPI"
]
;
then
configure_trilinos_options
=
"
$configure_trilinos_options
-D MPI_BASE_DIR=
$1
/MPI "
configure_trilinos_options
=
"
$configure_trilinos_options
-D MPI_BASE_DIR=
$1
/MPI "
mpi_dir
=
"
$1
/MPI"
else
mpi_dir
=
$(
dirname
"
$(
dirname
"
$(
which mpic++
)
"
)
"
)
fi
fi
### It seem that the PETSC --download-packege option has several problems and cannot produce
### It seem that the PETSC --download-packege option has several problems and cannot produce
...
@@ -286,9 +289,9 @@ fi
...
@@ -286,9 +289,9 @@ fi
tar
-xf
petsc-lite-3.6.4.tar.gz
tar
-xf
petsc-lite-3.6.4.tar.gz
cd
petsc-3.6.4
cd
petsc-3.6.4
echo
"./configure --with-cxx-dialect=C++11 --with-mpi-dir=
$
1
/MPI
$configure_options
--prefix=
$1
/PETSC"
echo
"./configure --with-cxx-dialect=C++11 --with-mpi-dir=
$
mpi_dir
$configure_options
--prefix=
$1
/PETSC"
./configure
--with-cxx-dialect
=
C++11
$petsc_openmp
--with-mpi-dir
=
$
1
/MPI
$configure_options
--with-mumps-lib
=
"
$MUMPS_extra_lib
"
--prefix
=
$1
/PETSC
./configure
--with-cxx-dialect
=
C++11
$petsc_openmp
--with-mpi-dir
=
$
mpi_dir
$configure_options
--with-mumps-lib
=
"
$MUMPS_extra_lib
"
--prefix
=
$1
/PETSC
make all
test
make all
test
make
install
make
install
...
...
This diff is collapsed.
Click to expand it.
src/Vector/vector_dist_unit_test.hpp
+
93
−
36
View file @
daf36c05
...
@@ -1632,62 +1632,119 @@ BOOST_AUTO_TEST_CASE( vector_dist_ghost_put )
...
@@ -1632,62 +1632,119 @@ BOOST_AUTO_TEST_CASE( vector_dist_ghost_put )
// sync the ghost
// sync the ghost
vd
.
ghost_get
<
0
>
();
vd
.
ghost_get
<
0
>
();
auto
NN
=
vd
.
getCellList
(
1.3
/
k
);
{
float
a
=
1.0
f
*
k
*
k
;
auto
NN
=
vd
.
getCellList
(
1.3
/
k
);
float
a
=
1.0
f
*
k
*
k
;
// run trough all the particles + ghost
// run trough all the particles + ghost
auto
it2
=
vd
.
getDomainIterator
();
auto
it2
=
vd
.
getDomainIterator
();
while
(
it2
.
isNext
())
while
(
it2
.
isNext
())
{
{
// particle p
// particle p
auto
p
=
it2
.
get
();
auto
p
=
it2
.
get
();
Point
<
3
,
float
>
xp
=
vd
.
getPos
(
p
);
Point
<
3
,
float
>
xp
=
vd
.
getPos
(
p
);
// Get an iterator over the neighborhood particles of p
// Get an iterator over the neighborhood particles of p
auto
Np
=
NN
.
template
getNNIterator
<
NO_CHECK
>(
NN
.
getCell
(
vd
.
getPos
(
p
)));
auto
Np
=
NN
.
template
getNNIterator
<
NO_CHECK
>(
NN
.
getCell
(
vd
.
getPos
(
p
)));
// For each neighborhood particle ...
// For each neighborhood particle ...
while
(
Np
.
isNext
())
while
(
Np
.
isNext
())
{
{
auto
q
=
Np
.
get
();
auto
q
=
Np
.
get
();
Point
<
3
,
float
>
xq
=
vd
.
getPos
(
q
);
Point
<
3
,
float
>
xq
=
vd
.
getPos
(
q
);
float
dist
=
xp
.
distance
(
xq
);
float
dist
=
xp
.
distance
(
xq
);
if
(
dist
<
1.0
/
k
)
if
(
dist
<
1.0
/
k
)
vd
.
getProp
<
0
>
(
q
)
+=
a
*
(
-
dist
*
dist
+
1.0
/
k
/
k
);
vd
.
getProp
<
0
>
(
q
)
+=
a
*
(
-
dist
*
dist
+
1.0
/
k
/
k
);
++
Np
;
++
Np
;
}
++
it2
;
}
}
++
it2
;
vd
.
ghost_put
<
add_
,
0
>
();
}
vd
.
ghost_put
<
add_
,
0
>
();
bool
ret
=
true
;
auto
it3
=
vd
.
getDomainIterator
();
bool
ret
=
true
;
float
constant
=
vd
.
getProp
<
0
>
(
it3
.
get
());
auto
it3
=
vd
.
getDomainIterator
();
float
eps
=
0.001
;
while
(
it3
.
isNext
())
{
float
constant2
=
vd
.
getProp
<
0
>
(
it3
.
get
());
if
(
fabs
(
constant
-
constant2
)
/
constant
>
eps
)
{
std
::
cout
<<
Point
<
3
,
float
>
(
vd
.
getPos
(
it3
.
get
())).
toString
()
<<
" "
<<
constant2
<<
"/"
<<
constant
<<
" "
<<
v_cl
.
getProcessUnitID
()
<<
std
::
endl
;
ret
=
false
;
break
;
}
float
constant
=
vd
.
getProp
<
0
>
(
it3
.
get
());
++
it3
;
float
eps
=
0.001
;
}
BOOST_REQUIRE_EQUAL
(
ret
,
true
);
}
while
(
it3
.
isNext
())
{
{
float
constant2
=
vd
.
getProp
<
0
>
(
it3
.
get
());
auto
NN
=
vd
.
getCellList
(
1.3
/
k
);
if
(
fabs
(
constant
-
constant2
)
/
constant
>
eps
)
float
a
=
1.0
f
*
k
*
k
;
// run trough all the particles + ghost
auto
it2
=
vd
.
getDomainIterator
();
while
(
it2
.
isNext
())
{
{
std
::
cout
<<
Point
<
3
,
float
>
(
vd
.
getPos
(
it3
.
get
())).
toString
()
<<
" "
<<
constant2
<<
"/"
<<
constant
<<
" "
<<
v_cl
.
getProcessUnitID
()
<<
std
::
endl
;
// particle p
ret
=
false
;
auto
p
=
it2
.
get
();
break
;
Point
<
3
,
float
>
xp
=
vd
.
getPos
(
p
);
// Get an iterator over the neighborhood particles of p
auto
Np
=
NN
.
template
getNNIterator
<
NO_CHECK
>(
NN
.
getCell
(
vd
.
getPos
(
p
)));
// For each neighborhood particle ...
while
(
Np
.
isNext
())
{
auto
q
=
Np
.
get
();
Point
<
3
,
float
>
xq
=
vd
.
getPos
(
q
);
float
dist
=
xp
.
distance
(
xq
);
if
(
dist
<
1.0
/
k
)
vd
.
getProp
<
0
>
(
q
)
+=
a
*
(
-
dist
*
dist
+
1.0
/
k
/
k
);
++
Np
;
}
++
it2
;
}
}
++
it3
;
vd
.
ghost_put
<
add_
,
0
>
();
}
bool
ret
=
true
;
auto
it3
=
vd
.
getDomainIterator
();
BOOST_REQUIRE_EQUAL
(
ret
,
true
);
float
constant
=
vd
.
getProp
<
0
>
(
it3
.
get
());
float
eps
=
0.001
;
while
(
it3
.
isNext
())
{
float
constant2
=
vd
.
getProp
<
0
>
(
it3
.
get
());
if
(
fabs
(
constant
-
constant2
)
/
constant
>
eps
)
{
std
::
cout
<<
Point
<
3
,
float
>
(
vd
.
getPos
(
it3
.
get
())).
toString
()
<<
" "
<<
constant2
<<
"/"
<<
constant
<<
" "
<<
v_cl
.
getProcessUnitID
()
<<
std
::
endl
;
ret
=
false
;
break
;
}
++
it3
;
}
BOOST_REQUIRE_EQUAL
(
ret
,
true
);
}
}
}
}
}
...
...
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