Python Google Colab中保存的文件位于何处?

Python Google Colab中保存的文件位于何处?,python,google-colaboratory,vtk,pde,fenics,Python,Google Colaboratory,Vtk,Pde,Fenics,我试图访问一个VTK文件,其中保存了热方程的解,但我不知道它在Colab中的保存位置 from fenics import * import time T = 2.0 # final time num_steps = 50 # number of time steps dt = T / num_steps # time step size # Create mesh and define function space nx = ny = 30 mesh = Rect

我试图访问一个VTK文件,其中保存了热方程的解,但我不知道它在Colab中的保存位置

from fenics import *
import time
T = 2.0            # final time
num_steps = 50     # number of time steps
dt = T / num_steps # time step size
# Create mesh and define function space
nx = ny = 30
mesh = RectangleMesh(Point(-2, -2), Point(2, 2), nx, ny)
V = FunctionSpace(mesh, 'P', 1)
# Define boundary condition
def boundary(x, on_boundary):
    return on_boundary
bc = DirichletBC(V, Constant(0), boundary)
# Define initial value
u_0 = Expression('exp(-a*pow(x[0], 2) - a*pow(x[1], 2))',
                 degree=2, a=5)
u_n = interpolate(u_0, V)
# Define variational problem
u = TrialFunction(V)
v = TestFunction(V)
f = Constant(0)
F = u*v*dx + dt*dot(grad(u), grad(v))*dx - (u_n + dt*f)*v*dx
a, L = lhs(F), rhs(F)
# Create VTK file for saving solution
vtkfile = File('heat_gaussian/solution.pvd')
# Time-stepping
u = Function(V)
t=0
for n in range(num_steps):
    # Update current time
    t += dt
    # Compute solution
    solve(a == L, u, bc)
    # Save to file and plot solution
    vtkfile << (u, t)
    plot(u)
    # Update previous solution
    u_n.assign(u)
# Hold plot
#interactive()


但仍然会出现错误。笔记本中创建的文件存储在哪里?

如果您安装了GDrive,则文件应存储在名为Colab笔记本的文件夹中

您还可以使用以下命令之一检查当前文件夹

%cd


在colab界面的左侧,有一个“文件”选项卡。您可以找到保存在那里的所有文件。

补充@jules cui answer,在Colab界面的左侧,您将看到几个图标。
单击文件夹图标,打开运行时中的所有文件。您可以单击右侧任何文件的扩展菜单,然后单击下载。

同时单击%cd和!pwd将/root作为输出。我已经找到了这些文件,但是我该如何下载它们呢?这正是我的眼睛无法捕捉到的:D谢谢!
from google.colab import files files.upload()
from google.colab import drive drive.mount('vtkfile')
%cd
!pwd