|
DOUG 0.2
|
00001 ! DOUG - Domain decomposition On Unstructured Grids 00002 ! Copyright (C) 1998-2006 Faculty of Computer Science, University of Tartu and 00003 ! Department of Mathematics, University of Bath 00004 ! 00005 ! This library is free software; you can redistribute it and/or 00006 ! modify it under the terms of the GNU Lesser General Public 00007 ! License as published by the Free Software Foundation; either 00008 ! version 2.1 of the License, or (at your option) any later version. 00009 ! 00010 ! This library is distributed in the hope that it will be useful, 00011 ! but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 ! Lesser General Public License for more details. 00014 ! 00015 ! You should have received a copy of the GNU Lesser General Public 00016 ! License along with this library; if not, write to the Free Software 00017 ! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 ! or contact the authors (University of Tartu, Faculty of Computer Science, Chair 00019 ! of Distributed Systems, Liivi 2, 50409 Tartu, Estonia, http://dougdevel.org, 00020 ! mailto:info(at)dougdevel.org) 00021 00023 module Partitioning_mod 00024 use Aggregate_mod 00025 00026 implicit none 00027 00028 #include<doug_config.h> 00029 00030 #ifdef D_COMPLEX 00031 #define float complex 00032 #else 00033 #define float real 00034 #endif 00035 00037 type Partitioning 00038 integer :: nnodes !< number of nodes 00039 integer :: nparts !< number of partitions 00040 !type(indlist),pointer :: partitions(:) ! partitions 00041 integer,pointer :: starts(:) !> array boundaries in \e nodes for each partition 00042 integer,pointer :: nodes(:) !> node numbers for partitions 00043 end type Partitioning 00044 00047 type Partitionings 00048 integer :: levels 00049 type(Partitioning) :: fPart !< fine partitioning 00050 type(Partitioning) :: cPart !< coarse partitioning 00051 00052 ! implementations 00053 float(kind=rk) :: strong_conn1, strong_conn2 00054 integer :: aggr_radius1, max_asize1 00055 type(AggrInfo) :: fAggr !< fine aggregates 00056 type(AggrInfo) :: cAggr !< coarse aggregates 00057 end type Partitionings 00058 00059 private 00060 public Partitioning, Partitionings, & 00061 Partitionings_New 00062 00063 contains 00064 00065 function Partitioning_New() result(P) 00066 type(Partitioning) :: P 00067 P%nnodes = -1 00068 P%nparts = -1 00069 P%starts => NULL() 00070 P%nodes => NULL() 00071 end function Partitioning_New 00072 00074 function Partitionings_New() result(P) 00075 type(Partitionings) :: P 00076 00077 P%levels = 0 00078 P%fPart = Partitioning_New() 00079 P%cPart = Partitioning_New() 00080 P%fAggr = AggrInfo_New() 00081 P%cAggr = AggrInfo_New() 00082 end function Partitionings_New 00083 00084 end module Partitioning_mod
1.7.3-20110217