-
Notifications
You must be signed in to change notification settings - Fork 62
/
distributed_matrix_vector.f90
9456 lines (8063 loc) · 468 KB
/
distributed_matrix_vector.f90
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
!> \file
!> \author Chris Bradley
!> \brief This module handles all distributed matrix vector routines.
!>
!> \section LICENSE
!>
!> Version: MPL 1.1/GPL 2.0/LGPL 2.1
!>
!> The contents of this file are subject to the Mozilla Public License
!> Version 1.1 (the "License"); you may not use this file except in
!> compliance with the License. You may obtain a copy of the License at
!> http://www.mozilla.org/MPL/
!>
!> Software distributed under the License is distributed on an "AS IS"
!> basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
!> License for the specific language governing rights and limitations
!> under the License.
!>
!> The Original Code is OpenCMISS
!>
!> The Initial Developer of the Original Code is University of Auckland,
!> Auckland, New Zealand, the University of Oxford, Oxford, United
!> Kingdom and King's College, London, United Kingdom. Portions created
!> by the University of Auckland, the University of Oxford and King's
!> College, London are Copyright (C) 2007-2010 by the University of
!> Auckland, the University of Oxford and King's College, London.
!> All Rights Reserved.
!>
!> Contributor(s):
!>
!> Alternatively, the contents of this file may be used under the terms of
!> either the GNU General Public License Version 2 or later (the "GPL"), or
!> the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
!> in which case the provisions of the GPL or the LGPL are applicable instead
!> of those above. If you wish to allow use of your version of this file only
!> under the terms of either the GPL or the LGPL, and not to allow others to
!> use your version of this file under the terms of the MPL, indicate your
!> decision by deleting the provisions above and replace them with the notice
!> and other provisions required by the GPL or the LGPL. If you do not delete
!> the provisions above, a recipient may use your version of this file under
!> the terms of any one of the MPL, the GPL or the LGPL.
!>
!> This module handles all distributed matrix vector routines.
MODULE DistributedMatrixVector
USE BaseRoutines
USE CmissMPI
USE CmissPetsc
USE ComputationEnvironment
USE DistributedMatrixVectorAccessRoutines
USE INPUT_OUTPUT
USE ISO_VARYING_STRING
USE ISO_C_BINDING
USE Kinds
USE Maths
USE MatrixVector
#ifndef NOMPIMOD
USE MPI
#endif
USE Strings
USE Types
USE LINKEDLIST_ROUTINES
#include "macros.h"
IMPLICIT NONE
PRIVATE
#ifdef NOMPIMOD
#include "mpif.h"
#endif
#include "petscversion.h"
!Module parameters
!> \addtogroup DistributedMatrixVector_LibraryTypes DistributedMatrixVector::LibraryTypes
!> \brief Distributed matrix-vector library types
!> \see DistributedMatrixVector
!>@{
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_VECTOR_CMISS_TYPE=LIBRARY_CMISS_TYPE !<CMISS distributed matrix-vector library type \see DistributedMatrixVector_LibraryTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_VECTOR_PETSC_TYPE=LIBRARY_PETSC_TYPE !<PETSc distributed matrix-vector library type \see DistributedMatrixVector_LibraryTypes,DistributedMatrixVector
!>@}
!> \addtogroup DistributedMatrixVector_DataTypes DistributedMatrixVector::DataTypes
!> \brief Distributed matrix-vector data types
!> \see DistributedMatrixVector
!>@{
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_VECTOR_INTG_TYPE=MATRIX_VECTOR_INTG_TYPE !<Integer distributed matrix-vector data type \see DistributedMatrixVector_DataTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_VECTOR_SP_TYPE=MATRIX_VECTOR_SP_TYPE !<Single precision real distributed matrix-vector data type \see DistributedMatrixVector_DataTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_VECTOR_DP_TYPE=MATRIX_VECTOR_DP_TYPE !<Double precision real distributed matrix-vector data type \see DistributedMatrixVector_DataTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_VECTOR_L_TYPE=MATRIX_VECTOR_L_TYPE !<Logical distributed matrix-vector data type \see DistributedMatrixVector_DataTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_VECTOR_SPC_TYPE=MATRIX_VECTOR_SPC_TYPE !<Single precision complex distributed matrix-vector data type \see DistributedMatrixVector_DataTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_VECTOR_DPC_TYPE=MATRIX_VECTOR_DPC_TYPE !<Double precision complex distributed matrix-vector data type \see DistributedMatrixVector_DataTypes,DistributedMatrixVector
!>@}
!> \addtogroup DistributedMatrixVector_StorageTypes DistributedMatrixVector::StorageTypes
!> \brief Distributed matrix-vector storage type parameters
!>@{
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_BLOCK_STORAGE_TYPE=MATRIX_BLOCK_STORAGE_TYPE !<Distributed matrix block storage type \see DistributedMatrixVector_StorageTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_DIAGONAL_STORAGE_TYPE=MATRIX_DIAGONAL_STORAGE_TYPE !<Distributed matrix diagonal storage type \see DistributedMatrixVector_StorageTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_COLUMN_MAJOR_STORAGE_TYPE=MATRIX_COLUMN_MAJOR_STORAGE_TYPE !<Distributed matrix column major storage type \see DistributedMatrixVector_StorageTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_ROW_MAJOR_STORAGE_TYPE=MATRIX_ROW_MAJOR_STORAGE_TYPE !<Distributed matrix row major storage type \see DistributedMatrixVector_StorageTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_COMPRESSED_ROW_STORAGE_TYPE=MATRIX_COMPRESSED_ROW_STORAGE_TYPE !<Distributed matrix compressed row storage type \see DistributedMatrixVector_StorageTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_COMPRESSED_COLUMN_STORAGE_TYPE=MATRIX_COMPRESSED_COLUMN_STORAGE_TYPE !<Distributed matrix compressed column storage type \see DistributedMatrixVector_StorageTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_ROW_COLUMN_STORAGE_TYPE=MATRIX_ROW_COLUMN_STORAGE_TYPE !<Distributed matrix row-column storage type \see DistributedMatrixVector_StorageTypes,MATRIX_VECTOR
!>@}
!> \addtogroup DistributedMatrixVector_SymmetryTypes DistributedMatrixVector::SymmetryTypes
!> \brief Distributed matrix symmetry type parameters
!> \see DistributedMatrixVector_Symmetry,DistributedMatrixVector
!>@{
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_SYMMETRIC_TYPE=MATRIX_SYMMETRIC_TYPE !<Distributed matrix is symmetric \see DistributedMatrixVector_SymmetryTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_HERMITIAN_TYPE=MATRIX_HERMITIAN_TYPE !<Distributed matrix is Hermitian (complex symmetric) \see DistributedMatrixVector_SymmetryTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_SKEW_SYMMETRIC_TYPE=MATRIX_SKEW_SYMMETRIC_TYPE !<Distributed matrix is skew-symmetric \see DistributedMatrixVector_SymmetryTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_UNSYMMETRIC_TYPE=MATRIX_UNSYMMETRIC_TYPE !<Distributed matrix is unsymmetric \see DistributedMatrixVector_SymmetryTypes,DistributedMatrixVector
!>@}
!> \addtogroup DistributedMatrixVector_GhostingTypes DistributedMatrixVector::GhostingTypes
!> \brief Distributed matrix-vector ghosting types
!> \see DistributedMatrixVector
!>@{
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_VECTOR_INCLUDE_GHOSTS_TYPE=1 !<Include ghost values in the distributed matrix/vector \see DistributedMatrixVector_GhostingTypes,DistributedMatrixVector
INTEGER(INTG), PARAMETER :: DISTRIBUTED_MATRIX_VECTOR_NO_GHOSTS_TYPE=2 !<Do not include ghost values/rows in the distributed matrix/vector \see DistributedMatrixVector_GhostingTypes,DistributedMatrixVector
!>@}
!Module types
!Module variables
INTEGER(INTG), SAVE :: distributedDataId=100000000
!Interfaces
INTERFACE DISTRIBUTED_MATRIX_ALL_VALUES_SET
MODULE PROCEDURE DistributedMatrix_AllValuesSetIntg
MODULE PROCEDURE DistributedMatrix_AllValuesSetSP
MODULE PROCEDURE DistributedMatrix_AllValuesSetDP
MODULE PROCEDURE DistributedMatrix_AllValuesSetL
END INTERFACE DISTRIBUTED_MATRIX_ALL_VALUES_SET
INTERFACE DistributedMatrix_AllValuesSet
MODULE PROCEDURE DistributedMatrix_AllValuesSetIntg
MODULE PROCEDURE DistributedMatrix_AllValuesSetSP
MODULE PROCEDURE DistributedMatrix_AllValuesSetDP
MODULE PROCEDURE DistributedMatrix_AllValuesSetL
END INTERFACE DistributedMatrix_AllValuesSet
INTERFACE DISTRIBUTED_MATRIX_CREATE_FINISH
MODULE PROCEDURE DistributedMatrix_CreateFinish
END INTERFACE DISTRIBUTED_MATRIX_CREATE_FINISH
INTERFACE DISTRIBUTED_MATRIX_CREATE_START
MODULE PROCEDURE DistributedMatrix_CreateStart
END INTERFACE DISTRIBUTED_MATRIX_CREATE_START
INTERFACE DISTRIBUTED_MATRIX_DATA_GET
MODULE PROCEDURE DistributedMatrix_DataGetIntg
MODULE PROCEDURE DistributedMatrix_DataGetSP
MODULE PROCEDURE DistributedMatrix_DataGetDP
MODULE PROCEDURE DistributedMatrix_DataGetL
END INTERFACE DISTRIBUTED_MATRIX_DATA_GET
INTERFACE DistributedMatrix_DataGet
MODULE PROCEDURE DistributedMatrix_DataGetIntg
MODULE PROCEDURE DistributedMatrix_DataGetSP
MODULE PROCEDURE DistributedMatrix_DataGetDP
MODULE PROCEDURE DistributedMatrix_DataGetL
END INTERFACE DistributedMatrix_DataGet
INTERFACE DISTRIBUTED_MATRIX_DATA_RESTORE
MODULE PROCEDURE DistributedMatrix_DataRestoreIntg
MODULE PROCEDURE DistributedMatrix_DataRestoreSP
MODULE PROCEDURE DistributedMatrix_DataRestoreDP
MODULE PROCEDURE DistributedMatrix_DataRestoreL
END INTERFACE DISTRIBUTED_MATRIX_DATA_RESTORE
INTERFACE DistributedMatrix_DataRestore
MODULE PROCEDURE DistributedMatrix_DataRestoreIntg
MODULE PROCEDURE DistributedMatrix_DataRestoreSP
MODULE PROCEDURE DistributedMatrix_DataRestoreDP
MODULE PROCEDURE DistributedMatrix_DataRestoreL
END INTERFACE DistributedMatrix_DataRestore
INTERFACE DISTRIBUTED_MATRIX_DATA_TYPE_SET
MODULE PROCEDURE DistributedMatrix_DataTypeSet
END INTERFACE DISTRIBUTED_MATRIX_DATA_TYPE_SET
INTERFACE DISTRIBUTED_MATRIX_DESTROY
MODULE PROCEDURE DistributedMatrix_Destroy
END INTERFACE DISTRIBUTED_MATRIX_DESTROY
INTERFACE DISTRIBUTED_MATRIX_DUPLICATE
MODULE PROCEDURE DistributedMatrix_Duplicate
END INTERFACE DISTRIBUTED_MATRIX_DUPLICATE
INTERFACE DISTRIBUTED_MATRIX_FORM
MODULE PROCEDURE DistributedMatrix_Form
END INTERFACE DISTRIBUTED_MATRIX_FORM
INTERFACE DISTRIBUTED_MATRIX_GHOSTING_TYPE_SET
MODULE PROCEDURE DistributedMatrix_GhostingTypeSet
END INTERFACE DISTRIBUTED_MATRIX_GHOSTING_TYPE_SET
INTERFACE DISTRIBUTED_MATRIX_LIBRARY_TYPE_SET
MODULE PROCEDURE DistributedMatrix_LibraryTypeSet
END INTERFACE DISTRIBUTED_MATRIX_LIBRARY_TYPE_SET
INTERFACE DISTRIBUTED_MATRIX_MAX_COLUMNS_PER_ROW_GET
MODULE PROCEDURE DistributedMatrix_MaxColumnsPerRowGet
END INTERFACE DISTRIBUTED_MATRIX_MAX_COLUMNS_PER_ROW_GET
INTERFACE DISTRIBUTED_MATRIX_NUMBER_NON_ZEROS_GET
MODULE PROCEDURE DistributedMatrix_NumberOfNonZerosGet
END INTERFACE DISTRIBUTED_MATRIX_NUMBER_NON_ZEROS_GET
INTERFACE DISTRIBUTED_MATRIX_NUMBER_NON_ZEROS_SET
MODULE PROCEDURE DistributedMatrix_NumberOfNonZerosSet
END INTERFACE DISTRIBUTED_MATRIX_NUMBER_NON_ZEROS_SET
INTERFACE DISTRIBUTED_MATRIX_OUTPUT
MODULE PROCEDURE DistributedMatrix_Output
END INTERFACE DISTRIBUTED_MATRIX_OUTPUT
INTERFACE DISTRIBUTED_MATRIX_OVERRIDE_SET_ON
MODULE PROCEDURE DistributedMatrix_OverrideSetOn
END INTERFACE DISTRIBUTED_MATRIX_OVERRIDE_SET_ON
INTERFACE DISTRIBUTED_MATRIX_OVERRIDE_SET_OFF
MODULE PROCEDURE DistributedMatrix_OverrideSetOff
END INTERFACE DISTRIBUTED_MATRIX_OVERRIDE_SET_OFF
INTERFACE DISTRIBUTED_MATRIX_STORAGE_LOCATIONS_GET
MODULE PROCEDURE DistributedMatrix_StorageLocationsGet
END INTERFACE DISTRIBUTED_MATRIX_STORAGE_LOCATIONS_GET
INTERFACE DISTRIBUTED_MATRIX_STORAGE_LOCATIONS_SET
MODULE PROCEDURE DistributedMatrix_StorageLocationsSet
END INTERFACE DISTRIBUTED_MATRIX_STORAGE_LOCATIONS_SET
INTERFACE DISTRIBUTED_MATRIX_STORAGE_TYPE_GET
MODULE PROCEDURE DistributedMatrix_StorageTypeGet
END INTERFACE DISTRIBUTED_MATRIX_STORAGE_TYPE_GET
INTERFACE DISTRIBUTED_MATRIX_STORAGE_TYPE_SET
MODULE PROCEDURE DistributedMatrix_StorageTypeSet
END INTERFACE DISTRIBUTED_MATRIX_STORAGE_TYPE_SET
INTERFACE DISTRIBUTED_MATRIX_UPDATE_FINISH
MODULE PROCEDURE DistributedMatrix_UpdateFinish
END INTERFACE DISTRIBUTED_MATRIX_UPDATE_FINISH
INTERFACE DISTRIBUTED_MATRIX_UPDATE_START
MODULE PROCEDURE DistributedMatrix_UpdateStart
END INTERFACE DISTRIBUTED_MATRIX_UPDATE_START
INTERFACE DISTRIBUTED_MATRIX_UPDATE_ISFINISHED
MODULE PROCEDURE DistributedMatrix_UpdateIsFinished
END INTERFACE DISTRIBUTED_MATRIX_UPDATE_ISFINISHED
INTERFACE DISTRIBUTED_MATRIX_UPDATE_WAITFINISHED
MODULE PROCEDURE DistributedMatrix_UpdateWaitFinished
END INTERFACE DISTRIBUTED_MATRIX_UPDATE_WAITFINISHED
INTERFACE DISTRIBUTED_MATRIX_VALUES_ADD
MODULE PROCEDURE DistributedMatrix_ValuesAddIntg
MODULE PROCEDURE DistributedMatrix_ValuesAddIntg1
MODULE PROCEDURE DistributedMatrix_ValuesAddIntg2
MODULE PROCEDURE DistributedMatrix_ValuesAddSP
MODULE PROCEDURE DistributedMatrix_ValuesAddSP1
MODULE PROCEDURE DistributedMatrix_ValuesAddSP2
MODULE PROCEDURE DistributedMatrix_ValuesAddDP
MODULE PROCEDURE DistributedMatrix_ValuesAddDP1
MODULE PROCEDURE DistributedMatrix_ValuesAddDP2
MODULE PROCEDURE DistributedMatrix_ValuesAddL
MODULE PROCEDURE DistributedMatrix_ValuesAddL1
MODULE PROCEDURE DistributedMatrix_ValuesAddL2
END INTERFACE DISTRIBUTED_MATRIX_VALUES_ADD
INTERFACE DistributedMatrix_ValuesAdd
MODULE PROCEDURE DistributedMatrix_ValuesAddIntg
MODULE PROCEDURE DistributedMatrix_ValuesAddIntg1
MODULE PROCEDURE DistributedMatrix_ValuesAddIntg2
MODULE PROCEDURE DistributedMatrix_ValuesAddSP
MODULE PROCEDURE DistributedMatrix_ValuesAddSP1
MODULE PROCEDURE DistributedMatrix_ValuesAddSP2
MODULE PROCEDURE DistributedMatrix_ValuesAddDP
MODULE PROCEDURE DistributedMatrix_ValuesAddDP1
MODULE PROCEDURE DistributedMatrix_ValuesAddDP2
MODULE PROCEDURE DistributedMatrix_ValuesAddL
MODULE PROCEDURE DistributedMatrix_ValuesAddL1
MODULE PROCEDURE DistributedMatrix_ValuesAddL2
END INTERFACE DistributedMatrix_ValuesAdd
INTERFACE DISTRIBUTED_MATRIX_VALUES_GET
MODULE PROCEDURE DistributedMatrix_ValuesGetIntg
MODULE PROCEDURE DistributedMatrix_ValuesGetIntg1
MODULE PROCEDURE DistributedMatrix_ValuesGetIntg2
MODULE PROCEDURE DistributedMatrix_ValuesGetSP
MODULE PROCEDURE DistributedMatrix_ValuesGetSP1
MODULE PROCEDURE DistributedMatrix_ValuesGetSP2
MODULE PROCEDURE DistributedMatrix_ValuesGetDP
MODULE PROCEDURE DistributedMatrix_ValuesGetDP1
MODULE PROCEDURE DistributedMatrix_ValuesGetDP2
MODULE PROCEDURE DistributedMatrix_ValuesGetL
MODULE PROCEDURE DistributedMatrix_ValuesGetL1
MODULE PROCEDURE DistributedMatrix_ValuesGetL2
END INTERFACE DISTRIBUTED_MATRIX_VALUES_GET
INTERFACE DistributedMatrix_ValuesGet
MODULE PROCEDURE DistributedMatrix_ValuesGetIntg
MODULE PROCEDURE DistributedMatrix_ValuesGetIntg1
MODULE PROCEDURE DistributedMatrix_ValuesGetIntg2
MODULE PROCEDURE DistributedMatrix_ValuesGetSP
MODULE PROCEDURE DistributedMatrix_ValuesGetSP1
MODULE PROCEDURE DistributedMatrix_ValuesGetSP2
MODULE PROCEDURE DistributedMatrix_ValuesGetDP
MODULE PROCEDURE DistributedMatrix_ValuesGetDP1
MODULE PROCEDURE DistributedMatrix_ValuesGetDP2
MODULE PROCEDURE DistributedMatrix_ValuesGetL
MODULE PROCEDURE DistributedMatrix_ValuesGetL1
MODULE PROCEDURE DistributedMatrix_ValuesGetL2
END INTERFACE DistributedMatrix_ValuesGet
INTERFACE DISTRIBUTED_MATRIX_VALUES_SET
MODULE PROCEDURE DistributedMatrix_ValuesSetIntg
MODULE PROCEDURE DistributedMatrix_ValuesSetIntg1
MODULE PROCEDURE DistributedMatrix_ValuesSetIntg2
MODULE PROCEDURE DistributedMatrix_ValuesSetSP
MODULE PROCEDURE DistributedMatrix_ValuesSetSP1
MODULE PROCEDURE DistributedMatrix_ValuesSetSP2
MODULE PROCEDURE DistributedMatrix_ValuesSetDP
MODULE PROCEDURE DistributedMatrix_ValuesSetDP1
MODULE PROCEDURE DistributedMatrix_ValuesSetDP2
MODULE PROCEDURE DistributedMatrix_ValuesSetL
MODULE PROCEDURE DistributedMatrix_ValuesSetL1
MODULE PROCEDURE DistributedMatrix_ValuesSetL2
END INTERFACE DISTRIBUTED_MATRIX_VALUES_SET
INTERFACE DistributedMatrix_ValuesSet
MODULE PROCEDURE DistributedMatrix_ValuesSetIntg
MODULE PROCEDURE DistributedMatrix_ValuesSetIntg1
MODULE PROCEDURE DistributedMatrix_ValuesSetIntg2
MODULE PROCEDURE DistributedMatrix_ValuesSetSP
MODULE PROCEDURE DistributedMatrix_ValuesSetSP1
MODULE PROCEDURE DistributedMatrix_ValuesSetSP2
MODULE PROCEDURE DistributedMatrix_ValuesSetDP
MODULE PROCEDURE DistributedMatrix_ValuesSetDP1
MODULE PROCEDURE DistributedMatrix_ValuesSetDP2
MODULE PROCEDURE DistributedMatrix_ValuesSetL
MODULE PROCEDURE DistributedMatrix_ValuesSetL1
MODULE PROCEDURE DistributedMatrix_ValuesSetL2
END INTERFACE DistributedMatrix_ValuesSet
INTERFACE DISTRIBUTED_MATRIX_BY_VECTOR_ADD
MODULE PROCEDURE DistributedMatrix_MatrixByVectorAdd
END INTERFACE DISTRIBUTED_MATRIX_BY_VECTOR_ADD
INTERFACE DISTRIBUTED_VECTOR_ALL_VALUES_SET
MODULE PROCEDURE DistributedVector_AllValuesSetIntg
MODULE PROCEDURE DistributedVector_AllValuesSetSP
MODULE PROCEDURE DistributedVector_AllValuesSetDP
MODULE PROCEDURE DistributedVector_AllValuesSetL
END INTERFACE DISTRIBUTED_VECTOR_ALL_VALUES_SET
INTERFACE DistributedVector_AllValuesSet
MODULE PROCEDURE DistributedVector_AllValuesSetIntg
MODULE PROCEDURE DistributedVector_AllValuesSetSP
MODULE PROCEDURE DistributedVector_AllValuesSetDP
MODULE PROCEDURE DistributedVector_AllValuesSetL
END INTERFACE DistributedVector_AllValuesSet
INTERFACE DISTRIBUTED_VECTOR_COPY
MODULE PROCEDURE DistributedVector_CopyIntg
MODULE PROCEDURE DistributedVector_CopySP
MODULE PROCEDURE DistributedVector_CopyDP
MODULE PROCEDURE DistributedVector_CopyL
END INTERFACE DISTRIBUTED_VECTOR_COPY
INTERFACE DistributedVector_Copy
MODULE PROCEDURE DistributedVector_CopyIntg
MODULE PROCEDURE DistributedVector_CopySP
MODULE PROCEDURE DistributedVector_CopyDP
MODULE PROCEDURE DistributedVector_CopyL
END INTERFACE DistributedVector_Copy
INTERFACE DISTRIBUTED_VECTOR_CREATE_FINISH
MODULE PROCEDURE DistributedVector_CreateFinish
END INTERFACE DISTRIBUTED_VECTOR_CREATE_FINISH
INTERFACE DISTRIBUTED_VECTOR_CREATE_START
MODULE PROCEDURE DistributedVector_CreateStart
END INTERFACE DISTRIBUTED_VECTOR_CREATE_START
INTERFACE DISTRIBUTED_VECTOR_DATA_GET
MODULE PROCEDURE DistributedVector_DataGetIntg
MODULE PROCEDURE DistributedVector_DataGetSP
MODULE PROCEDURE DistributedVector_DataGetDP
MODULE PROCEDURE DistributedVector_DataGetL
END INTERFACE DISTRIBUTED_VECTOR_DATA_GET
INTERFACE DistributedVector_DataGet
MODULE PROCEDURE DistributedVector_DataGetIntg
MODULE PROCEDURE DistributedVector_DataGetSP
MODULE PROCEDURE DistributedVector_DataGetDP
MODULE PROCEDURE DistributedVector_DataGetL
END INTERFACE DistributedVector_DataGet
INTERFACE DISTRIBUTED_VECTOR_DATA_RESTORE
MODULE PROCEDURE DistributedVector_DataRestoreIntg
MODULE PROCEDURE DistributedVector_DataRestoreSP
MODULE PROCEDURE DistributedVector_DataRestoreDP
MODULE PROCEDURE DistributedVector_DataRestoreL
END INTERFACE DISTRIBUTED_VECTOR_DATA_RESTORE
INTERFACE DistributedVector_DataRestore
MODULE PROCEDURE DistributedVector_DataRestoreIntg
MODULE PROCEDURE DistributedVector_DataRestoreSP
MODULE PROCEDURE DistributedVector_DataRestoreDP
MODULE PROCEDURE DistributedVector_DataRestoreL
END INTERFACE DistributedVector_DataRestore
INTERFACE DISTRIBUTED_VECTOR_DATA_TYPE_SET
MODULE PROCEDURE DistributedVector_DataTypeSet
END INTERFACE DISTRIBUTED_VECTOR_DATA_TYPE_SET
INTERFACE DISTRIBUTED_VECTOR_DESTROY
MODULE PROCEDURE DistributedVector_Destroy
END INTERFACE DISTRIBUTED_VECTOR_DESTROY
INTERFACE DISTRIBUTED_VECTOR_DUPLICATE
MODULE PROCEDURE DistributedVector_Duplicate
END INTERFACE DISTRIBUTED_VECTOR_DUPLICATE
INTERFACE DISTRIBUTED_VECTOR_GHOSTING_TYPE_SET
MODULE PROCEDURE DistributedVector_GhostingTypeSet
END INTERFACE DISTRIBUTED_VECTOR_GHOSTING_TYPE_SET
INTERFACE DISTRIBUTED_VECTOR_LIBRARY_TYPE_SET
MODULE PROCEDURE DistributedVector_LibraryTypeSet
END INTERFACE DISTRIBUTED_VECTOR_LIBRARY_TYPE_SET
INTERFACE DISTRIBUTED_VECTOR_OUTPUT
MODULE PROCEDURE DistributedVector_Output
END INTERFACE DISTRIBUTED_VECTOR_OUTPUT
INTERFACE DISTRIBUTED_VECTOR_OVERRIDE_SET_ON
MODULE PROCEDURE DistributedVector_OverrideSetOn
END INTERFACE DISTRIBUTED_VECTOR_OVERRIDE_SET_ON
INTERFACE DISTRIBUTED_VECTOR_OVERRIDE_SET_OFF
MODULE PROCEDURE DistributedVector_OverrideSetOff
END INTERFACE DISTRIBUTED_VECTOR_OVERRIDE_SET_OFF
INTERFACE DISTRIBUTED_VECTOR_UPDATE_FINISH
MODULE PROCEDURE DistributedVector_UpdateFinish
END INTERFACE DISTRIBUTED_VECTOR_UPDATE_FINISH
INTERFACE DISTRIBUTED_VECTOR_UPDATE_START
MODULE PROCEDURE DistributedVector_UpdateStart
END INTERFACE DISTRIBUTED_VECTOR_UPDATE_START
INTERFACE DISTRIBUTED_VECTOR_UPDATE_ISFINISHED
MODULE PROCEDURE DistributedVector_UpdateIsFinished
END INTERFACE DISTRIBUTED_VECTOR_UPDATE_ISFINISHED
INTERFACE DISTRIBUTED_VECTOR_UPDATE_WAITFINISHED
MODULE PROCEDURE DistributedVector_UpdateWaitFinished
END INTERFACE DISTRIBUTED_VECTOR_UPDATE_WAITFINISHED
INTERFACE DISTRIBUTED_VECTOR_VALUES_ADD
MODULE PROCEDURE DistributedVector_ValuesAddIntg
MODULE PROCEDURE DistributedVector_ValuesAddIntg1
MODULE PROCEDURE DistributedVector_ValuesAddSP
MODULE PROCEDURE DistributedVector_ValuesAddSP1
MODULE PROCEDURE DistributedVector_ValuesAddDP
MODULE PROCEDURE DistributedVector_ValuesAddDP1
MODULE PROCEDURE DistributedVector_ValuesAddL
MODULE PROCEDURE DistributedVector_ValuesAddL1
END INTERFACE DISTRIBUTED_VECTOR_VALUES_ADD
INTERFACE DistributedVector_ValuesAdd
MODULE PROCEDURE DistributedVector_ValuesAddIntg
MODULE PROCEDURE DistributedVector_ValuesAddIntg1
MODULE PROCEDURE DistributedVector_ValuesAddSP
MODULE PROCEDURE DistributedVector_ValuesAddSP1
MODULE PROCEDURE DistributedVector_ValuesAddDP
MODULE PROCEDURE DistributedVector_ValuesAddDP1
MODULE PROCEDURE DistributedVector_ValuesAddL
MODULE PROCEDURE DistributedVector_ValuesAddL1
END INTERFACE DistributedVector_ValuesAdd
INTERFACE DISTRIBUTED_VECTOR_VALUES_GET
MODULE PROCEDURE DistributedVector_ValuesGetIntg
MODULE PROCEDURE DistributedVector_ValuesGetIntg1
MODULE PROCEDURE DistributedVector_ValuesGetSP
MODULE PROCEDURE DistributedVector_ValuesGetSP1
MODULE PROCEDURE DistributedVector_ValuesGetDP
MODULE PROCEDURE DistributedVector_ValuesGetDP1
MODULE PROCEDURE DistributedVector_ValuesGetL
MODULE PROCEDURE DistributedVector_ValuesGetL1
END INTERFACE DISTRIBUTED_VECTOR_VALUES_GET
INTERFACE DistributedVector_ValuesGet
MODULE PROCEDURE DistributedVector_ValuesGetIntg
MODULE PROCEDURE DistributedVector_ValuesGetIntg1
MODULE PROCEDURE DistributedVector_ValuesGetSP
MODULE PROCEDURE DistributedVector_ValuesGetSP1
MODULE PROCEDURE DistributedVector_ValuesGetDP
MODULE PROCEDURE DistributedVector_ValuesGetDP1
MODULE PROCEDURE DistributedVector_ValuesGetL
MODULE PROCEDURE DistributedVector_ValuesGetL1
END INTERFACE DistributedVector_ValuesGet
INTERFACE DISTRIBUTED_VECTOR_VALUES_SET
MODULE PROCEDURE DistributedVector_ValuesSetIntg
MODULE PROCEDURE DistributedVector_ValuesSetIntg1
MODULE PROCEDURE DistributedVector_ValuesSetSP
MODULE PROCEDURE DistributedVector_ValuesSetSP1
MODULE PROCEDURE DistributedVector_ValuesSetDP
MODULE PROCEDURE DistributedVector_ValuesSetDP1
MODULE PROCEDURE DistributedVector_ValuesSetL
MODULE PROCEDURE DistributedVector_ValuesSetL1
END INTERFACE DISTRIBUTED_VECTOR_VALUES_SET
INTERFACE DistributedVector_ValuesSet
MODULE PROCEDURE DistributedVector_ValuesSetIntg
MODULE PROCEDURE DistributedVector_ValuesSetIntg1
MODULE PROCEDURE DistributedVector_ValuesSetSP
MODULE PROCEDURE DistributedVector_ValuesSetSP1
MODULE PROCEDURE DistributedVector_ValuesSetDP
MODULE PROCEDURE DistributedVector_ValuesSetDP1
MODULE PROCEDURE DistributedVector_ValuesSetL
MODULE PROCEDURE DistributedVector_ValuesSetL1
END INTERFACE DistributedVector_ValuesSet
INTERFACE DistributedVector_DotProduct
MODULE PROCEDURE DistributedVector_DotProductIntg
MODULE PROCEDURE DistributedVector_DotProductSp
MODULE PROCEDURE DistributedVector_DotProductDp
END INTERFACE DistributedVector_DotProduct
INTERFACE DISTRIBUTED_MATRIX_LINKLIST_SET
MODULE PROCEDURE DistributedMatrix_LinkListSet
END INTERFACE DISTRIBUTED_MATRIX_LINKLIST_SET
INTERFACE DISTRIBUTED_MATRIX_LINKLIST_GET
MODULE PROCEDURE DistributedMatrix_LinkListGet
END INTERFACE DISTRIBUTED_MATRIX_LINKLIST_GET
PUBLIC DISTRIBUTED_MATRIX_VECTOR_CMISS_TYPE,DISTRIBUTED_MATRIX_VECTOR_PETSC_TYPE
PUBLIC DISTRIBUTED_MATRIX_VECTOR_INTG_TYPE,DISTRIBUTED_MATRIX_VECTOR_SP_TYPE,DISTRIBUTED_MATRIX_VECTOR_DP_TYPE, &
& DISTRIBUTED_MATRIX_VECTOR_L_TYPE,DISTRIBUTED_MATRIX_VECTOR_SPC_TYPE,DISTRIBUTED_MATRIX_VECTOR_DPC_TYPE
PUBLIC DISTRIBUTED_MATRIX_BLOCK_STORAGE_TYPE,DISTRIBUTED_MATRIX_DIAGONAL_STORAGE_TYPE, &
& DISTRIBUTED_MATRIX_COLUMN_MAJOR_STORAGE_TYPE,DISTRIBUTED_MATRIX_ROW_MAJOR_STORAGE_TYPE, &
& DISTRIBUTED_MATRIX_COMPRESSED_ROW_STORAGE_TYPE,DISTRIBUTED_MATRIX_COMPRESSED_COLUMN_STORAGE_TYPE, &
& DISTRIBUTED_MATRIX_ROW_COLUMN_STORAGE_TYPE
PUBLIC DISTRIBUTED_MATRIX_SYMMETRIC_TYPE,DISTRIBUTED_MATRIX_HERMITIAN_TYPE,DISTRIBUTED_MATRIX_SKEW_SYMMETRIC_TYPE, &
& DISTRIBUTED_MATRIX_UNSYMMETRIC_TYPE
PUBLIC DISTRIBUTED_MATRIX_VECTOR_INCLUDE_GHOSTS_TYPE,DISTRIBUTED_MATRIX_VECTOR_NO_GHOSTS_TYPE
PUBLIC DISTRIBUTED_MATRIX_ALL_VALUES_SET
PUBLIC DistributedMatrix_AllValuesSet
PUBLIC DISTRIBUTED_MATRIX_CREATE_FINISH,DISTRIBUTED_MATRIX_CREATE_START
PUBLIC DistributedMatrix_CreateFinish,DistributedMatrix_CreateStart
PUBLIC DISTRIBUTED_MATRIX_DATA_GET,DISTRIBUTED_MATRIX_DATA_RESTORE
PUBLIC DistributedMatrix_DataGet,DistributedMatrix_DataRestore
PUBLIC DISTRIBUTED_MATRIX_DATA_TYPE_SET
PUBLIC DistributedMatrix_DataTypeGet,DistributedMatrix_DataTypeSet
PUBLIC DistributedMatrix_DimensionsGet
PUBLIC DISTRIBUTED_MATRIX_DESTROY
PUBLIC DistributedMatrix_Destroy
PUBLIC DISTRIBUTED_MATRIX_DUPLICATE
PUBLIC DistributedMatrix_Duplicate
PUBLIC DISTRIBUTED_MATRIX_FORM
PUBLIC DistributedMatrix_Form
PUBLIC DISTRIBUTED_MATRIX_GHOSTING_TYPE_SET
PUBLIC DistributedMatrix_GhostingTypeSet
PUBLIC DISTRIBUTED_MATRIX_LIBRARY_TYPE_SET
PUBLIC DistributedMatrix_LibraryTypeSet
PUBLIC DISTRIBUTED_MATRIX_LINKLIST_SET,DISTRIBUTED_MATRIX_LINKLIST_GET
PUBLIC DistributedMatrix_LinkListSet,DistributedMatrix_LinkListGet
PUBLIC DISTRIBUTED_MATRIX_MAX_COLUMNS_PER_ROW_GET
PUBLIC DistributedMatrix_MaxColumnsPerRowGet
PUBLIC DISTRIBUTED_MATRIX_NUMBER_NON_ZEROS_SET,DISTRIBUTED_MATRIX_NUMBER_NON_ZEROS_GET
PUBLIC DistributedMatrix_NumberOfNonZerosGet,DistributedMatrix_NumberOfNonZerosSet
PUBLIC DISTRIBUTED_MATRIX_OUTPUT
PUBLIC DistributedMatrix_Output
PUBLIC DISTRIBUTED_MATRIX_OVERRIDE_SET_ON,DISTRIBUTED_MATRIX_OVERRIDE_SET_OFF
PUBLIC DistributedMatrix_OverrideSetOn,DistributedMatrix_OverrideSetOff
PUBLIC DISTRIBUTED_MATRIX_STORAGE_LOCATIONS_GET,DISTRIBUTED_MATRIX_STORAGE_LOCATIONS_SET
PUBLIC DistributedMatrix_StorageLocationsGet,DistributedMatrix_StorageLocationsSet
PUBLIC DISTRIBUTED_MATRIX_STORAGE_TYPE_GET,DISTRIBUTED_MATRIX_STORAGE_TYPE_SET
PUBLIC DistributedMatrix_StorageTypeGet,DistributedMatrix_StorageTypeSet
PUBLIC DistributedMatrix_SymmetryTypeGet,DistributedMatrix_SymmetryTypeSet
PUBLIC DISTRIBUTED_MATRIX_UPDATE_START,DISTRIBUTED_MATRIX_UPDATE_FINISH
PUBLIC DistributedMatrix_UpdateFinish,DistributedMatrix_UpdateStart
PUBLIC DISTRIBUTED_MATRIX_UPDATE_ISFINISHED,DISTRIBUTED_MATRIX_UPDATE_WAITFINISHED
PUBLIC DistributedMatrix_UpdateIsFinished,DistributedMatrix_UpdateWaitFinished
PUBLIC DISTRIBUTED_MATRIX_VALUES_ADD
PUBLIC DistributedMatrix_ValuesAdd
PUBLIC DISTRIBUTED_MATRIX_VALUES_GET,DISTRIBUTED_MATRIX_VALUES_SET
PUBLIC DistributedMatrix_ValuesGet,DistributedMatrix_ValuesSet
PUBLIC DISTRIBUTED_MATRIX_BY_VECTOR_ADD
PUBLIC DistributedMatrix_MatrixByVectorAdd
PUBLIC DISTRIBUTED_VECTOR_ALL_VALUES_SET
PUBLIC DistributedVector_AllValuesSet
PUBLIC DISTRIBUTED_VECTOR_COPY
PUBLIC DistributedVector_Copy
PUBLIC DISTRIBUTED_VECTOR_CREATE_FINISH,DISTRIBUTED_VECTOR_CREATE_START
PUBLIC DistributedVector_CreateFinish,DistributedVector_CreateStart
PUBLIC DISTRIBUTED_VECTOR_DATA_GET,DISTRIBUTED_VECTOR_DATA_RESTORE
PUBLIC DistributedVector_DataGet,DistributedVector_DataRestore
PUBLIC DISTRIBUTED_VECTOR_DATA_TYPE_SET
PUBLIC DistributedVector_DataTypeGet,DistributedVector_DataTypeSet
PUBLIC DISTRIBUTED_VECTOR_DESTROY
PUBLIC DistributedVector_Destroy
PUBLIC DistributedVector_DotProduct
PUBLIC DISTRIBUTED_VECTOR_DUPLICATE
PUBLIC DistributedVector_Duplicate
PUBLIC DISTRIBUTED_VECTOR_GHOSTING_TYPE_SET
PUBLIC DistributedVector_GhostingTypeSet
PUBLIC DISTRIBUTED_VECTOR_LIBRARY_TYPE_SET
PUBLIC DistributedVector_LibraryTypeSet
PUBLIC DistributedVector_L2Norm
PUBLIC DISTRIBUTED_VECTOR_OUTPUT
PUBLIC DistributedVector_Output
PUBLIC DISTRIBUTED_VECTOR_OVERRIDE_SET_ON,DISTRIBUTED_VECTOR_OVERRIDE_SET_OFF
PUBLIC DistributedVector_OverrideSetOn,DistributedVector_OverrideSetOff
PUBLIC DISTRIBUTED_VECTOR_UPDATE_START,DISTRIBUTED_VECTOR_UPDATE_FINISH
PUBLIC DistributedVector_UpdateFinish,DistributedVector_UpdateStart
PUBLIC DISTRIBUTED_VECTOR_UPDATE_ISFINISHED,DISTRIBUTED_VECTOR_UPDATE_WAITFINISHED
PUBLIC DistributedVector_UpdateIsFinished,DistributedVector_UpdateWaitFinished
PUBLIC DISTRIBUTED_VECTOR_VALUES_ADD
PUBLIC DistributedVector_ValuesAdd
PUBLIC DISTRIBUTED_VECTOR_VALUES_GET,DISTRIBUTED_VECTOR_VALUES_SET
PUBLIC DistributedVector_ValuesGet,DistributedVector_ValuesSet
CONTAINS
!
!================================================================================================================================
!
!>Sets all values in an integer distributed matrix to the specified value.
SUBROUTINE DistributedMatrix_AllValuesSetIntg(distributedMatrix,value,err,error,*)
!Argument variables
TYPE(DistributedMatrixType), POINTER :: distributedMatrix !<A pointer to the distributed matrix
INTEGER(INTG), INTENT(IN) :: value !<The value to set
INTEGER(INTG), INTENT(OUT) :: err !<The error code
TYPE(VARYING_STRING), INTENT(OUT) :: error !<The error string
!Local variables
TYPE(DistributedMatrixCMISSType), POINTER :: cmissMatrix
TYPE(VARYING_STRING) :: localError
ENTERS("DistributedMatrix_AllValuesSetIntg",err,error,*999)
IF(.NOT.ASSOCIATED(distributedMatrix)) CALL FlagError("Distributed matrix is not associated.",err,error,*999)
IF(.NOT.distributedMatrix%matrixFinished) CALL FlagError("The distributed matrix has not been finished.",err,error,*999)
SELECT CASE(distributedMatrix%libraryType)
CASE(DISTRIBUTED_MATRIX_VECTOR_CMISS_TYPE)
NULLIFY(cmissMatrix)
CALL DistributedMatrix_CMISSMatrixGet(distributedMatrix,cmissMatrix,err,error,*999)
CALL Matrix_AllValuesSet(cmissMatrix%matrix,value,err,error,*999)
CASE(DISTRIBUTED_MATRIX_VECTOR_PETSC_TYPE)
CALL FlagError("Cannot set all values for an integer PETSc distributed matrix.",err,error,*999)
CASE DEFAULT
localError="The distributed matrix library type of "// &
& TRIM(NumberToVString(distributedMatrix%libraryType,"*",err,error))//" is invalid."
CALL FlagError(localError,err,error,*999)
END SELECT
EXITS("DistributedMatrix_AllValuesSetIntg")
RETURN
999 ERRORSEXITS("DistributedMatrix_AllValuesSetIntg",err,error)
RETURN 1
END SUBROUTINE DistributedMatrix_AllValuesSetIntg
!
!================================================================================================================================
!
!>Sets all values in a single precision distributed matrix to the specified value.
SUBROUTINE DistributedMatrix_AllValuesSetSP(distributedMatrix,value,err,error,*)
!Argument variables
TYPE(DistributedMatrixType), POINTER :: distributedMatrix !<A pointer to the distributed matrix
REAL(SP), INTENT(IN) :: value !<The value to set
INTEGER(INTG), INTENT(OUT) :: err !<The error code
TYPE(VARYING_STRING), INTENT(OUT) :: error !<The error string
!Local variables
TYPE(DistributedMatrixCMISSType), POINTER :: cmissMatrix
TYPE(VARYING_STRING) :: localError
ENTERS("DistributedMatrix_AllValuesSetSP",err,error,*999)
IF(.NOT.ASSOCIATED(distributedMatrix)) CALL FlagError("Distributed matrix is not associated.",err,error,*999)
IF(.NOT.distributedMatrix%matrixFinished) CALL FlagError("The distributed matrix has not been finished.",err,error,*999)
SELECT CASE(distributedMatrix%libraryType)
CASE(DISTRIBUTED_MATRIX_VECTOR_CMISS_TYPE)
NULLIFY(cmissMatrix)
CALL DistributedMatrix_CMISSMatrixGet(distributedMatrix,cmissMatrix,err,error,*999)
CALL Matrix_AllValuesSet(cmissMatrix%matrix,value,err,error,*999)
CASE(DISTRIBUTED_MATRIX_VECTOR_PETSC_TYPE)
CALL FlagError("Cannot set all values for a single precision PETSc distributed matrix.",err,error,*999)
CASE DEFAULT
localError="The distributed matrix library type of "// &
& TRIM(NumberToVString(distributedMatrix%libraryType,"*",err,error))//" is invalid."
CALL FlagError(localError,err,error,*999)
END SELECT
EXITS("DistributedMatrix_AllValuesSetSP")
RETURN
999 ERRORSEXITS("DistributedMatrix_AllValuesSetSP",err,error)
RETURN 1
END SUBROUTINE DistributedMatrix_AllValuesSetSP
!
!================================================================================================================================
!
!>Sets all values in a double precision distributed matrix to the specified value.
SUBROUTINE DistributedMatrix_AllValuesSetDP(distributedMatrix,value,err,error,*)
!Argument variables
TYPE(DistributedMatrixType), POINTER :: distributedMatrix !<A pointer to the distributed matrix
REAL(DP), INTENT(IN) :: value !<The value to set
INTEGER(INTG), INTENT(OUT) :: err !<The error code
TYPE(VARYING_STRING), INTENT(OUT) :: error !<The error string
!Local variables
TYPE(DistributedMatrixCMISSType), POINTER :: cmissMatrix
TYPE(DistributedMatrixPETScType), POINTER :: petscMatrix
TYPE(VARYING_STRING) :: localError
ENTERS("DistributedMatrix_AllValuesSetDP",err,error,*999)
IF(.NOT.ASSOCIATED(distributedMatrix)) CALL FlagError("Distributed matrix is not associated.",err,error,*999)
IF(.NOT.distributedMatrix%matrixFinished) CALL FlagError("The distributed matrix has not been finished.",err,error,*999)
SELECT CASE(distributedMatrix%libraryType)
CASE(DISTRIBUTED_MATRIX_VECTOR_CMISS_TYPE)
NULLIFY(cmissMatrix)
CALL DistributedMatrix_CMISSMatrixGet(distributedMatrix,cmissMatrix,err,error,*999)
CALL Matrix_AllValuesSet(cmissMatrix%matrix,value,err,error,*999)
CASE(DISTRIBUTED_MATRIX_VECTOR_PETSC_TYPE)
NULLIFY(petscMatrix)
CALL DistributedMatrix_PETScMatrixGet(distributedMatrix,petscMatrix,err,error,*999)
IF(ABS(VALUE)<=ZERO_TOLERANCE) THEN
IF(petscMatrix%useOverrideMatrix) THEN
CALL Petsc_MatZeroEntries(petscMatrix%overrideMatrix,err,error,*999)
ELSE
CALL Petsc_MatZeroEntries(petscMatrix%matrix,err,error,*999)
ENDIF
ELSE
CALL FlagError("Not implemented.",err,error,*999)
ENDIF
CASE DEFAULT
localError="The distributed matrix library type of "// &
& TRIM(NumberToVString(distributedMatrix%libraryType,"*",err,error))//" is invalid."
CALL FlagError(localError,err,error,*999)
END SELECT
EXITS("DistributedMatrix_AllValuesSetDP")
RETURN
999 ERRORSEXITS("DistributedMatrix_AllValuesSetDP",err,error)
RETURN 1
END SUBROUTINE DistributedMatrix_AllValuesSetDP
!
!================================================================================================================================
!
!>Sets all values in a logical distributed matrix to the specified value.
SUBROUTINE DistributedMatrix_AllValuesSetL(distributedMatrix,value,err,error,*)
!Argument variables
TYPE(DistributedMatrixType), POINTER :: distributedMatrix !<A pointer to the distributed matrix
LOGICAL, INTENT(IN) :: VALUE !<The value to set
INTEGER(INTG), INTENT(OUT) :: err !<The error code
TYPE(VARYING_STRING), INTENT(OUT) :: error !<The error string
!Local variables
TYPE(DistributedMatrixCMISSType), POINTER :: cmissMatrix
TYPE(VARYING_STRING) :: localError
ENTERS("DistributedMatrix_AllValuesSetL",err,error,*999)
IF(.NOT.ASSOCIATED(distributedMatrix)) CALL FlagError("Distributed matrix is not associated.",err,error,*999)
IF(.NOT.distributedMatrix%matrixFinished) CALL FlagError("The distributed matrix has not been finished.",err,error,*999)
SELECT CASE(distributedMatrix%libraryType)
CASE(DISTRIBUTED_MATRIX_VECTOR_CMISS_TYPE)
NULLIFY(cmissMatrix)
CALL DistributedMatrix_CMISSMatrixGet(distributedMatrix,cmissMatrix,err,error,*999)
CALL Matrix_AllValuesSet(cmissMatrix%matrix,value,err,error,*999)
CASE(DISTRIBUTED_MATRIX_VECTOR_PETSC_TYPE)
CALL FlagError("Cannot set all values for a logical PETSc distributed matrix.",err,error,*999)
CASE DEFAULT
localError="The distributed matrix library type of "// &
& TRIM(NumberToVString(distributedMatrix%libraryType,"*",err,error))//" is invalid."
CALL FlagError(localError,err,error,*999)
END SELECT
EXITS("DistributedMatrix_AllValuesSetL")
RETURN
999 ERRORSEXITS("DistributedMatrix_AllValuesSetL",err,error)
RETURN 1
END SUBROUTINE DistributedMatrix_AllValuesSetL
!
!================================================================================================================================
!
!>Finishes the creation of a CMISS distributed matrix.
SUBROUTINE DistributedMatrix_CMISSCreateFinish(cmissMatrix,err,error,*)
!Argument variables
TYPE(DistributedMatrixCMISSType), POINTER :: cmissMatrix !<A pointer to the distributed CMISS matrix
INTEGER(INTG), INTENT(OUT) :: err !<The error code
TYPE(VARYING_STRING), INTENT(OUT) :: error !<The error string
!Local Variables
TYPE(DOMAIN_MAPPING_TYPE), POINTER :: domainMapping
INTEGER(INTG) :: dummyErr
TYPE(VARYING_STRING) :: dummyError
ENTERS("DistributedMatrix_CMISSCreateFinish",err,error,*998)
IF(.NOT.ASSOCIATED(cmissMatrix)) CALL FlagError("Distributed matrix CMISS is not associated.",err,error,*998)
cmissMatrix%baseTagNumber=distributedDataId
NULLIFY(domainMapping)
domainMapping=>cmissMatrix%distributedMatrix%rowDomainMapping
IF(.NOT.ASSOCIATED(domainMapping)) CALL FlagError("Distributed matrix row domain mapping is not associated.",err,error,*998)
IF(domainMapping%NUMBER_OF_DOMAINS==1) THEN
distributedDataId=distributedDataId+1
ELSE
distributedDataId=distributedDataId+ &
& domainMapping%ADJACENT_DOMAINS_PTR(domainMapping%NUMBER_OF_DOMAINS)
END IF
CALL Matrix_CreateFinish(cmissMatrix%matrix,err,error,*999)
EXITS("DistributedMatrix_CMISSCreateFinish")
RETURN
999 CALL DistributedMatrix_CMISSFinalise(cmissMatrix,dummyErr,dummyError,*998)
998 ERRORSEXITS("DistributedMatrix_CMISSCreateFinish",err,error)
RETURN 1
END SUBROUTINE DistributedMatrix_CMISSCreateFinish
!
!================================================================================================================================
!
!>Finalise a CMISS distributed matrix.
SUBROUTINE DistributedMatrix_CMISSFinalise(cmissMatrix,err,error,*)
!Argument variables
TYPE(DistributedMatrixCMISSType), POINTER :: cmissMatrix !<A pointer to the CMISS distributed matrix
INTEGER(INTG), INTENT(OUT) :: err !<The error code
TYPE(VARYING_STRING), INTENT(OUT) :: error !<The error string
!Local Variables
ENTERS("DistributedMatrix_CMISSFinalise",err,error,*999)
IF(ASSOCIATED(cmissMatrix)) THEN
CALL Matrix_Destroy(cmissMatrix%matrix,err,error,*999)
DEALLOCATE(cmissMatrix)
ENDIF
EXITS("DistributedMatrix_CMISSFinalise")
RETURN
999 ERRORSEXITS("DistributedMatrix_CMISSFinalise",err,error)
RETURN 1
END SUBROUTINE DistributedMatrix_CMISSFinalise
!
!================================================================================================================================
!
!>Intialises a CMISS distributed matrix.
SUBROUTINE DistributedMatrix_CMISSInitialise(distributedMatrix,err,error,*)
!Argument variables
TYPE(DistributedMatrixType), POINTER :: distributedMatrix !<A pointer to the distributed matrix
INTEGER(INTG), INTENT(OUT) :: err !<The error code
TYPE(VARYING_STRING), INTENT(OUT) :: error !<The error string
!Local Variables
INTEGER(INTG) :: dummyErr
TYPE(DOMAIN_MAPPING_TYPE), POINTER :: rowDomainMapping,columnDomainMapping
TYPE(VARYING_STRING) :: dummyError,localError
ENTERS("DistributedMatrix_CMISSInitialise",err,error,*998)
IF(.NOT.ASSOCIATED(distributedMatrix)) CALL FlagError("Distributed matrix is not associated.",err,error,*998)
IF(ASSOCIATED(distributedMatrix%cmiss)) &
& CALL FlagError("CMISS is already associated for this distributed matrix.",err,error,*998)
rowDomainMapping=>distributedMatrix%rowDomainMapping
columnDomainMapping=>distributedMatrix%columnDomainMapping
IF(.NOT.ASSOCIATED(rowDomainMapping)) &
& CALL FlagError("Distributed matrix row domain mapping is not associated.",err,error,*998)
IF(.NOT.ASSOCIATED(columnDomainMapping)) &
& CALL FlagError("Distributed matrix column domain mapping is not associated.",err,error,*998)
ALLOCATE(distributedMatrix%cmiss,STAT=err)
IF(err/=0) CALL FlagError("Could not allocate CMISS distributed matrix.",err,error,*999)
distributedMatrix%cmiss%distributedMatrix=>distributedMatrix
distributedMatrix%libraryType=DISTRIBUTED_MATRIX_VECTOR_CMISS_TYPE
NULLIFY(distributedMatrix%cmiss%matrix)
!Set the defaults
CALL Matrix_CreateStart(distributedMatrix%cmiss%matrix,err,error,*999)
CALL Matrix_DataTypeSet(distributedMatrix%cmiss%matrix,MATRIX_VECTOR_DP_TYPE,err,error,*999)
CALL Matrix_StorageTypeSet(distributedMatrix%cmiss%matrix,MATRIX_BLOCK_STORAGE_TYPE,err,error,*999)
SELECT CASE(distributedMatrix%ghostingType)