beginner tutorial, example 4: Create a 2D structured mesh and set some tag data on it More...
Go to the source code of this file.
Functions | |
int | main () |
beginner tutorial, example 4: Create a 2D structured mesh and set some tag data on it
In this example, we create a 2D structured mesh (actually a 3D mesh made of quads) and then we will actually set data on the mesh. Tags represent data that is attached to entities. In this example, we will create two tags:
We will write the mesh out to a file, and you can visualize the data using your favorite tool.
In this example, I am demonstrating these operations in the clearest possible way - not using the most efficient method. MOAB has been designed so that users do not need to sacrifice performance - future examples will demonstrate how to access/manipulate the mesh using the fastest methods possible.
Definition in file mbex4.cpp.
int main | ( | ) |
Definition at line 42 of file mbex4.cpp.
References moab::ScdInterface::construct_box(), ErrorCode, moab::ScdBox::get_element(), moab::ScdBox::get_vertex(), MB_CHK_SET_ERR, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, moab::Interface::query_interface(), moab::Core::set_coords(), moab::Core::tag_get_handle(), moab::Core::tag_set_data(), and moab::Core::write_file().