-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathImportExportData.jl
84 lines (62 loc) · 3.29 KB
/
ImportExportData.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
mutable struct ImportExportData{GID <: Integer, PID <: Integer, LID <: Integer}
source::BlockMap{GID, PID, LID}
target::BlockMap{GID, PID, LID}
permuteToLIDs::Array{LID, 1}
permuteFromLIDs::Array{LID, 1}
remoteLIDs::Array{LID, 1}
exportLIDs::Array{LID, 1}
exportPIDs::Array{PID, 1}
numSameIDs::GID
distributor::Distributor{GID, PID, LID}
isLocallyComplete::Bool
end
## Constructors ##
function ImportExportData(source::BlockMap{GID, PID, LID}, target::BlockMap{GID, PID, LID})::ImportExportData{GID, PID, LID} where GID <: Integer where PID <:Integer where LID <: Integer
ImportExportData{GID, PID, LID}(source, target, [], [], [], [], [], 0, createDistributor(getComm(source)), true)
end
## Getters ##
function sourceMap(data::ImportExportData{GID, PID, LID})::BlockMap{GID, PID, LID} where GID <: Integer where PID <:Integer where LID <: Integer
data.source
end
function targetMap(data::ImportExportData{GID, PID, LID})::BlockMap{GID, PID, LID} where GID <: Integer where PID <:Integer where LID <: Integer
data.target
end
function permuteToLIDs(data::ImportExportData{GID, PID, LID})::Array{LID} where GID <: Integer where PID <:Integer where LID <: Integer
data.permuteToLIDs
end
function permuteFromLIDs(data::ImportExportData{GID, PID, LID})::Array{LID} where GID <: Integer where PID <:Integer where LID <: Integer
data.permuteFromLIDs
end
function remoteLIDs(data::ImportExportData{GID, PID, LID})::Array{LID} where GID <: Integer where PID <: Integer where LID <: Integer
data.remoteLIDs
end
function remoteLIDs(data::ImportExportData{GID, PID, LID}, remoteLIDs::AbstractArray{<: Integer}) where GID <: Integer where PID <: Integer where LID <: Integer
data.remoteLIDs = remoteLIDs
end
function exportLIDs(data::ImportExportData{GID, PID, LID})::Array{LID} where GID <: Integer where PID <: Integer where LID <: Integer
data.exportLIDs
end
function exportLIDs(data::ImportExportData{GID, PID, LID}, exportLIDs::AbstractArray{<: Integer}) where GID <: Integer where PID <: Integer where LID <: Integer
data.exportLIDs = exportLIDs
end
function exportPIDs(data::ImportExportData{GID, PID, LID})::Array{PID} where GID <: Integer where PID <: Integer where LID <: Integer
data.exportPIDs
end
function exportPIDs(data::ImportExportData{GID, PID, LID}, exportPIDs::AbstractArray{<: Integer}) where GID <: Integer where PID <: Integer where LID <: Integer
data.exportPIDs = exportPIDs
end
function numSameIDs(data::ImportExportData{GID, PID, LID})::LID where GID <: Integer where PID <: Integer where LID <: Integer
data.numSameIDs
end
function numSameIDs(data::ImportExportData{GID, PID, LID}, numSame::Integer)::LID where GID <: Integer where PID <: Integer where LID <: Integer
data.numSameIDs = numSame
end
function distributor(data::ImportExportData{GID, PID, LID})::Distributor{GID, PID, LID} where GID <: Integer where PID <: Integer where LID <: Integer
data.distributor
end
function isLocallyComplete(data::ImportExportData{GID, PID, LID})::Bool where GID <: Integer where PID <: Integer where LID <: Integer
data.isLocallyComplete
end
function isLocallyComplete(data::ImportExportData{GID, PID, LID}, isLocallyComplete::Bool) where GID <: Integer where PID <: Integer where LID <: Integer
data.isLocallyComplete = isLocallyComplete
end