From b1efa91cf639777fba43b4f5eeba790551b603af Mon Sep 17 00:00:00 2001 From: "Z J Wegert (Workstation)" Date: Tue, 14 May 2024 12:28:39 +1000 Subject: [PATCH] Additional tests --- test/seq/PZMultiFieldRepeatingStateTests.jl | 16 ++++++++++++---- test/seq/runtests.jl | 3 ++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/test/seq/PZMultiFieldRepeatingStateTests.jl b/test/seq/PZMultiFieldRepeatingStateTests.jl index 06db9bb2..17ad2807 100644 --- a/test/seq/PZMultiFieldRepeatingStateTests.jl +++ b/test/seq/PZMultiFieldRepeatingStateTests.jl @@ -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) @@ -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) @@ -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 \ No newline at end of file diff --git a/test/seq/runtests.jl b/test/seq/runtests.jl index 6338d22d..1bb2d4be 100644 --- a/test/seq/runtests.jl +++ b/test/seq/runtests.jl @@ -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