Comments (5)
well there you go
julia> A = LinearOperator{Float64}(2,2,8);
julia> m = ones(8,8);
julia> res = A+m
LinearMaps.LinearCombination{Float64,Tuple{PDEOperators.LinearOperator{Float64,StaticArrays.SVector{3,Float64}},LinearMaps.WrappedMap{Float64,Array{Float64,2}}},Tuple{Float64,Float64}}((PDEOperators.LinearOperator{Float64,StaticArrays.SVector{3,Float64}}(2,2,8,3,[1.0,-2.0,1.0],3,4),LinearMaps.WrappedMap{Float64,Array{Float64,2}}([1.0 1.0 … 1.0 1.0; 1.0 1.0 … 1.0 1.0; … ; 1.0 1.0 … 1.0 1.0; 1.0 1.0 … 1.0 1.0],true,true,true,false)),(1.0,1.0))
julia> full(res)
8×8 Array{Float64,2}:
-1.0 2.0 1.0 1.0 1.0 1.0 1.0 1.0
2.0 -1.0 2.0 1.0 1.0 1.0 1.0 1.0
1.0 2.0 -1.0 2.0 1.0 1.0 1.0 1.0
1.0 1.0 2.0 -1.0 2.0 1.0 1.0 1.0
1.0 1.0 1.0 2.0 -1.0 2.0 1.0 1.0
1.0 1.0 1.0 1.0 2.0 -1.0 2.0 1.0
1.0 1.0 1.0 1.0 1.0 2.0 -1.0 2.0
1.0 1.0 1.0 1.0 1.0 1.0 2.0 -1.0
This "just works" property is too good.
from diffeqoperators.jl.
Indexing should also automatically give +
and -
. Though you may want specific fast overloads for standard +
and -
operations.
from diffeqoperators.jl.
Indexing should also automatically give + and -. Though you may want specific fast overloads for standard + and - operations.
Can you explain that comprehensively? Do you mean to add operators to form a sort of composed PDE operator as in LinearMaps?
from diffeqoperators.jl.
Lazy composed PDE operators is another thing that's needed, but that should be a separate issue.
Just simple +
and -
vs AbstractMatrices would be nice, because then you could L + M
for any sparse matrix directly without producing a temporary like sparse_full(L) + M
. Setting up indexing will make this just work
, but you can make it better by setting it up to only loop through the bands. This gives you a way to then compose these even when not every operator can be of this special form.
from diffeqoperators.jl.
Some indexing support has also been pushed here.
from diffeqoperators.jl.
Related Issues (20)
- Getting an error when running discretize on a PDESystem with MOLFiniteDifference HOT 27
- 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"
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.