Hi everyone.
I was wondering if you guys can point me in the right direction here. I have quite a few functions with a bunch of inputs and outputs. I just wanted to make one that would help me organize them. The inner functions do not communicate properly with each other. I keep getting that the outputs of “fix_SWF_input” cannot be read by the following functions.
All the functions are inside the same file…
Any ideas?
function SW_Disp(Model,FEM_MESH,T0,Tstep,TF,Nmodes,Earth,Elastic,Anisotropy)
println("Forfward modelling ",Nmodes," Surface Wave Modes")
# Prepare Inputs
fks,Mesh,vpv,vsv,vsv_v,vsv_h,rhov,qsv,qR,Nsolid,hsolid,Nfluid,hfluid,vpfluid,vpfv,rhofv = fix_SWF_input(TF,Tstep,T0,FEM_MESH,Model,Elastic,Anisotropy);
# Compute de Dispersion for R Wave
kkR, cR, UR, evR = Rayleigh_Forwardsp(Nsolid,vsv_v,vpv,rhov,fks,hsolid,Nmodes,Nfluid,vpfv,rhofv,hfluid,qsv,Earth,Elastic);
println("Running: R wave dispersion")
# Compute de Dispersion for L Wave
kkL, cL, UL, evL = Love_Forwardsp(Nsolid,vsv_h,rhov,fks,hsolid,Nmodes,qsv,Earth,Elastic);
println("Running: L wave dispersion")
# Organize the Outputs
T, SWV,EG_FUNC_R_Z, EG_FUNC_R_R, EG_FUNC_L = fix_SWF_output(cR, UR, evR, cL, UL, evL, fks);
println("Done!")
##
return T, SWV,EG_FUNC_R_Z, EG_FUNC_R_R, EG_FUNC_L
end