Skip to content
Snippets Groups Projects
Select Git revision
  • 75775fc569f7789caed04ec753ff30a42b6e13ad
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

MVertex.h

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    waveguide2d.geo 1.91 KiB
    Include "waveguide2d_data.geo";
    
    Solver.AutoMesh = -1; // the geometry script generates the mesh
    
    If(MPI_Size == 1) // sequential meshing
      start = 0;
      end = N_DOM-1;
    EndIf
    If(MPI_Size > 1) // parallel meshing
      start = MPI_Rank;
      end = MPI_Rank;
    EndIf
    
    For idom In {start:end}
    
      //NewModel;
      Delete Model;
    
      Point(1) = {idom*dDom, 0, 0., LC};
      myExtrudedLine[] = Extrude {0, DY, 0} {
        Point{1}; Layers{DY/LC};
      };
      myExtrudedSurface[] = Extrude {dDom, 0, 0} {
        Line{myExtrudedLine[1]}; Layers{dDom/LC}; Recombine;
      };
      lateralSides[] = {};
      For i In {2:3}
        lateralSides += myExtrudedSurface[i];
      EndFor
      pmlLeft[] = Extrude {-dBb, 0, 0} {
        Line{myExtrudedLine[1]}; Layers{dBb/LC}; Recombine;
      };
      pmlRight[] = Extrude {dBb, 0, 0} {
        Line{myExtrudedSurface[0]}; Layers{dBb/LC}; Recombine;
      };
    
      pmlLeftSides[] = {};
      For i In {2:3}
        pmlLeftSides += pmlLeft[i];
      EndFor
    
      pmlRightSides[] = {};
      For i In {2:3}
        pmlRightSides += pmlRight[i];
      EndFor
    
      Physical Line(-((idom+1)*1000+10)) = myExtrudedLine[1]; // left face
      Physical Line(((idom+1)*1000+20)) = myExtrudedSurface[0]; // right face
      Physical Line(-((idom+1)*1000+202)) = lateralSides[]; // lateral shell
      Physical Surface(((idom+1)*1000+200)) = myExtrudedSurface[1];
    
      Physical Line(-((idom+1)*1000+1)) = pmlLeft[0]; // left face
      Physical Line(((idom+1)*1000+102)) = pmlLeftSides[]; // lateral shell
      Physical Surface(((idom+1)*1000+100)) = pmlLeft[1];
    
      Physical Line(((idom+1)*1000+4)) = pmlRight[0]; // right face
      Physical Line(-((idom+1)*1000+302)) = pmlRightSides[]; // lateral shell
      Physical Surface(((idom+1)*1000+300)) = pmlRight[1];
    
      If(StrCmp(OnelabAction, "check")) // only mesh if not in onelab check mode
        Printf("Meshing waveguide subdomain %g...", idom);
        Mesh 2;
        CreateDir Str(DIR);
        Save StrCat(MSH_NAME, Sprintf("%g.msh", idom));
        Printf("Done.");
      EndIf
    
    EndFor
    
    BoundingBox {0, DX, 0, DY, 0, DZ};