| 1 |
C Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 2 |
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
C NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
C |
| 5 |
C See packages/seacas/LICENSE for details |
| 6 |
C======================================================================= |
| 7 |
SUBROUTINE CHKDIS (NDIM, NAMECO, NVARNP, NAMENV, LN1, LN2) |
| 8 |
C======================================================================= |
| 9 |
|
| 10 |
C --*** CHKDIS *** (ALGEBRA) Check displacement variables |
| 11 |
C -- Written by Amy Gilkey - revised 03/02/88 |
| 12 |
C -- |
| 13 |
C --CHKDIS finds the displacement variables. The first two/three nodal |
| 14 |
C --variables are displacement variables if and only if they begin with |
| 15 |
C --'D' and end with the last character of the corresponding coordinate |
| 16 |
C --name. |
| 17 |
C -- |
| 18 |
C --Parameters: |
| 19 |
C -- NDIM - IN - the number of coordinates |
| 20 |
C -- NAMECO - IN - the coordinate names |
| 21 |
C -- NVARNP - IN - the number of nodal variables |
| 22 |
C -- NAMENV - IN - the nodal variable names |
| 23 |
|
| 24 |
include 'exodusII.inc' |
| 25 |
|
| 26 |
CHARACTER*(LN1) NAMECO(*) |
| 27 |
CHARACTER*(LN2) NAMENV(*) |
| 28 |
|
| 29 |
LOGICAL DEFOK |
| 30 |
|
| 31 |
IF (NVARNP .GE. NDIM) THEN |
| 32 |
DEFOK = .TRUE. |
| 33 |
LN = MAX (LENSTR (NAMENV(1)), 2) |
| 34 |
DO 100 I = 1, NDIM |
| 35 |
LC = LENSTR (NAMECO(I)) |
| 36 |
IF ((NAMENV(I)(1:1) .NE. 'D') |
| 37 |
& .OR. (NAMENV(I)(1:LN-1) .NE. NAMENV(1)(1:LN-1)) |
| 38 |
& .OR. (NAMENV(I)(LN:LN) .NE. NAMECO(I)(LC:LC))) |
| 39 |
& DEFOK = .FALSE. |
| 40 |
100 CONTINUE |
| 41 |
|
| 42 |
ELSE |
| 43 |
DEFOK = .FALSE. |
| 44 |
END IF |
| 45 |
|
| 46 |
IF (.NOT. DEFOK) THEN |
| 47 |
CALL PRTERR ('WARNING', 'Output database will not have' |
| 48 |
& // ' a valid set of displacement functions.') |
| 49 |
END IF |
| 50 |
|
| 51 |
RETURN |
| 52 |
END |