Skip to content
Snippets Groups Projects
Select Git revision
  • 4608e03c213fb6d19fb9561dfe47d7261c20e872
  • master default protected
  • revert-ef4a3a4f
  • patch_releases_4_14
  • overlaps_tags_and_distributed_export
  • overlaps_tags_and_distributed_export_rebased
  • relaying
  • alphashapes
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
41 results

gmsh.jl

Blame
  • fullsplit.script 1.45 KiB
    Include "param.geo";
    Merge "part.msh";
    N_DOM=NUM_SLICES;
    
    vol[] = {};         idx_vol[] = {};
    sur_scat[] = {};    idx_sur_scat[] = {};
    sur_inf[] = {};     idx_sur_inf[] = {};
    sigma_left[] = {};  idx_sigma_left[] = {};
    sigma_right[] = {}; idx_sigma_right[] = {};
    For i In {1:N_DOM}
      idx_vol[] += #vol[];                 vol[] += Physical Volume{4000 + i};
      idx_sur_scat[] += #sur_scat[];       sur_scat[] += Physical Surface{1000 + i};
      idx_sur_inf[] += #sur_inf[];         sur_inf[] += Physical Surface{2000 + i};
      idx_sigma_left[] += #sigma_left[];   sigma_left[] += Physical Surface{3000 + 1000 * (i-2)};
      idx_sigma_right[] += #sigma_right[]; sigma_right[] += Physical Surface{3000 + 1000 * (i-1)};
    EndFor
    idx_vol[] += #vol[];
    idx_sur_scat[] += #sur_scat[];
    idx_sur_inf[] += #sur_inf[];
    idx_sigma_left[] += #sigma_left[];
    idx_sigma_right[] += #sigma_right[];
    
    Mesh.Binary = 1;
    Geometry.OrientedPhysicals = 0; // partitions have negative tags!!
    
    For i In {1:N_DOM}
      idom = i-1;
      Delete Physicals;
      Physical Volume(4000+i) = vol[{idx_vol[i-1]:idx_vol[i]-1}];
      Physical Surface(1000+i) = sur_scat[{idx_sur_scat[i-1]:idx_sur_scat[i]-1:1}];
      Physical Surface(2000+i) = sur_inf[{idx_sur_inf[i-1]:idx_sur_inf[i]-1:1}];
      Physical Surface(-(4000 + 1000 * (i-2))) = sigma_left[{idx_sigma_left[i-1]:idx_sigma_left[i]-1:1}];
      Physical Surface(4000 + 1000 * (i-1)) = sigma_right[{idx_sigma_right[i-1]:idx_sigma_right[i]-1:1}];
      Save Sprintf("falcon_mshcut%g.msh", idom);
    EndFor