Octopus
basis_set_abst.F90
Go to the documentation of this file.
1!! Copyright (C) 2019 M. Lueders
2!!
3!! This program is free software; you can redistribute it and/or modify
4!! it under the terms of the GNU General Public License as published by
5!! the Free Software Foundation; either version 2, or (at your option)
6!! any later version.
7!!
8!! This program is distributed in the hope that it will be useful,
9!! but WITHOUT ANY WARRANTY; without even the implied warranty of
10!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11!! GNU General Public License for more details.
12!!
13!! You should have received a copy of the GNU General Public License
14!! along with this program; if not, write to the Free Software
15!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16!! 02110-1301, USA.
17!!
18
19#include "global.h"
20
21
23 use debug_oct_m
24 use global_oct_m
27
28 implicit none
29
30 private
31 public :: basis_set_abst_t
32
38 type, abstract :: basis_set_abst_t
39 private
40 logical :: time_dependent
41 contains
42 procedure(init), deferred :: init
43 procedure(end), deferred :: end
44 procedure(write_info), deferred :: write_info
45 procedure, non_overridable :: is_time_dependent
46 procedure, non_overridable :: set_time_dependent
47 end type basis_set_abst_t
48
49 abstract interface
50 subroutine init(this)
51 import basis_set_abst_t
52 class(basis_set_abst_t), intent(inout) :: this
53 end subroutine init
54
55 subroutine end(this)
56 import basis_set_abst_t
57 class(basis_set_abst_t), intent(inout) :: this
58 end subroutine end
59
60 subroutine write_info(this, iunit, namespace)
61 import basis_set_abst_t
62 import namespace_t
63 class(basis_set_abst_t), intent(in) :: this
64 integer, optional, intent(in) :: iunit
65 type(namespace_t), optional, intent(in) :: namespace
66 end subroutine write_info
67 end interface
68
69contains
70
71 function is_time_dependent(this) result(td_flag)
72 class(basis_set_abst_t), intent(in) :: this
73 logical :: td_flag
74
75 push_sub(is_time_dependent)
76
77 td_flag = this%time_dependent
78
79 pop_sub(is_time_dependent)
80 end function is_time_dependent
81
82 subroutine set_time_dependent(this, td_flag)
83 class(basis_set_abst_t), intent(inout) :: this
84 logical, intent(in) :: td_flag
85
86 push_sub(set_time_dependent)
87
88 this%time_dependent = td_flag
89
90 pop_sub(set_time_dependent)
91 end subroutine set_time_dependent
92
93end module basis_set_abst_oct_m
subroutine set_time_dependent(this, td_flag)
logical function is_time_dependent(this)
abstract class for basis sets