5 use neko,
only: neko_init, neko_finalize
6 use simcomp_executor,
only: simcomp_executor_t
7 use json_module,
only: json_file, json_value, json_core
8 use comm,
only: pe_rank
9 use utils,
only: neko_error, filename_suffix
10 use user_intf,
only: simulation_component_user_settings
11 use num_types,
only: rp
12 use logger,
only: neko_log
13 use neko,
only: neko_solve
15 use json_utils,
only: json_get_or_default
32 type(case_t),
intent(inout) :: neko_case
33 type(json_file) :: design_params
35 type(json_value),
pointer :: simcomp_object
36 type(json_file) :: comp_subdict
38 type(json_core) :: core
40 call neko_log%section(
'Initialize Topology Optimization')
46 call neko_log%section(
'Neko')
49 call neko_init(neko_case)
57 call neko_log%section(
'Topology Optimization Components')
61 call neko_case%params%get_core(core)
62 call neko_case%params%get(
'topology_optimization.components', &
63 simcomp_object, found)
64 comp_subdict = json_file(simcomp_object)
68 design_params = simulation_component_user_settings(
'design', comp_subdict)
75 type(case_t),
intent(inout) :: neko_case
77 integer :: iter, max_iter
80 logical :: converged = .false.
82 call json_get_or_default(neko_case%params, &
83 'case.topology_optimization.max_iter', &
92 call neko_solve(neko_case)
109 type(case_t),
intent(inout) :: neko_case
111 logical :: temperature_enabled
117 call json_get_or_default(neko_case%params,
'case.scalar.enabled', &
118 temperature_enabled, .false.)
120 if (temperature_enabled)
then
128 call neko_finalize(neko_case)
subroutine estimate_temperature(neko_case)
Contains extensions to the neko library required to run the topology optimization code.
subroutine, public setup_iteration(neko_case, iter)
Setup the iteration.
subroutine, public neko_top_init(neko_case)
Register user defined functions (see nekos user_intf.f90)
subroutine, public neko_top_solve(neko_case)
subroutine, public neko_top_finalize(neko_case)
type(simcomp_executor_t) topopt_components
Sensitivity module. This module contains the sensitivity computation of the topology optimization.
Module designed to setup the topology optimization user interface for Neko. This module should initia...
subroutine, public neko_user_init(neko_case)
Assign user conditions for the neko case.
The topology type, which is used to describe the designs in topology optimization.