Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Reading in .vol files and unit radius spheres for MAC

More
5 years 4 months ago #1315 by BenWilson94
Hi,

Is it possible to read in mesh previously generated with netgen and use them with the Python script solver ngs-py?

In the .vol file I know what the ids of the different materials will be and the ids of the surfaces are, but these are tagged just with 1,2,3 etc rather than text labels so I’m also not sure how to prescribe the materials and the BCs as the example shown uses meshes generated within the Python script solver which have textual labels instead.

Also, I’d be grateful if you could update the build of netgen/ngsolve for a MAC as I think this still has the bug of only generating meshes for a sphere of unit radius c.f.

ngsolve.org/forum/ngspy-forum/666-bug-meshing-ball-in-3d#1248

Thanks

Ben
More
5 years 4 months ago #1324 by cwinters
Hi,

there is a new installer including the fix for spheres.

When you set bcnames and materials you should see a list of them at the end of the .vol file. After loading with
Code:
mesh = Mesh(...)
you can check the boundary names and materials with
Code:
mesh.GetMaterials() mesh.GetBoundaries()

Best,
Christoph
Time to create page: 0.161 seconds