MOAB: Mesh Oriented datABase  (version 5.5.0)
cgns_test.cpp File Reference
#include "TestUtil.hpp"
#include "moab/Core.hpp"
#include "moab/Range.hpp"
#include "moab/FileOptions.hpp"
+ Include dependency graph for cgns_test.cpp:

Go to the source code of this file.

Macros

#define IS_BUILDING_MB
 

Functions

void test_read_write ()
 
int main ()
 

Variables

std::string cgnsfile = TestDir + "unittest/io/2d_naca0012.cgns"
 
std::string cgnsfilew = TestDir + "unittest/io/test.cgns"
 

Macro Definition Documentation

◆ IS_BUILDING_MB

#define IS_BUILDING_MB

Definition at line 3 of file cgns_test.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 14 of file cgns_test.cpp.

15 {
16  int result = 0;
17 
18  result += RUN_TEST( test_read_write );
19 
20  return result;
21 }

References RUN_TEST, and test_read_write().

◆ test_read_write()

void test_read_write ( )

Definition at line 23 of file cgns_test.cpp.

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 }

References cgnsfile, cgnsfilew, CHECK_ERR, ErrorCode, moab::Core::load_file(), mb, MB_SUCCESS, and moab::Core::write_file().

Referenced by main().

Variable Documentation

◆ cgnsfile

std::string cgnsfile = TestDir + "unittest/io/2d_naca0012.cgns"

Definition at line 9 of file cgns_test.cpp.

Referenced by test_read_write().

◆ cgnsfilew

std::string cgnsfilew = TestDir + "unittest/io/test.cgns"

Definition at line 10 of file cgns_test.cpp.

Referenced by test_read_write().