MOAB: Mesh Oriented datABase
(version 5.5.0)
cgns_test.cpp
Go to the documentation of this file.
1
#include "
TestUtil.hpp
"
2
#include "
moab/Core.hpp
"
3
#define IS_BUILDING_MB
4
#include "
moab/Range.hpp
"
5
#include "
moab/FileOptions.hpp
"
6
7
using namespace
moab
;
8
9
std::string
cgnsfile
= TestDir +
"unittest/io/2d_naca0012.cgns"
;
10
std::string
cgnsfilew
= TestDir +
"unittest/io/test.cgns"
;
11
12
void
test_read_write
();
13
14
int
main
()
15
{
16
int
result = 0;
17
18
result +=
RUN_TEST
(
test_read_write
);
19
20
return
result;
21
}
22
23
void
test_read_write
()
24
{
25
ErrorCode
rval;
26
Core
moab
;
27
Interface
&
mb
=
moab
;
28
rval =
mb
.
load_file
(
cgnsfile
.c_str() );
29
if
(
MB_SUCCESS
!= rval ) std::cerr <<
"Trouble reading file "
<<
cgnsfile
<< std::endl;
CHECK_ERR
( rval );
30
31
rval =
mb
.
write_file
(
cgnsfilew
.c_str() );
32
if
(
MB_SUCCESS
!= rval ) std::cerr <<
"Trouble writing file "
<<
cgnsfilew
<< std::endl;
CHECK_ERR
( rval );
33
}
test
io
cgns_test.cpp
Generated on Wed Oct 4 2023 14:20:26 for MOAB: Mesh Oriented datABase by
1.9.1