# doc-cache created by Octave 11.3.0
# name: cache
# type: cell
# rows: 3
# columns: 21
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
msh2m_displacement_smoothing


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1443
 -- Function File: [AX,AY] = msh2m_displacement_smoothing(MSH,K)

     Displace the boundary of a 2D mesh setting a spring with force/length
     constant K along each edge and enforcing equilibrium.

     This function builds matrices containing the resulting (linearized)
     equation for x and y coordinates of each mesh node.  Boundary conditions
     enforcing the displacement (Dirichlet type problem) or the force (Neumann
     type) at the boundary must be added to make the system solvable, e.g.:

          msh = msh2m_structured_mesh(linspace(0,1,10), linspace(0,1,10), 1,1:4,"left");

          dnodes   = msh2m_nodes_on_sides(msh,1:4);
          varnodes = setdiff([1:columns(msh.p)],dnodes);
          xd     = msh.p(1,dnodes)';
          yd     = msh.p(2,dnodes)';
          dx     = dy    = zeros(columns(msh.p),1);
          dxtot  = dytot = -.5*sin(xd.*yd*pi/2);
          Nsteps = 10;

          for ii = 1:Nsteps
           dx(dnodes) = dxtot;
           dy(dnodes) = dytot;
           [Ax,Ay] = msh2m_displacement_smoothing(msh,1);
           dx(varnodes) = Ax(varnodes,varnodes) \ ...
               (-Ax(varnodes,dnodes)*dx(dnodes));
           dy(varnodes) = Ay(varnodes,varnodes) \ ...
               (-Ay(varnodes,dnodes)*dy(dnodes));
           msh.p += [ dx'/Nsteps; dy'/Nsteps ] ;
           triplot(msh.t(1:3,:)',msh.p(1,:)',msh.p(2,:)');
           pause(.01)
          endfor

     See also: msh2m_jiggle_mesh.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Displace the boundary of a 2D mesh setting a spring with force/length constan...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
msh2m_equalize_mesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 388
 -- Function File: [MESH] = msh2m_equalize_mesh(MESH)

     Apply a baricentric regularization to equalize the size of triangle edges,
     i.e.  move each node to the center of mass of the patch of triangles to
     which it belongs.

     May be useful when distorting a mesh.  Type ‘demo msh2m_equalize_mesh’ to
     see some examples.

     See also: msh2m_displacement_smoothing.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Apply a baricentric regularization to equalize the size of triangle edges, i....



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
msh2m_geometrical_properties


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1939
 -- Function File: [VARARGOUT] =
          msh2m_geometrical_properties(MESH,[STRING1,STRING2,...])

     Compute MESH geometrical properties identified by input strings.

     Valid properties are:
        • ‘"bar"’: return a matrix with size 2 times the number of mesh elements
          containing the center of mass coordinates.
        • ‘"cir"’: return a matrix with size 2 times the number of mesh elements
          containing the circumcenter coordinates.
        • ‘"emidp"’: return a matrix with size 2 times the number of side edges
          containing their midpoint coordinates.
        • ‘"slength"’: return a matrix with size 3 times the number of mesh
          elements containing the length of each element side.
        • ‘"cdist"’: return a matrix of size 3 times the number of mesh elements
          containing the distance among circumcenters of neighbouring elements.
          If the corresponding side lies on the edge, the distance between
          circumcenter and border edge is returned in the matrix.
        • ‘"wjacdet"’: return the weigthed Jacobian determinant used for the
          numerical integration with trapezoidal rule over an element.
        • ‘"shg"’: return a matrix of size 3 times the number of elements matrix
          containing the gradient of P1 shape functions.
        • ‘"area"’: return a row vector containing the area of every element.
        • ‘"midedge"’: return a multi-dimensional array with size 2 times 3
          times the number of elements containing the coordinates of the
          midpoint of every edge.

     The output will contain the geometrical properties requested in the input
     in the same order specified in the function call.

     If an unexpected string is given as input, an empty vector is returned in
     output.

     See also: msh2m_topological_properties, msh3m_geometrical_properties.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
Compute MESH geometrical properties identified by input strings.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
msh2m_gmsh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 791
 -- Function File: [MESH] = msh2m_gmsh(GEOMETRY,OPTION,VALUE,...)
 -- Function File[MESH, GMSH_OUT]: = msh2m_gmsh(...)

     Construct an unstructured triangular 2D mesh making use of the free
     software gmsh.

     The compulsory argument GEOMETRY is the basename of the ‘*.geo’ file to be
     meshed.

     The optional arguments OPTION and VALUE identify respectively a gmsh option
     and its value.  For more information regarding the possible option to pass,
     refer to gmsh manual or gmsh site <http://www.geuz.org/gmsh/>.

     The returned value MESH is a PDE-tool like mesh structure.  If the function
     is called with two outputs GMSH_OUT is the verbose output of the gmsh
     subprocess.

     See also: msh2m_structured_mesh, msh3m_gmsh, msh2m_mesh_along_spline.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Construct an unstructured triangular 2D mesh making use of the free software
...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
msh2m_gmsh_write


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 87
 -- Function File: = msh2m_gmsh_write (FILENAME, MSH)

     See also: msh3m_gmsh_write.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
See also: msh3m_gmsh_write.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
msh2m_jiggle_mesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 556
 -- Function File: [NEWMSH] = msh2m_jiggle_mesh(MSH,STEPS)

     Equalize the size of triangle edges setting a spring of rest length
     FACTOR*AREA along each edge of the mesh and solving for static equilibrium.

     The non-linear eqautions of the system obtained are solved via a non-linear
     Gauss-Seidel method.  STEP is the number of steps of the method to be
     applied.

     May be useful when distorting a mesh, type ‘demo msh2m_jiggle_mesh’ to see
     some examples.

     See also: msh2m_displacement_smoothing, msh2m_equalize_mesh.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Equalize the size of triangle edges setting a spring of rest length FACTOR*AR...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
msh2m_join_structured_mesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 399
 -- Function File: [MESH] = msh2m_join_structured_mesh(MESH1,MESH2,S1,S2)

     Join the two structured meshes MESH1 and MESH2 into one single mesh.

     The two meshes must share a common edge identified by S1 and S2.

     *WARNING*: the two meshes must share the same vertexes on the common edge.

     See also: msh2m_structured_mesh, msh2m_gmsh, msh2m_submesh,
     msh3m_join_structured_mesh.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Join the two structured meshes MESH1 and MESH2 into one single mesh.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
msh2m_mesh_along_spline


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 706
 -- Function File: [MESH] = msh2m_mesh_along_spline(XC,YC,NNX,NNY,SIGMA)

     Generate a structured mesh in a thin layer of size SIGMA sitting on a
     natural Catmull-Rom type cubic spline with control points XC, YC.

     If NNX and NNY are scalars, the mesh has NNX nodes in the direction along
     the spline and NNY in the normal direction.

     If NNX and NNY are vectors they indicate the curvilinear coordinates of the
     mesh nodes.

     The returned value MESH is a PDE-tool like mesh structure.

     Be aware that if SIGMA is not much smaller than the curvature of the line
     the resulting mesh may be invalid.

     See also: msh2m_structured_mesh, msh2m_gmsh, msh3m_structured_mesh.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Generate a structured mesh in a thin layer of size SIGMA sitting on a natural...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
msh2m_nodes_on_sides


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 246
 -- Function File: [NODELIST] = msh2m_nodes_on_sides(MESH,SIDELIST)

     Return a list of MESH nodes lying on the sides specified in SIDELIST.

     See also: msh2m_geometrical_properties, msh2m_topological_properties,
     msh3m_nodes_on_faces.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
Return a list of MESH nodes lying on the sides specified in SIDELIST.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
msh2m_structured_mesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2148
 -- Function File: [MESH] = msh2m_structured_mesh(X,Y,REGION,SIDES,STRING)

     Construct a structured triangular 2D mesh on a rectangular domain.

        • X and Y are the one dimensional mesh vector of the corresponding
          Cartesian axis.
        • REGION is a number identifying the geometrical surface region, while
          SIDES is a 4 components vector containing the numbers used to identify
          the geometrical side edges.
        • STRING is an optional value specifying the orientation of the diagonal
          edge of the structured mesh.  It may take the value ‘"right"’
          (default), ‘"left"’, ‘"random"’.

     The returned value MESH is a PDE-tool like mesh structure composed of the
     following fields:
        − P: matrix with size 2 times number of mesh points.
             • 1st row: x-coordinates of the points.
             • 2nd row: y-coordinates of the points.
        − E: matrix with size 7 times number of mesh side edges.
             • 1st row: number of the first vertex of the side edge.
             • 2nd row: number of the second vertex of the side edge.
             • 3rd row: set to 0, present for compatibility with MatLab
               PDE-tool.
             • 4th row: set to 0, present for compatibility with MatLab
               PDE-tool.
             • 5th row: number of the geometrical border containing the side
               edge.
             • 6th row: number of the geometrical surface to the right of side
               edge.
             • 7th row: number of the geometrical surface to the left of the
               side edge.
        − T: matrix with size 4 times number of mesh elements.
             • 1st row: number of the first vertex of the element.
             • 2nd row: number of the second vertex of the element.
             • 3rd row: number of the third vertex of the element.
             • 4th row: number of the geometrical surface containing the
               element.

     See also: msh3m_structured_mesh, msh2m_gmsh, msh2m_mesh_along_spline,
     msh2m_join_structured_mesh, msh2m_submesh.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
Construct a structured triangular 2D mesh on a rectangular domain.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
msh2m_submesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 533
 -- Function File: [OMESH,NODELIST,ELEMENTLIST] =
          msh2m_submesh(IMESH,INTRFC,SDL)

     Extract the subdomain(s) in SDL from IMESH.

     The row vector INTRFC contains the internal interface sides to be
     maintained (field ‘mesh.e(5,:)’).  It can be empty.

     Return the vectors NODELIST and ELEMENTLIST containing respectively the
     list of nodes and elements of the original mesh that are part of the
     selected subdomain(s).

     See also: msh2m_join_structured_mesh, msh3m_submesh, msh3e_surface_mesh.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Extract the subdomain(s) in SDL from IMESH.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
msh2m_topological_properties


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1758
 -- Function File: [VARARGOUT] =
          msh2m_topological_properties(MESH,[STRING1,STRING2,...])

     Compute MESH topological properties identified by input strings.

     Valid properties are:
        • ‘"n"’: return a matrix with size 3 times the number of mesh elements
          containing the list of its neighbours.  The entry ‘M(i,j)’ in this
          matrix is the mesh element sharing the side ‘i’ of triangle ‘j’.  If
          no such element exists (i.e.  for boundary edges) a value of ‘NaN’ is
          set.
        • ‘"sides"’: return a matrix with size 2 times number of sides.The entry
          ‘M(i,j)’ is the index of the i-th vertex of j-th side.
        • ‘"ts"’: return a matrix with size 3 times the number of mesh elements
          containing the sides associated with each element.
        • ‘"tws"’:return a matrix with size 2 times the number of mesh sides
          containing the elements associated with each side.  For a side
          belonging to one triangle only a value of ‘NaN’ is set.
        • ‘"coinc"’: return a matrix with 2 rows.  Each column contains the
          indices of two triangles sharing the same circumcenter.
        • ‘"boundary"’: return a matrix with size 2 times the number of side
          edges.  The first row contains the mesh element to which the side
          belongs, the second row is the local index of this edge.

     The output will contain the geometrical properties requested in the input
     in the same order specified in the function call.

     If an unexpected string is given as input, an empty vector is returned in
     output.

     See also: mshm2m_geometrical_properties, msh3m_geometrical_properties.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
Compute MESH topological properties identified by input strings.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
msh2p_mesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 147
 -- Function File: msh2p_mesh(MESH, LINESPEC)

     Plot MESH with the line specification in LINESPEC using ‘triplot’.

     See also: triplot.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
Plot MESH with the line specification in LINESPEC using ‘triplot’.

Se



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
msh3e_surface_mesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 601
 -- Function File: [EMESH,SNODES,SSIDES,STRIANGLES] =
          msh3e_surface_mesh(MESH,NSRF,NSIDES)

     Extract the plane surface NSRF delimited by NSIDES from MESH.

     Return the vector SNODES containing the references to input mesh nodes
     (field ‘mesh.p’), the vector SSIDES containing the references to input mesh
     side (field ‘mesh.s’) and the vector STRIANGLES containing the references
     to input mesh side edges (field ‘mesh.e’).

     *WARNING*: the suface MUST be ortogonal to either X, Y or Z axis.  This
     should be changed to account for generic 2D surface.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Extract the plane surface NSRF delimited by NSIDES from MESH.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
msh3m_geometrical_properties


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1124
 -- Function File: [VARARGOUT] =
          msh3m_geometrical_properties(MESH,[STRING1,STRING2,...])

     Compute MESH geometrical properties identified by input strings.

     Valid properties are:
        • ‘"bar"’: return a matrix with size 3 times the number of mesh elements
          containing the center of mass coordinates.
        • ‘"wjacdet"’: return the weigthed Jacobian determinant used for the
          numerical integration with trapezoidal rule over an element.
        • ‘"shg"’: return a matrix of size 3 times the number of elements matrix
          containing the gradient of P1 shape functions.
        • ‘"shp"’: return a matrix containing the the value of P1 shape
          functions.
        • ‘"area"’: return a row vector containing the volume of each element.

     The output will contain the geometrical properties requested in the input
     in the same order specified in the function call.

     If an unexpected string is given as input, an empty vector is returned in
     output.

     See also: msh2m_topological_properties, msh2m_geometrical_properties.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
Compute MESH geometrical properties identified by input strings.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
msh3m_gmsh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 790
 -- Function File: [MESH] = msh3m_gmsh(GEOMETRY,OPTION,VALUE,...)
 -- Function File[MESH, GMSH_OUT]: = msh3m_gmsh(...)

     Construct an unstructured tetrahedral 3D mesh making use of the free
     software gmsh.

     The required argument GEOMETRY is the basename of the ‘*.geo’ file to be
     meshed.

     The optional arguments OPTION and VALUE identify respectively a gmsh option
     and its value.  For more information regarding the possible option to pass,
     refer to gmsh manual or gmsh site <http://www.geuz.org/gmsh/>.

     The returned value MESH is a PDE-tool like mesh structure.  If the function
     is called with two outputs GMSH_OUT is the verbose output of the gmsh
     subprocess.

     See also: msh3m_structured_mesh, msh2m_gmsh, msh2m_mesh_along_spline.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Construct an unstructured tetrahedral 3D mesh making use of the free software...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
msh3m_gmsh_write


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 87
 -- Function File: = msh3m_gmsh_write (FILENAME, MSH)

     See also: msh2m_gmsh_write.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
See also: msh2m_gmsh_write.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
msh3m_join_structured_mesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 399
 -- Function File: [MESH] = msh3m_join_structured_mesh(MESH1,MESH2,S1,S2)

     Join the two structured meshes MESH1 and MESH2 into one single mesh.

     The two meshes must share a common face identified by S1 and S2.

     *WARNING*: the two meshes must share the same vertexes on the common face.

     See also: msh3m_structured_mesh, msh3m_gmsh, msh3m_submesh,
     msh2m_join_structured_mesh.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Join the two structured meshes MESH1 and MESH2 into one single mesh.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
msh3m_nodes_on_faces


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 211
 -- Function File: [NODELIST] = msh3m_nodes_on_faces(MESH,FACELIST)

     Return a list of MESH nodes lying on the faces specified in FACELIST.

     See also: msh3m_geometrical_properties, msh2m_nodes_on_faces.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
Return a list of MESH nodes lying on the faces specified in FACELIST.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
msh3m_structured_mesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2324
 -- Function File: [MESH] = msh3m_structured_mesh(X,Y,Z,REGION,SIDES)

     Construct a structured tetrahedral 3D mesh on a parallelepipedal domain.

        • X, Y and Z are the one dimensional mesh vector of the corresponding
          Cartesian axis.
        • REGION is a number identifying the geometrical volume, while SIDES is
          a 6 components vector containing the numbers used to identify the
          geometrical face edges.

     The returned value MESH is a PDE-tool like mesh structure composed of the
     following fields:
        − P: matrix with size 3 times number of mesh points.
             • 1st row: x-coordinates of the points.
             • 2nd row: y-coordinates of the points.
             • 3rd row: z-coordinates of the points.
        − E: matrix with size 10 times number of mesh boundary triangles.
             • 1st row: number of the first vertex of the face edge.
             • 2nd row: number of the second vertex of the face edge.
             • 3rd row: number of the third vertex of the face edge.
             • 4th row: set to 0, present for compatibility with MatLab
               PDE-tool.
             • 5th row: set to 0, present for compatibility with MatLab
               PDE-tool.
             • 6th row: set to 0, present for compatibility with MatLab
               PDE-tool.
             • 7th row: set to 0, present for compatibility with MatLab
               PDE-tool.
             • 8th row: number of the geometrical volume to the right of the
               face edge.
             • 9th row: number of the geometrical volume to the left of the face
               edge.
             • 10th row: number of the geometrical border containing the face
               edge.
        − T: matrix with size 5 times number of mesh elements.
             • 1st row: number of the first vertex of the element.
             • 2nd row: number of the second vertex of the element.
             • 3rd row: number of the third vertex of the element.
             • 4th row: number of the fourth vertex of the element.
             • 5th row: number of the geometrical volume containing the element.

     See also: msh2m_structured_mesh, msh3m_gmsh, msh2m_mesh_along_spline,
     msh3m_join_structured_mesh, msh3m_submesh.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
Construct a structured tetrahedral 3D mesh on a parallelepipedal domain.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
msh3m_submesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 546
 -- Function File: [OMESH,NODELIST,ELEMENTLIST] =
          msh3m_submesh(IMESH,INTRFC,SDL)

     Extract the subdomain(s) in SDL from IMESH.

     The row vector INTRFC contains the internal interface sides to be
     maintained (field ‘mesh.e(5,:)’).  It can be empty.

     Return the vectors NODELIST and ELEMENTLIST containing respectively the
     list of nodes and elements of the original mesh that are part of the
     selected subdomain(s).

     See also: msh3m_join_structured_mesh, msh2m_join_structured_mesh,
     msh3m_submesh.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Extract the subdomain(s) in SDL from IMESH.





