Method

NumCosmoHIPertTwoFluidsStateInterpdup

Declaration [src]

NcHIPertTwoFluidsStateInterp*
nc_hipert_two_fluids_state_interp_dup (
  NcHIPertTwoFluidsStateInterp* sinterp
)

Description [src]

Creates a shallow copy of sinterp. The internal splines for both modes are not duplicated but shared via reference counting (i.e., the references are increased using ncm_spline_ref()).

This function is useful when multiple components need read-only access to the same interpolation structure without duplicating memory-heavy spline data.

Return value

Type: NcHIPertTwoFluidsStateInterp

A newly allocated NcHIPertTwoFluidsStateInterp with shared spline references.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.