[Gmsh] Python scripts as onelab solvers

2019-12-05 Thread Max Orok
Hello all,

I believe you can only use executable files as Gmsh solvers.
Would there be any interest in using Python scripts as solvers directly?
Perhaps there's a clever workaround used right now.

>From the GUI, I'd like to be able to:

   - add a python solver to the solver list
   - have that solver modify the gui window with onelab parameters, like
   exec solvers do currently

I know about the custom_gui.py demo, but believe it requires users to start
it from the command line.

Maybe this could be a more portable option for distributing solvers or
reduce the barrier to writing one?

Thank you,
Max

-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Change position of value scale

2019-12-05 Thread Marco Tiberga
Dear Christophe,

Thanks for the help!

Best,
Marco

-Original Message-
From: Christophe Geuzaine [mailto:cgeuza...@uliege.be] 
Sent: donderdag 5 december 2019 11:45
To: Marco Tiberga
Cc: Max Orok; gmsh@onelab.info
Subject: Re: [Gmsh] Change position of value scale



> On 5 Dec 2019, at 10:25, Marco Tiberga  wrote:
> 
> Dear Max,
>  
> Yes, that works!
> The scale is vertical now, even though I cannot move it to the right/left of 
> the view.

Here's how to have a vertical scale 100 pixels from the right edge of the 
window, centered vertically:

test.geo:

***
View "Test" {
  ST(0,0,0, 1,0,0, 0,1,0){1,2,3};
};

PostProcessing.HorizontalScales = 0; // Display value scales horizontally
View[0].AutoPosition = 0; // Position the scale or 2D plot automatically (0: 
manual)
View[0].Height = 200; // Height (in pixels) of the scale or 2D plot
View[0].Width = 20; // Width (in pixels) of the scale or 2D plot
View[0].PositionX = -100; // X position (in pixels) of the scale or 2D plot (< 
0: measure from right edge; >= 1e5: centered)
View[0].PositionY = 1e6; // Y position (in pixels) of the scale or 2D plot (< 
0: measure from bottom edge; >= 1e5: centered)
***

(There is a little bug with vertical alignment in the latest stable release, 
that was just fixed. Use the latest snapshot to test.)

Christophe



> . but it does not matter, better than nothing.
>  
> Thanks for the help, I scanned through the View options in the manual, I did 
> not think of looking at the PostProcessing ones as well.
> As a suggestion, I think that explaining what the 
> “PostProcessing.HorizontalScales = 0” does in the manual is useful to 
> everyone.
>  
> Best,
> Marco
>  
>  
> From: Max Orok [mailto:mo...@mevex.com] 
> Sent: woensdag 4 december 2019 20:21
> To: Marco Tiberga
> Cc: gmsh@onelab.info
> Subject: Re: [Gmsh] Change position of value scale
>  
> Maybe try setting PostProcessing.HorizontalScales = 0; ?
>  
> 
>  
> https://urldefense.proofpoint.com/v2/url?u=http-3A__gmsh.info_doc_texinfo_gmsh.html-23Post-5F002dprocessing-2Doptions-2Dlist=DwIFaQ=XYzUhXBD2cD-CornpT4QE19xOJBbRy-TBPLK0X9U2o8=xDQrN9dIlh8hsy24roW04-s63YICVLB4nv0g5BCLJug=-P9U1Y5-mejSlzoFufhNKjjHSGR0Vrg0N-VXRWzaMWU=pFztDMtGRpA-cFtLowtnriTBPoujctfZKCyRFWInDpA=
>  
>  
> Sincerely,
> Max 
>  
> On Wed, Dec 4, 2019 at 1:52 PM Marco Tiberga  wrote:
> Dear Gmsh community,
>  
> Is there a way to change the position of the value scale in any kind of View?
> I tried with the most recent Gmsh snapshot, but if I go to “View options” -> 
> “Axes” -> “2D axes/value scale position” only the option “manual” seems to 
> actually be able to change the position. I am using the GUI, FYI.
>  
> However, I cannot obtain what I want.
> The “Automatic” position is at the bottom-center of the screen and the scale 
> is horizontal. If possible, I would like to have a vertical scale, to the 
> left or right of the view.
>  
> Thanks a lot for your help, in advance.
>  
> Best regards,
> Marco Tiberga
> PhD candidate
> Delft University of Technology
> Faculty of Applied Sciences
> Radiation Science & Technology Department
> Mekelweg 15, 2629 JB Delft, The Netherlands
> E-Mail: m.tibe...@tudelft.nl
> Website: http://www.nera.rst.tudelft.nl/
>  
>  
> ___
> gmsh mailing list
> gmsh@onelab.info
> https://urldefense.proofpoint.com/v2/url?u=http-3A__onelab.info_mailman_listinfo_gmsh=DwIFaQ=XYzUhXBD2cD-CornpT4QE19xOJBbRy-TBPLK0X9U2o8=xDQrN9dIlh8hsy24roW04-s63YICVLB4nv0g5BCLJug=-P9U1Y5-mejSlzoFufhNKjjHSGR0Vrg0N-VXRWzaMWU=XdyyzLmYB0NKS7XrkQBWCkRQYuQXAqE_VL5sB6tbkXs=
>  
> 
> 
> -- 
> Max Orok
> Contractor
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mevex.com=DwIFaQ=XYzUhXBD2cD-CornpT4QE19xOJBbRy-TBPLK0X9U2o8=xDQrN9dIlh8hsy24roW04-s63YICVLB4nv0g5BCLJug=-P9U1Y5-mejSlzoFufhNKjjHSGR0Vrg0N-VXRWzaMWU=5QP9foH-tRAB80LztLsn1h1ZzgR5mCzTLuJfcCEqin8=
>  
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> https://urldefense.proofpoint.com/v2/url?u=http-3A__onelab.info_mailman_listinfo_gmsh=DwIFaQ=XYzUhXBD2cD-CornpT4QE19xOJBbRy-TBPLK0X9U2o8=xDQrN9dIlh8hsy24roW04-s63YICVLB4nv0g5BCLJug=-P9U1Y5-mejSlzoFufhNKjjHSGR0Vrg0N-VXRWzaMWU=XdyyzLmYB0NKS7XrkQBWCkRQYuQXAqE_VL5sB6tbkXs=
>  

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.montefiore.ulg.ac.be_-7Egeuzaine=DwIFaQ=XYzUhXBD2cD-CornpT4QE19xOJBbRy-TBPLK0X9U2o8=xDQrN9dIlh8hsy24roW04-s63YICVLB4nv0g5BCLJug=-P9U1Y5-mejSlzoFufhNKjjHSGR0Vrg0N-VXRWzaMWU=0_XKk_DxPsgEsLpeNCGI8Cf5vEadfEeSUmha65oPan8=
 



