dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #22747
Re: [Question #153448]: Importing mesh and entities
Question #153448 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/153448
Status: Answered => Open
B. Emek Abali is still having a problem:
its all greek even to me after many minutes of trial and error :)
Thanks Johan, now I get the idea more better, it is a much better idea
to store in separate files, two open problems arise
first: only one material is written out, are all the meshfunction in
that data? probably yes!
second: Illegal xml row index 2 out of range of (0 -1) if I try to run
MeshFunction('uint', mesh, 'Output_material.xml')
1014
for i, matname in enumerate(materials):
...
...
handler.add_entity_meshfunction(elemids.index(elemid), i)
so it looks like (as you assumed) 'uint' and then the range 0 and 1
holds true for my data with two materials. Why tries MeshFunction to
reach also the number 2 in mesh, is there sth. wrong in the header ?
1007
for matname, elsetids in material2elsetids.items():
if matname not in materials:
handler.error("Unknown material %s referred to for element sets %s" %
(matname, ", ".join(elsetids)))
num_entities += len(elsetids)
handler.start_meshfunction("material", 3, num_entities)
may be len(elsetids) is 2 (I have two materials) but it should be starting from 0 so num_entities += len(elsetids)-1 kind of thing?
but programming is not my branch, what do You think Johan, any specific
hope :)
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
Follow ups
References