Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
function imposed_compression_energy(me,rostar,g,dPres,dp0)type(circulator_t),intent(inout)::mereal(dp),intent(in)::rostar,g,dPres,dp0real(dp)::imposed_compression_energy,eps,Ro_a,Ro_bif(me%SubType=="pump")thenRo_a=me%br(1)%p%Prim(Pri_ro)Ro_b=me%br(2)%p%Prim(Pri_ro)imposed_compression_energy=0.5_dp*(1.0_dp/Ro_a+1.0_dp/Ro_b)*dPreselse if(me%SubType=="compressor")theneps=1.0e-3_dpif(dPres<=0.0_dp)thenimposed_compression_energy=dp0/(rostar*g)else if(dPres>=dp0)thenimposed_compression_energy=eps*dp0/(rostar*g)!0.0_dpelseimposed_compression_energy=dp0*(1.0_dp-(dPres/dp0)**2)/(rostar*g)endif endifend function imposed_compression_energy