<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>you maybe can follow this example:<br><br>https://bitbucket.org/fathomteam/moab/src/bee2e77e416976393a63a221a814d85285403a7e/examples/old/FileRead.cpp?at=master<br><br>It is a 2d mesh, but it reads from 2 files, one with coordinates position and one with connectivity for triangles.<br><br>You can create a mesh with just create_vertex() and create_element() methods on moab::Interface<br><br><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">I have the mesh in a flat text file format- one file with vertex<br>coordinates, one file that lists the connectivity of faces to vertices<br>(ie for each face, what are the vertices that "bound" it).<br><br>Topologically, the mesh is 2D since the highest dimensionality element<br>is a face (bounded by edges). However, the mesh represents a<br>discretization of the surface of a sphere, so vertex coordinates are<br>3D (x,y,z). Since I am on the surface of a sphere of unit radius, I<br>could always go to a 2D coordinate representation in terms of angles<br>and just store the 3D coordinates as Tag values. Then everything would<br>be 2D (although the coordinates would be weird).<br><br>It is unclear to me how to define a 3D mesh from this, since there<br>really are no cells (elements of dimension = 3) in the mesh.<br><br>On Wed, Nov 6, 2013 at 4:44 PM, Iulian Grindeanu <iulian@mcs.anl.gov> wrote:<br>><br>><br>> ________________________________<br>><br>> Dear Moab-Dev,<br>><br>> I have a geodesic mesh (like MPAS or GCRM) and I was wondering what<br>> the best way to represent the mesh in MOAB was. It is topologically 2D<br>> but it is embedded in a 3D manifold (so vertex coordinates are x,y,z).<br>> I was thinking that I would treat the mesh as 2D, feed in "bogus"<br>> vertex coordinates and just use tags over the mesh elements to keep<br>> track of the actual mesh coordinates. This way, I keep the 2D<br>> topological structure (which is more important for my application<br>> anyways). Is this a good approach?<br>><br>> Thanks,<br>> Chris Eldred<br>><br>> --<br>> Chris Eldred<br>> DOE Computational Science Graduate Fellow<br>> Graduate Student, Atmospheric Science, Colorado State University<br>> B.S. Applied Computational Physics, Carnegie Mellon University, 2009<br>> chris.eldred@gmail.com / celdred@atmos.colostate.edu<br>><br>> Probably I don't understand what you need :(<br>><br>> What kind of format do you have ? netcdf? Is the mesh on a sphere / surface?<br>><br>> The vertex coordinates are retrieved with "get_coords" methods, and set with<br>> set_coords methods, or use "coords_iterate" type methods in readUtil<br>> interface.<br>><br>> Why not keep the full 3d mesh? what is so special about the 2d topological<br>> structure?<br>> Is it structured in any way? Can you use the MPAS reader or not?<br>><br>> Iulian<br>><br><br><br><br>-- <br>Chris Eldred<br>DOE Computational Science Graduate Fellow<br>Graduate Student, Atmospheric Science, Colorado State University<br>B.S. Applied Computational Physics, Carnegie Mellon University, 2009<br>chris.eldred@gmail.com / celdred@atmos.colostate.edu<br></blockquote><br></div></body></html>