You can use Get/@ FileNames["save*"].


There are several issues. First of all Context[] is the same here and can be replaced with $Context to make the example clearer. Now: DumpSave is HoldRest so in case of symbol = 2 it can save that definition instead of seeing 2. DumpSave["file", symbol] will save defnitions of symbol. So will DumpSave["file", $Context]. It will save information that $...


The function that does the actual calculation: fcalc[n_] := n^2 make file names: SetDirectory[NotebookDirectory[]]; makeFileName[n_] := "cachefile_" <> ToString[n] <> ".wl" The function that you call from the rest of the code: Clear[f]; f[n_] := f[n] = Module[{name, F}, (* is there a cached version? *) name = makeFileName[n]; If[...


Get /@ StringTemplate["save``"] /@ Range[1, 5]


Notice that DumpSave has attribute HoldRest which prevents evaluation of all but its first argument. The documentation of Evaluate states: You can use Evaluate to override HoldFirst etc. attributes of built-in functions. Evaluate only overrides HoldFirst etc. attributes when it appears directly as the head of the function argument that would ...


I suspect that Files written by DumpSave cannot be exchanged between operating systems that differ in $SystemWordLength. which is quoted from the documentation article on DumpSace, is relevant to your problem. Evaluated $SystemWordLength on both computers. Are they different?


guidance to your comment: define some user functions sin,cos data = Table[{x, Sin[x], Cos[x]}, {x, Subdivide[0, 2 Pi, 50]}]; sin = Interpolation[data[[All, {1, 2}]]]; cos = Interpolation[data[[All, {1, 3}]]]; save the functions DumpSave["sincos.mx", {sin, cos}] Clear[sin,cos] (* new session*) load function Get["sincos.mx"] now the ...


The step data is stored in the interpolating function: sol = NDSolveValue[{D[u[t, x], t] == 0.1 D[u[t, x], x, x] + u[t, x] D[u[t, x], x], u[0, x] == Cos[2 Pi x], u[t, 0] == u[t, 1]}, u, {t, 0, 1}, {x, 0, 1}, Method -> "StiffnessSwitching"]; sol["Coordinates"][[1]] {0.`, 0.06800128840268457`, 0.09489195680748204`, \ 0.13502467607112256`, 0....

Only top voted, non community-wiki answers of a minimum length are eligible