-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename residual_function_n
?
#224
Comments
Another reason for this request: as it is, the residual functions remain defined in the REPL but are not directly visible from the workspace. Running the computations again for a system of smaller order and trying to compute the total loss can then lead (and has lead, in my case) to some very hard to catch bugs. Though this workflow might not be very common (running tests for multiple systems of different order), having |
No, it would be the first residual function. Actually, I have mentioned in the docs on how to inspect the generated expression of the residual functions. Once you have those native Julia expressions, you could call julia> residual_function_exprs = Sophon.symbolic_discretize(poisson, pinn, sampler, strategy);
julia> residual_functions = eval.(ans)
3-element Vector{Function}:
#9 (generic function with 1 method)
#11 (generic function with 1 method)
#13 (generic function with 1 method) |
As it is, it's hard to grasp from the code alone what each
residual_function
does. The FAQ seems to indicate that n = 1 returns the total loss, but that seems at odds with the actual implementation, where there seem to be roughly as many functions as there are equations for the losses. Would it be too breaking to instead have this as arrays of functionsresidual_function_eq[i]
andresidual_function_bc[i]
?Even just a short description somewhere in the docs would be of great help to those of us using the package mostly for the symbolic machinery and the loss functions.
The text was updated successfully, but these errors were encountered: