amanzi / ats

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

hard-coded regions in mpc_coupled_transport are wrong #113

Open ecoon opened 2 years ago

ecoon commented 2 years ago

mpc_coupled_transport hard-codes the "surface" region as the coupling region for surface flow. Typically "surface" is a 3D face region in the subsurface mesh, and is not valid in the 2D surface mesh. Changes to Amanzi seem to have exposed this error in both ATS code and tests.

Instead, "surface domain" is typically used to indicate the entire 2D surface domain.

That said, this is not required, so this MPC should get this region name from the user (defaulting to "surface domain") rather than hard-coding it.

ecoon commented 2 years ago

I fixed the incorrect name, changing "surface" --> "surface domain".

This mpc still needs some cleanup:

mpc_coupled_transport.cc:33 -- what happens when we try to use transport on subdomains, and "domain" is not the subsurface? This cannot be hard-coded. We can expect the user to provide the PKs in the correct order, e.g. pk_order[0] is the surface or subsurface, but it isn't ok to select this based on a magic domain name.

line 113: hard-coded names must go

lines 162 & 173: ask the user for the names of these regions. They can default to "surface" and "surface domain", respectively, but they should be settable on the input spec.

ecoon commented 2 years ago

Trying to assign @zexuanxu not sure why he isn't showing up

zexuanxu commented 2 years ago

Just to confirm that I got this message and will look into it.

ecoon commented 1 year ago

Is this fixed now?