SciFEM-Project_CoffeeMugSim.../generate_mesh
2026-01-19 10:45:46 +01:00
..
ascii_read_meshvector.m copied the templates 2026-01-19 10:45:46 +01:00
ascii_write_mesh.m copied the templates 2026-01-19 10:45:46 +01:00
ascii_write_subdomains.m copied the templates 2026-01-19 10:45:46 +01:00
chip_2materials.m copied the templates 2026-01-19 10:45:46 +01:00
chip_2materials.txt copied the templates 2026-01-19 10:45:46 +01:00
chip_2materials_sd.txt copied the templates 2026-01-19 10:45:46 +01:00
generate_rectangle_subdomains.m copied the templates 2026-01-19 10:45:46 +01:00
README.md copied the templates 2026-01-19 10:45:46 +01:00
rec_4.m copied the templates 2026-01-19 10:45:46 +01:00
rec_4.txt copied the templates 2026-01-19 10:45:46 +01:00
rec_4_sd.txt copied the templates 2026-01-19 10:45:46 +01:00
rec_16.m copied the templates 2026-01-19 10:45:46 +01:00
rec_16.txt copied the templates 2026-01-19 10:45:46 +01:00
rec_16_sd.txt copied the templates 2026-01-19 10:45:46 +01:00
rec_64.m copied the templates 2026-01-19 10:45:46 +01:00
rec_64.txt copied the templates 2026-01-19 10:45:46 +01:00
rec_64_sd.txt copied the templates 2026-01-19 10:45:46 +01:00
rec_a_1.m copied the templates 2026-01-19 10:45:46 +01:00
rec_a_4.m copied the templates 2026-01-19 10:45:46 +01:00
rec_a_4.txt copied the templates 2026-01-19 10:45:46 +01:00
rec_a_4_sd.txt copied the templates 2026-01-19 10:45:46 +01:00
rec_a_16.m copied the templates 2026-01-19 10:45:46 +01:00
rec_a_64.m copied the templates 2026-01-19 10:45:46 +01:00
square_4.m copied the templates 2026-01-19 10:45:46 +01:00
square_4.txt copied the templates 2026-01-19 10:45:46 +01:00
square_4_sd.txt copied the templates 2026-01-19 10:45:46 +01:00
square_a_4.m copied the templates 2026-01-19 10:45:46 +01:00
square_b_4.m copied the templates 2026-01-19 10:45:46 +01:00
visualize_results.m copied the templates 2026-01-19 10:45:46 +01:00

generate_mesh: mesh generation via matlab for 2D objects

  • Triangular linear elements are generated to describe the mesh.

File structure

A script foo.m generates two files:

  • foo.txt : contains
    • number of vertices
    • dimension in space (=2)
    • number of elements
    • number of vertices per element (=3)
    • list of vertex coordinates: xk, yk
    • list of vertex indices defining the elements: idxi,1, idxi,2, idxi,3
    • indices start with 1 (Fortran)
  • foo_sd.txt :
    • number of elements
    • subdomain index an element belongs to
    • indices start with 1 (Fortran)

current code structure

  • ascii_write_mesh.m : function that writes a mesh file for input in other codes
  • ascii_write_subdomains.m : function that writes the subdomain number for each element into a file
  • generate_rectangle_subdomains.m : function that generates (n x k) subdomains by combining squares
  • square_4.m : generates mesh and subdomain files for a square separated into subdomains
  • rec_kk.m : generates mesh and subdomain files for kk subdomains
  • chip_2materials.m : generates mesh and subdomain files for chip geometry with 2 subdomains