double precision function gnmr1(y,ymin,ymax) implicit none double precision y,ymin,ymax double precision wykl /4.0d0/ if (y.lt.ymin) then gnmr1=(ymin-y)**wykl/wykl else if (y.gt.ymax) then gnmr1=(y-ymax)**wykl/wykl else gnmr1=0.0d0 endif return end c------------------------------------------------------------------------------ double precision function gnmr1prim(y,ymin,ymax) implicit none double precision y,ymin,ymax double precision wykl /4.0d0/ if (y.lt.ymin) then gnmr1prim=-(ymin-y)**(wykl-1) else if (y.gt.ymax) then gnmr1prim=(y-ymax)**(wykl-1) else gnmr1prim=0.0d0 endif return end c------------------------------------------------------------------------------ double precision function harmonic(y,ymax) implicit none double precision y,ymax double precision wykl /2.0d0/ harmonic=(y-ymax)**wykl return end c------------------------------------------------------------------------------- double precision function harmonicprim(y,ymax) double precision y,ymin,ymax double precision wykl /2.0d0/ harmonicprim=(y-ymax)*wykl return end c--------------------------------------------------------------------------------- double precision function rlornmr1(y,ymin,ymax,sigma) implicit none double precision y,ymin,ymax,sigma double precision wykl /4.0d0/ if (y.lt.ymin) then rlornmr1=(ymin-y)**wykl/((ymin-y)**wykl+sigma**wykl) else if (y.gt.ymax) then rlornmr1=(y-ymax)**wykl/((y-ymax)**wykl+sigma**wykl) else rlornmr1=0.0d0 endif return end c------------------------------------------------------------------------------ double precision function rlornmr1prim(y,ymin,ymax,sigma) implicit none double precision y,ymin,ymax,sigma double precision wykl /4.0d0/ if (y.lt.ymin) then rlornmr1prim=-(ymin-y)**(wykl-1)*sigma**wykl*wykl/ & ((ymin-y)**wykl+sigma**wykl)**2 else if (y.gt.ymax) then rlornmr1prim=(y-ymax)**(wykl-1)*sigma**wykl*wykl/ & ((y-ymax)**wykl+sigma**wykl)**2 else rlornmr1prim=0.0d0 endif return end