Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
mapping_fctry.f90
1
34!
36submodule(mapping) mapping_fctry
37 use utils, only: neko_type_error
44 use json_utils, only : json_get
45 use utils, only : concat_string_array, neko_error
46 implicit none
47
48 ! List of all possible types created by the factory routine
49 character(len=20) :: MAPPING_KNOWN_TYPES(6) = [character(len=20) :: &
50 "linear", &
51 "PDE_filter", &
52 "RAMP", &
53 "Borrvall_Petersson", &
54 "SIMP", &
55 "heaviside_mapping"]
56
57contains
58
62 module subroutine mapping_factory(object, json, coef)
63 class(mapping_t), allocatable, intent(inout) :: object
64 type(json_file), intent(inout) :: json
65 type(coef_t), intent(inout) :: coef
66 character(len=:), allocatable :: type_name
67
68 call json_get(json, "type", type_name)
69
70 select case (trim(type_name))
71 case ("linear")
72 allocate(linear_mapping_t::object)
73 case ("PDE_filter")
74 allocate(pde_filter_t::object)
75 case ("RAMP")
76 allocate(ramp_mapping_t::object)
77 case ("Borrvall_Petersson")
78 allocate(borrvall_petersson_mapping_t::object)
79 case ("SIMP")
80 allocate(simp_mapping_t::object)
81 case ("heaviside_mapping", "heaviside_projection")
82 allocate(heaviside_mapping_t::object)
83 case default
84 call neko_type_error("Mapping function", type_name, mapping_known_types)
85 end select
86
87 ! Initialize
88 call object%init(json, coef)
89
90 end subroutine mapping_factory
91
92end submodule mapping_fctry
A Borrvall & Petersson mapping of coefficients.
Smooth Heaviside mapping.
A linear mapping of coefficients.
Mappings to be applied to a scalar field.
Definition mapping.f90:36
A PDE based filter.
A RAMP mapping of coefficients.
A SIMP mapping of coefficients.
A Borrvall & Petersson mapping of coefficients This is the material interpolation described by Borrva...
A linear mapping of coefficients $f(x) = f_{min} + (f_{max} - f_{min}) x$.
A PDE based filter mapping , see Lazarov & O. Sigmund 2010, by solving an equation of the form .
A RAMP mapping of coefficients This is the standard RAMP described in https://doi....
A SIMP mapping of coefficients.