Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add profile warehouse getter #99

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/core.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ module tuvx_core
procedure :: get_grid_warehouse
! Returns a profile from the warehouse
procedure :: get_profile
! Returns the profile warehouse
procedure :: get_profile_warehouse
! Returns an updater for use TUV-x data
procedure, private :: get_grid_updater, get_profile_updater, &
get_radiator_updater
Expand Down Expand Up @@ -344,6 +346,23 @@ function get_profile( this, profile_name, units ) result( profile )

end function get_profile

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

function get_profile_warehouse( this ) result( profile_warehouse )
! Returns a copy of a profile from the warehouse

use musica_assert, only : assert_msg
use tuvx_profile, only : profile_t

class(core_t), intent(in) :: this
class(profile_warehouse_t), pointer :: profile_warehouse

call assert_msg( 423051914, associated( this%profile_warehouse_ ), &
"Profiles not available" )
profile_warehouse => this%profile_warehouse_

end function get_profile_warehouse

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

function get_grid_updater( this, grid, found ) result( updater )
Expand Down
Loading