Skip to content

Instantly share code, notes, and snippets.

@fp4code
Created July 12, 2022 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fp4code/0028cd0458044421470d9a7f4301178f to your computer and use it in GitHub Desktop.
Save fp4code/0028cd0458044421470d9a7f4301178f to your computer and use it in GitHub Desktop.
Crash when computing T*VV with T a circulant matrix and VV = V + V a vector
### A Pluto.jl notebook ###
# v0.19.9
using Markdown
using InteractiveUtils
# ╔═╡ d2f4364f-3fab-4f6b-ad1b-0335301f0f5a
import Pkg; Pkg.activate(ENV["PWD"])
# ╔═╡ b5220756-a51d-480d-804e-2b215bad8cf3
Pkg.add("ToeplitzMatrices")
# ╔═╡ a6236eee-c5e3-4ef0-87c4-6cc4d6a85f3c
Pkg.add("FFTW")
# ╔═╡ d9723aec-e0d3-4a6b-9e60-116707702e9f
using ToeplitzMatrices, FFTW
# ╔═╡ f326323d-6180-44bb-b7d0-894a77fbb340
T = Circulant([1.0, 0, 0])
# ╔═╡ 4ffa3b55-8037-427e-8733-bd379b020349
V = [1.0, 2.0, 3.0]
# ╔═╡ c989b8ab-3ed7-41d1-832f-5ed9741193ca
VV = V + V
# ╔═╡ e88a08ce-cc23-4d7d-a9df-fbc310db8cbd
ok = T*(V + V)
# ╔═╡ 0bb8b3da-be13-45c3-83d1-00151d6fc7fb
bug = T*VV
# ╔═╡ cfc65d3c-f82b-4789-8ebc-8f705776540f
println(ok)
# ╔═╡ 4222e846-7eae-4e70-9312-259f269f9224
println(bug)
# ╔═╡ Cell order:
# ╠═d2f4364f-3fab-4f6b-ad1b-0335301f0f5a
# ╠═b5220756-a51d-480d-804e-2b215bad8cf3
# ╠═a6236eee-c5e3-4ef0-87c4-6cc4d6a85f3c
# ╠═d9723aec-e0d3-4a6b-9e60-116707702e9f
# ╠═f326323d-6180-44bb-b7d0-894a77fbb340
# ╠═4ffa3b55-8037-427e-8733-bd379b020349
# ╠═c989b8ab-3ed7-41d1-832f-5ed9741193ca
# ╠═e88a08ce-cc23-4d7d-a9df-fbc310db8cbd
# ╠═0bb8b3da-be13-45c3-83d1-00151d6fc7fb
# ╠═cfc65d3c-f82b-4789-8ebc-8f705776540f
# ╠═4222e846-7eae-4e70-9312-259f269f9224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment