Debian Codegraph @

src/atlas_f/numerics/atlas_Method_module.F90

raw
1 ! (C) Copyright 2013 ECMWF.
2 !
3 ! This software is licensed under the terms of the Apache Licence Version 2.0
4 ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5 ! In applying this licence, ECMWF does not waive the privileges and immunities
6 ! granted to it by virtue of its status as an intergovernmental organisation nor
7 ! does it submit to any jurisdiction.
8
9 #include "atlas/atlas_f.h"
10
11 module atlas_Method_module
12
13 use fckit_owned_object_module, only : fckit_owned_object
14
15 implicit none
16
17 private :: fckit_owned_object
18
19 public :: atlas_Method
20
21 private
22
23 !------------------------------------------------------------------------------
24 TYPE, extends(fckit_owned_object) :: atlas_Method
25
26 ! Purpose :
27 ! -------
28 ! *Method* :
29 ! Describes how nodes are ordered
30 ! Describes how parallelisation for fields is done
31
32 ! Methods :
33 ! -------
34 ! name : The name or tag this function space was created with
35
36 ! Author :
37 ! ------
38 ! 20-Nov-2013 Willem Deconinck *ECMWF*
39
40 !------------------------------------------------------------------------------
41 contains
42 procedure, public :: name => atlas_Method__name
43 #if FCKIT_FINAL_NOT_INHERITING
44 final :: atlas_Method__final_auto
45 #endif
46 END TYPE atlas_Method
47
48 interface atlas_Method
49 module procedure atlas_Method__cptr
50 end interface
51
52 !========================================================
53 contains
54 !========================================================
55
56 function atlas_Method__cptr(cptr) result(this)
57 use, intrinsic :: iso_c_binding, only : c_ptr
58 type(atlas_Method) :: this
59 type(c_ptr), intent(in) :: cptr
60 call this%reset_c_ptr( cptr )
61 call this%return()
62 end function
63
64 function atlas_Method__name(this) result(name)
65 use atlas_Method_c_binding
66 use fckit_c_interop_module, only : c_ptr_to_string
67 use, intrinsic :: iso_c_binding, only : c_ptr
68 class(atlas_Method), intent(in) :: this
69 character(len=:), allocatable :: name
70 type(c_ptr) :: name_c_str
71 name_c_str = atlas__Method__name(this%CPTR_PGIBUG_A)
72 name = c_ptr_to_string(name_c_str)
73 end function
74
75 !-------------------------------------------------------------------------------
76
77 #if FCKIT_FINAL_NOT_INHERITING
78 ATLAS_FINAL subroutine atlas_Method__final_auto(this)
79 type(atlas_Method), intent(inout) :: this
80 #if FCKIT_FINAL_DEBUGGING
81 write(0,*) "atlas_Method__final_auto"
82 #endif
83 #if FCKIT_FINAL_NOT_PROPAGATING
84 call this%final()
85 #endif
86 FCKIT_SUPPRESS_UNUSED( this )
87 end subroutine
88 #endif
89
90 end module atlas_Method_module
91