## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• 08:28
JuliaTagBot commented #163
• 08:24
AstroJacobLi starred SciML/NeuralPDE.jl
• 08:08
Nikronic starred SciML/StochasticDiffEq.jl
• 08:07
• 04:46
YingboMa commented #80
• 04:33
JuliaTagBot commented #163
• 04:03
ChrisRackauckas synchronize #80
• 04:03

ChrisRackauckas on individual

tabbit (compare)

• 03:25
ChrisRackauckas review_requested #80
• 03:25
ChrisRackauckas opened #80
• 03:25

ChrisRackauckas on individual

Allow individualized work-preci… (compare)

• 03:14

kanav99 on gh-pages

build based on 4cdcd9d (compare)

• 03:08

ChrisRackauckas on master

Typo with Modelingtoolkitize Merge pull request #753 from Gl… (compare)

• 03:08
ChrisRackauckas closed #753
• 03:07
GlenHertz opened #753
• 03:04
ChrisRackauckas opened #293
• 00:37
JuliaTagBot commented #163
• 00:37
JuliaTagBot commented #163
• 00:22
JuliaRegistrator commented #150
• 00:22
ChrisRackauckas commented #150
BridgingBot
@GitterIRCbot
[slack] <briochemc> Oh there's a numargs !
BridgingBot
@GitterIRCbot
[slack] <briochemc> Oh so DiffEqBase uses length(m.sig.parameters) instead of m.nargs . I guess I don't understand why but that's ok 🙂 I can just use DiffEq's isinplace I think
BridgingBot
@GitterIRCbot
[slack] <OJASV Kamal> When I multiply f with d^2(f)/dx^2 in the first equation it throws the error that an ode system can have only one independent variable. But f is a dependent variable
BridgingBot
@GitterIRCbot
[slack] <dalarev> Hey everybody, before getting too deep into it, IterativeSolvers: gmres doesn't support overdetermined systems (i.e., non-square A?)
[slack] <chrisrackauckas> it should?
BridgingBot
@GitterIRCbot
BridgingBot
@GitterIRCbot
[slack] <mschauer> Try with explicit x0?
BridgingBot
@GitterIRCbot
BridgingBot
@GitterIRCbot
[slack] <mschauer> I thought gmres!(x, A, y), but that also doesnt work
[slack] <mschauer> I looked at idrs and it would require some thinking to tell if this is legal for overdetermined systems for example
[slack] <dalarev> A\b works, but I am benchmarking different methods.
[slack] <mschauer> A\b does something perhaps overly smart and switches the solver depending on the dimensions i believe
BridgingBot
@GitterIRCbot
[slack] <dalarev> https://discourse.julialang.org/t/efficient-way-of-doing-linear-regression/31232/33 post tells me it's probably the most accurate, but my A matrix comprises derivative operators, so I'm also looking at DiffEqOperators.
BridgingBot
@GitterIRCbot
[slack] <mschauer> Solve the normal equations:
gmres(A'*A, A'*y)
[slack] <mschauer> and then perhaps with a solver which uses the Hermitian structure… ah, you just said so much
BridgingBot
@GitterIRCbot
[slack] <mschauer> use conjugate gradient descent on the normal equations, tells me a helpful voice
BridgingBot
@GitterIRCbot
[slack] <Jose Daniel Lara> @chrisrackauckas is there a more updated version of Benchmarks vs Matlab solvers from DiffEq?
BridgingBot
@GitterIRCbot
BridgingBot
@GitterIRCbot
[slack] <dalarev> From the discourse post I linked to, it sounds like doing A'A could square my errors, and I think for my application accuracy is most important.
[slack] <mschauer> Well, can you do QR? Then do it. I assumed that you use an iterative solver because you must
BridgingBot
@GitterIRCbot

[slack] <yingbo_ma> Seems like we are also getting

Builds have been temporarily disabled for public repositories due to a negative credit balance. Please go to the Plan page to replenish your credit balance or alter your Consume paid credits for OSS setting.

BridgingBot
@GitterIRCbot
[slack] <David Millard> Hi, I have a second order ODE in a classical mechanics context. Is SecondOrderODEProblem still supported? I had a hard time understand what inputs the dynamics function should take. Unfortunately reading https://github.com/SciML/DiffEqBase.jl/blob/864c379ead274243acdd965bd8942d1da1deb3bb/test/problem_creation_tests.jl#L51 didn't shed a lot of light for me. I'm not sure what the relationship between u and v are, and the docstring args from the SecondOrderODEProblem constructor seems flipped compared to its implementation. Thanks for any information!
[slack] <chrisrackauckas> @David Millard https://tutorials.sciml.ai/html/models/01-classical_physics.html should help
BridgingBot
@GitterIRCbot
[slack] <David Millard> That's exactly what I was missing. Thank you!
BridgingBot
@GitterIRCbot
[slack] <jonas.isensee> Hi,
what's the best way to implement a system where I have states of the form u0 = (rand(3), rand(3,3))
I know that I can just work with u0 = rand(3,4) but that makes the eoms rather ugly. The above doesn't work though
[slack] <chrisrackauckas> RecursiveArrayTools.ArrayPartition
BridgingBot
@GitterIRCbot

