Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_io
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_io
Commits
863d65e6
Commit
863d65e6
authored
Aug 17, 2017
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing io in SE_CLASS3
parent
e4b2a896
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
7 deletions
+78
-7
src/CSVWriter/CSVWriter_unit_tests.hpp
src/CSVWriter/CSVWriter_unit_tests.hpp
+4
-0
src/RawReader/RawReader_unit_tests.hpp
src/RawReader/RawReader_unit_tests.hpp
+5
-0
src/VTKWriter/VTKWriter_unit_tests.hpp
src/VTKWriter/VTKWriter_unit_tests.hpp
+59
-7
src/util/GBoxes.hpp
src/util/GBoxes.hpp
+10
-0
No files found.
src/CSVWriter/CSVWriter_unit_tests.hpp
View file @
863d65e6
...
...
@@ -58,8 +58,12 @@ BOOST_AUTO_TEST_CASE( csv_writer_particles )
// Write the CSV
csv_writer
.
write
(
"csv_out_unk.csv"
,
v_pos
,
v_prp
);
// In case of SE_CLASS3 enabled the number of properties change
#ifndef SE_CLASS3
bool
test
=
compare
(
"csv_out_unk.csv"
,
"test_data/csv_out_unk_test.csv"
);
BOOST_REQUIRE_EQUAL
(
true
,
test
);
#endif
}
}
...
...
src/RawReader/RawReader_unit_tests.hpp
View file @
863d65e6
...
...
@@ -23,6 +23,9 @@ BOOST_AUTO_TEST_CASE( raw_reader_read_test )
grid_cpu
<
3
,
aggregate
<
float
,
float
[
3
]
>>
read_bin_test
;
GridRawReader
<
3
,
aggregate
<
float
,
float
[
3
]
>
,
int
>
rr
;
#ifndef SE_CLASS3
rr
.
read
(
"test_data/raw_read_sv_test.bin"
,
read_bin_test
,
FORTRAN_STYLE
|
STRUCT_OF_ARRAY
,
12
);
auto
it
=
read_bin_test
.
getIterator
();
...
...
@@ -39,6 +42,8 @@ BOOST_AUTO_TEST_CASE( raw_reader_read_test )
++
it
;
}
#endif
}
...
...
src/VTKWriter/VTKWriter_unit_tests.hpp
View file @
863d65e6
...
...
@@ -15,10 +15,9 @@
BOOST_AUTO_TEST_SUITE
(
vtk_writer_test
)
/* \brief Sub-domain vertex graph node
/*
!
\brief Sub-domain vertex graph node
*
*/
struct
vertex
{
//! The node contain 3 unsigned long integer for communication computation memory and id
...
...
@@ -35,13 +34,22 @@ struct vertex
//! The data
type
data
;
//! x
static
const
unsigned
int
x
=
0
;
//! y
static
const
unsigned
int
y
=
1
;
//! z
static
const
unsigned
int
z
=
2
;
//! property 1
static
const
unsigned
int
prp1
=
3
;
//! property 2
static
const
unsigned
int
prp2
=
4
;
//! property 3
static
const
unsigned
int
prp3
=
5
;
//! property 4
static
const
unsigned
int
prp4
=
6
;
//! property 5
static
const
unsigned
int
prp5
=
7
;
//! total number of properties boost::fusion::vector
...
...
@@ -58,7 +66,9 @@ struct vertex
/*! \brief Initialize the VTKVertex
*
* \param
* \param x coordinate x
* \param y coordinate y
* \param z coordinate z
*
*/
vertex
(
float
x
,
float
y
,
float
z
)
...
...
@@ -107,7 +117,9 @@ struct vertex2
/*! \brief Initialize the VTKVertex
*
* \param
* \param x coordinate x
* \param y coordinate y
* \param z coordinate z
*
*/
vertex2
(
float
x
,
float
y
,
float
z
)
...
...
@@ -671,9 +683,13 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_grids)
openfpm
::
vector
<
std
::
string
>
prp_names
;
vtk_g
.
write
(
"vtk_grids.vtk"
,
prp_names
);
#ifndef SE_CLASS3
// Check that match
bool
test
=
compare
(
"vtk_grids.vtk"
,
"test_data/vtk_grids_test.vtk"
);
BOOST_REQUIRE_EQUAL
(
test
,
true
);
#endif
}
{
...
...
@@ -826,9 +842,14 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_grids)
openfpm
::
vector
<
std
::
string
>
prp_names
;
vtk_g
.
write
(
"vtk_grids_unk.vtk"
,
prp_names
);
#ifndef SE_CLASS3
// Check that match
bool
test
=
compare
(
"vtk_grids_unk.vtk"
,
"test_data/vtk_grids_test.vtk"
);
BOOST_REQUIRE_EQUAL
(
test
,
true
);
#endif
}
// Try
...
...
@@ -924,10 +945,15 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set )
openfpm
::
vector
<
std
::
string
>
prp_names
;
vtk_v
.
write
(
"vtk_points.vtk"
,
prp_names
);
#ifndef SE_CLASS3
bool
test
=
true
;
// Check that match
bool
test
=
compare
(
"vtk_points.vtk"
,
"test_data/vtk_points_test.vtk"
);
test
=
compare
(
"vtk_points.vtk"
,
"test_data/vtk_points_test.vtk"
);
BOOST_REQUIRE_EQUAL
(
test
,
true
);
#endif
// Create a writer and write
VTKWriter
<
boost
::
mpl
::
pair
<
openfpm
::
vector
<
Point
<
3
,
double
>>
,
openfpm
::
vector
<
aggregate
<
float
,
Point
<
3
,
float
>>>>
,
VECTOR_POINTS
>
vtk_v2
;
...
...
@@ -935,10 +961,14 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set )
vtk_v2
.
write
(
"vtk_points_pp.vtk"
,
prp_names
);
#ifndef SE_CLASS3
// Check that match
test
=
compare
(
"vtk_points_pp.vtk"
,
"test_data/vtk_points_pp_test.vtk"
);
BOOST_REQUIRE_EQUAL
(
test
,
true
);
#endif
}
}
...
...
@@ -983,10 +1013,14 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_properties )
openfpm
::
vector
<
std
::
string
>
prp_names
({
"scalar"
,
"vector"
});
vtk_v
.
write
(
"vtk_points_with_prp_names.vtk"
,
prp_names
);
#ifndef SE_CLASS3
// Check that match
bool
test
=
compare
(
"vtk_points_with_prp_names.vtk"
,
"test_data/vtk_points_with_prp_names_test.vtk"
);
BOOST_REQUIRE_EQUAL
(
test
,
true
);
#endif
}
}
...
...
@@ -1066,23 +1100,32 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_binary )
vtk_v
.
write
(
"vtk_points_bin.vtk"
,
prp_names
,
"vtk output"
,
file_type
::
BINARY
);
vtk_v
.
write
(
"vtk_points_bin2.vtk"
,
prp_names
,
"vtk output"
,
file_type
::
BINARY
);
#ifndef SE_CLASS3
bool
test
=
true
;
// Check that match
bool
test
=
compare
(
"vtk_points_bin.vtk"
,
"test_data/vtk_points_bin_test.vtk"
);
test
=
compare
(
"vtk_points_bin.vtk"
,
"test_data/vtk_points_bin_test.vtk"
);
BOOST_REQUIRE_EQUAL
(
test
,
true
);
test
=
compare
(
"vtk_points_bin2.vtk"
,
"test_data/vtk_points_bin_test.vtk"
);
BOOST_REQUIRE_EQUAL
(
test
,
true
);
#endif
// Create a writer and write
VTKWriter
<
boost
::
mpl
::
pair
<
openfpm
::
vector
<
Point
<
3
,
double
>>
,
openfpm
::
vector
<
aggregate
<
float
,
Point
<
3
,
float
>>>>
,
VECTOR_POINTS
>
vtk_v2
;
vtk_v2
.
add
(
v1ps
,
v4pp
,
75
);
vtk_v2
.
write
(
"vtk_points_pp_bin.vtk"
,
prp_names
,
"vtk output"
,
file_type
::
BINARY
);
#ifndef SE_CLASS3
// Check that match
test
=
compare
(
"vtk_points_pp_bin.vtk"
,
"test_data/vtk_points_pp_bin_test.vtk"
);
BOOST_REQUIRE_EQUAL
(
test
,
true
);
#endif
}
...
...
@@ -1174,10 +1217,15 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_binary )
vtk_v
.
write
(
"vtk_points_2d_bin.vtk"
,
stub
,
"vtk output"
,
file_type
::
BINARY
);
#ifndef SE_CLASS3
bool
test
=
true
;
// Check that match
bool
test
=
compare
(
"vtk_points_2d_bin.vtk"
,
"test_data/vtk_points_2d_bin_test.vtk"
);
test
=
compare
(
"vtk_points_2d_bin.vtk"
,
"test_data/vtk_points_2d_bin_test.vtk"
);
BOOST_REQUIRE_EQUAL
(
test
,
true
);
#endif
// Create a writer and write
VTKWriter
<
boost
::
mpl
::
pair
<
openfpm
::
vector
<
Point
<
2
,
double
>>
,
openfpm
::
vector
<
aggregate
<
float
[
3
],
double
[
2
]
>>>
,
VECTOR_POINTS
>
vtk_v2
;
...
...
@@ -1185,9 +1233,13 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_binary )
vtk_v2
.
write
(
"vtk_points_2d_pp_bin.vtk"
,
stub
,
"vtk output"
,
file_type
::
BINARY
);
#ifndef SE_CLASS3
// Check that match
test
=
compare
(
"vtk_points_2d_pp_bin.vtk"
,
"test_data/vtk_points_2d_pp_bin_test.vtk"
);
BOOST_REQUIRE_EQUAL
(
test
,
true
);
#endif
}
}
...
...
src/util/GBoxes.hpp
View file @
863d65e6
...
...
@@ -44,6 +44,16 @@ struct GBoxes
Box
<
dim
,
long
int
>
Dbox
;
//! origin of GDbox in global grid coordinates
Point
<
dim
,
long
int
>
origin
;
/*! \brief Indicate that this structure has no pointers inside
*
* \return true
*
*/
static
bool
noPointers
()
{
return
true
;
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment