Octopus
density_criterion.F90
Go to the documentation of this file.
1!! Copyright (C) 2020 N. Tancogne-Dejean
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
23 use debug_oct_m
24 use global_oct_m
27
28 implicit none
29
30 private
31 public :: &
33
35 private
36 contains
38 end type density_criterion_t
39
40 interface density_criterion_t
41 procedure density_criterion_constructor
42 end interface density_criterion_t
43
44
45contains
46
47 ! ---------------------------------------------------------
48 function density_criterion_constructor(tol_abs, tol_rel) result(crit)
49 real(real64), intent(in) :: tol_abs
50 real(real64), intent(in) :: tol_rel
51 class(density_criterion_t), pointer :: crit
52
54
55 safe_allocate(crit)
56
57 crit%tol_abs = tol_abs
58 crit%tol_rel = tol_rel
59 crit%label = 'dens'
60
63
64 ! ---------------------------------------------------------
65 subroutine density_criterion_finalize(this)
66 type(density_criterion_t), intent(inout) :: this
67
69
71
73 end subroutine density_criterion_finalize
74
76
77!! Local Variables:
78!! mode: f90
79!! coding: utf-8
80!! End:
subroutine, public convergence_criterion_end(this)
class(density_criterion_t) function, pointer density_criterion_constructor(tol_abs, tol_rel)
subroutine density_criterion_finalize(this)