MOAB: Mesh Oriented datABase  (version 5.4.1)
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.

Defines

#define IS_BUILDING_MB

Functions

void test_read_write ()
int main ()

Variables

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

Define Documentation

#define IS_BUILDING_MB

Definition at line 3 of file cgns_test.cpp.


Function Documentation

int main ( )

Definition at line 14 of file cgns_test.cpp.

References RUN_TEST, and test_read_write().

{
    int result = 0;

    result += RUN_TEST( test_read_write );

    return result;
}
void test_read_write ( )

Definition at line 23 of file cgns_test.cpp.

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

Referenced by main().

{
    ErrorCode rval;
    Core moab;
    Interface& mb = moab;
    rval          = mb.load_file( cgnsfile.c_str() );
    if( MB_SUCCESS != rval ) std::cerr << "Trouble reading file " << cgnsfile << std::endl;CHECK_ERR( rval );

    rval = mb.write_file( cgnsfilew.c_str() );
    if( MB_SUCCESS != rval ) std::cerr << "Trouble writing file " << cgnsfilew << std::endl;CHECK_ERR( rval );
}

Variable Documentation

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

Definition at line 9 of file cgns_test.cpp.

Referenced by test_read_write().

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

Definition at line 10 of file cgns_test.cpp.

Referenced by test_read_write().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines