123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169(* File: mesh.ml
Copyright (C) 2006-
Christophe Troestler <Christophe.Troestler@umons.ac.be>
WWW: http://math.umons.ac.be/an/software/
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation, with the special
exception on linking described in the file LICENSE.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file
LICENSE for more details. *)openBigarrayincludeMesh_commonletpslg(typel)?(hole:lmatoption)?(region:lmatoption)?(point_marker:lint_vecoption)(point:lmat)?(segment_marker:lint_vecoption)(segment:lint_mat):lpslg=matchArray2.layoutpointwith|C_layout->MeshC.pslg~hole~region~point_marker~point~segment_marker~segment|Fortran_layout->MeshF.pslg~hole~region~point_marker~point~segment_marker~segmentletcreate(typel)?(hole:lmatoption)?(region:lmatoption)?(point_marker:lint_vecoption)(point:lmat)?(segment_marker:lint_vecoption)?(segment:lint_matoption)?(neighbor:lint_matoption)?(edge:lint_matoption)?(edge_marker:lint_vecoption)(triangle:lint_mat):lt=matchArray2.layoutpointwith|C_layout->MeshC.create~hole~region~point_marker~point~segment_marker~segment~neighbor~edge~edge_marker~triangle|Fortran_layout->MeshF.create~hole~region~point_marker~point~segment_marker~segment~neighbor~edge~edge_marker~triangleletcopy_vecv=letv'=Array1.create(Array1.kindv)(Array1.layoutv)(Array1.dimv)inArray1.blitvv';v'letcopy_matm=letm'=Array2.create(Array2.kindm)(Array2.layoutm)(Array2.dim1m)(Array2.dim2m)inArray2.blitmm';m'letcopy(mesh:'lt)=make_mesh~point:(copy_matmesh#point)~point_marker:(copy_vecmesh#point_marker)~segment:(copy_matmesh#segment)~segment_marker:(copy_vecmesh#segment_marker)~hole:(copy_matmesh#hole)~region:(copy_matmesh#region)~triangle:(copy_matmesh#triangle)~neighbor:(copy_matmesh#neighbor)~edge:(copy_matmesh#edge)~edge_marker:(copy_vecmesh#edge_marker)letsub(typel)(mesh:lt)?poslen:lt=matchlayoutmeshwith|C_layout->MeshC.submesh?poslen|Fortran_layout->MeshF.submesh?poslenletband_height_P1(typel)?filter(mesh:l#t)=letmesh=(mesh:>lt)inmatchlayoutmeshwith|C_layout->MeshC.band_height_P1filtermesh|Fortran_layout->MeshF.band_height_P1filtermeshletcuthill_mckee(typel)?(rev=true)?(perm:lint_vecoption)(mesh:lt):lt=matchlayoutmeshwith|C_layout->MeshC.cuthill_mckee~revpermmesh|Fortran_layout->MeshF.cuthill_mckee~revpermmeshletpermute_points(typel)(mesh:lt)?(inv=false)(perm:lint_vec):lt=matchlayoutmeshwith|C_layout->MeshC.permute_pointsmesh~invperm|Fortran_layout->MeshF.permute_pointsmesh~invpermletpermute_triangles(typel)(mesh:lt)?(inv=false)(perm:lint_vec):lt=matchlayoutmeshwith|C_layout->MeshC.permute_trianglesmesh~invperm|Fortran_layout->MeshF.permute_trianglesmesh~invpermmoduleLaTeX=structtypecolor=intletsave(typel)?edge(mesh:l#t)filename=letmesh=(mesh:>lt)inmatchlayoutmeshwith|C_layout->MeshC.latex?edgemeshfilename|Fortran_layout->MeshF.latex?edgemeshfilenameletwrite(typel)?edge(mesh:l#t)fh=letmesh=(mesh:>lt)inmatchlayoutmeshwith|C_layout->MeshC.latex_write?edgemeshfh|Fortran_layout->MeshF.latex_write?edgemeshfhletlevel_curves(typel)?boundary(mesh:l#t)(z:lvec)?level_eqlevelsfilename=letmesh=(mesh:>lt)inmatchlayoutmeshwith|C_layout->MeshC.level_curves?boundarymeshz?level_eqlevelsfilename|Fortran_layout->MeshF.level_curves?boundarymeshz?level_eqlevelsfilenameletsuper_level(typel)?boundary(mesh:l#t)(z:lvec)levelcolorfilename=letmesh=(mesh:>lt)inmatchlayoutmeshwith|C_layout->MeshC.super_level?boundarymeshzlevelcolorfilename|Fortran_layout->MeshF.super_level?boundarymeshzlevelcolorfilenameletsub_level(typel)?boundary(mesh:l#t)(z:lvec)levelcolorfilename=letmesh=(mesh:>lt)inmatchlayoutmeshwith|C_layout->MeshC.sub_level?boundarymeshzlevelcolorfilename|Fortran_layout->MeshF.sub_level?boundarymeshzlevelcolorfilenameendletscilab(typel)(mesh:l#t)?longitude?azimuth?mode?box?edgecolor(z:lvec)filename=letmesh=(mesh:>lt)inmatchlayoutmeshwith|C_layout->MeshC.scilabmesh?longitude?azimuth?mode?box?edgecolorzfilename|Fortran_layout->MeshF.scilabmesh?longitude?azimuth?mode?box?edgecolorzfilenameletmatlab(typel)(mesh:l#t)?edgecolor?linestyle?facealpha(z:lvec)filename=letmesh=(mesh:>lt)inmatchlayoutmeshwith|C_layout->MeshC.matlabmesh?edgecolor?linestyle?facealphazfilename|Fortran_layout->MeshF.matlabmesh?edgecolor?linestyle?facealphazfilenameletmathematica(typel)(mesh:l#t)(z:lvec)filename=letmesh=(mesh:>lt)inmatchlayoutmeshwith|C_layout->MeshC.mathematicameshzfilename|Fortran_layout->MeshF.mathematicameshzfilename(* Local Variables: *)(* compile-command: "make -k -w -C .." *)(* End: *)