Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagobadia committed Jun 23, 2020
1 parent ada4c37 commit 4b411f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/ODEsTests/ODEOperatorMocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import GridapODEs.ODETools: jacobian_t!
import GridapODEs.ODETools: allocate_jacobian
import GridapODEs.ODETools: residual!

struct ODEOperatorMock{T<:Real} <: ODEOperator
struct ODEOperatorMock{T<:Real} <: ConstantODEOperator
a::T
b::T
c::T
Expand Down
15 changes: 12 additions & 3 deletions test/TransientFEsTests/TransientFETests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module TransientFETests
# module TransientFETests

using Gridap
using Test
Expand Down Expand Up @@ -87,6 +87,16 @@ op = TransientFEOperator(U,V0,t_Ω)
odeop = get_algebraic_operator(op)
cache = allocate_cache(odeop)

op.type
op.terms

# santiagobadia : @fverdugo I had this problem before related to terms...
# but I still don't understand where is the error, can you take a look?
i = 0
for terms in op.terms
i += 1
end

r = allocate_residual(op,uh,cache)
J = allocate_jacobian(op,uh,cache)
uh10 = interpolate_everywhere(U0,0.0)#10.0)
Expand All @@ -110,7 +120,6 @@ ls = LUSolver()
tol = 1.0
maxiters = 20
using Gridap.Algebra: NewtonRaphsonSolver
# nls = NewtonRaphsonSolver(ls,tol,maxiters)
nls = NLSolver(ls;show_trace=true,method=:newton) #linesearch=BackTracking())
odes = ThetaMethod(nls,dt,1.0)
solver = TransientFESolver(odes) # Return a specialization of TransientFESolver
Expand Down Expand Up @@ -248,4 +257,4 @@ for (uh_tn, tn) in sol_t
# # writevtk(trian,"sol at time: $tn",cellfields=["u" => uh_tn])
end

end #module
# end #module

0 comments on commit 4b411f1

Please sign in to comment.