| 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_mesh_cells_module |
| 12 |
|
| 13 |
use, intrinsic :: iso_c_binding, only: c_ptr |
| 14 |
use atlas_HybridElements_module, only: atlas_HybridElements |
| 15 |
|
| 16 |
implicit none |
| 17 |
|
| 18 |
private :: atlas_HybridElements |
| 19 |
private :: c_ptr |
| 20 |
|
| 21 |
public :: atlas_mesh_cells |
| 22 |
|
| 23 |
private |
| 24 |
|
| 25 |
type, extends(atlas_HybridElements) :: atlas_mesh_cells |
| 26 |
contains |
| 27 |
#if FCKIT_FINAL_NOT_INHERITING |
| 28 |
final :: atlas_mesh_Cells__final_auto |
| 29 |
#endif |
| 30 |
end type |
| 31 |
|
| 32 |
interface atlas_mesh_cells |
| 33 |
module procedure atlas_mesh_cells__cptr |
| 34 |
module procedure atlas_mesh_cells__constructor |
| 35 |
end interface |
| 36 |
|
| 37 |
!======================================================== |
| 38 |
contains |
| 39 |
!======================================================== |
| 40 |
|
| 41 |
function atlas_mesh_cells__cptr(cptr) result(this) |
| 42 |
use atlas_hybridelements_c_binding |
| 43 |
type(atlas_mesh_cells) :: this |
| 44 |
type(c_ptr), intent(in) :: cptr |
| 45 |
call this%reset_c_ptr( cptr ) |
| 46 |
call this%return() |
| 47 |
end function |
| 48 |
|
| 49 |
function atlas_mesh_cells__constructor() result(this) |
| 50 |
use atlas_hybridelements_c_binding |
| 51 |
type(atlas_mesh_cells) :: this |
| 52 |
call this%reset_c_ptr( atlas__mesh__HybridElements__create() ) |
| 53 |
call this%return() |
| 54 |
end function |
| 55 |
|
| 56 |
!------------------------------------------------------------------------------- |
| 57 |
|
| 58 |
#if FCKIT_FINAL_NOT_INHERITING |
| 59 |
ATLAS_FINAL subroutine atlas_mesh_Cells__final_auto(this) |
| 60 |
type(atlas_mesh_Cells), intent(inout) :: this |
| 61 |
#if FCKIT_FINAL_DEBUGGING |
| 62 |
write(0,*) "atlas_mesh_Cells__final_auto" |
| 63 |
#endif |
| 64 |
#if FCKIT_FINAL_NOT_PROPAGATING |
| 65 |
call this%final() |
| 66 |
#endif |
| 67 |
FCKIT_SUPPRESS_UNUSED( this ) |
| 68 |
end subroutine |
| 69 |
#endif |
| 70 |
|
| 71 |
! ---------------------------------------------------------------------------------------- |
| 72 |
|
| 73 |
end module atlas_mesh_cells_module |
| 74 |
|