DorianDepriester / MTEX2Gmsh

Matlab toolbox for generating 2D meshes from EBSD data
https://doriandepriester.github.io/MTEX2Gmsh/
MIT License
41 stars 18 forks source link

[need some help] gmshGeo fails #16

Closed kun-Jiang closed 1 year ago

kun-Jiang commented 1 year ago

Hello Dorian, Sorry to disturb you. There is a problem when I run the unitTest.m and I haven't modified the code. My matlab version is R2018b gmsh 4.12 mtex 5.9.0 I had some try according the Error prompt but it doesn't work. Can you give me some help? Following is my command window

>> unitTest

ebsd = EBSD

 Phase  Orientations     Mineral         Color  Symmetry  Crystal reference frame
     0    1197 (32%)  notIndexed                                                 
     1    1952 (52%)  Forsterite  LightSkyBlue       mmm                         
     2    290 (7.8%)   Enstatite  DarkSeaGreen       mmm                         
     3    282 (7.6%)    Diopside     Goldenrod     12/m1       X||a*, Y||b*, Z||c

 Properties: bands, bc, bs, error, mad, x, y
 Scan unit : um

Error using  * 
Both logical arguments must be scalar. Use TIMES (.*) for elementwise multiplication.

Error in findSingularPoints (line 21)
    I_VG = (I_VF * gB.I_FG)==2;

Error in computeSegments (line 14)
sp=findSingularPoints(grains);

Error in gmshGeo (line 46)
            [Segmts,OuterLoop,InnerLoops,G.SingularPoints]=computeSegments(grains);

Error in unitTest (line 26)
            G=gmshGeo(grains);
DorianDepriester commented 1 year ago

Hello Joe, I will investigate this, but it seems that this error is due to the MTEX version you use. By the time I fix it (let's be honest, not today), try using MTEX 5.8.0 instead.

kun-Jiang commented 1 year ago

Thanks for your suggestion, Dorian. It works well after replacing the MTEX 5.9 with version 5.8.0

DorianDepriester commented 1 year ago

I've made a patch, so you should be able to use MTEX 5.9.0 as well.