y_weighted_mean Function

public function y_weighted_mean(backend, mesh, f, weights) result(mean)

Sum over j of weights(j) times the x-z mean of plane j, reduced over all ranks. The size and indexing of weights follow the local y planes of the rank, so each rank passes the weights of its own planes.

f must be a DIR_X field with data_loc set. weights has one entry per local y plane. The weights must already be normalised to sum to 1 over the global y extent for the result to be a mean.

Arguments

Type IntentOptional Attributes Name
class(base_backend_t), intent(inout) :: backend
type(mesh_t), intent(in) :: mesh
class(field_t), intent(in) :: f
real(kind=dp), intent(in) :: weights(:)

Return Value real(kind=dp)


Calls

proc~~y_weighted_mean~~CallsGraph proc~y_weighted_mean m_base_backend::y_weighted_mean mpi_allreduce mpi_allreduce proc~y_weighted_mean->mpi_allreduce proc~abort_run m_logger::abort_run proc~y_weighted_mean->proc~abort_run proc~field_plane_sums_base m_base_backend::base_backend_t%field_plane_sums_base proc~y_weighted_mean->proc~field_plane_sums_base proc~get_dims m_mesh::mesh_t%get_dims proc~y_weighted_mean->proc~get_dims proc~get_global_dims m_mesh::mesh_t%get_global_dims proc~y_weighted_mean->proc~get_global_dims interface~str m_logger::str proc~abort_run->interface~str mpi_abort mpi_abort proc~abort_run->mpi_abort mpi_barrier mpi_barrier proc~abort_run->mpi_barrier mpi_comm_rank mpi_comm_rank proc~abort_run->mpi_comm_rank mpi_comm_size mpi_comm_size proc~abort_run->mpi_comm_size mpi_finalized mpi_finalized proc~abort_run->mpi_finalized mpi_initialized mpi_initialized proc~abort_run->mpi_initialized proc~field_plane_sums_base->proc~abort_run proc~get_dims_dataloc m_mesh::get_dims_dataloc proc~get_dims->proc~get_dims_dataloc proc~get_global_dims->proc~get_dims_dataloc

Called by

proc~~y_weighted_mean~~CalledByGraph proc~y_weighted_mean m_base_backend::y_weighted_mean proc~channel_bulk_velocity m_case_channel::channel_bulk_velocity proc~channel_bulk_velocity->proc~y_weighted_mean proc~define_bc_abl m_case_abl::case_abl_t%define_BC_abl proc~define_bc_abl->proc~y_weighted_mean proc~define_bc_channel m_case_channel::case_channel_t%define_BC_channel proc~define_bc_channel->proc~channel_bulk_velocity