File: mat__c_eq_zero_integer.f

package info (click to toggle)
aces3 3.0.6-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 82,460 kB
  • sloc: fortran: 225,647; ansic: 20,413; cpp: 4,349; makefile: 953; sh: 137
file content (83 lines) | stat: -rw-r--r-- 2,392 bytes parent folder | download | duplicates (6)
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
C  Copyright (c) 2003-2010 University of Florida
C
C  This program is free software; you can redistribute it and/or modify
C  it under the terms of the GNU General Public License as published by
C  the Free Software Foundation; either version 2 of the License, or
C  (at your option) any later version.

C  This program is distributed in the hope that it will be useful,
C  but WITHOUT ANY WARRANTY; without even the implied warranty of
C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
C  GNU General Public License for more details.

C  The GNU General Public License is included in this distribution
C  in the file COPYRIGHT.
         SUBROUTINE  MAT__C_EQ_ZERO_INTEGER
     +
     +                    ( DDROW,DDCOL,
     +                      ROW,COL,
     +
     +                              C )
     +
C------------------------------------------------------------------------
C  OPERATION   : MAT__C_EQ_ZERO_INTEGER
C  MODULE      : MATRIX
C  MODULE-ID   : MAT
C  DESCRIPTION : This operation builds a two-dimensional zero matrix C
C                of integer type.
C
C                The zero matrix need not to be a square matrix.
C
C  AUTHOR      : Norbert Flocke
C------------------------------------------------------------------------
C
C
C             ...include files and declare variables.
C
C
         IMPLICIT   NONE

         INTEGER    DDROW,DDCOL
         INTEGER    I,J
         INTEGER    ROW,COL
         INTEGER    ZERO

         INTEGER    C (1:DDROW,1:DDCOL)

         PARAMETER  (ZERO = 0)
C
C
C------------------------------------------------------------------------
C
C
C             ...check dimensions.
C
C
         IF  (ROW.GT.DDROW  .OR.  COL.GT.DDCOL)  THEN
              WRITE (1,*) ' Dimensions of matrix C too small: '
              WRITE (1,*) ' mat__c_eq_zero_integer '
              WRITE (1,*) ' DDROW,DDCOL,ROW,COL = ',
     +                      DDROW,DDCOL,ROW,COL
              WRITE (*,*) ' Dimensions of matrix C too small: '
              WRITE (*,*) ' mat__c_eq_zero_integer '
              WRITE (*,*) ' DDROW,DDCOL,ROW,COL = ',
     +                      DDROW,DDCOL,ROW,COL
              STOP
         END IF
C
C
C             ...build zero matrix.
C
C
         DO J = 1,COL
         DO I = 1,ROW  
            C (I,J) = ZERO
         END DO
         END DO
C
C
C             ...ready!
C
C
         RETURN
         END