___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Refinement mesh of specific entities within volume

2019-12-05 Thread Jeremy Theler
Have you tried FacesList instead of EdgesList?

On Wed, 2019-12-04 at 15:52 +0100, Sabrina Zacarias wrote:
> Dear gmsh team,
> 
> I Have a surface (which is a tube) embedded in a volume (a cylinder),
> and I have two questions regarding the meshing:
> 
> 1. Is it possible/is there an easy way to define a finer mesh for the
> surface than for the volume?
> 2. I would also like a finer mesh in the surroundings of the surface.
> I explored the field Distance+threshold combination, but I was not
> able to make it work, yet. Is there a better way?
> 
> Here a test code I was using:
> 
> e1 = newl; Circle(e1) = {0, 0,0 , 109, 0, 2*Pi};
> out[]=Extrude {0, 0, 10} { Curve{e1}; }; //+
> Cylinder(1) = {0, 0, -10, 0, 0, 30, 120, 2*Pi};
> 
> els1=out[1];
> Surface{els1} In Volume{1};
> lc=1;
> Field[1] = Distance;
> Field[1].NNodesByEdge = 100;
> Field[1].EdgesList = {1,2,3};
> 
> 
> Field[2] = Threshold;
> Field[2].IField = 1;
> Field[2].LcMin = lc / 100;
> Field[2].LcMax = lc;
> Field[2].DistMin = 1.;
> Field[2].DistMax = 3.;
> 
> 
> 
> Thank you so much for your advice.
> 
> Best regards,
> 
> Sabrina 
> -- 
> Sabrina Zacarias
> Institut für Kernphysik
> Technische Universität Darmstadt
> S2|14 / office 319
> Schlossgartenstr. 9
> 
> 64289 Darmstadt
> 
> Office: +49 6151 16 23589
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> 
> http://onelab.info/mailman/listinfo/gmsh
> 
> 


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Change position of value scale

2019-12-05 Thread Christophe Geuzaine


> On 5 Dec 2019, at 10:25, Marco Tiberga  wrote:
> 
> Dear Max,
>  
> Yes, that works!
> The scale is vertical now, even though I cannot move it to the right/left of 
> the view.

Here's how to have a vertical scale 100 pixels from the right edge of the 
window, centered vertically:

test.geo:

***
View "Test" {
  ST(0,0,0, 1,0,0, 0,1,0){1,2,3};
};

