From 2ad16fb831b53d0459f68661ff4e2a8135f6562e Mon Sep 17 00:00:00 2001 From: Petr Krysl Date: Sun, 7 Mar 2021 10:15:26 -0800 Subject: [PATCH] simplify imports --- examples/heat/poisson/t4.jl | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/examples/heat/poisson/t4.jl b/examples/heat/poisson/t4.jl index dd82225..62dd707 100644 --- a/examples/heat/poisson/t4.jl +++ b/examples/heat/poisson/t4.jl @@ -8,31 +8,22 @@ tetrahedral elements are used. module t4 using LinearAlgebra -using MeshCore: nrelations, nentities, attribute, @_check -using MeshSteward: T4block -using MeshSteward: Mesh, attach!, baseincrel, boundary -using MeshSteward: connectedv, geometry -using MeshSteward: vtkwrite -using Elfel.RefShapes: RefShapeTetrahedron, manifdim, manifdimv -using Elfel.FElements: FEH1_T4, refshape, Jacobian -using Elfel.FESpaces: FESpace, ndofs, setebc!, nunknowns, doftype -using Elfel.FESpaces: numberfreedofs!, numberdatadofs! -using Elfel.FESpaces: scattersysvec!, makeattribute, gathersysvec! -using Elfel.FEIterators: FEIterator, ndofsperel, elnodes, eldofs -using Elfel.FEIterators: jacjac -using Elfel.QPIterators: QPIterator, bfun, bfungradpar, bfungrad, weight -using Elfel.Assemblers: SysmatAssemblerSparse, start!, finish!, assemble! -using Elfel.Assemblers: SysvecAssembler -using Elfel.LocalAssemblers: LocalMatrixAssembler, LocalVectorAssembler, init! +using SparseArrays +using MeshCore.Exports +using MeshCore: @_check +using MeshSteward.Exports +using Elfel.Exports A = 1.0 # length of the side of the square kappa = 1.0; # conductivity matrix Q = -6.0; # internal heat generation rate tempf(x, y, z) =(1.0 + x^2 + 2.0 * y^2);#the exact distribution of temperature -N = 10;# number of subdivisions along the sides of the square domain +N = 20;# number of subdivisions along the sides of the square domain function genmesh() conn = T4block(A, A, A, N, N, N) + # conn = minimize_profile(conn) + println(summary(conn)) mesh = Mesh() attach!(mesh, conn) return mesh @@ -76,6 +67,8 @@ function assembleKF(fesp, kappa, Q) end function solve!(T, K, F, nu) + I, J, V = findnz(K) + @show bw = maximum(I .- J) + 1 @time KT = K * T @time T[1:nu] = K[1:nu, 1:nu] \ (F[1:nu] - KT[1:nu]) end