Skip to content

Commit

Permalink
upd for multithreading
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrKryslUCSD committed Mar 14, 2024
1 parent 701ebed commit b2d757a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ version = "3.0.5"

[[deps.FinEtoolsMultithreading]]
deps = ["ChunkSplitters", "FinEtools", "LinearAlgebra", "SparseArrays", "SparseMatricesCSR", "Test"]
git-tree-sha1 = "0651710dcb8582120fe75551bd8ca7e9e33b9930"
git-tree-sha1 = "44287b240318acf33edcd5c226b468a2a59ae74a"
repo-rev = "main"
repo-url = "https://github.com/PetrKryslUCSD/FinEtoolsMultithreading.jl.git"
uuid = "6d2818ca-ed81-4c53-b1fa-1f68c2fd5913"
Expand Down
11 changes: 4 additions & 7 deletions examples/steady_state/2-d/Poisson_examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ using FinEtoolsHeatDiff
using FinEtoolsHeatDiff.AlgoHeatDiffModule
import LinearAlgebra: cholesky
using FinEtoolsMultithreading.Exports
using FinEtoolsMultithreading: csc_matrix

function Poisson_FE_example()
println("""
Expand Down Expand Up @@ -331,7 +330,9 @@ function Poisson_FE_Q4_parallel_example(N = 100, ntasks = Threads.nthreads(), as
conductivity(femm, assembler, geom, Temp)
end

t1 = time()
n2e = FENodeToFEMap(fes.conn, nnodes(Temp))
println("Make node to element map = $(time() - t1) [s]")

println("Conductivity")
t0 = time();
Expand All @@ -345,12 +346,8 @@ function Poisson_FE_Q4_parallel_example(N = 100, ntasks = Threads.nthreads(), as
println(" Make node to neighbor map = $(time() - t1) [s]")

t1 = time()
start, dofs = sparsity_pattern_symmetric(fes, Temp, n2n)
println(" Make sparsity pattern = $(time() - t1) [s]")

t1 = time()
K = csc_matrix(start, dofs, nalldofs(Temp), zero(eltype(Temp.values)))
println(" Make zero matrix = $(time() - t1) [s]")
K = sparse_symmetric_zero(Temp, n2n, :CSC)
println(" Make sparse zero = $(time() - t1) [s]")

t1 = time()
add_to_matrix!(K, assembler)
Expand Down

0 comments on commit b2d757a

Please sign in to comment.