PostProcessing.HorizontalScales = 0; // Display value scales horizontally
View[0].AutoPosition = 0; // Position the scale or 2D plot automatically (0: 
manual)
View[0].Height = 200; // Height (in pixels) of the scale or 2D plot
View[0].Width = 20; // Width (in pixels) of the scale or 2D plot
View[0].PositionX = -100; // X position (in pixels) of the scale or 2D plot (< 
0: measure from right edge; >= 1e5: centered)
View[0].PositionY = 1e6; // Y position (in pixels) of the scale or 2D plot (< 
0: measure from bottom edge; >= 1e5: centered)
***

(There is a little bug with vertical alignment in the latest stable release, 
that was just fixed. Use the latest snapshot to test.)

Christophe



> . but it does not matter, better than nothing.
>  
> Thanks for the help, I scanned through the View options in the manual, I did 
> not think of looking at the PostProcessing ones as well.
> As a suggestion, I think that explaining what the 
> “PostProcessing.HorizontalScales = 0” does in the manual is useful to 
> everyone.
>  
> Best,
> Marco
>  
>  
> From: Max Orok [mailto:mo...@mevex.com] 
> Sent: woensdag 4 december 2019 20:21
> To: Marco Tiberga
> Cc: gmsh@onelab.info
> Subject: Re: [Gmsh] Change position of value scale
>  
> Maybe try setting PostProcessing.HorizontalScales = 0; ?
>  
> 
>  
> http://gmsh.info/doc/texinfo/gmsh.html#Post_002dprocessing-options-list
>  
> Sincerely,
> Max 
>  
> On Wed, Dec 4, 2019 at 1:52 PM Marco Tiberga  wrote:
> Dear Gmsh community,
>  
> Is there a way to change the position of the value scale in any kind of View?
> I tried with the most recent Gmsh snapshot, but if I go to “View options” -> 
> “Axes” -> “2D axes/value scale position” only the option “manual” seems to 
> actually be able to change the position. I am using the GUI, FYI.
>  
> However, I cannot obtain what I want.
> The “Automatic” position is at the bottom-center of the screen and the scale 
> is horizontal. If possible, I would like to have a vertical scale, to the 
> left or right of the view.
>  
> Thanks a lot for your help, in advance.
>  
> Best regards,
> Marco Tiberga
> PhD candidate
> Delft University of Technology
> Faculty of Applied Sciences
> Radiation Science & Technology Department
> Mekelweg 15, 2629 JB Delft, The Netherlands
> E-Mail: m.tibe...@tudelft.nl
> Website: http://www.nera.rst.tudelft.nl/
>  
>  
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
> 
> 
> -- 
> Max Orok
> Contractor
> www.mevex.com
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Change position of value scale

2019-12-05 Thread Marco Tiberga
Dear Max,

Yes, that works!
The scale is vertical now, even though I cannot move it to the right/left of 
the view.. but it does not matter, better than nothing.

Thanks for the help, I scanned through the View options in the manual, I did 
not think of looking at the PostProcessing ones as well.
As a suggestion, I think that explaining what the 
“PostProcessing.HorizontalScales = 0” does in the manual is useful to everyone.

Best,
Marco


From: Max Orok [mailto:mo...@mevex.com]
Sent: woensdag 4 december 2019 20:21
To: Marco Tiberga
Cc: gmsh@onelab.info
Subject: Re: [Gmsh] Change position of value scale

Maybe try setting PostProcessing.HorizontalScales = 0; ?

[image.png]

http://gmsh.info/doc/texinfo/gmsh.html#Post_002dprocessing-options-list

Sincerely,
Max

On Wed, Dec 4, 2019 at 1:52 PM Marco Tiberga 
mailto:m.tibe...@tudelft.nl>> wrote:
Dear Gmsh community,

Is there a way to change the position of the value scale in any kind of View?
I tried with the most recent Gmsh snapshot, but if I go to “View options” -> 
“Axes” -> “2D axes/value scale position” only the option “manual” seems to 
actually be able to change the position. I am using the GUI, FYI.

However, I cannot obtain what I want.
The “Automatic” position is at the bottom-center of the screen and the scale is 
horizontal. If possible, I would like to have a vertical scale, to the left or 
right of the view.

Thanks a lot for your help, in advance.

Best regards,
Marco Tiberga
PhD candidate
Delft University of Technology
Faculty of Applied Sciences
Radiation Science & Technology Department
Mekelweg 15, 2629 JB Delft, The Netherlands
E-Mail: m.tibe...@tudelft.nl
Website: http://www.nera.rst.tudelft.nl/


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


--
Max Orok
Contractor
www.mevex.com

[Image removed by sender.]
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh