Set Meshing Options with Python?

More
4 years 2 weeks ago #3285 by mariopa
Thx, update to recent version worked!

One more question, i wanna set other Meshing Options like:

"max mesh size"
"min mesh size"
"mesh size grading"

is there a help file or something, where i can find the correct commands for python?

at the moment i know:

mesh = geo.GenerateMesh(meshsize.very_fine, curvaturesafety=5)

but how i can set "min mesh size" for examble?
how you guys find out the correct paramaters?

thx much!

regards, mario
More
4 years 2 weeks ago #3287 by matthiash
Hi Mario,

As far as I know, Netgen has no minh setting. Most options are explained by using the python help() function:
Code:
from netgen.meshing import MeshingParamters help(MeshingParameters)

For a comprehensive list of all options you need too look at the source code:
github.com/NGSolve/netgen/blob/master/li...g/meshtype.hpp#L1221

The different meshsize variants are defined here:
github.com/NGSolve/netgen/blob/master/python/meshing.py

Best,
Matthias
More
4 years 2 weeks ago #3288 by mariopa
thx
More
4 years 2 weeks ago #3294 by mariopa
One more question, I am not able to solve:

Under "Meshing Options/General" I can select

* First Step
* Last Step
* Print Messages

and all points under "Additional meshing options"

I allready search for it, is there a way to set those options in python too?

You helped me allready very much but hopefully you can help me again.

thank much!

regards, mario
More
4 years 1 week ago #3315 by mariopa
anyone an idea?

i am not able to find a solution :(
More
4 years 1 week ago #3323 by mariopa
i tried to study the source code, but did not found a solution.

help(MeshingParameters) does not show me a solution, so this means I am not able to set these meshing options with a python script?

Is there any other solution to use the meshing options without interacting with the GUI:

* First Step
* Last Step
* Print Messages

it does not matter if python or not, maybe start netgen.exe with a specific command line?

I am coding a tool for ngsolve, wich is meshing much files at the same time automaticaly every file with a differnt meshing option and the users told me they need to set the meshing options listet above.

if there is no solution they have to interact with the GUI, but this is not a good way i need to do this automaticaly in the background.
Time to create page: 0.101 seconds