FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
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 
17 contains
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  integer(kind=kint), allocatable:: vwght(:)
34  integer(kind=kint):: options(40)
35  integer(kind=kint):: ierror
36 
37  allocate(vwght(neqns),stat=ierror)
38  if ( ierror/=0 ) stop "ALLOCATION ERROR, vwght: SUB. gennd"
39 
40  vwght(:)=1
41 
42  call metis_setdefaultoptions(options)
43  ! set fortran numbering
44  options(18)=1
45 
46  call metis_nodend(neqns,xadj,adj0,vwght,options,perm,invp)
47 
48  deallocate(vwght)
49 
50 #else
51  stop "METIS not available"
52 #endif
53  end subroutine hecmw_ordering_metis_nodend
54 
55 end 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