Skip to content

Instantly share code, notes, and snippets.

View antoine-levitt's full-sized avatar

Antoine Levitt antoine-levitt

View GitHub Profile
using FFTW
const MAX_THREADS = Threads.nthreads()
println("$(MAX_THREADS) threads")
N = 128
M = 40
println("N=$N, M=$M")
(require 'latex nil t)
;; Math insertion in julia. Use it with
(defun julia-math-insert (s)
"Inserts math symbol given by `s'"
(when s
(let ((sym (gethash (concat "\\" s) julia-latexsubs)))
(when sym
(insert sym)))))
import LinearAlgebra.BLAS
const libblas = Base.libblas_name
const liblapack = Base.liblapack_name
import LinearAlgebra
import LinearAlgebra: BlasReal, BlasComplex, BlasFloat, BlasInt, DimensionMismatch, checksquare, stride1, chkstride1, axpy!
import Libdl
import LinearAlgebra.BLAS
const libblas = Base.libblas_name
const liblapack = Base.liblapack_name
import LinearAlgebra
import LinearAlgebra: BlasReal, BlasComplex, BlasFloat, BlasInt, DimensionMismatch, checksquare, stride1, chkstride1, axpy!
import Libdl
diff --git a/src/solvers/anderson.jl b/src/solvers/anderson.jl
index 0d47b6a..60dc122 100644
--- a/src/solvers/anderson.jl
+++ b/src/solvers/anderson.jl
@@ -42,8 +42,8 @@ AndersonCache(df, ::Anderson{0}) =
@views function anderson_(df::Union{NonDifferentiable, OnceDifferentiable},
initial_x::AbstractArray{T},
- xtol::T,
- ftol::T,
using Random
using LinearAlgebra
function ortho(X)
Array(qr(X).Q)
end
function align(X,Y)
# returns an orthogonal combination X * c with c unitary such that X*c is closest to Y
proj = X'Y
using Random
using LinearAlgebra
function ortho(X)
Array(qr(X).Q)
end
function align(X,Y)
# returns an orthogonal combination X * c with c unitary such that X*c is closest to Y
proj = X'Y
using Random
using LinearAlgebra
function ortho(X)
Array(qr(X).Q)
end
function align(X,Y)
# returns an orthogonal combination X * c with c unitary such that X*c is closest to Y
proj = X'Y
diff --git a/share/julia/stdlib/v1.0/REPL/src/REPLCompletions.jl b/share/julia/stdlib/v1.0/REPL/src/REPLCompletions.jl
index 3a3e507..5b1db55 100644
--- a/share/julia/stdlib/v1.0/REPL/src/REPLCompletions.jl
+++ b/share/julia/stdlib/v1.0/REPL/src/REPLCompletions.jl
@@ -696,7 +696,47 @@ function completions(string, pos, context_module=Main)::Completions
s = string[startpos:pos]
end
end
+
+ # Completion of strings like si(1.0) with pos after si should only
using StaticArrays
using PyPlot
const gap = 0.0 # gap at the Dirac points. 0 for graphene
const n = 80 # number of k point per direction
const t2 = 0.0
#http://www-personal.umich.edu/~sunkai/teaching/Fall_2014/Chapter6.pdf
# K = 1/3,-1/3