[MOAB-dev] canonical face connectivity from 10-nodded tet mesh

Tim Tautges tautges at mcs.anl.gov
Mon May 31 20:04:02 CDT 2010


Welcome!  It's a holiday today in the States, but I'll look at this tomorrow.  Quickly glancing at the code below, looks 
like you're doing things correctly; I'm guessing the faces aren't being created with the correct ordering in the 
high-order nodes.  That should be pretty easy to fix.

- tim

On 05/31/2010 11:02 AM, Julien Vignollet wrote:
> Dear Moab developers,
>
> I am a new (and very modest!) moab user experiencing difficulties when
> trying to retrieve the canonical face connectivities in a mesh of 10
> nodded tetrahedrons (order based on Tautges system from the paper
> "Canonical numbering systems for finite-element codes") . I am trying to
> use moab in a 3D finite element code to model multi-phasic hyperelastic
> elements. I am using Gmsh and Paraview for pre- and post-processing.
> Attached is the basic mesh I am using to get started.
>
> Apart from a small problem when importing the gmsh file (it seems nodes
> 7 and 8 are swapped), my main difficulty arises when I try to access the
> faces connectivity (see extract of code at the end of this message).
> This technique worked successfully to obtain the element connectivities
> (i.e. the 10 nodes of the tets in a canonical order) when I loop over
> the elements, but it fails when I loop over the faces. The handle conn
> gets populated with the correct 6 face nodes but not in a canonical
> order. The vertex nodes are in the right order, but the mid-nodes are
> not and I don't see any consistent pattern.
>
> Is there anything I am doing wrong here? Could you advise any tip to get
> around this?
>
>
>
> / MBRange elems, faces;/
> / const MBEntityHandle* conn;/
> / int num_nodes;/
> / double coord_node_face[6*3];/
> /
> /
> / result = gMB->load_mesh("test_mesh_modified.msh"); EE(gMB);/
> / result = gMB->get_entities_by_dimension(0, 3, elems);/
> / gMB->get_adjacencies(elems,2,true,faces,MBInterface::UNION);/
> /
> /
> / for (MBRange::iterator fit = faces.begin(); fit != faces.end(); fit++) {/
> / gMB->get_connectivity(*fit,conn,num_nodes);/
> / gMB->get_coords(conn,num_nodes,coord_node_face);/
> / if (coord_node_face[1]==0.5) /*/[... call a function using face
> canonical connectivities...]/*
> / }/
> /
> /
> /result = gMB->write_file("Vtk_file.vtk")/
>
>
>
>
>
>
> Hope that this was clear enough and not too lengthy!
>
> Regards,
>
>
> ---
> Julien Vignollet
> PhD Student
> Department of Civil Engineering
> The University of Glasgow, Glasgow G12 8LT
> Tel: +44 (0)141 330 6027
>
>
>

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
          phone: (608) 263-8485      1500 Engineering Dr.
            fax: (608) 263-4499      Madison, WI 53706



More information about the moab-dev mailing list