93 INTEGER,
PUBLIC,
PARAMETER ::
gridman_dp = selected_real_kind(13)
95 INTEGER,
PUBLIC,
PARAMETER ::
gridman_sp = selected_real_kind(7)
148 INTEGER(GRIDMAN_SP) :: nelements
153 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: indexes(:,:)
155 CHARACTER(LEN=GRIDMAN_LENGTH) :: description
157 CHARACTER(LEN=GRIDMAN_LWORD),
ALLOCATABLE :: columns(:)
175 CHARACTER(LEN=GRIDMAN_LENGTH) :: description
177 INTEGER(GRIDMAN_SP) :: nedges
179 INTEGER(GRIDMAN_SP) :: ncells
193 INTEGER(GRIDMAN_SP) :: npoints
199 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: cells(:,:)
201 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: points(:,:)
203 REAL(GRIDMAN_DP) :: unit2si
205 CHARACTER(LEN=GRIDMAN_LENGTH):: units
207 REAL(GRIDMAN_DP),
ALLOCATABLE :: x(:,:)
209 INTEGER :: nedgeindex
211 INTEGER :: ncellindex
227 INTEGER(GRIDMAN_SP) :: n
229 INTEGER(GRIDMAN_SP) :: l
231 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: ind(:)
235 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: ifirst(:)
239 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: ilast(:)
265 INTEGER,
INTENT(IN) :: nindex
266 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nelements
267 INTEGER,
INTENT(OUT) :: ierr
274 INTEGER,
INTENT(OUT) :: ierr
280 INTEGER,
INTENT(OUT) :: res,ierr
286 INTEGER,
INTENT(IN) :: iout
287 INTEGER,
INTENT(OUT) :: ierr
293 INTEGER,
INTENT(IN) :: iin
294 INTEGER,
INTENT(OUT) :: ierr
300 INTEGER,
INTENT(OUT) :: res,ierr
306 INTEGER,
INTENT(OUT) :: ierr
312 INTEGER,
INTENT(OUT) :: ierr
318 INTEGER(GRIDMAN_SP),
ALLOCATABLE,
INTENT(OUT) :: elmap(:)
319 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: nmin,nmax
321 INTEGER,
INTENT(OUT) :: ierr
327 INTEGER(GRIDMAN_SP),
INTENT(IN) :: n
328 INTEGER,
INTENT(OUT) :: ierr
334 INTEGER(GRIDMAN_SP),
INTENT(IN) :: n12
335 INTEGER(GRIDMAN_SP),
INTENT(IN) :: imap12(2,n12)
336 INTEGER,
INTENT(OUT) :: ierr
342 INTEGER,
INTENT(OUT) :: ierr
357 INTEGER(GRIDMAN_SP),
INTENT(IN) :: n,l
358 INTEGER,
INTENT(OUT) :: ierr
364 INTEGER,
INTENT(OUT) :: ierr
376 s ierr,nedgeindex,ncellindex)
379 INTEGER,
INTENT(IN) ::
TYPE
380 INTEGER(GRIDMAN_SP),
INTENT(IN) :: ncells,nedges,npoints
381 INTEGER,
INTENT(OUT) :: ierr
382 INTEGER,
INTENT(IN),
OPTIONAL :: nedgeindex,ncellindex
388 INTEGER,
INTENT(OUT) :: ierr
394 INTEGER,
INTENT(OUT) :: res,ierr
400 INTEGER,
INTENT(OUT) :: ierr
403 SUBROUTINE gridman_grid_comp(GRID1,GRID2,RES,IERR)
406 INTEGER,
INTENT(OUT) :: res,ierr
407 END SUBROUTINE gridman_grid_comp
412 INTEGER,
INTENT(OUT) :: ierr
418 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: ncount
419 INTEGER,
INTENT(OUT) :: ierr
425 INTERFACE gridman_grid_write
430 INTEGER,
INTENT(IN) :: iout
431 INTEGER,
INTENT(OUT) :: ierr
437 CHARACTER(*),
INTENT(IN) :: fname
438 INTEGER,
INTENT(OUT) :: ierr
444 INTERFACE gridman_grid_read
449 INTEGER,
INTENT(IN) :: iin
450 INTEGER,
INTENT(OUT) :: ierr
456 CHARACTER(*),
INTENT(IN) :: fname
457 INTEGER,
INTENT(OUT) :: ierr
470 INTEGER,
INTENT(OUT) :: ierr
477 INTEGER,
INTENT(OUT) :: ierr
484 INTEGER,
INTENT(OUT) :: ierr
490 LOGICAL,
INTENT(IN) :: ltake(grid%ncells)
491 INTEGER,
INTENT(OUT) :: ierr
497 LOGICAL,
INTENT(IN) :: ltake(grid%nedges)
498 INTEGER,
INTENT(OUT) :: ierr
504 INTEGER,
INTENT(OUT) :: ierr
510 INTERFACE gridman_grid_metadata
515 CHARACTER(GRIDMAN_LENGTH),
ALLOCATABLE :: text(:)
516 INTEGER,
INTENT(OUT) :: nt
517 INTEGER,
INTENT(OUT) :: ierr
523 INTEGER,
INTENT(IN) :: iunit
524 INTEGER,
INTENT(OUT) :: ierr
527 END INTERFACE gridman_grid_metadata
537 REAL(GRIDMAN_DP),
INTENT(IN) :: x1,y1,x2,y2,x3,y3
544 REAL(GRIDMAN_DP),
INTENT(IN) :: x1,y1,x2,y2,x3,y3
551 REAL(GRIDMAN_DP),
INTENT(IN) :: x1,y1,x2,y2
558 REAL(GRIDMAN_DP),
INTENT(IN) :: x0,y0
559 REAL(GRIDMAN_DP),
INTENT(OUT) :: xn,yn
565 REAL(GRIDMAN_DP),
INTENT(IN) :: x1,y1,x2,y2
572 REAL(GRIDMAN_DP),
INTENT(IN) :: x0,y0,vx0,vy0,x1,y1,x2,y2
573 REAL(GRIDMAN_DP),
INTENT(OUT) :: xi,yi
579 f x21,y21,x22,y22,xi,yi)
581 REAL(GRIDMAN_DP),
INTENT(IN) :: x11,y11,x12,y12,x21,y21,x22,y22
582 REAL(GRIDMAN_DP),
INTENT(OUT) :: xi,yi
589 INTEGER(GRIDMAN_SP),
INTENT(IN) :: np
590 REAL(GRIDMAN_DP) :: xp(np),yp(np),x0,y0
597 REAL(GRIDMAN_DP),
INTENT(IN) :: x1,y1,x2,y2,x,y,tol
611 INTEGER,
INTENT(OUT) :: res,ierr
618 INTEGER,
INTENT(OUT) :: ierr
624 REAL(GRIDMAN_DP) :: ledges(grid%nedges)
625 INTEGER,
INTENT(OUT) :: ierr
631 REAL(GRIDMAN_DP) :: scells(grid%ncells)
632 INTEGER,
INTENT(OUT) :: ierr
638 REAL(GRIDMAN_DP) :: xcn(2,grid%ncells)
639 INTEGER,
INTENT(OUT) :: ierr
645 REAL(GRIDMAN_DP) :: vn(2,grid%nedges)
646 INTEGER,
INTENT(OUT) :: ierr
652 LOGICAL :: isconvex(grid%ncells)
653 INTEGER,
INTENT(OUT) :: ierr
659 REAL(GRIDMAN_DP) :: sedges(grid%nedges)
660 INTEGER,
INTENT(OUT) :: ierr
661 REAL(GRIDMAN_DP),
OPTIONAL :: angle
667 REAL(GRIDMAN_DP) :: vcells(grid%ncells)
668 INTEGER,
INTENT(OUT) :: ierr
669 REAL(GRIDMAN_DP),
OPTIONAL :: angle
676 INTEGER,
INTENT(OUT) :: ierr
682 REAL(GRIDMAN_DP),
INTENT(IN) :: tol
683 INTEGER,
INTENT(OUT) :: ierr
689 INTEGER(GRIDMAN_SP),
INTENT(IN) :: np
690 REAL(GRIDMAN_DP),
INTENT(IN) :: xp(np),yp(np)
691 LOGICAL,
INTENT(IN) :: lex
692 INTEGER,
INTENT(OUT) :: ierr
700 INTERFACE gridman_tria_read
703 s necke,nchbar,nseite,itri,ierr)
705 CHARACTER(*) :: fnames(3)
706 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: nrknot,ntrii
707 REAL(GRIDMAN_DP),
ALLOCATABLE :: xytrian(:,:)
708 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: necke(:,:),nchbar(:,:),
709 i nseite(:,:),itri(:,:)
710 INTEGER,
INTENT(OUT) :: ierr
715 CHARACTER(*) :: fnames(3)
717 INTEGER,
INTENT(OUT) :: ierr
720 END INTERFACE gridman_tria_read
722 INTERFACE gridman_tria_write
725 s necke,nchbar,nseite,itri,ierr)
727 CHARACTER(*) :: fnames(3)
728 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nrknot,ntrii
729 REAL(GRIDMAN_DP),
INTENT(IN) :: xytrian(2,nrknot)
730 INTEGER(GRIDMAN_SP),
INTENT(IN) :: necke(3,ntrii),nchbar(3,ntrii),
732 INTEGER,
INTENT(OUT) :: ierr
737 CHARACTER(*) :: fnames(3)
739 INTEGER,
INTENT(OUT) :: ierr
742 END INTERFACE gridman_tria_write
745 INTERFACE gridman_carre_read30
749 s nniso,nxiso,nyiso,br,bz,ierr)
751 CHARACTER(*),
INTENT(IN) :: fname
752 CHARACTER(*),
INTENT(OUT) :: sonnetfile
753 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: nx,ny
754 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: nncut,nniso
755 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: nxcut(:,:),nycut(:,:),
756 i nxiso(:,:),nyiso(:,:)
757 REAL(GRIDMAN_DP),
ALLOCATABLE :: br(:,:,:),bz(:,:,:)
758 INTEGER,
INTENT(OUT) :: ierr
763 CHARACTER(*),
INTENT(IN) :: fname
765 INTEGER,
INTENT(OUT) :: ierr
766 LOGICAL,
OPTIONAL :: leir
769 END INTERFACE gridman_carre_read30
772 INTERFACE gridman_carre_readsonnet
777 s rbt,br,bz,pit,bc,ierr)
779 CHARACTER(*),
INTENT(IN) :: fname
780 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: nx,ny
781 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: nncut, nniso
782 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: nxcut(:),nycut(:),
784 REAL(GRIDMAN_DP) :: rbt
785 REAL(GRIDMAN_DP),
ALLOCATABLE :: br(:,:,:),bz(:,:,:),
787 INTEGER,
INTENT(OUT) :: ierr
792 CHARACTER(*),
INTENT(IN) :: fname
794 INTEGER,
INTENT(OUT) :: ierr
795 LOGICAL,
OPTIONAL :: leir
798 END INTERFACE gridman_carre_readsonnet
801 INTERFACE gridman_addsurf2d_read
805 CHARACTER(*),
INTENT(IN) :: fname
806 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: nsurf
807 REAL(GRIDMAN_DP),
ALLOCATABLE :: x(:,:),y(:,:)
808 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: isrf(:)
809 INTEGER,
INTENT(OUT) :: ierr
816 CHARACTER(*),
INTENT(IN) :: fname
817 INTEGER,
INTENT(OUT) :: ierr
820 END INTERFACE gridman_addsurf2d_read
823 INTERFACE gridman_addsurf3d_read
828 CHARACTER(*),
INTENT(IN) :: fname
829 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: nsurf
830 REAL(GRIDMAN_DP),
ALLOCATABLE :: x(:,:),y(:,:),z(:,:)
831 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: isrf(:)
832 INTEGER,
INTENT(OUT) :: ierr
838 CHARACTER(*),
INTENT(IN) :: fname
839 INTEGER,
INTENT(OUT) :: ierr
842 END INTERFACE gridman_addsurf3d_read
845 INTERFACE gridman_template_read
849 CHARACTER(*),
INTENT(IN) :: fname
850 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: m,l
851 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: n(:)
852 REAL(GRIDMAN_DP),
ALLOCATABLE :: x(:),y(:)
853 INTEGER,
INTENT(OUT) :: ierr
859 CHARACTER(*),
INTENT(IN) :: fname
860 INTEGER,
INTENT(OUT) :: ierr
863 END INTERFACE gridman_template_read
865 INTERFACE gridman_template_write
870 CHARACTER(*),
INTENT(IN) :: fname
871 INTEGER(GRIDMAN_SP),
INTENT(IN) :: m,n(m),l
872 REAL(GRIDMAN_DP),
INTENT(IN) :: x(l),y(l)
873 INTEGER,
INTENT(OUT) :: ierr
880 CHARACTER(*),
INTENT(IN) :: fname
881 INTEGER,
INTENT(OUT) :: ierr
884 END INTERFACE gridman_template_write
889 s npoints,ncells,nvertex,nd,
890 s x,ifirst,lvertex,ivertex,
893 INTEGER,
INTENT(IN) :: iout
894 CHARACTER(*),
INTENT(IN) :: header
895 INTEGER(GRIDMAN_SP),
INTENT(IN) :: npoints,ncells,nvertex
896 INTEGER,
INTENT(IN) :: nd
897 REAL(GRIDMAN_DP),
INTENT(IN) :: x(nd,npoints)
898 INTEGER(GRIDMAN_SP),
INTENT(IN) :: ifirst(ncells),lvertex(ncells),
900 INTEGER,
INTENT(IN) :: ctype(ncells)
901 INTEGER,
INTENT(OUT) :: ierr
907 INTEGER,
INTENT(IN) :: iout
908 CHARACTER(*),
INTENT(IN) :: dataname
909 INTEGER(GRIDMAN_SP),
INTENT(IN) :: n
910 REAL(GRIDMAN_DP),
INTENT(IN) :: s(n)
911 INTEGER,
INTENT(OUT) :: ierr
916 INTEGER,
INTENT(IN) :: iout
917 CHARACTER(*) :: dataname
918 INTEGER(GRIDMAN_SP),
INTENT(IN) :: n
919 INTEGER,
INTENT(IN) :: nd
920 REAL(GRIDMAN_DP) :: v(nd,n)
921 INTEGER,
INTENT(OUT) :: ierr
925 s npoints,ncells,nvertex,nd,
926 s x,ifirst,lvertex,ivertex,ctype,
927 s ncs,ncv,nps,npv,ierr,
928 s cell_scalar,csname,
929 s cell_vector,cvname,
930 s point_scalar,psname,
931 s point_vector,pvname)
933 CHARACTER(*),
INTENT(IN) :: fname,header
934 INTEGER(GRIDMAN_SP),
INTENT(IN) :: npoints,ncells,nvertex
935 INTEGER,
INTENT(IN) :: nd
936 REAL(GRIDMAN_DP),
INTENT(IN) :: x(nd,npoints)
937 INTEGER(GRIDMAN_SP),
INTENT(IN) :: ifirst(ncells),lvertex(ncells),
939 INTEGER,
INTENT(IN) :: ctype(ncells)
940 INTEGER,
INTENT(IN) :: ncs,ncv,nps,npv
941 INTEGER,
INTENT(OUT) :: ierr
942 REAL(GRIDMAN_DP),
INTENT(IN),
OPTIONAL ::
943 r cell_scalar(ncells,ncs),
944 r cell_vector(nd,ncells,ncv),
945 r point_scalar(npoints,nps),
946 r point_vector(nd,npoints,npv)
947 CHARACTER(*),
INTENT(IN),
OPTIONAL :: csname(ncs),
961 s nchbar,nseite,itri,ierr)
964 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nrknot,ntrii
965 REAL(GRIDMAN_DP),
INTENT(IN) :: xytrian(2,nrknot)
966 INTEGER(GRIDMAN_SP),
INTENT(IN) ::
967 i necke(3,ntrii),nchbar(3,ntrii),
968 i nseite(3,ntrii),itri(5,ntrii)
969 INTEGER,
INTENT(OUT) :: ierr
973 s nchbar,nseite,itri,ierr)
976 REAL(GRIDMAN_DP),
INTENT(IN) :: xytrian(2,grid%npoints)
977 INTEGER(GRIDMAN_SP),
INTENT(IN) ::
978 i necke(3,grid%NCELLS),nchbar(3,grid%NCELLS),
980 INTEGER,
INTENT(OUT) :: ierr
984 SUBROUTINE gridman_carre2grid_fort30(GRID,LXB,LYB,NXB,NYB,NNCUT,
987 s lx,ly,nxl,nyl,ierr,leir)
990 INTEGER(GRIDMAN_SP),
INTENT(IN) :: lxb,lyb,nxb,nyb,lx,ly,nxl,nyl
991 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nncut,nniso
992 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nxcut(2,nncut),nycut(2,nncut),
993 i nxiso(2,nniso),nyiso(2,nniso)
994 REAL(GRIDMAN_DP) :: br(lxb:nxb,lyb:nyb,4),bz(lxb:nxb,lyb:nyb,4)
995 INTEGER,
INTENT(OUT) :: ierr
996 LOGICAL,
OPTIONAL :: leir
997 END SUBROUTINE gridman_carre2grid_fort30
1001 s lxb,lyb,nxb,nyb,nncut,nxcut,nycut,
1002 s nniso,nxiso,nyiso,br,bz,
1003 s lx,ly,nxl,nyl,ierr,leir)
1006 INTEGER(GRIDMAN_SP),
INTENT(IN) :: lxb,lyb,nxb,nyb,lx,ly,nxl,nyl
1007 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nncut,nniso
1008 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nxcut(nncut),nycut(nncut),
1009 i nxiso(nniso),nyiso(nniso)
1010 REAL(GRIDMAN_DP) :: br(lxb:nxb,lyb:nyb,4),bz(lxb:nxb,lyb:nyb,4)
1011 INTEGER,
INTENT(OUT) :: ierr
1012 LOGICAL,
OPTIONAL :: leir
1019 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nsurf
1020 REAL(GRIDMAN_DP) :: x(2,nsurf),y(2,nsurf)
1021 INTEGER(GRIDMAN_SP) :: isrf(nsurf)
1029 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nsurf
1030 REAL(GRIDMAN_DP) :: x(3,nsurf),y(3,nsurf),z(3,nsurf)
1031 INTEGER(GRIDMAN_SP) :: isrf(nsurf)
1039 INTEGER(GRIDMAN_SP),
INTENT(IN) :: m,l,n(m)
1040 REAL(GRIDMAN_DP),
INTENT(IN) :: x(l),y(l)
1041 INTEGER,
INTENT(OUT) :: ierr
1050 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: n
1051 INTEGER,
INTENT(OUT) :: m
1052 REAL(GRIDMAN_DP),
ALLOCATABLE,
INTENT(OUT) :: rindexes(:,:)
1053 CHARACTER(GRIDMAN_LENGTH) :: sindexes(:)
1054 INTEGER,
INTENT(OUT) :: ierr
1061 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: m,l
1062 INTEGER(GRIDMAN_SP),
ALLOCATABLE :: n(:)
1063 REAL(GRIDMAN_DP),
ALLOCATABLE :: x(:),y(:)
1064 INTEGER,
INTENT(OUT) :: ierr
1069 s x,ifirst,lvertex,ivertex,ctype,
1070 s ierr,ntheta,theta)
1073 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: npoints,ncells,nvertex
1074 REAL(GRIDMAN_DP),
ALLOCATABLE,
INTENT(OUT) :: x(:,:)
1075 INTEGER(GRIDMAN_SP),
ALLOCATABLE,
INTENT(OUT) ::
1076 i ifirst(:),lvertex(:),ivertex(:)
1077 INTEGER,
ALLOCATABLE,
INTENT(OUT) :: ctype(:)
1078 INTEGER,
INTENT(OUT) :: ierr
1079 INTEGER,
INTENT(IN) :: ntheta
1080 REAL(GRIDMAN_DP),
INTENT(IN),
OPTIONAL :: theta(ntheta)
1085 s ifirst,lvertex,ivertex,
1089 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: npoints,ncells,nvertex
1090 REAL(GRIDMAN_DP),
ALLOCATABLE,
INTENT(OUT) :: x(:,:)
1091 INTEGER(GRIDMAN_SP),
ALLOCATABLE,
INTENT(OUT) ::
1092 i ifirst(:),lvertex(:),ivertex(:)
1093 INTEGER,
ALLOCATABLE,
INTENT(OUT) :: ctype(:)
1094 INTEGER,
INTENT(OUT) :: ierr
1103 INTEGER(GRIDMAN_SP),
INTENT(OUT) :: n
1104 INTEGER,
INTENT(OUT) :: m
1105 REAL(GRIDMAN_DP),
ALLOCATABLE,
INTENT(OUT) :: rindexes(:,:)
1106 CHARACTER(GRIDMAN_LENGTH),
ALLOCATABLE,
INTENT(OUT) :: sindexes(:)
1107 INTEGER,
INTENT(OUT) :: ierr
1113 s ncs,ncv,nps,npv,ierr,
1114 s cell_scalar,csname,
1115 s cell_vector,cvname,
1116 s point_scalar,psname,
1117 s point_vector,pvname)
1119 CHARACTER(*),
INTENT(IN) :: fname,header
1121 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nelements
1122 INTEGER,
INTENT(IN) :: ncs,ncv,nps,npv
1123 INTEGER,
INTENT(OUT) :: ierr
1124 REAL(GRIDMAN_DP),
INTENT(IN),
OPTIONAL ::
1125 r cell_scalar(grid%NCELLS,ncs)
1126 CHARACTER(*),
INTENT(IN),
OPTIONAL :: csname(ncs)
1127 REAL(GRIDMAN_DP),
INTENT(IN),
OPTIONAL ::
1128 r cell_vector(2,grid%NCELLS,ncv)
1129 CHARACTER(*),
INTENT(IN),
OPTIONAL :: cvname(ncv)
1130 REAL(GRIDMAN_DP),
INTENT(IN),
OPTIONAL ::
1131 r point_scalar(grid%NPOINTS,nps)
1132 CHARACTER(*),
INTENT(IN),
OPTIONAL :: psname(nps)
1133 REAL(GRIDMAN_DP),
INTENT(IN),
OPTIONAL ::
1134 r point_vector(2,grid%NPOINTS,npv)
1135 CHARACTER(*),
INTENT(IN),
OPTIONAL :: pvname(npv)
1141 s ncs,ncv,nps,npv,ierr,
1147 CHARACTER(*),
INTENT(IN) :: fname,header
1149 INTEGER(GRIDMAN_SP),
INTENT(IN) :: nelements
1150 INTEGER,
INTENT(IN) :: ncs,ncv,nps,npv
1151 INTEGER,
INTENT(OUT) :: ierr
1152 REAL(GRIDMAN_DP),
INTENT(IN),
OPTIONAL ::
1153 r cell_scalar(nelements,ncs)
1154 CHARACTER(*),
INTENT(IN),
OPTIONAL :: csname(ncs)
1155 REAL(GRIDMAN_DP),
INTENT(IN),
OPTIONAL ::
1156 r cell_vector(3,nelements,ncv)
1157 CHARACTER(*),
INTENT(IN),
OPTIONAL :: cvname(ncv)
1158 REAL(GRIDMAN_DP),
INTENT(IN),
OPTIONAL ::
1159 r point_scalar(grid%NPOINTS,nps)
1160 CHARACTER(*),
INTENT(IN),
OPTIONAL :: psname(nps)
1161 REAL(GRIDMAN_DP),
INTENT(IN),
OPTIONAL ::
1162 r point_vector(3,grid%NPOINTS,npv)
1163 CHARACTER(*),
INTENT(IN),
OPTIONAL :: pvname(npv)
subroutine gridman_carre2grid(GRID, LXB, LYB, NXB, NYB, NNCUT, NXCUT, NYCUT, NNISO, NXISO, NYISO, BR, BZ, LX, LY, NXL, NYL, IERR, LEIR)
Convert B2 (CARRE, SONNET) grid into GRIDMAN_GRID grid object.
subroutine gridman_grid_points(EDGES, GRID, IERR)
Create table of edges connected to each point.
logical, save, public gridman_check
Switch to enforce extra checks of input parameters.
subroutine gridman_grid_check(GRID, RES, IERR)
Check consistency of the grid data.
subroutine gridman_index_create121(INDEX, N, IERR)
Create index table for "one-to-one" mapping.
logical function gridman_intersect2d(X11, Y11, X12, Y12, X21, Y21, X22, Y22, XI, YI)
Intersection of two intervals on a plane.
logical function gridman_cross2d(X0, Y0, V, U, X1, Y1, X2, Y2, XI, YI)
Intersection of "particle trajectory" with an interval (2D)
subroutine gridman_indlist_allocate(INDLIST, N, L, IERR)
Allocate list of elements.
subroutine gridman_index_check(INDEX, RES, IERR)
Check index object.
integer, parameter, public gridman_length
Length of the description strings.
integer, save, public gridman_unit
Index of the standard output unit.
subroutine gridman_grid2d_merge(GRID, GRID1, GRID2, TOL, IERR)
Merge two 2D grids by connecting their boundary edges.
real(gridman_dp), save, public gridman_tol
Tolerance parameter which is used to compare two real numbers.
subroutine gridman_grid2d_cylvolumes(GRID, VCELLS, IERR, ANGLE)
Calculate cylindrical cell volumes.
integer(gridman_sp), parameter, public gridman_ver
Index of the current version.
subroutine gridman_grid_eliminate_edges(GRID_NEW, GRID, LTAKE, IERR)
Eliminate edges the GRIDMAN_GRID object.
subroutine gridman_grid_eliminate_cells(GRID_NEW, GRID, LTAKE, IERR)
Eliminate cells from GRIDMAN_GRID object.
integer, parameter, public gridman_dp
Kind parameter for real numbers.
subroutine gridman_addsurf2d_read_grid(GRID, FNAME, IERR)
Read planar EIRENE Additional Surfaces and convert them into (2D) grid object.
Explicit interfaces to GRIDMAN subroutines and functions.
subroutine gridman_template_write_grid(GRID, FNAME, IERR)
Write GRIDMAN_GRID object in a simple template format (DG template)
real(gridman_dp) function gridman_triavol(X1, Y1, X2, Y2, X3, Y3)
Volume of the solid of revolution obtained by rotating of a triangle around axis X=0.
subroutine gridman_addsurf2grid_2d(GRID, NSURF, X, Y, ISRF, IERR)
Convert planar EIRENE Additional Surfaces into grid object.
subroutine gridman_grid_allocate(GRID, TYPE, NEDGES, NPOINTS, NCELLS, IERR, NEDGEINDEX, NCELLINDEX)
Allocate GRIDMAN_GRID object.
subroutine gridman_index_compare(INDEX1, INDEX2, RES, IERR)
Compare two index objects.
subroutine gridman_grid2d_chains(GRID, CHAINS, IERR)
Find closed chain of points which form each cell.
subroutine gridman_3dgrid2vtk_index(GRID, N, M, RINDEXES, SINDEXES, IERR)
Translate edge indices in VTK input in the sense of GRIDMAN_3DGRID2VTK (in the current implementation...
subroutine gridman_grid2d_cut(CUTGRID, GRID, XP, YP, NP, LEX, IERR)
Select part of a 2D grid cut by polygon.
logical function gridman_close2interval2d(X1, Y1, X2, Y2, X, Y, TOL)
Find if point is close to the interval within prescribed tolerance.
subroutine gridman_index_copy(INDEX2, INDEX1, IERR)
Create a copy of the index object.
subroutine gridman_grid_cells(EDGES, GRID, IERR)
Create a list of edges which belong to each cell.
subroutine gridman_grid_unitread(GRID, IIN, IERR)
Read grid object from file defined by unit number.
subroutine gridman_grid_take(GRID2, GRID1, IERR)
Take data from one grid object to another.
subroutine gridman_grid_count(GRID, NCOUNT, IERR)
Return the number of cells plus the number of edges not belonging to any cell.
subroutine gridman_grid2d_check(GRID, RES, IERR)
Check correctness of the 2D grid object.
subroutine gridman_grid2d_cylareas(GRID, SEDGES, IERR, ANGLE)
Calculate cylindrical areas of the cell edges.
subroutine gridman_index_transform(INDEX2, INDEX1, IMAP12, N12, IERR)
Transform indices of elements - IND(0,:)
subroutine gridman_indlist_deallocate(INDLIST, IERR)
Deallocate list of indices.
subroutine gridman_tria_read_grid(GRID, FNAMES, IERR)
Read EIRENE triangular grid from fort.33-35, returns GRID object.
real(gridman_dp) function gridman_conarea(X1, Y1, X2, Y2)
Area of the conical surface obtained by rotation of the interval (X1,Y1),(X2,Y2) around X=0...
Data-type which describes a grid as a set of edges, methods in grid.f.
subroutine gridman_vtk_grid2d_write(FNAME, HEADER, GRID, NELEMENTS, NCS, NCV, NPS, NPV, IERR, CELL_SCALAR, CSNAME, CELL_VECTOR, CVNAME, POINT_SCALAR, PSNAME, POINT_VECTOR, PVNAME)
Write 2D grid and data in VTK ASCII legacy format.
subroutine gridman_grid_metadata_unit(GRID, IUNIT, IERR)
Print metadata into unit - shell for GRIDMAN_GRID_METADATA_TEXT.
subroutine gridman_grid2d_triang(TRIA, GRID, IERR)
Triangulation of 2D grid.
subroutine gridman_grid2tria(GRID, XYTRIAN, NECKE, NCHBAR, NSEITE, ITRI, IERR)
Convert GRIDMAN_GRID grid object into EIRENE triangular grid.
subroutine gridman_grid_deallocate(GRID, IERR)
Deallocate grid object.
subroutine gridman_grid2d_center(GRID, XCN, IERR)
Calculate coordinates of the cell centers.
subroutine gridman_tria2grid(GRID, NRKNOT, NTRII, XYTRIAN, NECKE, NCHBAR, NSEITE, ITRI, IERR)
Convert EIRENE triangular grid into GRIDMAN_GRID grid object (type=GRID2D)
subroutine gridman_index_allocate(INDEX, NINDEX, NELEMENTS, IERR)
Allocate index object.
subroutine gridman_3dgrid2vtk(GRID, NPOINTS, NCELLS, NVERTEX, X, IFIRST, LVERTEX, IVERTEX, CTYPE, IERR)
Convert 3D grid into VTK format. Only grid w/o cells is implemented at the moment !!! ...
subroutine gridman_grid2template(GRID, M, N, L, X, Y, IERR)
Convert GRIDMAN_GRID object into arrays which can be stored in simple template format (DG template) ...
subroutine gridman_tria_write_grid(GRID, FNAMES, IERR)
Write EIRENE triangular grid - defined as GRID object - into fort.33-35.
subroutine gridman_grid2d_isconvex(GRID, ISCONVEX, IERR)
Find if cells are convex polygons or not.
subroutine gridman_grid_copy(GRID2, GRID1, IERR)
Create a copy of the grid object.
subroutine gridman_grid_unitwrite(GRID, IOUT, IERR)
Save grid object in a file defined by the unit index.
subroutine gridman_addsurf3d_read_grid(GRID, FNAME, IERR)
Read triangular EIRENE Additional Surfaces and convert them into (3D) grid object.
subroutine gridman_grid2d_norm(GRID, VN, IERR)
Calculate unit normal vectors to grid edges.
logical, save, public gridman_dbg
Switch for debugging mode.
subroutine gridman_index_elmap(ELMAP, NMIN, NMAX, INDEX, IERR)
Create an aray which maps elements into the table of indices.
logical function gridman_point_in_polygon(XP, YP, NP, X0, Y0)
Find if point lies inside a closed polygon.
Data-type which stores indices defined on the grid cells or edges.
real(gridman_dp), parameter, public gridman_2pi
2PI number
subroutine gridman_grid_combine(GRID, GRID1, GRID2, IERR)
Combine two grid objects into one.
Data-type which describes lists of elements with variable number of indices for each element...
subroutine gridman_grid_metadata_text(GRID, TEXT, NT, IERR)
Print metadata into text array.
subroutine gridman_addsurf2grid_3d(GRID, NSURF, X, Y, Z, ISRF, IERR)
Convert triangular elements (EIRENE additional surfaces) into (3D) grid object.
subroutine gridman_carre_readsonnet_grid(GRID, FNAME, IERR, LEIR)
Read CARRE grid in SONNET format, return GRID object.
subroutine gridman_grid_fileread(GRID, FNAME, IERR)
Read grid object from file defined by file name.
real(gridman_dp) function gridman_triaarea(X1, Y1, X2, Y2, X3, Y3)
Area of a triangle.
subroutine gridman_grid_filewrite(GRID, FNAME, IERR)
Save grid object in a file defined by the file name.
logical function gridman_index_repeated_elements(INDEX, IERR)
Check if the same element index appear more than once.
subroutine gridman_index_merge(INDEX, INDEX1, INDEX2, IERR)
Merge INDEX2 into INDEX1.
subroutine gridman_2dgrid2vtk_index(GRID, N, M, RINDEXES, SINDEXES, IERR)
Translate cell and edge indices in VTK input in the sense of GRIDMAN_2DGRID2VTK.
real(gridman_dp), parameter, public gridman_pi
PI number.
subroutine gridman_index_read(INDEX, IIN, IERR)
Read index object from file.
subroutine gridman_index_write(INDEX, IOUT, IERR)
Save index object in a file.
Definition of data types, global constants and variables.
real(gridman_dp) function gridman_dist2d(X1, Y1, X2, Y2)
Distance between two points on a plane.
subroutine gridman_index_deallocate(INDEX, IERR)
Allocate index object.
subroutine gridman_grid2d_lengths(GRID, LEDGES, IERR)
Calculate lengths of the cell edges.
integer, parameter, public gridman_lword
Length of the string COLUMNS in GRIDMAN_INDEX.
subroutine gridman_norm2d(X0, Y0, XN, YN)
Vector (XY,YN) normal to (X0,Y0)
subroutine gridman_vtk_grid3d_write(FNAME, HEADER, GRID, NELEMENTS, NCS, NCV, NPS, NPV, IERR, CELL_SCALAR, CSNAME, CELL_VECTOR, CVNAME, POINT_SCALAR, PSNAME, POINT_VECTOR, PVNAME)
Write 3D grid and data in VTK ASCII legacy format. Only grid w/o cells is implemented at the moment !...
subroutine gridman_template2grid(GRID, M, N, L, X, Y, IERR)
Convert data read from a file in simple template format (DG template) into GRIDMAN_GRID object...
subroutine gridman_carre_read30_grid(GRID, FNAME, IERR, LEIR)
Read B2 (CARRE, SONNET) grid from fort.30, return GRID object.
subroutine gridman_grid_remove_free_edges(GRID_NEW, GRID, IERR)
Remove edges which do not belong to any cell from the GRIDMAN_GRID object.
subroutine gridman_grid2d_crossect(GRID, SCELLS, IERR)
Calculate cross section area of the cells.
subroutine gridman_2dgrid2vtk(GRID, NPOINTS, NCELLS, NVERTEX, X, IFIRST, LVERTEX, IVERTEX, CTYPE, IERR, NTHETA, THETA)
Convert 2D grid into VTK format.
integer, parameter, public gridman_sp
Kind parameter for integer numbers.
subroutine gridman_template_read_grid(GRID, FNAME, IERR)
Read from a simple template file (DG template) into GRIDMAN_GRID object.