
Hello. Is there a way to somehow mark some vertices in vtk mesh so I could later use them in region definition? I've tried to create my vtk mesh with vertices field "node_groups". And some vertices have this field to set to 1, and other to 2. But it doesnt work. Sfepy tell me
raise ValueError('region "%s" has no entities!' % self.name) Thank you

Hi,
On 2/1/20 12:35 PM, fatune@gmail.com wrote:
Hello. Is there a way to somehow mark some vertices in vtk mesh so I could later use them in region definition? I've tried to create my vtk mesh with vertices field "node_groups". And some vertices have this field to set to 1, and other to 2. But it doesnt work. Sfepy tell me
raise ValueError('region "%s" has no entities!' % self.name)
How do you define the region?
The node groups of a VTK mesh are used in the examples/acoustics/vibro_acoustic3d.py example - have a look there.
r.

regions = { 'Omega' : 'all', 'Gamma_Left' : ('vertices in (x < 0.00001)', 'facet'), 'Gamma_Right' : ('vertices in (x > 99.099999)', 'facet'), 'GammaIn': ('vertices of group 0', 'edge'), }
The group I am struggling with is GammaIn. I was using vibro_acoustic3d.py as an example when I was creating my vtk mesh. Am I right in my assumption that it is enough to add field "node_groups" to my vtk and sfepy will gather information of the group number from this field?

In addition to the previous message. I created vtk mesh with values in field "node_groups" to be 1 or 2. When I use 'vertices of group 0' sfepy works without errors, but set this region to every single vertex in the mesh, and I don't have values 0 in 'node_groups' field. When I change 0 to 1 or 2 it raises error. Apparently sfepy just ignores 'node_groups' field.
On Sun, Feb 2, 2020 at 10:16 AM <fatune@gmail.com> wrote:
regions = { 'Omega' : 'all', 'Gamma_Left' : ('vertices in (x < 0.00001)', 'facet'), 'Gamma_Right' : ('vertices in (x > 99.099999)', 'facet'), 'GammaIn': ('vertices of group 0', 'edge'), }
The group I am struggling with is GammaIn. I was using vibro_acoustic3d.py as an example when I was creating my vtk mesh. Am I right in my assumption that it is enough to add field "node_groups" to my vtk and sfepy will gather information of the group number from this field?
SfePy mailing list -- sfepy@python.org To unsubscribe send an email to sfepy-leave@python.org https://mail.python.org/mailman3/lists/sfepy.python.org/

On 2/2/20 12:28 AM, FaTune wrote:
In addition to the previous message. I created vtk mesh with values in field "node_groups" to be 1 or 2. When I use 'vertices of group 0' sfepy works without errors, but set this region to every single vertex in the mesh, and I don't have values 0 in 'node_groups' field. When I change 0 to 1 or 2 it raises error. Apparently sfepy just ignores 'node_groups' field.
It is possible to display the vertex and cell groups in a mesh with the following (or use any VTK viewer, such as paraview):
python postproc.py meshes/3d/acoustic_wg.vtk --all -b
Does it show your regions correctly? If the mesh and the node_groups are well defined, what you do should work.
If the above does not help you finding what's wrong, send here a minimal example that demonstrates the problem.
r.
On Sun, Feb 2, 2020 at 10:16 AM <fatune@gmail.com> wrote:
regions = { 'Omega' : 'all', 'Gamma_Left' : ('vertices in (x < 0.00001)', 'facet'), 'Gamma_Right' : ('vertices in (x > 99.099999)', 'facet'), 'GammaIn': ('vertices of group 0', 'edge'), }
The group I am struggling with is GammaIn. I was using vibro_acoustic3d.py as an example when I was creating my vtk mesh. Am I right in my assumption that it is enough to add field "node_groups" to my vtk and sfepy will gather information of the group number from this field?
participants (3)
-
FaTune
-
fatune@gmail.com
-
Robert Cimrman