Skip to content

Commit

Permalink
simplify imports
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrKryslUCSD committed Mar 7, 2021
1 parent a8c13a4 commit 2ad16fb
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions examples/heat/poisson/t4.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

2 comments on commit 2ad16fb

@PetrKryslUCSD
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/31447

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.0 -m "<description of version>" 2ad16fb831b53d0459f68661ff4e2a8135f6562e
git push origin v0.6.0

Also, note the warning: Version 0.6.0 skips over 0.4.0
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.