Comments (6)
Yes, we plan to have a lazy Kron so that way you can build the block-banded matrix, but it will take some work and I wouldn't expect it too soon.
from diffeqoperators.jl.
Ah, got it: It's not Matrix(D1)
, it's now convert(Array,D1)
. Or sparse
to directly get a sparse matrix. Then the following works:
using LinearAlgebra, SparseArrays, DiffEqOperators
N = 10
h = 1/N
D1 = sparse(DerivativeOperator{Float64}(2,2,h,N,:Dirichlet0,:Dirichlet0))
Id = sparse(I,N,N)
A = kron(D1,Id) + kron(Id,D1)
(EDIT: Although this gives me a singular matrix, so I must have made a mistake with the boundary conditions. Got it. Might be useful to others so I'm adding a brief tutorial to the /docs
folder.)
from diffeqoperators.jl.
That is good to know (and no hurry)! In the meantime, is there some other way I can construct such a matrix (it doesn't have to be really efficient since I'm only doing it once as a setup)?
from diffeqoperators.jl.
AbstractMatrix(A)
, Matrix(A)
, etc. We need to update the docs as well. Give us a a month or so to put this into shape.
from diffeqoperators.jl.
That's fair; I was in fact worried that this was a bad time for a feature (or documentation) request. But just to make sure: This should be possible right now by manually forming the Kronecker product? Because neither Matrix(D1)
nor AbstractMatrix(D1)
(nor kron(D1,Id)
for a manually constructed identity matrix) works for me...
from diffeqoperators.jl.
I thought we made those for the structured full matrices already, but we may still need to upgrade from using full
(just got back from Juliacon so I need to check where we're at in more detail). Once the full/banded/etc matrix is made kron
should just be the normal kron. And I wonder if there's a special kron
for BlockBandedMatrices.
from diffeqoperators.jl.
Related Issues (20)
- Performance issues with nonlinear_diffusion! HOT 4
- Fix symbolic arrays test to allow MTK v5.21.0 HOT 7
- UndefVarError: dereference not defined when precompiling DiffEqOperators (Win10, julia 1.6.1-2) HOT 7
- Version Compatibility? HOT 1
- Error defining second-order differential HOT 8
- The latest versions of LoopVectorization (0.12.80-81) are not compatible and cause errors HOT 1
- Noob Help: Simple, Linear, Inhomogenous PDE HOT 3
- concretization of High Dimension PDE HOT 2
- LoopVectorization break HOT 5
- Unexpected concretization of Laplace operator HOT 3
- v4.35.0 failed to release HOT 2
- Feature request: Support Summation-By-Parts operators HOT 4
- Support Unitful HOT 6
- Incorrect boundary padded vector with composed PeriodicBC on 2d data HOT 6
- Implementing Drift-Diffusion model in higher dimensions HOT 3
- Uninitialized field `opnorm` in JacVecOperator HOT 4
- SplitODEProblem broken for MatrixFreeOperator HOT 3
- ERROR: LoadError: Some tests did not pass: 30 passed, 0 failed, 4 errored, 4 broken. HOT 18
- Warning related to "LoopVectorization.check_args"
- Lots of precompilation errors and noise HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffeqoperators.jl.