Skip to content

Instantly share code, notes, and snippets.

View PetrKryslUCSD's full-sized avatar

Petr Krysl PetrKryslUCSD

View GitHub Profile
from math import pi
import numpy
from scipy.optimize import minimize
import context
from pystran import model
from pystran import section
from pystran import freedoms
from pystran import geometry
from pystran import plots
┌──────────────────────────────────────────────────────────────────────┐
│ • MobaXterm Personal Edition v24.0 • │
│ (SSH client, X server and network tools) │
│ │
│ ⮞ SSH session to [email protected]
│ • Direct SSH : ✓ │
│ • SSH compression : ✓ │
│ • SSH-browser : ✓ │
│ • X11-forwarding : ✓ (remote display is forwarded through SSH) │
│ │
# This file is machine-generated - editing it directly is not advised
julia_version = "1.8.5"
manifest_format = "2.0"
project_hash = "5fb174050415bfb2078581bbe0e257b3dbe52a7c"
[[deps.Adapt]]
deps = ["LinearAlgebra", "Requires"]
git-tree-sha1 = "cc37d689f599e8df4f464b2fa3870ff7db7492ef"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
module mwe
using LinearAlgebra: dot, norm
using Statistics: mean
using Cthulhu
using InteractiveUtils
cmplx(r, c) = r + im * c
size3(v) = norm(v)
ssize3(v) = v[1]^2 + v[2]^2 + v[3]^2
module FESpaces
using StaticArrays
using MeshCore
using MeshCore: nshapes, indextype, nrelations, retrieve, manifdim, IncRel
using MeshKeeper: Mesh, baseincrel, increl
using ..FElements: nfeatofdim, ndofsperfeat, ndofsperelem
mutable struct FEField{N, T, IT}
dofnums::Vector{SVector{N, IT}}
using PlotlyJS
using JSON
plots = scatter3d(;x = rand(6), y = rand(6), z = rand(6))
layout = Layout(width="600", height="600", autosize=true, title="Change the view, then switch to commandline",
scene=attr(
xaxis=attr(title="X", gridcolor="rgb(255, 255, 255)",
zerolinecolor="rgb(255, 255, 255)",
showbackground=true,
backgroundcolor="rgb(25, 25, 25)"),
@PetrKryslUCSD
PetrKryslUCSD / testinglu.jl
Last active September 20, 2020 01:56
Testing LU
module testinglu
using LinearAlgebra
import LinearAlgebra: lu!, generic_lufact!, BlasInt, checknonsingular
function better_generic_lufact!(A::StridedMatrix{T}, ::Val{Pivot} = Val(true);
check::Bool = true) where {T,Pivot}
m, n = size(A)
minmn = min(m,n)
info = 0
module naivelu
using BenchmarkTools
using LinearAlgebra
"""
naivelu!(a)
Naive LU decomposition implementation.
module moinbounds13
using FinEtools
using FinEtools.MatrixUtilityModule: add_mggt_ut_only!, complete_lt!
using LinearAlgebra: Transpose, mul!
using BenchmarkTools
function add_mggt_ut_only_wo!(Ke::FFltMat, gradN::FFltMat, mult::FFlt)
@assert size(Ke, 1) == size(Ke, 2)
Kedim = size(Ke, 1)
nne, mdim = size(gradN)
mx::FInt = 0
Variables:
fens1::FinEtools.FENodeSetModule.FENodeSet
fens2::FinEtools.FENodeSetModule.FENodeSet
tolerance::Float64
dim::Int64
nn1<optimized out>
nn2<optimized out>
xyz1<optimized out>
id1<optimized out>
xyz2<optimized out>