Electrostatic linear plasma dispersion relation
where, in SI units:
using LinearAlgebra, SparseArrays | |
struct StaticCondensationMatrix{T, M<:AbstractMatrix{T}} <: AbstractMatrix{T} | |
A::M | |
indices::Vector{UnitRange{Int}} | |
nlocalblocks::Int | |
ncouplingblocks::Int | |
reducedlocalindices::Vector{UnitRange{Int}} | |
reducedcoupledindices::Vector{UnitRange{Int}} | |
reducedlhs::M |
using LinearAlgebra, Test | |
# Initialize matrices with proper dimensions | |
A11 = rand(2, 2) | |
A12 = rand(2, 2) | |
A21 = rand(2, 2) # Doesn't necessarily need symmetry | |
A22 = rand(2, 2) | |
A23 = rand(2, 2) | |
A32 = rand(2, 2) # Doesn't necessarily need symmetry | |
A33 = rand(2, 2) |
using Base.Threads, LinearAlgebra, SparseArrays | |
using Random; Random.seed!(0) | |
using ChunkSplitters | |
using BlockArrays | |
using ThreadPinning | |
pinthreads(:cores) | |
using Polyester | |
lsolve!(A, L::AbstractSparseArray) = (A .= L \ A) # can't mutate L | |
lsolve!(A, L) = ldiv!(A, lu(L), A) # could use a work array here in lu! |
using LinearAlgebra | |
function qr_factorization(A) | |
m, n = size(A) | |
Q = zeros(float(eltype(A)), m, m) | |
for i in 1:m Q[i, i] = 1 end | |
R = zeros(float(eltype(A)), m, n) | |
R .= A | |
G = zeros(float(eltype(A)), 2, 2) | |
using Random, Distributed, Test | |
Random.seed!(0) | |
addprocs(4, exeflags="-t 2") | |
@everywhere begin | |
using LinearAlgebra, Random | |
using Distributed, DistributedArrays, SharedArrays | |
LinearAlgebra.BLAS.set_num_threads(Base.Threads.nthreads()) |
using LinearAlgebra, Random, Base.Threads | |
Random.seed!(0) | |
alphafactor(x::Real) = -sign(x) | |
alphafactor(x::Complex) = -exp(im * angle(x)) | |
function householder!(A::Matrix{T}) where T | |
m, n = size(A) | |
H = A | |
α = zeros(T, min(m, n)) # Diagonal of R |
using LinearAlgebra, Test, Random | |
Random.seed!(0) | |
@testset "understand raw lapack calls" begin | |
@show Threads.nthreads() | |
@show BLAS.get_num_threads() | |
m = 5 | |
n = 4 | |
A = rand(m, n); |
using SpecialFunctions, Bessels, LinearAlgebra, Plots | |
const spj = SpecialFunctions.besselj | |
const bej = Bessels.besselj | |
function foo!(A, B, f::T, ns, ms, N) where T | |
for (j, n) in enumerate(ns) | |
for (i, m) in enumerate(ms) | |
A[i, j] = 0 | |
t = @elapsed for _ in 1:N |
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by GNU Octave configure 6.4.0, which was | |
generated by GNU Autoconf 2.69. Invocation command line was | |
$ ./configure CFLAGS=-O3 -m64 -mavx2 -mfma -march=native -mtune=native -mfpmath=sse -malign-data=cacheline -ftree-vectorize -fno-semantic-interposition -fomit-frame-pointer -I/home/cookj/BUILT/include -L/home/cookj/BUILT/lib -Wl,-rpath=/home/cookj/BUILT/lib -pipe -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -lmimalloc CXXFLAGS=-O3 -m64 -mavx2 -mfma -march=native -mtune=native -mfpmath=sse -malign-data=cacheline -ftree-vectorize -fno-semantic-interposition -fomit-frame-pointer -I/home/cookj/BUILT/include -L/home/cookj/BUILT/lib -Wl,-rpath=/home/cookj/BUILT/lib -pipe -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -lmimalloc FFLAGS=-O3 -m64 -mavx2 -mfma -march=native -mtune=native -mfpmath=sse -malign-dat |