amanzi / ats

Advanced Terrestrial Simulator (ATS) development
Other
47 stars 35 forks source link

When run the demo, why the error indicating missing input parameter happens. #279

Open TJUCoastlabRGQ opened 1 month ago

TJUCoastlabRGQ commented 1 month ago

I'm running the demo included in "ats/tools/meshing/meshing_ats/four-polygon-test" with the recommended command "python ../meshing_ats.py -n 10 -d 1 ./four_polygon.vtk". When runing the following command "m3 = Mesh3D.extruded_Mesh2D(m2, [options.depth,], [options.num_cells,], [10000,])", I got the following error "TypeError: Mesh3D.extruded_Mesh2D() missing 1 required positional argument: 'mat_ids'". What's the problem, thanks in advance!

ecoon commented 1 month ago

Oh, I'm not sure that utility is tested in our CI, so it's very possible it is out of date. I'll take a look. mat_ids is [10000,] in this case, so clearly we're missing another argument to that function somewhere.

ecoon commented 1 month ago

Ok, so vtk_io.py is python2, and we don't really support python2 for anything anymore. I'm either going to remove this or refactor it, but either way it won't happen today.

Can you try changing the second-to-last line in your meshing_ats.py file to:

m3 = Mesh3D.extruded_Mesh2D(m2, ['constant',], [options.depth,], [options.num_cells,], [10000,])

I think it will then work for you.

But what exactly are you trying to do? There may be better ways to do what you want.