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 [2026/06/12 09:46] (current) 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 write to stdout directly, but instead use a [[dev:printkey]].
 +
 +
 +Printkeys allow the user to [[printkey|control]] the verbosity of the output.
  
 ---- ----
Line 77: Line 82:
 ⚠️ ''Found DEALLOCATE with STAT argument in "${proc}"'' ⚠️ ''Found DEALLOCATE with STAT argument in "${proc}"''
  
-✅ Please don't ''STAT='' to ''DEALLOCATE'' to ensure that the program stops after a failure.+✅ Please don'pass ''STAT='' to ''DEALLOCATE'' to ensure that the program stops after a failure.
  
 A failed deallocation is always indicative of a bug (e.g. double free or segmentation fault) and the program should not continue afterwards. A failed deallocation is always indicative of a bug (e.g. double free or segmentation fault) and the program should not continue afterwards.
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: by oschuett