[Gmsh] Using Floating point expressions to automatically set physical entities.

Ruth Vazquez Sabariego ruth.sabariego at esat.kuleuven.be
Thu Dec 10 21:39:13 CET 2015


It is weird that it didn’t work. It does nicely here:
Physical Surface (100) = Ex1[{2:5}];

Ruth

—
Prof. Ruth V. Sabariego
KU Leuven
Dept. Electrical Engineering ESAT/Electa
http://www.esat.kuleuven.be/electa

Free software: http://gmsh.info | http://getdp.info | http://onelab.info







On 08 Dec 2015, at 14:25, Luis Parras Anguita <lparras at uma.es<mailto:lparras at uma.es>> wrote:

Thanks Ruth.

It does not work. I have solved it using Matlab to write the .geo file
directly line by line.



2015-12-08 13:54 GMT+01:00 Ruth Vazquez Sabariego
<ruth.sabariego at esat.kuleuven.be<mailto:ruth.sabariego at esat.kuleuven.be>>:
Try

Ext1[{2:5}]

Ruth

Physical Surface('interface_stationary_1')={Ex1[2:5]};

—
Prof. Ruth V. Sabariego
KU Leuven
Dept. Electrical Engineering ESAT/Electa
http://www.esat.kuleuven.be/electa

Free software: http://gmsh.info | http://getdp.info | http://onelab.info







On 08 Dec 2015, at 12:40, Luis Parras Anguita <lparras at uma.es> wrote:

Dear all.

I have created a cylinder by extruding a surface with the following commands:
lc1 = 0.01;
Point(0)={0,0,0,lc1};
Point(1)={1,0,0,lc1};
Point(2)={0,1,0,lc1};
Point(3)={-1,0,0,lc1};
Point(4)={0,-1,0,lc1};
Circle(5)={1,0,2};
Circle(6)={2,0,3};
Circle(7)={3,0,4};
Circle(8)={4,0,1};
Line Loop(1)={5,6,7,8};
Plane Surface(2)={1};
Ex1[]=Extrude {0, 0, 1} {
Surface{2};
};
Printf("top surface = %g", Ex1[0]);
Printf("Volume = %g", Ex1[1]);
Printf("side surfaces = %g, %g, %g, %g", Ex1[2], Ex1[3],Ex1[4],Ex1[5]);

Now I would like gmsh to automatically set the different physical
entities. I know the number of the lower surface, and the name of the
upper surface, but I have three surfaces that has been created that I
can access as Ex1[2:5]. I have tried several possibilities but I do
not know how to do what I want:

Physical Surface('interface_stationary_1')={Ex1[2:5]};

Best regards.

--
Luis Parras Anguita
Profesor Contratado Doctor
Departamento de Ing. Mecánica y Mecánica de Fluidos
ETSII Industriales, Málaga.
-----------------------------------------
Edificio Escuela de Ingenierías
C/ Arquitecto Francisco Peñalosa Nº 6
29071 Málaga

_______________________________________________
gmsh mailing list
gmsh at geuz.org
http://www.geuz.org/mailman/listinfo/gmsh




--
Luis Parras Anguita
Profesor Contratado Doctor
Departamento de Ing. Mecánica y Mecánica de Fluidos
ETSII Industriales, Málaga.
-----------------------------------------
Edificio Escuela de Ingenierías
C/ Arquitecto Francisco Peñalosa Nº 6
29071 Málaga

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20151210/e7f7434b/attachment.html>