44 character(len=20) :: SOURCE_KNOWN_TYPES(3) = [character(len=20) :: &
55 module subroutine source_term_factory(object, json, fields, coef)
56 class(source_term_t),
allocatable,
intent(inout) :: object
57 type(json_file),
intent(inout) :: json
58 type(field_list_t),
intent(inout) :: fields
59 type(coef_t),
intent(inout) :: coef
60 character(len=:),
allocatable :: type_name
61 character(len=:),
allocatable :: type_string
63 call json_get(json,
"type", type_name)
65 if (trim(type_name) .eq.
"constant")
then
67 else if (trim(type_name) .eq.
"boussinesq")
then
69 else if (trim(type_name) .eq.
"brinkman")
then
73 new_line(
'A') //
"- ", .true.)
75 // trim(type_name) //
". Known types are: " &
80 call object%init(json, fields, coef)
82 end subroutine source_term_factory
84 end submodule source_term_fctry
Retrieves a parameter by name or throws an error.
Implements the boussinesq_source_term_t type.
Implements the brinkman_source_term_t type.
Implements the const_source_term_t type.
Utilities for retrieving parameters from the case files.
Implements the source_term_t type and a wrapper source_term_wrapper_t.
character(:) function, allocatable, public concat_string_array(array, sep, prepend)
Concatenate an array of strings into one string with array items separated by spaces.
Bouyancy source term accroding to the Boussinesq approximation.
A Brinkman source term. The region and strength are controlled by assigning regions types and brinkma...
A constant source term. The strength is specified with the values keyword, which should be an array,...