[Gmsh] Different element sizes in different spatial directions?

Martin Meyer Martin.Meyer4 at mailbox.tu-dresden.de
Wed Jan 11 13:40:37 CET 2012


Hi Ruth,

thanks for that, this works fine as I expected. However it would be  
better if the values I declare for the step sizes in x and z direction  
could be more like "guidelines" for gmsh, so that the resulting mesh  
is not a regular, structured one as the mesh that is created by your  
script. I don't know if it's possible for example to shift each of the  
calculated internal nodes, by adding or subtracting some random number  
to/from the coordinates (the random number in each direction could for  
example be 10% of the suggested "guideline" step size)?

Regards,
Martin


Zitat von "Ruth V. Sabariego" <r.sabariego at ulg.ac.be>:

> Try this:
> a = 100 ;
> lc1 = 10 ;
> lc2 = 1 ;
>
> Point(1) = {0,0,0,lc1};
> Point(2) = {a,0,0,lc1};
>
> Line(1) = {1,2};
>
> Extrude {0, a, 0} {
>   Line{1}; Layers{a/lc2};
> }
>
> Regards,
> Ruth
>
> --
> Dr. Ir. Ruth V. Sabariego
> University of Liege, Electrical Engineering & Computer Science,
> Applied & Computational Electromagnetics (ACE),
> phone: +32-4-3663737 - fax: +32-4-3662910 - http://ace.montefiore.ulg.ac.be/
>
>
>
> On 10 Jan 2012, at 13:48, Martin Meyer wrote:
>
>> Hi,
>>
>> I'm pretty new to gmsh, and so far I haven't succeeded in creating   
>> a mesh with different element sizes in different spatial directions  
>>  (for instance a 100m*100m square with average element sizes of 10m  
>>  in x direction and 1m in y direction).
>> Is this possible, and if so, can you show me how to do that (either  
>>  script or GUI)?
>>
>> Thanks in advance for your thoughts,
>> Martin
>>
>> _______________________________________________
>> gmsh mailing list
>> gmsh at geuz.org
>> http://www.geuz.org/mailman/listinfo/gmsh
>
>