I don't have the output logs anymore, but when defining a solid boundary, the printed time, dt, mass, and energy values were all NaN.
I wonder if the culprit might be here:
|
vars["fill_solid_hydro_w"] = |
|
torch::where(solid.unsqueeze(0).expand_as(hydro_w), hydro_w, 0.); |
|
vars["fill_solid_hydro_w"].narrow(0, IVX, 3).zero_(); |
|
pib->mark_prim_solid_(hydro_w, solid); |
|
|
|
vars["fill_solid_hydro_u"] = |
|
torch::where(solid.unsqueeze(0).expand_as(vars.at("hydro_u")), |
|
vars.at("hydro_u"), 0.); |
|
vars["fill_solid_hydro_u"].narrow(0, IVX, 3).zero_(); |
The solid tensor is 1 where there is solid and 0 where there is air. Thus, I think the torch::where calls fill the solid region with hydro variables and the air with 0, which is the opposite of the intended behavior.
Also, are lines 387 and 393 needed? If you initialize a velocity field, these lines would override that with 0.
I don't have the output logs anymore, but when defining a solid boundary, the printed time, dt, mass, and energy values were all NaN.
I wonder if the culprit might be here:
snapy/src/mesh/meshblock.cpp
Lines 385 to 393 in bed60c2
The solid tensor is 1 where there is solid and 0 where there is air. Thus, I think the torch::where calls fill the solid region with hydro variables and the air with 0, which is the opposite of the intended behavior.
Also, are lines 387 and 393 needed? If you initialize a velocity field, these lines would override that with 0.