User Tools

Site Tools


conv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
conv [2023/03/14 12:35] – [c008] oschuettconv [2023/11/14 10:49] (current) – [c012] oschuett
Line 71: Line 71:
 ===== c012 ===== ===== c012 =====
 ⚠️ ''Found WRITE statement with hardcoded unit in "${proc}"'' ⚠️ ''Found WRITE statement with hardcoded unit in "${proc}"''
 +
 +✅ Please don't writing to stdout directly, but instead use a [[dev:printkey]].
 +
 +
 +Printkeys allow the user to [[printkey|control]] the verbosity of the output.
  
 ---- ----
Line 100: Line 105:
 <code Fortran> <code Fortran>
 TYPE foo_type TYPE foo_type
 +   ! Primitive types.
    INTEGER                             :: my_int     = -1    INTEGER                             :: my_int     = -1
    REAL(dp)                            :: my_real    = 0.0_dp    REAL(dp)                            :: my_real    = 0.0_dp
    LOGICAL                             :: my_logical = .FALSE.    LOGICAL                             :: my_logical = .FALSE.
    CHARACTER(LEN=42)                   :: my_string  = ""    CHARACTER(LEN=42)                   :: my_string  = ""
-   TYPE(bar_type)                      :: my_nested  = bar_type() +   REAL(dp), DIMENSION(3)              :: my_array   [1.0_dp, 2.0_dp3.0_dp]
-   REAL(dp), DIMENSION(3,3)            :: my_array   0.0_dp +
-   REAL(dp)DIMENSION(:)POINTER     :: my_pointer => NULL() +
-   REAL(dp), DIMENSION(:), ALLOCATABLE :: my_alloc  ! Automatically initialized +
-END TYPE foo_type+
  
-TYPE bar_type +   ! Arrays can also be initialized via broadcasting of a scalar. 
-   INTEGER                             :: my_int     -1 +   REAL(dp), DIMENSION(3)              :: my_array2   = 0.0_dp 
-END TYPE bar_type+       
 +   ! Pointers should be nullified. 
 +   REAL(dp), DIMENSION(:), POINTER     :: my_pointer1 => NULL() 
 +   TYPE(bar_type), POINTER             :: my_pointer2 => NULL() 
 +    
 +   ! Derived types can be initialized through their constructor. 
 +   TYPE(bar_type)                      :: my_derived  bar_type() 
 + 
 +   ! Allocatables get automatically nullified. 
 +   REAL(dp), DIMENSION(:), ALLOCATABLE :: my_alloc 
 +    
 +   ! Allocatables of derived types get auto initialized upon allocation. 
 +   TYPE(bar_type), ALLOCATABLE         :: my_derived_alloc 
 +END TYPE foo_type
 </code> </code>
  
Line 152: Line 167:
  
 ---- ----
 +
 +===== c106 =====
 +⚠️ ''Found CALL EXECUTE_COMMAND_LINE in procedure "${proc}"''
 +
 +✅ Please don't call ''EXECUTE_COMMAND_LINE'', but instead use a workflow engine like  [[https://www.aiida.net|AiiDA]].
 +
 +----
 +
  
 ===== c201 ===== ===== c201 =====
conv.1678797320.txt.gz · Last modified: 2023/03/14 12:35 by oschuett