DorianDepriester / MTEX2Gmsh

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

Create more elements in Z direction #15

Closed jdavidgg01 closed 2 years ago

jdavidgg01 commented 2 years ago

Hello Dorian,

For the standard command it says: The above command results in a 1 element thick mesh so i was wondering if there is there a way to apply thickness and have more elements in Z direction?

Thank you Regards

David.

DorianDepriester commented 2 years ago

Do you mean using tetrahedrons or wedge/hexahedrons?

DorianDepriester commented 2 years ago

Hello @jdavidgg01, In case you are interested, I have just added a 'Layers' option for meshing (1cc69be). For instance, if you want 3 wedge elements in thickness (instead of 1):

G.mesh(file.msh, 'Layers', 3)

Does this comply with your needs?

jdavidgg01 commented 2 years ago

Yes Dorian, that is exactly what i'm looking for, but i'm trying to run your updated code with the layers option but Matlab is giving me this error:

Not enough input arguments.

Error in mesh (line 99) [~,~,fext] = fileparts(filepath);

I don't know if i'm doing something wrong?

Regards

DorianDepriester commented 2 years ago

Are you sure you have updated MTEX2Gmsh to the latest commit?

DorianDepriester commented 2 years ago

Oh, I have just noticed I have forgotten the quotes around the file name:

G.mesh('file.msh', 'Layers', 3)

Alternatively, you can try:

mesh(G, 'file.msh', 'Layers', 3)
jdavidgg01 commented 2 years ago

Now is working Dorian, thank you so much!