From 61b08ac74e8e560a762532ef8a1d896a02ca3d70 Mon Sep 17 00:00:00 2001 From: "Alberto F. Martin" Date: Thu, 23 Mar 2023 19:38:40 +1100 Subject: [PATCH] Automated calculation of constraints already works for a simple case. More devs needed to extend it to higher order elements. --- Manifest.toml | 662 +++++++++++++++++++++++++ Project.toml | 1 - src/OctreeDistributedDiscreteModels.jl | 11 +- test/non_conforming_octrees_wip.jl | 131 +++-- 4 files changed, 765 insertions(+), 40 deletions(-) create mode 100644 Manifest.toml diff --git a/Manifest.toml b/Manifest.toml new file mode 100644 index 0000000..284457c --- /dev/null +++ b/Manifest.toml @@ -0,0 +1,662 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.8.3" +manifest_format = "2.0" +project_hash = "6283fb484812c42fd2d2cea43aebee82196aea66" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "16b6dbc4cf7caee4e1e75c49485ec67b667098a0" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.3.1" + +[[deps.AbstractTrees]] +git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.4.4" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "cc37d689f599e8df4f464b2fa3870ff7db7492ef" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.6.1" + +[[deps.ArgCheck]] +git-tree-sha1 = "a3a402a35a2f7e0b87828ccabbd5ebfbebe356b4" +uuid = "dce04be8-c92d-5529-be00-80e4d2c0e197" +version = "2.3.0" + +[[deps.ArgParse]] +deps = ["Logging", "TextWrap"] +git-tree-sha1 = "3102bce13da501c9104df33549f511cd25264d7d" +uuid = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" +version = "1.1.4" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.ArrayInterface]] +deps = ["Adapt", "LinearAlgebra", "Requires", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "a89acc90c551067cd84119ff018619a1a76c6277" +uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" +version = "7.2.1" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "56c347caf09ad8acb3e261fe75f8e09652b7b05b" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "0.7.10" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AutoHashEquals]] +git-tree-sha1 = "45bb6705d93be619b81451bb2006b7ee5d4e4453" +uuid = "15f4f7f2-30c1-5605-9d31-71845cf9641f" +version = "0.2.0" + +[[deps.BSON]] +git-tree-sha1 = "86e9781ac28f4e80e9b98f7f96eae21891332ac2" +uuid = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0" +version = "0.3.6" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "21490270d1fcf2efa9ddb2126d6958e9b72a4db0" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "0.16.11" + +[[deps.CEnum]] +git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" +uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" +version = "0.4.2" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "c6d890a52d2c4d55d326439580c3b8d0875a77d9" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.15.7" + +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "485193efd2176b88e6622a39a246f8c5b600e74e" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.6" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "9c209fb7536406834aa938fb149964b985de6c83" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.1" + +[[deps.Combinatorics]] +git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.0.2" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + +[[deps.Compat]] +deps = ["Dates", "LinearAlgebra", "UUIDs"] +git-tree-sha1 = "7a60c856b9fa189eb34f5f8a6f6b5529b7942957" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.6.1" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "0.5.2+0" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "89a9db8d28102b094992472d333674bd1a83ce2a" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.1" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.13" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "a4ad7ef19d2cdc2eff57abbbe68032b1cd0bd8f8" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.13.0" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "49eba9ad9f7ead780bfb7ee319f962c811c6d3b2" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.8" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.6" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "f9818144ce7c8c41edf5c4c179c684d92aa4d9fe" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.6.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.10+0" + +[[deps.FastGaussQuadrature]] +deps = ["LinearAlgebra", "SpecialFunctions", "StaticArrays"] +git-tree-sha1 = "58d83dd5a78a36205bdfddb82b1bb67682e64487" +uuid = "442a2c76-b920-505d-bb47-c5924d526838" +version = "0.4.9" + +[[deps.FileIO]] +deps = ["Pkg", "Requires", "UUIDs"] +git-tree-sha1 = "7be5f99f7d15578798f338f5433b6c432ea8037b" +uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" +version = "1.16.0" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "deed294cde3de20ae0b2e0355a6c4e1c6a5ceffc" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.12.8" + +[[deps.FiniteDiff]] +deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "03fcb1c42ec905d15b305359603888ec3e65f886" +uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" +version = "2.19.0" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +git-tree-sha1 = "00e252f4d706b3d55a8863432e742bf5717b498d" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.35" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.Gridap]] +deps = ["AbstractTrees", "BSON", "BlockArrays", "Combinatorics", "DataStructures", "DocStringExtensions", "FastGaussQuadrature", "FileIO", "FillArrays", "ForwardDiff", "JLD2", "JSON", "LineSearches", "LinearAlgebra", "NLsolve", "NearestNeighbors", "PolynomialBases", "QuadGK", "Random", "SparseArrays", "SparseMatricesCSR", "StaticArrays", "Test", "WriteVTK"] +git-tree-sha1 = "414c21416961116fe48f7dccd65419b0495e83a8" +repo-rev = "refinement-rule-subface-glue" +repo-url = "git@github.com:gridap/Gridap.jl.git" +uuid = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e" +version = "0.17.17" + +[[deps.GridapDistributed]] +deps = ["FillArrays", "Gridap", "LinearAlgebra", "MPI", "PartitionedArrays", "SparseArrays", "SparseMatricesCSR", "WriteVTK"] +git-tree-sha1 = "180748d8c92eb66a2c67efab53b617e2dd154ca6" +uuid = "f9701e48-63b3-45aa-9a63-9bc6c271f355" +version = "0.2.7" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2018.0.3+2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "49510dfcb407e572524ba94aeae2fced1f3feb0f" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.8" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.2" + +[[deps.IterativeSolvers]] +deps = ["LinearAlgebra", "Printf", "Random", "RecipesBase", "SparseArrays"] +git-tree-sha1 = "1169632f425f79429f245113b775a0e3d121457c" +uuid = "42fd0dbc-a981-5370-80f2-aaf504508153" +version = "0.9.2" + +[[deps.JLD2]] +deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "Pkg", "Printf", "Reexport", "Requires", "TranscodingStreams", "UUIDs"] +git-tree-sha1 = "42c17b18ced77ff0be65957a591d34f4ed57c631" +uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819" +version = "0.4.31" + +[[deps.JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.4.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.3" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c7cb1f5d892775ba13767a87c7ada0b980ea0a71" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.16.1+2" + +[[deps.LightXML]] +deps = ["Libdl", "XML2_jll"] +git-tree-sha1 = "e129d9391168c677cd4800f5c0abb1ed8cb3794f" +uuid = "9c8b4983-aa76-5018-a973-4c85ecc9e179" +version = "0.9.0" + +[[deps.LineSearches]] +deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] +git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" +uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" +version = "7.2.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "0a1b7c2863e44523180fdb3146534e265a91870b" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.23" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "2ce8695e1e699b68702c03402672a69f54b8aca9" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2022.2.0+0" + +[[deps.MPI]] +deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "Pkg", "Random", "Requires", "Serialization", "Sockets"] +git-tree-sha1 = "d56a80d8cf8b9dc3050116346b3d83432b1912c0" +uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195" +version = "0.19.2" + +[[deps.MPICH_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "d790fbd913f85e8865c55bf4725aff197c5155c8" +uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" +version = "4.1.1+1" + +[[deps.MPIPreferences]] +deps = ["Libdl", "Preferences"] +git-tree-sha1 = "71f937129731a29eabe6969db2c90368a4408933" +uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" +version = "0.1.7" + +[[deps.MPItrampoline_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "ad88f863a5a16b3e26d14446afd3cd746266281b" +uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" +version = "5.2.1+3" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.10" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.0+0" + +[[deps.MicrosoftMPI_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "a16aa086d335ed7e0170c5265247db29172af2f9" +uuid = "9237b28f-5490-5468-be7b-bb81f5f5e6cf" +version = "10.1.3+2" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.2.1" + +[[deps.NLSolversBase]] +deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" +uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" +version = "7.8.3" + +[[deps.NLsolve]] +deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] +git-tree-sha1 = "019f12e9a1a7880459d0173c182e6a99365d7ac1" +uuid = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" +version = "4.5.1" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.2" + +[[deps.NearestNeighbors]] +deps = ["Distances", "StaticArrays"] +git-tree-sha1 = "2c3726ceb3388917602169bed973dbc97f1b51a8" +uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" +version = "0.4.13" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.20+0" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenMPI_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "f3080f4212a8ba2ceb10a34b938601b862094314" +uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" +version = "4.1.5+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[deps.P4est_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "Pkg", "TOML", "Zlib_jll"] +git-tree-sha1 = "70c2d9a33b8810198314a5722ee3e9520110b28d" +uuid = "6b5a15aa-cf52-5330-8376-5e5d90283449" +version = "2.8.1+2" + +[[deps.P4est_wrapper]] +deps = ["CEnum", "Libdl", "MPI", "P4est_jll"] +git-tree-sha1 = "9aaa64b061ef8f4ba4ef0095cad2e25305ee65cf" +uuid = "3743d7c0-8adf-11ea-380b-7d33b0ecc1da" +version = "0.1.3" + +[[deps.Parameters]] +deps = ["OrderedCollections", "UnPack"] +git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" +uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" +version = "0.12.3" + +[[deps.Parsers]] +deps = ["Dates", "SnoopPrecompile"] +git-tree-sha1 = "478ac6c952fddd4399e71d4779797c538d0ff2bf" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.5.8" + +[[deps.PartitionedArrays]] +deps = ["Distances", "IterativeSolvers", "LinearAlgebra", "MPI", "Printf", "SparseArrays", "SparseMatricesCSR"] +git-tree-sha1 = "8a8a72723ffb62a395b0475b78b4695fb7090441" +uuid = "5a9dfac6-5c52-46f7-8278-5e2210713be9" +version = "0.2.15" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.8.0" + +[[deps.PolynomialBases]] +deps = ["ArgCheck", "AutoHashEquals", "FFTW", "FastGaussQuadrature", "LinearAlgebra", "Requires", "SimpleUnPack", "SpecialFunctions"] +git-tree-sha1 = "cfbe38cc661a5a418e198cb21cdc42258a586301" +uuid = "c74db56a-226d-5e98-8bb0-a6049094aeea" +version = "0.4.17" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.3.0" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "6ec7ac8412e83d57e313393220879ede1740f9ee" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.8.2" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.RecipesBase]] +deps = ["SnoopPrecompile"] +git-tree-sha1 = "261dddd3b862bd2c940cf6ca4d1c8fe593e457c8" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.3" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] +git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "1.1.1" + +[[deps.SimpleUnPack]] +git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" +uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" +version = "1.1.0" + +[[deps.SnoopPrecompile]] +deps = ["Preferences"] +git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" +uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" +version = "1.0.3" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SparseMatricesCSR]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "38677ca58e80b5cad2382e5a1848f93b054ad28d" +uuid = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" +version = "0.6.7" + +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "ef28127915f4229c971eb43f3fc075dd3fe91880" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.2.0" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "b8d897fe7fa688e93aef573711cb207c08c9e11e" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.5.19" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "6b7ba252635a5eff6a0b0664a41ee140a1c9e72a" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.0" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f9af7f195fb13589dd2e2d57fdb401717d2eb1f6" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.5.0" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.0" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.1" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.TextWrap]] +git-tree-sha1 = "9250ef9b01b66667380cf3275b3f7488d0e25faf" +uuid = "b718987f-49a8-5099-9789-dcd902bef87d" +version = "1.0.1" + +[[deps.TranscodingStreams]] +deps = ["Random", "Test"] +git-tree-sha1 = "94f38103c984f89cf77c402f2a68dbd870f8165f" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.9.11" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.WriteVTK]] +deps = ["Base64", "CodecZlib", "FillArrays", "LightXML", "TranscodingStreams"] +git-tree-sha1 = "f50c47d715199601a54afdd5267f24c8174842ae" +uuid = "64499a7a-5c06-52f2-abe2-ccb03c286192" +version = "1.16.0" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "93c41695bc1c08c46c5899f4fe06d6ead504bb73" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.10.3+0" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.12+3" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.1.1+0" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" diff --git a/Project.toml b/Project.toml index f9995a2..de40597 100644 --- a/Project.toml +++ b/Project.toml @@ -17,7 +17,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] ArgParse = "1" FillArrays = "0.8.4, 0.9, 0.10, 0.11, 0.12" -Gridap = "0.17.17" GridapDistributed = "0.2.7" MPI = "0.16, 0.17, 0.18, 0.19, 0.20" P4est_wrapper = "0.1.3" diff --git a/src/OctreeDistributedDiscreteModels.jl b/src/OctreeDistributedDiscreteModels.jl index 1e050c6..5f43be9 100644 --- a/src/OctreeDistributedDiscreteModels.jl +++ b/src/OctreeDistributedDiscreteModels.jl @@ -1069,7 +1069,7 @@ function generate_cell_vertices_and_faces(ptr_pXest_lnodes, cell_prange) end hanging_vertices_pairs_to_owner_face = Dict{Tuple{Int,Int},Int}() - hanging_faces_pairs_to_owner_face = Dict{Tuple{Int,Int},Int}() + hanging_faces_pairs_to_owner_face = Dict{Tuple{Int,Int},Tuple{Int,Int}}() P4EST_2_GRIDAP_VERTEX_2D = Gridap.Arrays.IdentityVector(num_cell_vertices) @@ -1197,7 +1197,8 @@ function generate_cell_vertices_and_faces(ptr_pXest_lnodes, cell_prange) # end # Process hanging face - hanging_faces_pairs_to_owner_face[(cell, GridapP4est.P4EST_2_GRIDAP_FACET_2D[p4est_lface])] = owner_face + hanging_faces_pairs_to_owner_face[(cell, GridapP4est.P4EST_2_GRIDAP_FACET_2D[p4est_lface])] = + (owner_face,half+1) end end end @@ -1207,18 +1208,18 @@ function generate_cell_vertices_and_faces(ptr_pXest_lnodes, cell_prange) # assigning IDs from the last num_regular_faces ID # For each hanging face, keep track of (owner_cell,lface) hanging_faces_owner_cell_and_lface = - Vector{Tuple{Int,Int}}(undef, length(keys(hanging_faces_pairs_to_owner_face))) + Vector{Tuple{Int,Int,Int}}(undef, length(keys(hanging_faces_pairs_to_owner_face))) num_hanging_faces = 0 for key in keys(hanging_faces_pairs_to_owner_face) (cell, lface) = key - owner_p4est_gface = hanging_faces_pairs_to_owner_face[key] + (owner_p4est_gface, half) = hanging_faces_pairs_to_owner_face[key] owner_gridap_gface = regular_faces_p4est_to_gridap[owner_p4est_gface] num_hanging_faces += 1 start_gridap_faces = (cell - 1) * num_cell_faces gridap_cells_faces_data[start_gridap_faces+lface] = num_regular_faces + num_hanging_faces (owner_cell, p4est_lface) = p4est_gface_to_gcell_p4est_lface[owner_p4est_gface] hanging_faces_owner_cell_and_lface[num_hanging_faces] = - (owner_cell, num_cell_vertices+GridapP4est.P4EST_2_GRIDAP_FACET_2D[p4est_lface]) + (owner_cell, num_cell_vertices+GridapP4est.P4EST_2_GRIDAP_FACET_2D[p4est_lface], half) end diff --git a/test/non_conforming_octrees_wip.jl b/test/non_conforming_octrees_wip.jl index 1b777d4..c9fff7d 100644 --- a/test/non_conforming_octrees_wip.jl +++ b/test/non_conforming_octrees_wip.jl @@ -4,6 +4,7 @@ using Gridap using PartitionedArrays using GridapDistributed using MPI +using Gridap.FESpaces # Generate a local numbering of vertices that includes hanging vertices # Generate a local numbering of faces out of the one generated by vertices (automatic? to confirm) @@ -108,11 +109,33 @@ reffe = ReferenceFE(lagrangian,Float64,order) V = TestFESpace(dmodel,reffe,dirichlet_tags="boundary") U = TrialFESpace(V) -sDOF_to_dof, sDOF_to_dofs=generate_symbolic_constraints(model.dmodel, V, reffe, non_conforming_glue) -println(sDOF_to_dof) -println(sDOF_to_dofs) +function _h_refined_reffe(reffe::Tuple{<:Lagrangian,Any,Any}) + (reffe[1],(reffe[2][1],2*reffe[2][2]),reffe[3]) +end + +basis, reffe_args,reffe_kwargs = reffe +cell_reffe = ReferenceFE(QUAD,basis,reffe_args...;reffe_kwargs...) +reffe_cell = cell_reffe -function generate_symbolic_constraints(dmodel, V,reffe,non_conforming_glue) +h_refined_reffe = _h_refined_reffe(reffe) +basis, reffe_args,reffe_kwargs = h_refined_reffe +cell_reffe_h_refined = ReferenceFE(QUAD,basis,reffe_args...;reffe_kwargs...) +reffe_cell_h_refined = cell_reffe_h_refined + +dof_basis_h_refined = Gridap.CellData.get_dof_basis(reffe_cell_h_refined) + +coarse_shape_funs=Gridap.ReferenceFEs.get_shapefuns(reffe_cell) +ref_constraints=evaluate(dof_basis_h_refined,coarse_shape_funs) + +rr = Gridap.Adaptivity.RedRefinementRule(QUAD) +face_subface_ldof_to_cell_ldof = Gridap.Adaptivity.coarse_nodes_above_fine_nodes(rr,(2*order-1,2*order-1),order) + +function generate_constraints(dmodel, + V, + reffe, + non_conforming_glue, + ref_constraints, + face_subface_ldof_to_cell_ldof) gridap_cells_vertices, num_regular_vertices, num_hanging_vertices, hanging_vertices_owner_cell_and_lface, @@ -120,7 +143,7 @@ function generate_symbolic_constraints(dmodel, V,reffe,non_conforming_glue) num_regular_faces, num_hanging_faces, hanging_faces_owner_cell_and_lface = non_conforming_glue - sDOF_to_dof, sDOF_to_dofs = map_parts(gridap_cells_vertices, + sDOF_to_dof, sDOF_to_dofs, sDOF_to_coeffs = map_parts(gridap_cells_vertices, num_regular_vertices, num_hanging_vertices, hanging_vertices_owner_cell_and_lface, @@ -154,8 +177,8 @@ function generate_symbolic_constraints(dmodel, V,reffe,non_conforming_glue) end basis, reffe_args,reffe_kwargs = reffe - cell_reffe = ReferenceFE(model,basis,reffe_args...;reffe_kwargs...) - reffe_cell = first(cell_reffe) + cell_reffe = ReferenceFE(QUAD,basis,reffe_args...;reffe_kwargs...) + reffe_cell = cell_reffe cell_dof_ids = get_cell_dof_ids(V) face_own_dofs = Gridap.ReferenceFEs.get_face_own_dofs(reffe_cell) @@ -168,56 +191,96 @@ function generate_symbolic_constraints(dmodel, V,reffe,non_conforming_glue) (_,ocell_lface)=hanging_vertices_owner_cell_and_lface[vid_hanging] ptrs[vid_hanging+1] = ptrs[vid_hanging] + length(face_dofs[ocell_lface]) end - data=Vector{Int}(undef, ptrs[num_hanging_vertices+1]-1) + data_owner_face_dofs=Vector{Int}(undef, ptrs[num_hanging_vertices+1]-1) + data_owner_face_ldofs=Vector{Int}(undef, ptrs[num_hanging_vertices+1]-1) for vid_hanging=1:num_hanging_vertices (ocell,ocell_lface)=hanging_vertices_owner_cell_and_lface[vid_hanging] s=ptrs[vid_hanging] e=ptrs[vid_hanging+1]-1 for (j,ldof) in enumerate(face_dofs[ocell_lface]) - data[s+j-1]=cell_dof_ids[ocell][ldof] + data_owner_face_dofs[s+j-1]=cell_dof_ids[ocell][ldof] + data_owner_face_ldofs[s+j-1]=ldof end end - hanging_vertices_owner_face_dofs=Gridap.Arrays.Table(data,ptrs) + hanging_vertices_owner_face_dofs = Gridap.Arrays.Table(data_owner_face_dofs , ptrs) + hanging_vertices_owner_face_ldofs = Gridap.Arrays.Table(data_owner_face_ldofs, ptrs) + + sDOF_to_dof = Int[] + sDOF_to_dofs = Vector{Int}[] + sDOF_to_coeffs = Vector{Float64}[] + + basis, reffe_args,reffe_kwargs = reffe + face_reffe = ReferenceFE(SEGMENT,basis,reffe_args...;reffe_kwargs...) + Dc = 2 + hanging_lvertex_within_first_subface = 2^(Dc-1) + subface_own_dofs = Gridap.ReferenceFEs.get_face_own_dofs(face_reffe) + subface_own_dofs = subface_own_dofs[hanging_lvertex_within_first_subface] + num_faces = 2^Dc - sDOF_to_dof = Int[] - sDOF_to_dofs = Vector{Int}[] for vid_hanging=1:num_hanging_vertices # Go over the dofs of hanging_vertices_to_cell[vid_hanging] # on hanging_vertices_to_lvertex lvertx cell=hanging_vertices_to_cell[vid_hanging] lvertex=hanging_vertices_to_lvertex[vid_hanging] - for ldof in face_own_dofs[lvertex] - push!(sDOF_to_dof,cell_dof_ids[cell][ldof]) + (_,ocell_lface)=hanging_vertices_owner_cell_and_lface[vid_hanging] + ocell_lface = ocell_lface - num_faces + for ((ldof,dof),ldof_subface) in zip(enumerate(face_own_dofs[lvertex]),subface_own_dofs) + push!(sDOF_to_dof,cell_dof_ids[cell][dof]) push!(sDOF_to_dofs,hanging_vertices_owner_face_dofs[vid_hanging]) + coeffs=Vector{Float64}(undef,length(hanging_vertices_owner_face_ldofs[vid_hanging])) + for (i,ldof_coarse) in enumerate(hanging_vertices_owner_face_ldofs[vid_hanging]) + coeffs[i]=ref_constraints[face_subface_ldof_to_cell_ldof[ocell_lface][1][ldof_subface],ldof_coarse] + end + push!(sDOF_to_coeffs,coeffs) end end - sDOF_to_dof, sDOF_to_dofs + # TO-DO: the tables can be generated more efficiently + sDOF_to_dof, Gridap.Arrays.Table(sDOF_to_dofs), Gridap.Arrays.Table(sDOF_to_coeffs) end end -# end +sDOF_to_dof, sDOF_to_dofs,sDOF_to_coeffs= + generate_constraints(model.dmodel, V, reffe, + non_conforming_glue, ref_constraints, face_subface_ldof_to_cell_ldof) +println(sDOF_to_dof) +println(sDOF_to_dofs) +println(sDOF_to_coeffs) +# Define manufactured functions +u(x) = x[1] +f(x) = 0.0 -using Gridap -using Gridap.ReferenceFEs -function _h_refined_reffe(reffe::Tuple{<:Lagrangian,Any,Any}) - (reffe[1],(reffe[2][1],2*reffe[2][2]),reffe[3]) -end +map_parts(dmodel.models,V.spaces,U.spaces,sDOF_to_dof,sDOF_to_dofs,sDOF_to_coeffs) do model,V,U,sDOF_to_dof,sDOF_to_dofs,sDOF_to_coeffs + Vc = FESpaceWithLinearConstraints( + sDOF_to_dof, + sDOF_to_dofs, + sDOF_to_coeffs, + V) + Uc = TrialFESpace(Vc,u) -order=2 -reffe = ReferenceFE(lagrangian,Float64,order) -basis, reffe_args,reffe_kwargs = reffe -cell_reffe = ReferenceFE(model,basis,reffe_args...;reffe_kwargs...) -reffe_cell = first(cell_reffe) + # Define integration mesh and quadrature + degree = 2 + Ω = Triangulation(model) + dΩ = Measure(Ω,degree) -h_refined_reffe = _h_refined_reffe(reffe) -model = Gridap.Geometry.CartesianDiscreteModel((0,1,0,1),(10,10)) + a(u,v) = ∫( ∇(v)⊙∇(u) )*dΩ + b(v) = ∫(v*f)*dΩ + + # op = AffineFEOperator(a,b,U,V0) + op = AffineFEOperator(a,b,Uc,Vc) + uh = solve(op) + + # Define exact solution and error + e = u - uh + + # Compute errors + el2 = sqrt(sum( ∫( e*e )*dΩ )) + eh1 = sqrt(sum( ∫( e*e + ∇(e)⋅∇(e) )*dΩ )) + + tol=1e-8 + @assert el2 < tol + @assert eh1 < tol +end -basis, reffe_args,reffe_kwargs = h_refined_reffe -cell_reffe_h_refined = ReferenceFE(model,basis,reffe_args...;reffe_kwargs...) -reffe_cell_h_refined = first(cell_reffe_h_refined) -dof_basis_h_refined = get_dof_basis(reffe_cell_h_refined) -sfuns=Gridap.ReferenceFEs.get_shapefuns(reffe_cell) -evaluate(dof_basis_h_refined,sfuns)