Octopus
algorithm_factory.F90
Go to the documentation of this file.
1!! Copyright (C) 2023 M. Oliveira
2!!
3!! This Source Code Form is subject to the terms of the Mozilla Public
4!! License, v. 2.0. If a copy of the MPL was not distributed with this
5!! file, You can obtain one at https://mozilla.org/MPL/2.0/.
6!!
7
8#include "global.h"
9
14 implicit none
15
16 private
17 public :: &
19
24 !
25 type, abstract :: algorithm_factory_t
26 contains
27 procedure(algorithm_factory_create), deferred :: create
28 procedure(algorithm_factory_create_static), deferred :: create_static
29 end type algorithm_factory_t
30
31 abstract interface
32 function algorithm_factory_create(this, system) result(algorithm)
33 import :: algorithm_factory_t
35 import algorithm_t
36 class(algorithm_factory_t), intent(in) :: this
37 class(interaction_partner_t), intent(in), target :: system
38 class(algorithm_t), pointer :: algorithm
39 end function algorithm_factory_create
40
41 function algorithm_factory_create_static(this, system) result(algorithm)
42 import :: algorithm_factory_t
44 import algorithm_t
45 class(algorithm_factory_t), intent(in) :: this
46 class(interaction_partner_t), intent(in), target :: system
47 class(algorithm_t), pointer :: algorithm
49 end interface
50
52
53!! Local Variables:
54!! mode: f90
55!! coding: utf-8
56!! End:
This module defines the abstract interfact for algorithm factories.
This module implements the basic elements defining algorithms.
Definition: algorithm.F90:141
This module defines classes and functions for interaction partners.
Abstract class for the algorithm factories.
An algorithm is a list of algorithmic operations executed sequentially.
Definition: algorithm.F90:200
abstract class for general interaction partners