FrontISTR 5.2.0
Large-scale structural analysis program with finit element method
Loading...
Searching...
No Matches
hecmw_ordering_metis.F90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
2! Copyright (c) 2020 FrontISTR Commons
3! This software is released under the MIT License, see LICENSE.txt
4!-------------------------------------------------------------------------------
5
6!----------------------------------------------------------------------
8! ordering provided by Metis
9!----------------------------------------------------------------------
11 use hecmw_util
12 implicit none
13
14 private
16
17contains
18
19 !======================================================================!
21 !======================================================================!
22 subroutine hecmw_ordering_metis_nodend(Neqns,Xadj,Adj0,Perm,Invp)
23 implicit none
24 !------
25 integer(kind=kint), intent(in):: neqns
26 integer(kind=kint), intent(in):: adj0(:)
27 integer(kind=kint), intent(in):: xadj(:)
28 integer(kind=kint), intent(out):: perm(:)
29 integer(kind=kint), intent(out):: invp(:)
30 !------
31#ifdef HECMW_WITH_METIS
32
33# if HECMW_METIS_VER == 5
34
35 integer(kind=kint), allocatable:: vwght(:)
36 integer(kind=kint):: options(40)
37 integer(kind=kint):: ierror
38
39 allocate(vwght(neqns),stat=ierror)
40 if ( ierror/=0 ) stop "ALLOCATION ERROR, vwght: SUB. gennd"
41
42 vwght(:)=1
43
44 call metis_setdefaultoptions(options)
45 ! set fortran numbering
46 options(18)=1
47
48 call metis_nodend(neqns,xadj,adj0,vwght,options,perm,invp)
49
50 deallocate(vwght)
51
52# elif HECMW_METIS_VER == 4
53
54 integer(kind=kint):: numflag
55 integer(kind=kint):: options(8)
56
57 numflag=1
58 options(:)=0
59
60 call metis_nodend(neqns,xadj,adj0,numflag,options,perm,invp)
61
62# else
63# error unknown HECMW_METIS_VER
64# endif
65
66#else
67 stop "METIS not available"
68#endif
69 end subroutine hecmw_ordering_metis_nodend
70
71end module hecmw_ordering_metis
HECMW_ORDERING_METIS is a program for the Nested Dissection.
subroutine, public hecmw_ordering_metis_nodend(neqns, xadj, adj0, perm, invp)
hecmw_ordering_metis_NodeND
I/O and Utility.
Definition: hecmw_util_f.F90:7