10#include "./base/base_uses.f90"
29 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_fb_trial_fns_types'
42 TYPE fb_trial_fns_data
44 INTEGER,
DIMENSION(:),
POINTER :: nfunctions
45 INTEGER,
DIMENSION(:, :),
POINTER :: functions
46 END TYPE fb_trial_fns_data
55 TYPE(fb_trial_fns_data),
POINTER,
PRIVATE :: obj
71 cpassert(
ASSOCIATED(trial_fns%obj))
72 cpassert(trial_fns%obj%ref_count > 0)
73 trial_fns%obj%ref_count = trial_fns%obj%ref_count + 1
85 IF (
ASSOCIATED(trial_fns%obj))
THEN
86 cpassert(trial_fns%obj%ref_count > 0)
87 trial_fns%obj%ref_count = trial_fns%obj%ref_count - 1
88 IF (trial_fns%obj%ref_count == 0)
THEN
89 trial_fns%obj%ref_count = 1
90 IF (
ASSOCIATED(trial_fns%obj%nfunctions))
THEN
91 DEALLOCATE (trial_fns%obj%nfunctions)
93 IF (
ASSOCIATED(trial_fns%obj%functions))
THEN
94 DEALLOCATE (trial_fns%obj%functions)
96 trial_fns%obj%ref_count = 0
97 DEALLOCATE (trial_fns%obj)
100 NULLIFY (trial_fns%obj)
112 NULLIFY (trial_fns%obj)
139 res =
ASSOCIATED(trial_fns%obj)
150 cpassert(.NOT.
ASSOCIATED(trial_fns%obj))
151 ALLOCATE (trial_fns%obj)
152 NULLIFY (trial_fns%obj%nfunctions)
153 NULLIFY (trial_fns%obj%functions)
154 trial_fns%obj%ref_count = 1
162 SUBROUTINE fb_trial_fns_init(trial_fns)
165 cpassert(
ASSOCIATED(trial_fns%obj))
167 IF (
ASSOCIATED(trial_fns%obj%nfunctions))
THEN
168 DEALLOCATE (trial_fns%obj%nfunctions)
170 IF (
ASSOCIATED(trial_fns%obj%functions))
THEN
171 DEALLOCATE (trial_fns%obj%functions)
173 END SUBROUTINE fb_trial_fns_init
186 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: nfunctions
187 INTEGER,
DIMENSION(:, :),
OPTIONAL,
POINTER :: functions
189 cpassert(
ASSOCIATED(trial_fns%obj))
190 IF (
PRESENT(nfunctions)) nfunctions => trial_fns%obj%nfunctions
191 IF (
PRESENT(functions)) functions => trial_fns%obj%functions
205 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: nfunctions
206 INTEGER,
DIMENSION(:, :),
OPTIONAL,
POINTER :: functions
208 cpassert(
ASSOCIATED(trial_fns%obj))
209 IF (
PRESENT(nfunctions))
THEN
210 IF (
ASSOCIATED(trial_fns%obj%nfunctions))
THEN
211 DEALLOCATE (trial_fns%obj%nfunctions)
213 trial_fns%obj%nfunctions => nfunctions
215 IF (
PRESENT(functions))
THEN
216 IF (
ASSOCIATED(trial_fns%obj%functions))
THEN
217 DEALLOCATE (trial_fns%obj%functions)
219 trial_fns%obj%functions => functions
subroutine, public fb_trial_fns_set(trial_fns, nfunctions, functions)
sets the attributes of a fb_trial_fns object
subroutine, public fb_trial_fns_nullify(trial_fns)
nullifies the content of given object
logical function, public fb_trial_fns_has_data(trial_fns)
check if the object has data associated to it
subroutine, public fb_trial_fns_associate(a, b)
associates the content of an object to that of another object of the same type
subroutine, public fb_trial_fns_get(trial_fns, nfunctions, functions)
get values of the attributes of a fb_trial_fns object
subroutine, public fb_trial_fns_retain(trial_fns)
retains given object
subroutine, public fb_trial_fns_release(trial_fns)
releases given object
subroutine, public fb_trial_fns_create(trial_fns)
creates an fb_trial_fns object and initialises it
the object container which allows for the creation of an array of pointers to fb_trial_fns objects