Neko 1.99.6
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
lpt_simcomp.f90
Go to the documentation of this file.
1! Copyright (c) 2026, The Neko Authors
2! All rights reserved.
3!
4! Redistribution and use in source and binary forms, with or without
5! modification, are permitted provided that the following conditions
6! are met:
7!
8! * Redistributions of source code must retain the above copyright
9! notice, this list of conditions and the following disclaimer.
10!
11! * Redistributions in binary form must reproduce the above
12! copyright notice, this list of conditions and the following
13! disclaimer in the documentation and/or other materials provided
14! with the distribution.
15!
16! * Neither the name of the authors nor the names of its
17! contributors may be used to endorse or promote products derived
18! from this software without specific prior written permission.
19!
20! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24! COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31! POSSIBILITY OF SUCH DAMAGE.
32!
35 use json_module, only : json_file
37 use case, only : case_t
38 use time_state, only : time_state_t
39 use lpt, only : lpt_t
40 implicit none
41 private
42
44 type, public, extends(simulation_component_t) :: lpt_simcomp_t
46 type(lpt_t) :: lpt
47 contains
49 procedure, pass(this) :: init => lpt_simcomp_init_from_json
51 procedure, pass(this) :: free => lpt_simcomp_free
53 procedure, pass(this) :: preprocess_ => lpt_simcomp_preprocess
55 procedure, pass(this) :: compute_ => lpt_simcomp_compute
56 end type lpt_simcomp_t
57
58contains
59
61 subroutine lpt_simcomp_init_from_json(this, json, case)
62 class(lpt_simcomp_t), intent(inout), target :: this
63 type(json_file), intent(inout) :: json
64 class(case_t), intent(inout), target :: case
65
66 call this%free()
67 call this%init_base(json, case)
68 this%preprocess_controller = this%compute_controller
69 call this%lpt%init(json, case)
70 this%lpt%output_controller = this%output_controller
71 this%name = this%lpt%name
72 end subroutine lpt_simcomp_init_from_json
73
75 subroutine lpt_simcomp_free(this)
76 class(lpt_simcomp_t), intent(inout) :: this
77
78 call this%free_base()
79 call this%lpt%free()
80 end subroutine lpt_simcomp_free
81
83 subroutine lpt_simcomp_preprocess(this, time)
84 class(lpt_simcomp_t), intent(inout) :: this
85 type(time_state_t), intent(in) :: time
86
87 call this%lpt%preprocess(time)
88 end subroutine lpt_simcomp_preprocess
89
91 subroutine lpt_simcomp_compute(this, time)
92 class(lpt_simcomp_t), intent(inout) :: this
93 type(time_state_t), intent(in) :: time
94
95 call this%lpt%compute(time)
96 end subroutine lpt_simcomp_compute
97
98end module lpt_simcomp
Defines a simulation case.
Definition case.f90:34
Simulation-component handler for Lagrangian particle tracking.
subroutine lpt_simcomp_free(this)
Free the component.
subroutine lpt_simcomp_preprocess(this, time)
Update LPT before the fluid solve.
subroutine lpt_simcomp_init_from_json(this, json, case)
Construct from JSON.
subroutine lpt_simcomp_compute(this, time)
Update LPT after the fluid solve.
Implements lpt_t. (Lagrangian Particle Tracking)
Definition lpt.f90:34
Simulation components are objects that encapsulate functionality that can be fit to a particular comp...
subroutine preprocess_(this, time)
Dummy preprocessing function.
subroutine compute_(this, time)
Dummy compute function.
Module with things related to the simulation time.
Passive Lagrangian particle tracking.
Definition lpt.f90:73
A simulation component that drives passive Lagrangian particle tracking.
Base abstract class for simulation components.
A struct that contains all info about the time, expand as needed.