Use the model already read by other (no second copy in memory).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | self | |||
| class(Model), | intent(in) | :: | other |
a model with its model read |
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