diff --git a/src/core/StaticXUA.jl b/src/core/StaticXUA.jl index 2f9d730..2e97b2a 100644 --- a/src/core/StaticXUA.jl +++ b/src/core/StaticXUA.jl @@ -27,8 +27,8 @@ function zero!(out::OUTstaticΛXU_A) zero!(out.Lya) zero!(out.Laa) end -function addin!(out::OUTstaticΛXU_A,asm,iele,scale,eleobj::E,Λ,X,U,A, t,γ,dbg) where{E} - Nx,Nu,Na = getndof(E,(:X,:U,:A)) +function addin!(out::OUTstaticΛXU_A,asm,iele,scale,eleobj::E,Λ,X::NTuple{Nxdir,<:SVector{Nx}}, + U::NTuple{Nudir,<:SVector{Nu}},A::SVector{Na}, t,γ,dbg) where{E,Nxdir,Nx,Nudir,Nu,Na} # TODO make Nx,Nu,Na types Ny = 2Nx+Nu # Y=[Λ;X;U] Nz = 2Nx+Nu+Na # Z = [Y;A]=[Λ;X;U;A] ΔZ = variate{2,Nz}(δ{1,Nz,𝕣}()) diff --git a/test/profile.jl b/test/profile.jl index 688b977..eade2a9 100644 --- a/test/profile.jl +++ b/test/profile.jl @@ -20,16 +20,16 @@ e7 = addelement!(model,Hold ,[n3], field=:tx2) @once f3(a) = 0.11a^2 e8 = addelement!(model,DofCost ,[n1], class=:X ,field=:tx1 ,cost=f2) e9 = addelement!(model,DofCost ,[n1], class=:X ,field=:tx2 ,cost=f2) -#e10 = addelement!(model,DofCost ,[n4], class=:A ,field=:ΞL₀ ,cost=f3) -#e10 = addelement!(model,DofCost ,[n4], class=:A ,field=:ΞEI ,cost=f3) +e10 = addelement!(model,DofCost ,[n4], class=:A ,field=:ΞL₀ ,cost=f3) +e10 = addelement!(model,DofCost ,[n4], class=:A ,field=:ΞEI ,cost=f3) stateX = solve(staticX; model,time=[.5,1.],verbose=false) -#state = solve(staticXUA;model,initial=stateX,maxYiter= 0,verbose=false) +state = solve(staticXUA;model,initial=stateX,maxYiter= 50,verbose=false) #@btime state = solve(staticXUA;model,initial=stateX,maxYiter= 0,verbose=false) Profile.clear() -Profile.@profile for i=1:25000 - local stateX = solve(staticX; model,time=[.5,1.],verbose=false) -# local state = solve(staticXUA;model,initial=stateX,maxYiter= 50,verbose=false); +Profile.@profile for i=1:1000#25000 +# local stateX = solve(staticX; model,time=[.5,1.],verbose=false) + local state = solve(staticXUA;model,initial=stateX,maxYiter= 50,verbose=false); end ProfileView.view(fontsize=30);