Skip to content

Commit

Permalink
Additional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zjwegert committed May 14, 2024
1 parent 5ac2ac9 commit b1efa91
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
16 changes: 12 additions & 4 deletions test/seq/PZMultiFieldRepeatingStateTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ using Test
using Gridap, GridapDistributed, GridapPETSc, GridapSolvers,
PartitionedArrays, GridapTopOpt, SparseMatricesCSR

using Gridap.TensorValues, Gridap.Helpers
using Gridap.TensorValues, Gridap.Helpers, Gridap.MultiField

## Parameters
function main(;AD)
function main(;AD,use_mfs)
el_size = (20,20)
order = 1
xmax,ymax=(1.0,1.0)
Expand Down Expand Up @@ -38,8 +38,14 @@ function main(;AD)
U = TrialFESpace(V,VectorValue(0.0,0.0))
Q = TestFESpace(model,reffe_scalar;conformity=:H1,dirichlet_tags=["origin"])
P = TrialFESpace(Q,0)
UP = MultiFieldFESpace([U,P])
VQ = MultiFieldFESpace([V,Q])
if use_mfs
mfs = BlockMultiFieldStyle()
UP = MultiFieldFESpace([U,P];style=mfs)
VQ = MultiFieldFESpace([V,Q];style=mfs)
else
UP = MultiFieldFESpace([U,P])
VQ = MultiFieldFESpace([V,Q])
end

V_φ = TestFESpace(model,reffe_scalar)
V_reg = TestFESpace(model,reffe_scalar)
Expand Down Expand Up @@ -187,5 +193,7 @@ end
# Test that these run successfully
@test main(;AD=true)
@test main(;AD=false)
@test main(;AD=true,use_mfs=true)
@test main(;AD=false,use_mfs=true)

end # module
3 changes: 2 additions & 1 deletion test/seq/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module LSTOSequentialTests
using Test

@time @testset "Thermal Compliance - ALM" begin include("ThermalComplianceALMTests.jl") end
@time @testset "Nonlinear Thermal Compliance - ALM" begin include("NonLinearThermalComplianceALMTests.jl") end
@time @testset "Nonlinear Thermal Compliance - ALM" begin include("NonlinearThermalComplianceALMTests.jl") end
@time @testset "Nonlinear Neohook with Jacobian - ALM" begin include("NeohookAnalyticJacALMTests.jl") end
@time @testset "Inverse Homogenisation - ALM" begin include("InverseHomogenisationALMTests.jl") end
@time @testset "Inverter - HPM" begin include("InverterHPMTests.jl") end
@time @testset "PZMultiFieldRepeatingState - ALM" begin include("PZMultiFieldRepeatingStateTests.jl") end
Expand Down

0 comments on commit b1efa91

Please sign in to comment.