dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #22276
Re: [Question #150226]: Using mesher region information /?tags
The abaqus plugin does not write anything to the mesh data structure. It
generates a an additional file.
I think this is what mesh converter should do. It creates the file
materials.xml, but that guy is just a MeshFunction over cells.
I have not tested this but this is my impression by just scanning the code.
Johan
On Wednesday March 23 2011 16:26:10 Anders Logg wrote:
> Note that "material" is not recognized by DOLFIN. It will be stored
> but there is nothing in DOLFIN that will kick in an do anything with
> this data (although it can be used from a user program).
>
> A list of which data is recognized by DOLFIN (like "cell_domains") is
> listed in MeshData.h:
>
> /// The class MeshData is a container for auxiliary mesh data,
> /// represented either as MeshFunctions over topological mesh
> /// entities, arrays or maps. Each dataset is identified by a unique
> /// user-specified string. Only uint-valued data are currently
> /// supported.
> ///
> /// The following named mesh data are recognized by DOLFIN:
> ///
> /// Boundary indicators
> ///
> /// "boundary_facet_cells" - Array<uint> of size num_facets
> /// "boundary_facet_numbers" - Array<uint> of size num_facets
> /// "boundary_indicators" - Array<uint> of size num_facets
> /// "material_indicators" - MeshFunction<uint> of dimension D
> ///
> /// Subdomain indicators
> ///
> /// "cell_domains" - MeshFunction<uint> of dimension D
> /// "interior_facet_domains" - MeshFunction<uint> of dimension D - 1
> /// "exterior_facet_domains" - MeshFunction<uint> of dimension D - 1
> ///
> /// Facet orientation (used for assembly over interior facets)
> ///
> /// "facet orientation" - MeshFunction<uint> of dimension D - 1
> ///
> /// Boundary extraction
> ///
> /// "vertex map" - MeshFunction<uint> of dimension 0
> /// "cell map" - MeshFunction<uint> of dimension D
> ///
> /// Mesh partitioning
> ///
> /// "global entity indices %d" - MeshFunction<uint> of dimension 0, 1,
> ..., D /// "exterior facets" - MeshFunction<uint> of dimension
> D - 1 /// "num global entities" - Array<uint> of size D + 1
> /// "overlap" - vector mapping
> ///
> /// Sub meshes
> ///
> /// "global vertex indices" - MeshFunction<uint> of dimension 0
> ///
> /// Mesh coloring
> ///
> /// "colors-%D-%d-%1" - MeshFunction<uint> of dimension D with
> colors based on connectivity %d /// "num colored cells" - Array<uint>
> listing the number of cells of each color /// "colored cells %d" -
> Array<uint> of cell indices with colors 0, 1, 2, ...
>
>
> --
> Anders
>
> On Wed, Mar 23, 2011 at 04:12:40PM -0700, Johan Hake wrote:
> > It looks like abacus supports writing of Meshfunctions for materials and
> > such.
> >
> > Look in:
> > site-packages/dolfin/mesh/meshconverter.py
> >
> > ...
> >
> > def _abaqus(...):
> > ...
> > handler.start_meshfunction("material", 3, num_entities)
> > # Each material is associated with a number of element sets
> >
> > for i, matname in enumerate(materials):
> > try: elsetids = material2elsetids[matname]
> >
> > except KeyError:
> > # No elements for this material
> > continue
> >
> > # For each element set associated with this material
> > elsets = []
> >
> > for eid in elsetids:
> > try: elsets.append(eid2elset[eid])
> >
> > except KeyError:
> > handler.error("Material '%s' is assigned to undefined
> > element
> >
> > "
> >
> > "set '%s'" % (matname, eid))
> >
> > for elset in elsets:
> > for elemid in elset:
> > handler.add_entity_meshfunction(elemids.index(elemid), i)
> >
> > handler.end_meshfunction()
> >
> > I guess something like this needs to be added to the
> >
> > def gmsh2xml
> >
> > function.
> >
> > Johan
> >
> > On Wednesday March 23 2011 15:59:05 Neilen Marais wrote:
> > > Question #150226 on DOLFIN changed:
> > > https://answers.launchpad.net/dolfin/+question/150226
> > >
> > > Neilen Marais posted a new comment:
> > > Anders,
> > >
> > > I think I could cook up a patch, but I have searched (in vain) for a
> > > description of the dolfin xml format. If you could point me in the
> > > right direction I'm sure I could have a patch done in no time!
> > >
> > > Thanks
> > > Neilen
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~dolfin
> > Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~dolfin
> > More help : https://help.launchpad.net/ListHelp
Follow ups
References