[slack] <jonas.isensee> Thanks you, that seems to work.
Not sure that is much better for my particular usecase though.
I want to work with the matrix directly and
u.x[2] is probably not much better than@view u[:,2:4]
at the cost of introducing another abstraction layer.

(relevant since this is for teaching...)

BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> views are probably a nice canonical way to do it if it's simple enough
[slack] <chrisrackauckas> LabelledArrays.jl is another.
BridgingBot
@GitterIRCbot

[slack] <jonas.isensee> Ha, I didn't know that package! This looks really cool.

For the sake of the students I will probably still stick to regular views
but I'll see if I can incorporate that into my normal work 🙂

[slack] <jonas.isensee> Thanks for your help
[slack] <chrisrackauckas> no problem
[slack] <chrisrackauckas> ComponentArrays.jl is another cool package along those lines.
BridgingBot
@GitterIRCbot
[slack] <jonas.isensee> Incredible. I'm having a "Why did I not know this" moment
BridgingBot
@GitterIRCbot

[slack] <David Millard> Hi, I'm sure I'm misusing VectorContinuousCallback, but I can't seem to figure out why. I effectively have a slightly fancier version of the bouncing ball example, where the bottom points of a mesh make inelastic contact with a floor plane at z = 0.

The multi-wall bouncing ball works fine for me. However, I can't seem to convince the affect! function to trigger in my program. Relevant bits:
z(u) = view(u, 3, :, 1)
dz(u) = view(u, 3, :, 2)
floor_cond(out, u, t, int) = out .= ifelse.(z(u) .> 0, z(u), 0)

function floor_affect!(int, idx)
z(int.u)[idx] = 0
dz(int.u)[idx] = 0
end

floor_cb = VectorContinuousCallback(floor_cond, floor_affect!, nothing, size(state, 2); rootfind=false)

prob = ODEProblem{true}(elastic_dynamics!, state, (0, 1 / 60), params)
sol = solve(prob, callback=floor_cb; dt=1e-4) Settingzanddzto 0 yields the behavior I want in my own dinky homemade Euler solver, where I just check the z-coord and apply the affect with anif block.

Secondary meta question: is this the right venue for questions like this?

Marc Berliner
@MarcBerliner
In ModelingToolkit.jl, is there anything similar to the subs command from MATLAB's symbolic toolbox?
BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> what does that do?
Marc Berliner
@MarcBerliner
It replaces a symbolic variable with a number or array. E.g. subs(x+y, x, 1) = 1+y
BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> substitute?
Marc Berliner
@MarcBerliner
Thanks! I missed that in the doc
BridgingBot
@GitterIRCbot
[slack] <chrisrackauckas> no problem
dimitri-voytan
@dimitri-voytan

Hi, I'm new to Julia and the Neural PDE library, and I was wondering if there if is a way to implement the following idea in the Physics Informed Neural Network.

Take for example the 1D Poisson eq. $u_{xx} = f$ with $u(0) = u(1) = 0$. This could be solved by taking the neural network output (call it $ũ$) and multiplying it by $x(x-1)$. Since this polynomial is zero on the boundary, the boundary conditions are automatically enforced, and the PDE is enforced with $u = ũ*x*(x-1)$.

I tried doing something like this by

@variables u(..)
@parameters x
@derivatives Uxx''~x
eq = Uxx(u(x)*x*(x-1.0) )~ 1

and then following (and modifying dimensions where appropriate) the rest of the tutorial at https://github.com/SciML/NeuralPDE.jl

When I do this, I get UndefVarError: *_d not defined. Everything runs as expected when I use
eq = Uxx(u(x) )~ 1, so maybe multiplication between parameters and variables is undefined? Is there a way I can implement this?

Any help would be appreciated.

Christopher Rackauckas
@ChrisRackauckas
@dimitri-voytan yeah... that's not in the automated form. But it's in the very old 1992 paper on solving PDEs with NNs, and I've thought about it
4:00
it's hard to automate that because it can be specific to the equation
Mihaly Koltai
Hi, can I do matrix multiplication within the ODE in diffeqr (so using the solver from R)? If i try to do it, eg. for the Lorentz equation:
'f_ode_julia_vect <- function(u,x,t) {du=x %% u + c(0,-u[1]u[3],u[1]u[2]); return(du) }
prob<-de_jul\$ODEProblem(f_ode_julia_vect, u0,tspan,K_lor); fastprob=diffeqr::jitoptimize_ode(de_jul,prob)'
where K_lor is a 3x3 matrix I keep getting the error 'Error in x %
% u : requires numeric/complex matrix/vector arguments'
Christopher Rackauckas
@ChrisRackauckas
@mbkoltai_twitter you can do it, but I guess not with the JIT. Can you open an issue on JIT compilation of matmuls?
Mihaly Koltai