share_model Function

private function share_model(self, other) result(ok)

Use the model already read by other (no second copy in memory).

Type Bound

Model

Arguments

Type IntentOptional Attributes Name
class(Model), intent(inout) :: self
class(Model), intent(in) :: other

a model with its model read

Return Value logical


Source Code

    logical function share_model(self, other) result(ok)
        class(Model), intent(inout) :: self
        class(Model), intent(in) :: other                   !! a model with its model read
        ok = c_associated(other%model_)
        if (.not. ok) return
        self%model_ = other%model_
        self%file = other%file
        self%bound_center = other%bound_center
        self%bound_radius = other%bound_radius
    end function share_model