Compare commits

..
Author SHA1 Message Date
Andrew Gillette 801f3dd5d7 Href ex edits 2021-03-19 15:12:45 -07:00
Andrew Gillette 9f0989b578 Michalewicz function coded as exact=3 2021-03-17 15:01:57 -07:00
Andrew Gillette 00277b5f5b Updated case 3 2021-03-17 11:06:11 -07:00
Andrew Gillette 7fba38a3e3 New case for h ref study 2021-03-17 10:17:48 -07:00
Andrew Gillette 70b3cc2586 Adding content from convergence test 2021-03-15 15:40:22 -07:00
Andrew Gillette 71aa900a77 Starting branch from master - ha 2021-03-15 13:50:44 -07:00
Tzanio Kolev b793a810f9 Merge pull request #2090 from mfem/mkl-fortran-mpi
Convert CPardiso communicator from c-int to fortran
2021-03-13 13:57:55 -08:00
Tzanio Kolev 77d8c4acf6 Merge pull request #2040 from mfem/dist-solvers
FE distance solvers miniapp
2021-03-11 17:59:07 -08:00
Tzanio 26b25d376b Merge branch 'master' into dist-solvers 2021-03-11 17:09:50 -08:00
Tzanio e3b240e200 Typo 2021-03-11 17:07:26 -08:00
Tzanio Kolev 7214e1b654 Merge pull request #1817 from mfem/var-order-space-dev
Variable order finite element collections and spaces [var-order-space-dev]
2021-03-11 16:57:52 -08:00
Tzanio 574c624eb0 Fix documentation 2021-03-11 16:54:10 -08:00
Vladimir Z Tomov 7e64d954ce Updated doc files. 2021-03-11 15:57:50 -08:00
Vladimir Z Tomov f889d26ccb Renamed shifted_methods -> shifted. 2021-03-11 15:30:25 -08:00
Tzanio Kolev 358e298a6e Merge pull request #1781 from mfem/barker29/matrix-free-ams
Matrix-free auxiliary Maxwell solver [barker29/matrix-free-ams]
2021-03-11 11:19:06 -08:00
Julian Andrej 53098368ea convert communicator from c-int to fortran 2021-03-08 14:49:33 -08:00
Jakub Červený 33827fe5cc Fix GetNumGeometries check in FESpace on empty meshes. 2021-03-08 21:03:51 +01:00
Jakub Červený f685fac4de Fix sequence -> fes_sequence in GridFunctionPumi 2021-03-08 19:51:18 +01:00
Andrew T. Barker 52f0b6e526 Improve CHANGELOG entry for matrix-free AMS. 2021-03-08 08:30:34 -08:00
Andrew T. Barker 22e991663d Fix copyright dates in auxiliary.?pp 2021-03-08 08:28:08 -08:00
Tzanio 999fbbc519 Small changes 2021-03-07 17:36:55 -08:00
Tzanio 67ca991a09 minor 2021-03-07 14:55:00 -08:00
Vladimir Z Tomov 683ad30963 Merge branch 'dist-solvers' of github.com:mfem/mfem into dist-solvers 2021-03-05 14:49:04 -08:00
Vladimir Z Tomov 48a04479a1 Makefile fix. 2021-03-05 14:48:26 -08:00
Veselin Dobrev 681d82ff69 Apply 'make style' 2021-03-05 13:10:09 -08:00
Jakub Červený 2a0b624fd1 Fixed FiniteElementSpace::GetFaceOrder for constant-order spaces. 2021-03-05 20:20:59 +01:00
Jakub Červený 5adbfd3d08 Fixed RT_FECollection special constructor, now calls base constructor. 2021-03-05 20:20:25 +01:00
Tzanio Kolev 8af351185c Merge pull request #2060 from mortezah/2d_field_transfer
MFEM2PUMI and PUMI2MEM field transfer for 2D Triangular Meshes
2021-03-04 11:38:57 -08:00
Tzanio Kolev f2419de266 Merge pull request #2076 from mfem/gcc-bug-workaround
Workaround for a bug in gcc 4.9.2 exposed by autotests [gcc-bug-workaround]
2021-03-04 09:22:21 -08:00
Tzanio KolevandAdrien Bernede a7e31b6d51 Update general/mem_manager.hpp
Co-authored-by: Adrien Bernede <51493078+adrienbernede@users.noreply.github.com>
2021-03-03 19:54:52 -08:00
Jakub Červený 5c1b290d55 Merge pull request #2075 from mfem/var-order-space-no-degree
Consistent order/degree in variable order spaces [var-order-space-no-degree]
2021-03-03 20:36:47 +01:00
Veselin Dobrev ca7c17ecd2 Workaround for a bug in gcc-4.9.2 exposed by autotests. 2021-03-03 07:57:45 -08:00
Jakub Červený 31385c8a6a All FE collections initialize base_p in FiniteElementCollection.
Added consistency check in FESpace::GetFE.
2021-03-03 15:42:49 +01:00
Tzanio Kolev 081e96799f Merge pull request #2028 from mfem/wcdawn/VTKfixes
Making VTK reader more versatile
2021-03-02 12:21:26 -08:00
Tzanio 34d8143d61 Commented out found_material 2021-03-02 11:31:01 -08:00
Vladimir Z Tomov 9796b3981d Fixed the makefile (nvcc autotest issue). 2021-02-26 22:05:40 -08:00
Tzanio Kolev cd788e83ff Merge pull request #2031 from mfem/wcdawn/cudaSparseMatrixfix
Allow first SparseMatrix to not use CUDA
2021-02-26 17:42:16 -08:00
Jakub Červený 2949fa9563 WIP trying an approach where there is no distinction between element
order and degree. FESpace works with actual degrees, even for RT space.
The methods GetXDegree are removed, GetOrder is the same as GetElementOrder.
2021-02-26 16:02:21 +01:00
Veselin Dobrev c4e5bdf660 Merge pull request #1935 from mfem/blockmatrix-fix
Blockmatrix fix
2021-02-25 14:33:34 -08:00
Jakub Červený ab35f48f31 Removed hpdemo from .gitignore 2021-02-25 12:52:55 +01:00
Jakub Červený 8a491a4c9f Removing hpdemo so it's not merged accidentally. 2021-02-25 12:51:14 +01:00
Jakub Červený 62208424db Merge branch 'master' into var-order-space-dev 2021-02-25 11:45:42 +01:00
Tzanio Kolev 4bc51ae3b8 Merge pull request #2053 from mfem/artv3/raja/teams-async
Adjust RAJA teams to be asynchronous
2021-02-24 18:40:39 -08:00
Tzanio Kolev f720a9413c Merge pull request #2047 from mfem/artv3/memleak-amgX
Fixes for AmgX solver class memory leaks
2021-02-24 18:40:19 -08:00
Vladimir Z Tomov d35af74399 Minor. 2021-02-24 16:53:54 -08:00
Vladimir Z Tomov 9ff4312f6e style. 2021-02-24 16:36:31 -08:00
blaz df3f5bc980 more documentation 2021-02-24 12:56:36 -08:00
Vladimir Z Tomov 99879bcbb1 Changelog. 2021-02-24 10:38:01 -08:00
Vladimir Z Tomov 042805b022 Travis error. 2021-02-24 10:00:40 -08:00
blaz 27a2eb8448 fix cmake files and adds small amendments 2021-02-23 16:51:55 -08:00
Veselin Dobrev cda8398bce Merge pull request #1936 from latug0/CheckElementOrientation_fix
segfault in CheckElementOrientation method
2021-02-23 12:12:08 -08:00
Vladimir Z Tomov 2a8898292f Removed all mfem:: 2021-02-23 09:45:42 -08:00
Vladimir Z Tomov 3efd5442ea Exposed better the dx^2 scaling of the heat solver. Fixed a bug. 2021-02-23 09:41:16 -08:00
Vladimir Z Tomov 4086eededc Enabled filtering for the input level set coefficient.
Other minor changes and reorganization.
2021-02-23 09:06:58 -08:00
Vladimir Z Tomov 2981527366 Minor. 2021-02-22 15:21:34 -08:00
Vladimir Z Tomov 71948978e9 Improved the comments. 2021-02-22 15:13:47 -08:00
Tzanio Kolev fd8bac4565 Merge pull request #2052 from mfem/gslib-fix
Some fixes related to field-diff.
2021-02-22 13:40:09 -08:00
Tzanio 3b36be37e7 Comment out a warning 2021-02-22 13:37:33 -08:00
William Dawn 2254495b47 allow first SparseMatrix to not use CUDA 2021-02-22 14:30:50 -07:00
Vladimir Z Tomov 8bca0d6fba MPI_Barriers around the glvis sockets. 2021-02-22 12:19:44 -08:00
Jakub Červený 24630a4dcc Replace GetOrder and GetFaceOrder in petsc.cpp 2021-02-19 19:05:05 +01:00
Jakub Červený 9a5bc06ce1 Fix style 2021-02-19 19:02:11 +01:00
Jakub Červený e328861837 The variable-order version of FiniteElement::GetEdgeElement needs to stay. 2021-02-19 16:16:25 +01:00
Jakub Červený d8bf00f9c6 FiniteElementSpace: removed GetEdgeOrder and GetFaceOrder, reverted to
old GetFaceOrder and deprecated it, added new method GetFaceDegree.
2021-02-19 14:40:21 +01:00
Jakub Červený bb207fd312 Fix loading of high-order Gmsh meshes. 2021-02-19 09:44:01 +01:00
Tzanio Kolev 3c407ebf79 Merge pull request #2049 from mfem/wcdawn/SlepcPetscInt
Change int to PetscInt to support 64-bit indices in SLEPc
2021-02-18 18:04:24 -08:00
Tzanio 9d7b735427 Merge branch 'master' into barker29/matrix-free-ams
Conflicts:
	CHANGELOG
2021-02-18 17:41:37 -08:00
Morteza H. Siboni 416487de32 Style fix 2021-02-18 16:13:53 -05:00
Morteza H. Siboni fdc7aa9c26 Merge branch 'master' of github.com:mfem/mfem into 2d_field_transfer 2021-02-18 16:00:48 -05:00
Will Pazner 65190bcc83 Move construction of nodes until after FinalizeTopology in LOR mesh construction 2021-02-17 10:01:28 -08:00
William Dawn 86b1dc38c2 make casting clear with PetscInt 2021-02-17 09:49:05 -07:00
Jakub Červený 1d203019a4 Minor: fix style 2021-02-17 09:52:26 +01:00
Veselin Dobrev 20426cdd7f Expand the documentation for Mesh::CheckElementOrientation 2021-02-16 17:37:03 -08:00
Will Pazner 1fe12d8ff9 Merge remote-tracking branch 'origin/master' into var-order-space-dev
# Conflicts:
#	CHANGELOG
#	mesh/mesh.cpp

Allow creation of LOR mixed meshes with variable p
2021-02-16 15:09:04 -08:00
Andrew T. Barker 8b0e4fd483 ZeroWrap -> ZeroWrapAMG for clarity 2021-02-16 14:35:23 -08:00
Andrew T. Barker 38afcf1cc0 aspacematrix, aspacepc -> lor_matrix, lor_pc 2021-02-16 14:32:29 -08:00
Andrew T. Barker 118aa08ee0 a_space -> a_lor from review suggestions. 2021-02-16 14:26:08 -08:00
Veselin Dobrev b077091551 Merge pull request #1766 from mfem/yohann/ceed-convection
Refactor the libCEED integration and add support for Convection.
2021-02-16 12:28:55 -08:00
William Dawn 05a7b379ee clarify logic in VTK reader 2021-02-16 12:35:15 -07:00
Arturo Vargas dd6b58c678 make raja teams async 2021-02-16 11:06:52 -08:00
Will Pazner 958c042695 Clarify comment in XML VTK reader 2021-02-16 09:28:30 -08:00
Vladimir Z Tomov 72fbea4342 Another attempt to fix gitignore. 2021-02-15 12:45:37 -08:00
Tzanio Kolev 09ce818791 Merge pull request #2051 from mfem/cuda-version-update
Update the CUDA version requirement
2021-02-15 12:00:22 -08:00
Tzanio Kolev d182a4e53c Merge pull request #2048 from mfem/gmsh-err-dev
More informative Gmsh error message [gmsh-err-dev]
2021-02-15 11:59:39 -08:00
Tzanio Kolev 97674fd467 Merge pull request #2046 from mfem/error-computation-fix
Small bug fix: computation of H1/Hdiv/Hcurl for ParGridFunction
2021-02-15 11:59:30 -08:00
Vladimir Z Tomov 2144ba2eec gitignore 2021-02-14 22:58:14 -08:00
Vladimir Z Tomov 9f2179918a Description of the miniapp. 2021-02-14 22:53:23 -08:00
Vladimir Z Tomov d12477a245 Travis error fix. 2021-02-14 22:19:30 -08:00
Tzanio Kolev 9825bda5c5 Merge pull request #1967 from mfem/slepc-eps-type-fix
Hide SLEPc's 'EPS' type in a namespace
2021-02-14 18:36:37 -08:00
Tzanio Kolev f3f9328e71 Merge pull request #2014 from mfem/lor-all-elements
LOR for all element types [lor-all-elements]
2021-02-14 18:35:08 -08:00
Tzanio 7879dcbfbf Merge branch 'master' into lor-all-elements
Conflicts:
	CHANGELOG
2021-02-14 18:33:36 -08:00
Arturo Vargas dd8b0b453e make style 2021-02-13 18:52:27 -08:00
Arturo Vargas eab8b91a51 move free to a place where it would actually get called 2021-02-13 18:38:49 -08:00
Vladimir Z Tomov 4f69246403 Some fixes related to field-diff. 2021-02-12 22:24:38 -08:00
Veselin Dobrev c688e754fc Update the CUDA version requirement to v10.1.168 -- this
is where 'cusparseDnVecDescr_t' (used by SparseMatrix) was
introduced.
2021-02-12 17:43:05 -08:00
Jakub Červený 2778243202 Moved documentation of var_edge/face_dofs to MakeDofTable. 2021-02-12 11:48:45 +01:00
Jakub Červený ba3d0a3a84 Fix var-order check in HypreADS 2021-02-12 09:18:27 +01:00
Vladimir Z Tomov 0b94dd8d58 Minor. 2021-02-11 17:05:53 -08:00
Stowell, Mark L a11e16600e Making the error message more clear 2021-02-11 16:53:01 -08:00
Vladimir Z Tomov f56728b97b Fixed the makefile. 2021-02-11 16:42:00 -08:00
Vladimir Z Tomov ec2b1c7882 Updated 2020 to 2021. 2021-02-11 16:34:41 -08:00
Vladimir Z Tomov 0f7b40c7f6 Minor. 2021-02-11 16:19:43 -08:00
William Dawn 9d9a1c215c change int to PetscInt to support 64-bit indices in SLEPc 2021-02-11 17:08:15 -07:00
Vladimir Z Tomov 0139b6e456 Cleaned compilation warnings. 2021-02-11 16:05:08 -08:00
Vladimir Z Tomov edd801a51d style. 2021-02-11 15:46:46 -08:00
Veselin Dobrev 2ae45cecc7 Fix a bug in ScalarFiniteElement::ScalarLocalInterpolation in
the case when 'fine_fe.GetOrder() > GetOrder'.
2021-02-11 14:23:46 -08:00
Jakub Červený db73241320 Added var-order check in HypreADS. 2021-02-11 19:40:49 +01:00
Stowell, Mark L f7920ef4ec Providing more informative error message regarding Gmsh attributes 2021-02-11 10:04:40 -08:00
Jakub Červený 6a1c206771 Improved documentation and added more checks to address reviewer comments. 2021-02-11 11:22:54 +01:00
Arturo Vargas 5bb9067c43 remove null pointer setting 2021-02-10 16:41:09 -08:00
Tzanio dc3da718cc Merge branch 'master' into dist-solvers 2021-02-10 11:16:58 -08:00
Arturo Vargas c53bf5c946 added more notes 2021-02-10 02:20:44 -08:00
Arturo Vargas 19d5be916d mem leak fix for hypre diag/off diag merge method 2021-02-10 02:19:19 -08:00
psocratis ad2090f20a fix parallel H1/Hdiv/Hcurl 2021-02-09 20:00:24 -08:00
Yohann 62fb3bce31 Merge branch 'master' into yohann/ceed-convection 2021-02-09 09:55:09 -08:00
Yohann Dudouit b78bc81cf0 Rewrite convection comments. 2021-02-09 09:34:32 -08:00
Tzanio e478378b82 Single space after a period. 2021-02-09 08:21:36 -08:00
Tzanio Kolev a67f4b72c9 Merge branch 'master' into var-order-space-dev 2021-02-09 08:18:58 -08:00
Tzanio Kolev 3366e729b9 Merge pull request #1832 from mfem/feature/testing-with-spack
Gitlab CI: install dependencies with Spack instead of TPLS repo [feature/testing-with-spack]
2021-02-09 08:16:12 -08:00
Tzanio Kolev 8f7fd31070 Merge pull request #2034 from mfem/init-list-containers-dev
List initialization for Array/Vector/DenseMatrix
2021-02-09 08:13:30 -08:00
Tzanio 655cb61075 minor 2021-02-09 08:07:14 -08:00
Veselin Dobrev 29398b217b For backward compatibility, restore AssemblyLevel::LEGACYFULL,
marked as deprecated.

Speed-up some unit tests by skipping mesh refinements in some
cases.
2021-02-08 18:55:57 -08:00
Will Pazner 0ce3549b2a Add mixed mesh sample run for lor-transfer 2021-02-08 18:23:28 -08:00
Will Pazner e23bb0e2e1 Fix comment in lor-transfer miniapp 2021-02-08 18:21:48 -08:00
Will Pazner 16eda91c81 Add comment for transfer operator offsets array 2021-02-08 18:16:52 -08:00
Will Pazner 63ec453fd4 Modify for-loop formatting 2021-02-08 18:16:38 -08:00
Veselin Dobrev 4e5fb3ce0c Fix doxygen warnings: use 'petsc::Vec' and 'petsc::Mat'
instead of 'Vec' and 'Mat' where needed for doxygen.
2021-02-08 14:59:25 -08:00
Yohann Dudouit a3a1640c1d Revert "Rename MFNonlinearFormExtension to UANonlinearFormExtension."
This reverts commit 726ede0e37.
2021-02-08 10:18:56 -08:00
Tzanio Kolev 5cb6dd52bf Merge pull request #1538 from mfem/chak/div-free-solver
Divergence-free solver [chak/div-free-solver]
2021-02-07 15:28:29 -08:00
Tzanio 45752101bc Merge branch 'master' into chak/div-free-solver 2021-02-07 15:25:10 -08:00
Tzanio a54957ade6 Final adjustments 2021-02-07 15:24:45 -08:00
Tzanio Kolev ae55d659f7 Merge pull request #1981 from mfem/face-check-dev
Add checks for invalid higher dimensional branching [face-check-dev]
2021-02-07 15:03:23 -08:00
Tzanio Kolev b2090cc839 Merge pull request #1983 from mfem/NSE-nonlinear-update
Add convective and skew-symmetric integrator for Navier-Stoke equations [NSE-nonlinear-update]
2021-02-07 15:00:50 -08:00
Tzanio Kolev a393a31039 Update CHANGELOG 2021-02-07 14:58:22 -08:00
Tzanio 4caf37b50c Updated CHANGELOG, styling 2021-02-07 14:57:50 -08:00
Yohann Dudouit 726ede0e37 Rename MFNonlinearFormExtension to UANonlinearFormExtension. 2021-02-05 15:04:19 -08:00
Yohann Dudouit 30f0264449 Rename LEGACYFULL to LEGACY. 2021-02-05 15:03:42 -08:00
Yohann Dudouit aab4cb154a Rename Setup to Assemble. 2021-02-05 11:21:05 -08:00
Jakub Červený 53377c8bd3 Fixed parallel Space, now uses mesh_sequence too. 2021-02-05 20:07:31 +01:00
Jakub Cerveny 313d167344 Reworked detection of mesh/space changes. Space now has its own "sequence"
as well as "mesh_sequence". GridFunction depends only on "fes_sequence".
This is because the space can now change (orders) without any mesh change.
2021-02-05 18:01:29 +01:00
Tzanio Kolev 5abb89c7f8 Merge pull request #2015 from mfem/robertchiodi/bugfix/air_hypre_int
Fix usage of HYPRE_Int in hypre.hpp/hypre.cpp [robertchiodi/bugfix/air_hypre_int]
2021-02-05 08:00:25 -08:00
Veselin Dobrev a7d14f7ae1 Fix typos. 2021-02-04 21:19:13 -08:00
Veselin Dobrev ae9cbd33ed Formatting edits. 2021-02-04 21:12:25 -08:00
Tzanio Kolev 78e85377a7 Merge pull request #2037 from mfem/ci/bernede1/copyright-2021
Add action to check copyright [ci/bernede1/copyright-2021]
2021-02-04 16:54:01 -08:00
Tzanio Kolev b8c8d39688 Merge pull request #2012 from mfem/2003-fix
Fix Intel compiler warnings
2021-02-04 16:53:30 -08:00
Tzanio 31e6148cf2 minor 2021-02-04 16:41:10 -08:00
Veselin Dobrev 32e10dcf73 Merge branch 'master' into yohann/ceed-convection
Resolved conflicts:
   fem/bilinearform_ext.cpp
2021-02-04 16:19:14 -08:00
Veselin Dobrev 983910c743 Merge pull request #1882 from mfem/pmesh-gi
ParMesh global indices
2021-02-04 15:50:51 -08:00
Veselin Dobrev 30e4664397 Merge pull request #1938 from latug0/gmsh_optional_affine_keyword
Fix issue #1937
2021-02-04 14:37:36 -08:00
Veselin Dobrev 12b3e315f0 Merge pull request #1929 from latug0/gmsh-bi-periodic
Bugfix proposal for issue #1928
2021-02-04 14:34:54 -08:00
Veselin Dobrev 0c98591d4a Merge pull request #1732 from mfem/yohann/single-SpMat
Add a function to Get the fully-assembled operator in a single SparseMatrix
2021-02-04 14:31:46 -08:00
Veselin Dobrev 2e2c39d01c Merge branch 'master' into pmesh-gi
Resolved conflicts:
   mesh/pmesh.cpp
2021-02-04 14:27:17 -08:00
Veselin Dobrev fd5b895960 In petsc.hpp, move the global declaration of PETSc types like
Vec, Mat, KSP into the namespace mfem::petsc. These types are
just aliases of the global PETSc types defined in PETSc's
header petsc.h.
2021-02-04 14:08:47 -08:00
Adrien M. Bernede 1d79aa7659 Clean up commented code 2021-02-04 11:33:08 -08:00
Yohann Dudouit 58555e3478 Set alpha inside the ConvectionOperatorInfo. 2021-02-04 10:08:48 -08:00
Jakub Červený d3730cb887 Fixed 1D mesh construction in test_lin_interp unit test. 2021-02-04 18:28:58 +01:00
Vladimir Z Tomov 4d1db195da Small corrections. 2021-02-04 09:20:31 -08:00
Vladimir Z Tomov b5c3395256 Added a mesh and better control over the print levels. 2021-02-04 08:52:35 -08:00
Jakub Červený 91e1d6ec1d Merge branch 'master' into var-order-space-dev 2021-02-04 17:41:01 +01:00
Jakub Červený 77e357d732 Renamed FiniteElementCollection::CloneOrder to just Clone. 2021-02-04 17:40:03 +01:00
Josh Essman 1ab3ee7ee4 docs: inner init-lists correspond to rows of DenseMat 2021-02-04 08:19:54 -06:00
Josh EssmanandWill Pazner 6e4879dd14 cleanup: apply suggestions from @pazner
Co-authored-by: Will Pazner <11493037+pazner@users.noreply.github.com>
2021-02-04 08:16:08 -06:00
Veselin Dobrev 3454f1061d Merge pull request #1392 from mfem/par-ncmesh-saving-dev
ParNCMesh I/O and new NC mesh format [par-ncmesh-saving-dev]
2021-02-03 18:01:50 -08:00
Yohann Dudouit 64039dc77c Update license. 2021-02-03 16:54:41 -08:00
Yohann Dudouit ab7ebe5556 Merge branch 'master' into yohann/ceed-convection 2021-02-03 16:52:26 -08:00
Adrien M. Bernede 83f058b457 Merge branch 'master' into feature/testing-with-spack 2021-02-03 14:57:28 -08:00
Adrien M. Bernede 39b977b454 MFEM -> mfem 2021-02-03 14:53:42 -08:00
Vladimir Z Tomov 54151d0a8d Miniapp for FE distance solvers (moved from a different branch). 2021-02-03 14:38:35 -08:00
Will Pazner 4f6b8161f4 Set up LOR mesh nodes after topology has been finalized 2021-02-03 12:06:19 -08:00
Adrien BernedeandTzanio Kolev fe5e4ae27d Improved error message
Co-authored-by: Tzanio Kolev <tzanio@llnl.gov>
2021-02-03 11:38:00 -08:00
Adrien Bernede cbf9b54701 MFEM -> mfem 2021-02-03 11:37:30 -08:00
Adrien M. Bernede bca0bb903e Add copyright to Github files 2021-02-03 10:13:55 -08:00
Adrien M. Bernede 1394613bbd Restrict regex to commented lines 2021-02-03 10:12:43 -08:00
Adrien M. Bernede 0f637bb582 Fix action so that it captures 2020 in copyrights 2021-02-03 10:08:36 -08:00
Adrien M. Bernede 769d4c6d84 Add action to check copyright. Check 2021 for failure demo. 2021-02-03 09:55:53 -08:00
Tzanio Kolev 438a458c3f Merge pull request #2009 from mfem/winsock-dev
Add winsock initialization to socketstream
2021-02-03 09:07:50 -08:00
Tzanio Kolev f76effcbbf Merge pull request #2021 from mfem/doc/forget-2020
Let's forget about 2020
2021-02-03 09:06:59 -08:00
Jakub Červený 71ed4771f5 Fix "test_linear_fes" unit test since mesh finalization is now strictly required by the FiniteElementSpace. 2021-02-03 13:23:39 +01:00
Josh Essman f9ff9a1004 feat: braced init-list construction for Array<T> plus test 2021-02-02 15:18:21 -08:00
Josh Essman 4987516479 feat: add init-list constructors for matrix/vector plus tests 2021-02-02 16:58:22 -06:00
Stowell, Mark L 1b8262c014 Removing new check in 1D and adding a comment reminding us to, one day, fix this issue. 2021-02-02 13:16:46 -08:00
Yohann Dudouit 028d6b6794 Remove unnecessary include in test_ceed. 2021-02-02 12:28:26 -08:00
Yohann Dudouit 72dce58ed5 Reorganize OperatorInfo attributes. 2021-02-02 11:45:42 -08:00
Yohann Dudouit df774919ce Improve readability of Ceed Integrators. 2021-02-02 11:28:57 -08:00
Yohann Dudouit 23ffdb43e5 More renaming of libceed to ceed. 2021-02-02 11:24:23 -08:00
Yohann Dudouit 46a1bf2ff7 Rename libceed to ceed in the tests. 2021-02-02 10:52:04 -08:00
Yohann Dudouit 36225982b7 Rename libceed folder to ceed. 2021-02-02 10:14:48 -08:00
Veselin Dobrev 3213213f00 In ex6p.cpp, add an option to choose between conforming
and nonconforming refinement for simplicial meshes.

Add two new sample runs using nonconforming refinement for
one 2D and one 3D simplicial meshes.
2021-02-01 23:25:44 -08:00
Andrew T. Barker 819648a334 Move temp vector initialization following review comment. 2021-02-01 16:47:20 -08:00
Jakub Červený 32f99feb2f Fixed FiniteElementSpace::GetHpConformingRestriction. 2021-02-01 21:35:51 +01:00
Michael Schneier 580489ed30 fixed comment formatting 2021-02-01 14:24:02 -05:00
Michael Schneier 7654126ff8 added code optimizations 2021-02-01 14:07:35 -05:00
William Dawn cd4a56212a making VTK reader more versatile 2021-02-01 11:00:58 -07:00
Jakub Červený 63ab31001f Fixed checks in FiniteElementSpace::Update related to orders_changed. 2021-02-01 17:12:51 +01:00
Jakub Červený 2ad51d2b63 Stronger check in FiniteElementSpace::Construct. 2021-01-31 21:37:20 +01:00
Tzanio 82dc265ce3 minor 2021-01-31 11:35:48 -08:00
Tzanio Kolev 08b339303b Merge pull request #1906 from mfem/hip-cmake-dev
Add AMD HIP support to CMake build system
2021-01-31 10:53:24 -08:00
Tzanio f6c2bc8c59 minor 2021-01-31 10:48:47 -08:00
Tzanio 76e34731d6 Merge branch 'master' into hip-cmake-dev 2021-01-31 10:46:35 -08:00
Tzanio fd5e641629 make style 2021-01-31 10:40:34 -08:00
Jakub Červený f341c19dd3 hpdemo: removed saving of variable-order solution (not implemented yet) 2021-01-31 19:31:28 +01:00
Veselin Dobrev 96532096bc Move the function mfem_hypre_ParCSRMatrixDropSmallEntries from
the mfem::internal namespace to a method of class HypreParMatrix
called DropSmallEntries.

For HYPRE versions < 2.14, DropSmallEntries will call the method
Threshold() with threshold = tol * max(l2 row norm).
2021-01-29 17:13:44 -08:00
Andrew T. Barker 6c5831d15e MatrixFreeAMS: add optional smoother argument to constructor 2021-01-29 10:15:59 -08:00
Andrew T. Barker eb149e7385 MatrixFreeAMS: remove timers 2021-01-29 09:44:31 -08:00
Andrew T. Barker 6799097db9 Various changes based on code review, mostly in comments / documentation. 2021-01-29 09:41:16 -08:00
Tzanio Kolev f5bebced46 Merge pull request #2010 from mfem/feature/tomstitt/clearable-cusparse-descrs
CuSparseClear for clearing CuSparse Descriptors
2021-01-28 15:57:48 -08:00
Yohann Dudouit 472afb7ea1 Remove unnecessary MFEM_USE_CEED. 2021-01-28 14:24:14 -08:00
Yohann Dudouit 907d15334c Make MFIntegrator and PAIntegrator constructors protected. 2021-01-28 09:54:25 -08:00
Yohann Dudouit 3c25d217e7 Replace a few more mfem_error with MFEM_ABORT. 2021-01-28 09:40:25 -08:00
Jakub Červený 68eac20de5 Improved documentation for var_edge_dofs and var_face_dofs. 2021-01-28 16:53:33 +01:00
Josh Essman e6f96b8b81 docs: update changelog 2021-01-28 08:40:42 -06:00
Jakub Červený a846cd77e0 MFEM NC mesh v1.0: added optional section "sfc_version" for future SFC changes. 2021-01-28 12:43:18 +01:00
Yohann Dudouit fcb10e2e59 Move EvalMode im integrator.hpp 2021-01-27 19:13:20 -08:00
Tzanio d572dc2ad6 Small adjustments 2021-01-27 18:51:46 -08:00
Yohann Dudouit 0948e35e69 Guard OperatorInfo. 2021-01-27 18:51:42 -08:00
Yohann Dudouit 5e78e90fe4 make style. 2021-01-27 18:48:59 -08:00
Yohann Dudouit a6491b1dc1 Improve docuementation in integrator.hpp 2021-01-27 18:42:33 -08:00
Yohann Dudouit 77a034d8f2 Add documentation to OperatorInfo. 2021-01-27 18:40:25 -08:00
Yohann Dudouit f6c3bea290 Put MFIntegrator and PAIntegrator in the same file. 2021-01-27 18:31:25 -08:00
Yohann Dudouit 939fdc1603 Add an OperatorInfo struct and make Mass,Convection,Diffusion,NLConvection Info inherit from it to simplify the design. 2021-01-27 18:21:36 -08:00
Yohann Dudouit 6fe3f64be4 Improve Assemble documentation. 2021-01-27 17:33:08 -08:00
Yohann Dudouit 4d67253c54 Remove InitMF and InitPA and fuse them with Assemble. 2021-01-27 17:27:22 -08:00
chakshinglee afda89b797 update CHANGELOG 2021-01-27 16:35:45 -08:00
Yohann Dudouit 16775ebe6b Fix failed merge. 2021-01-27 16:13:11 -08:00
Yohann 177e8b3eeb Merge branch 'master' into yohann/ceed-convection 2021-01-27 16:04:37 -08:00
Yohann Dudouit d70e5b855f Replace mfem_error with MFEM_ABORT. 2021-01-27 15:53:56 -08:00
Yohann Dudouit 55dcc6463b Remove irrelevant code. 2021-01-27 15:51:21 -08:00
chakshinglee 5f812bed09 fix gitignore 2021-01-27 15:50:47 -08:00
Yohann Dudouit d8b93f0f9f Make PAIntegrator inherit from Operator instead of MFIntegrator. 2021-01-27 15:33:17 -08:00
Yohann Dudouit 13634b53f2 Add a Mass+Diffusion test. 2021-01-27 15:22:18 -08:00
Yohann Dudouit 9e915223a3 Improve pa and mf integrator documentation. 2021-01-27 15:21:47 -08:00
Yohann Dudouit 89750bc6c8 Improve util.hpp documentation. 2021-01-27 15:02:12 -08:00
chakshinglee c992f3ff2c fix tab in makefile 2021-01-27 15:01:43 -08:00
chakshinglee 9c926350fb fix makefiel 2021-01-27 14:54:46 -08:00
Yohann Dudouit 3140de1197 Rename {PA,MF}NLConvectionIntegrator to {PA,MF}VectorConvectionNLFIntegrator. 2021-01-27 14:52:06 -08:00
Yohann Dudouit 98026fd8c0 Improve coefficient.hpp documentation. 2021-01-27 14:46:01 -08:00
Yohann Dudouit 388ebd34c3 Rename ceed::*Info into ceed::*OperatorInfo. 2021-01-27 14:40:57 -08:00
chakshinglee 5ab9df8422 adjust the content of README in miniapps/solvers 2021-01-27 14:40:44 -08:00
Yohann Dudouit 122b685931 Replace mfem_error with MFEM_ABORT. 2021-01-27 14:37:57 -08:00
chakshinglee e23f85dbc5 fix path and names in makefiles 2021-01-27 13:35:21 -08:00
chakshinglee 5598afbf09 rename directory blocksolvers to solvers 2021-01-27 12:37:07 -08:00
chakshinglee c58491cc3d rename some files in blocksolvers 2021-01-27 12:28:14 -08:00
chakshinglee 553d48468f fix headers 2021-01-27 12:17:04 -08:00
Tzanio Kolev febe2ac5b5 Merge pull request #1727 from mfem/wcdawn/nonscalar-VectorDiffusionIntegrator
Support for VectorCoefficient and MatrixCoefficient with VectorDiffusionIntegrator [wcdawn/nonscalar-VectorDiffusionCoeficient]
2021-01-27 09:43:37 -08:00
Tzanio dd0f930417 updated CHANGELOG 2021-01-27 09:42:44 -08:00
Tzanio d6ccd49491 Merge branch 'master' into wcdawn/nonscalar-VectorDiffusionIntegrator 2021-01-27 09:41:25 -08:00
Tzanio 1bd2e86cc5 minor 2021-01-27 09:39:15 -08:00
Tzanio 59703e36ed Updated comments 2021-01-27 09:30:18 -08:00
Andrew T. Barker 466743498e Fix underscore confusion. 2021-01-27 08:35:30 -08:00
chakshinglee 514e6bd72d fix wrong operator pointer in ProductSolver 2021-01-26 18:48:05 -08:00
chakshinglee fcc2ac87a8 Merge branch 'master' of https://github.com/mfem/mfem into chak/div-free-solver 2021-01-26 18:13:56 -08:00
chakshinglee d2706e0677 fix trailing underscore in DirectSubBlockSolver and ProductSolver 2021-01-26 18:12:40 -08:00
chakshinglee cddc73a424 rename BlockDiagSolver to DirectSubBlockSolver 2021-01-26 17:54:33 -08:00
chakshinglee a274cfeaac add a wrapper to call hypre_ParCSRMatrixDropSmallEntries independent of the version of hypre 2021-01-26 17:44:02 -08:00
Tom Stitt c0833d45c9 missed Destroy on first commit... 2021-01-26 17:03:44 -08:00
Adrien M. Bernede 04fb572359 Let's forget about 2020 2021-01-26 11:55:36 -08:00
Will Pazner da1c6e4f09 Update CHANGELOG 2021-01-26 09:05:08 -08:00
Veselin Dobrev 852e346258 In HypreAMS and HypreADS, do not use the mesh vertices when
the mesh has nodes, and instead construct the necessary
operators similar to high-order spaces.
2021-01-25 17:51:13 -08:00
Will Pazner ffda2a17e4 Merge remote-tracking branch 'origin/master' into lor-all-elements 2021-01-25 10:11:42 -08:00
Robert Chiodi 54fdbf86d6 Fix usage of HYPRE_Int. 2021-01-25 10:20:54 -07:00
Max Yang a825ad6d39 Run astyle 2021-01-25 08:29:57 -08:00
Max Yang ae70ea7e43 Use winsock init variable to work around unused variable error 2021-01-25 08:29:15 -08:00
Tzanio 8223e31905 Pragma unroll fix for Intel? 2021-01-22 13:27:15 -08:00
Tom Stitt 133b6280e7 Adds ClearCuSparse, which clears the descriptors; to be used after releasing the cusparse device memory 2021-01-22 11:54:59 -08:00
Max Yang 495e641b42 Add winsock initialization to socketstream 2021-01-22 11:11:28 -08:00
Will Pazner 24bb81f961 Merge remote-tracking branch 'origin/master' into lor-all-elements 2021-01-21 15:56:40 -08:00
Yohann Dudouit 0a9a969c99 make more style. 2021-01-21 13:09:03 -08:00
Yohann Dudouit 1e93c9d892 Add a MFEM_USE_CEED guard. 2021-01-21 13:05:06 -08:00
Yohann Dudouit 64719c8da9 make style 2021-01-21 13:03:12 -08:00
Yohann 152a5845ca Merge branch 'master' into yohann/ceed-convection 2021-01-21 12:48:12 -08:00
Yohann Dudouit 9d3a4ba0ab Add a ceed namespace. 2021-01-21 12:33:21 -08:00
Michael Schneier a7c7b28819 fixed formatting and comments 2021-01-21 13:29:05 -05:00
Michael Schneier 21f1377ad5 fixed formatting and comments 2021-01-21 13:23:49 -05:00
Michael Schneier ace270d7c1 fixed formatting and comments 2021-01-21 13:23:41 -05:00
Tzanio 278b1ec7a9 Proposed fix for issue 2003 2021-01-21 08:34:12 -08:00
Jakub Červený 41089b9a19 Fixed v1.1 compatibility: legacy NC mesh honors leaf element order in file. 2021-01-21 12:19:49 +01:00
Andrew T. Barker 53be0a3c9f Make sure this compiles in serial. 2021-01-19 11:27:04 -08:00
Andrew T. Barker afcce33a07 Cleaner, more complete documentation. 2021-01-19 10:13:28 -08:00
Andrew T. Barker dee92b1497 Various style and readability improvements, update CHANGELOG. 2021-01-19 08:54:11 -08:00
Andrew T. Barker 9b847ddcff Merge remote-tracking branch 'origin/master' into barker29/matrix-free-ams 2021-01-19 08:01:28 -08:00
Andrew T. Barker 4eda8d4fa0 Clean up initialization order warnings. 2021-01-19 07:44:29 -08:00
Andrew T. Barker 656f1c146e Merge branch 'barker29/matrix-free-ams' of github.com:mfem/mfem into barker29/matrix-free-ams 2021-01-19 07:37:43 -08:00
Jakub Červený 8509a8fde0 Fixed a typo in CHANGELOG 2021-01-15 18:05:05 +01:00
Jakub Červený b9809db7d7 ex6, ex6p: reverted to zero-based numbering of iterations 2021-01-15 17:44:27 +01:00
Jakub Červený bed65fd34d Legacy GridFunctions are now automatically converted to new vertex ordering on load. 2021-01-15 17:35:20 +01:00
William Dawn 1c5d7c32e2 add support for nonscalar coefficient with VectorDiffusionIntegrator 2021-01-14 13:28:32 -07:00
Jakub Červený 65c9a629c3 ex6: changed 'it' to start from 1, for consistency with ex6p. 2021-01-14 09:21:51 +01:00
Michael Schneier 305f342a39 fixed typo 2021-01-13 19:04:08 -05:00
Michael Schneier e393acf0f0 fixed formatting 2021-01-13 18:59:30 -05:00
Michael Schneier 2b971db1b4 switch integrator to inherit from VectorConvectionNLFIntegrator 2021-01-13 18:39:30 -05:00
Michael Schneier 41f52fcf46 switch integrator to inherit from VectorConvectionNLFIntegrator 2021-01-13 18:39:18 -05:00
Michael SchneierandYohann 73c9ea57a6 Update fem/nonlininteg.cpp
Co-authored-by: Yohann <dudouit1@llnl.gov>
2021-01-13 18:31:00 -05:00
Michael SchneierandYohann 679df8872b Update fem/nonlininteg.hpp
Co-authored-by: Yohann <dudouit1@llnl.gov>
2021-01-13 18:30:16 -05:00
Michael SchneierandYohann b20caa4c32 Update fem/nonlininteg.cpp
Co-authored-by: Yohann <dudouit1@llnl.gov>
2021-01-13 18:29:18 -05:00
Michael SchneierandYohann b6e6df4ef0 Update fem/nonlininteg.cpp
Co-authored-by: Yohann <dudouit1@llnl.gov>
2021-01-13 18:21:54 -05:00
Michael SchneierandYohann d2f1d647c7 Update fem/nonlininteg.cpp
Co-authored-by: Yohann <dudouit1@llnl.gov>
2021-01-13 18:21:46 -05:00
Jakub Červený 4473857a93 (Should normally be disabled) 2021-01-13 20:31:07 +01:00
Jakub Červený 32ed640538 Old vertex ordering for testing purposes. 2021-01-13 20:30:25 +01:00
Yohann 19716dd92c Merge branch 'master' into yohann/ceed-convection 2021-01-11 13:33:42 -08:00
Bernede cf6a0df279 Oversight: apply script renaming in scripts 2021-01-11 10:43:22 +01:00
Tzanio 8747bfca09 small adjustments 2021-01-10 15:45:19 -08:00
Jakub Červený c40d97d2af Merge branch 'master' into par-ncmesh-saving-dev 2021-01-08 17:34:17 +01:00
Jakub Červený 4ebf1d589d Improved documentation of var-order bit-masks. 2021-01-08 16:45:55 +01:00
Jakub Červený 2aa792b9cf Addressed Will's comments (GetMaxElementOrder and restored some checks). 2021-01-08 16:13:32 +01:00
Jakub Červený e2d17e8a8d Remove all debugging code. 2021-01-08 15:41:27 +01:00
Jakub Červený 878364ef0e Ensure 'vertices' are valid even if 'Nodes' are set in the NC case. Remove debug code. 2021-01-08 15:38:54 +01:00
Michael Schneier a7d5a588ab removed unused variables 2021-01-08 08:47:00 -05:00
Jakub Červený 906bdfd343 Replaced "owned" with "local" in the documentation of UpdateVertices. 2021-01-08 09:35:59 +01:00
Jakub Červený 21b16ef241 Debugging code trying to fix parallel edge orientations. 2021-01-07 21:45:01 +01:00
Bernede ef86539b91 Fix wrong mfem-uberenv version 2021-01-07 18:46:28 +01:00
Bernede 8e817d2ab1 Local README, Contributing and Changelog 2021-01-07 15:49:00 +01:00
Bernede 67a4dfa645 Fix generate upstream 2021-01-07 12:27:12 +01:00
Bernede 716f45d4b5 Fix oversight: upstream-permission moved to mfem-uberenv repo 2021-01-07 10:50:32 +01:00
Bernede 3e37f01665 copyright headears 2021-01-07 10:21:23 +01:00
Bernede 555dc52dd6 Remove .sh extension for scripts 2021-01-07 10:12:39 +01:00
Michael Schneier ad63fe64a2 fixed formatting 2021-01-07 00:51:47 -05:00
Michael Schneier ba19db5a54 nonlininteg.hpp
fixed documentation
2021-01-07 00:45:28 -05:00
Michael Schneier 1fcdd61d11 add convective and skew-symmetric integrator 2021-01-06 23:24:32 -05:00
Josh Essman 3b76df45f3 fix: introduce mfem_add_* macros for delegating to HIP wrappers 2021-01-06 14:22:50 -08:00
Yohann Dudouit 98c9793d93 Move the libCEED extension in NonlinearFormIntegrator. 2021-01-06 14:21:25 -08:00
Yohann Dudouit 63b73f5095 Lower the order of the ceed tests to only order 1. 2021-01-06 13:58:03 -08:00
Yohann Dudouit 04676ad0ac Check that diffusion is not used with symMat coeff. 2021-01-06 13:56:24 -08:00
Yohann a6939d3cc9 Merge branch 'master' into yohann/ceed-convection 2021-01-06 13:51:43 -08:00
Yohann Dudouit 45cbbe7efb Add documentation. 2021-01-06 13:47:58 -08:00
Yohann Dudouit ad7fd2fe82 Rename qFunction libCEED files with _qf. 2021-01-06 13:47:58 -08:00
YohannandWill Pazner e737b5bb43 Update fem/libceed/util.cpp
Co-authored-by: Will Pazner <11493037+pazner@users.noreply.github.com>
2021-01-06 13:47:58 -08:00
YohannandWill Pazner 91e6d99582 Update fem/libceed/operator.hpp
Co-authored-by: Will Pazner <11493037+pazner@users.noreply.github.com>
2021-01-06 13:47:58 -08:00
Will Pazner 01860b5382 Try different workaround for gcc 4.8 bug 2021-01-06 13:47:58 -08:00
Will Pazner 68c6a62751 Add ifdef guard 2021-01-06 13:47:58 -08:00
Will Pazner 526b910ab7 Add missing include 2021-01-06 13:47:58 -08:00
Will Pazner 02b97fcb01 make style 2021-01-06 13:47:58 -08:00
Will Pazner a92bfb7715 Workaround for GCC 4.8 bug 60199
error: field initializer is not constant
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60199
2021-01-06 13:47:58 -08:00
Will Pazner e29122e96a Fix CEED MF coefficient bug 2021-01-06 13:47:58 -08:00
Will Pazner 4220e083e1 CEED coefficient bug fix 2021-01-06 13:47:58 -08:00
Will Pazner 22a1bba5a7 make style 2021-01-06 13:47:58 -08:00
Will Pazner 278fa7235d Refactor CEED PA and MF assembly 2021-01-06 13:47:58 -08:00
Will PaznerandYohann 00bb7bbdb0 Update fem/libceed/mf_integrator.hpp
Co-authored-by: Yohann <dudouit1@llnl.gov>
2021-01-06 13:47:58 -08:00
Will Pazner eba5e69401 Overload InitCeedCoeff 2021-01-06 13:47:58 -08:00
Will Pazner ed9dd4db0c Update unit tests 2021-01-06 13:47:58 -08:00
Will Pazner 521338a369 Improve IsConstant check 2021-01-06 13:47:58 -08:00
Will Pazner ff9dd9e87c Get rid of CeedCoeffType 2021-01-06 13:47:58 -08:00
Will Pazner a062036b4c Work on refactoring coefficient 2021-01-06 13:47:58 -08:00
Yohann Dudouit 3d875d9194 Reorder CMakeLists. 2021-01-06 13:47:58 -08:00
Yohann Dudouit 9a2204b421 Remove coefficient.cpp from CMakeLists. 2021-01-06 13:47:58 -08:00
Yohann Dudouit 8c4dd7e929 Initialize Context coefficient in InitCeedCoeff. 2021-01-06 13:47:58 -08:00
Yohann Dudouit 34aa11fde1 Make MFEMCeedOperator inherit from Operator.- Rename Mult to AddMult- Add Mult method 2021-01-06 13:47:58 -08:00
Yohann Dudouit c8cce331bc make style 2021-01-06 13:47:58 -08:00
Yohann Dudouit abbd9ffd4a make some style. 2021-01-06 13:47:58 -08:00
Yohann Dudouit 74782a6a2e Update CHANGELOG 2021-01-06 13:47:58 -08:00
Yohann Dudouit 2a4d29a08b Update CMakeLists 2021-01-06 13:47:58 -08:00
Yohann Dudouit 0aad4ac21d Minor 2021-01-06 13:47:58 -08:00
Yohann Dudouit 894ad6b861 Add MFEM_USE_CEED guards. 2021-01-06 13:47:58 -08:00
Yohann Dudouit 544c9a4f7b Use specialized contect for each CeedQFunction. 2021-01-06 13:47:58 -08:00
Yohann Dudouit 4f2affb28c Delete ceed.hpp 2021-01-06 13:47:58 -08:00
Yohann Dudouit 6ee1f14145 Add some forgotten code. 2021-01-06 13:47:58 -08:00
Yohann Dudouit 94c5d65d91 Fix CeedMassIntegrator. 2021-01-06 13:47:58 -08:00
Yohann Dudouit e2e5d5fc80 V0 of the refactored libCEED. 2021-01-06 13:47:58 -08:00
Stowell, Mark L c46e3f1c80 Add checks for invalid higher dimensional branching 2021-01-06 11:33:28 -08:00
chakshinglee 0cd88aeeb7 Merge branch 'chak/hypresmoother-transpose' of https://github.com/mfem/mfem into chak/div-free-solver 2021-01-05 20:30:06 -08:00
chakshinglee 1f24c0bb5f use the new MultTranspose setup in HypreSmoother 2021-01-05 19:40:05 -08:00
chakshinglee ba40bf9c9a resolve conflicts from merging hypresmoother-transpose 2021-01-05 19:12:04 -08:00
Gauthier Folzan ca4d9b5ccd returning value through variable static const double zero 2021-01-05 23:49:13 +01:00
Josh Essman feb61cc55f feat: add HIP_ARCH and associated flag 2021-01-05 14:39:09 -06:00
Gauthier Folzan 680fcf0f1a Return 0 when element is undefined 2021-01-05 21:16:51 +01:00
Josh Essman 361ca5d795 fix: add HIP source/header files to CMake build 2021-01-05 10:49:35 -08:00
Josh Essman 32b0a040a1 fix: cmakedefine MFEM_USE_HIP 2021-01-05 10:30:39 -08:00
chakshinglee b092af06c8 Merge branch 'master' of https://github.com/mfem/mfem into chak/div-free-solver 2021-01-04 11:11:50 -08:00
Jakub Červený 736fb69076 Merge branch 'master' into par-ncmesh-saving-dev 2020-12-30 13:38:20 +01:00
Dylan Copeland defa968cb2 Adding some AMR tests for element global indices, and more documentation. 2020-12-29 10:10:20 -08:00
Dylan Copeland 961adafe92 Making global index functions const. 2020-12-27 10:04:05 -08:00
Morteza H. Siboni db1ccd911a Fixes loop lower bound + return values rotation 2020-12-26 19:24:06 -05:00
Dylan Copeland 4a678cfc85 Interpreting 1D "edges" as vertices. 2020-12-26 13:03:31 -08:00
Dylan Copeland ae99aaae94 Minor change. 2020-12-26 12:19:47 -08:00
Dylan Copeland 35e1e1abb2 Removed excessive sanity checks. Added 1D unit tests. Made face version call edge or vertex version in 2D or 1D. 2020-12-26 12:15:33 -08:00
Morteza H. Siboni 655f583cae Updates xi rotation routines for pumi
Now things work for 2D triangular meshes as well
2020-12-26 14:45:09 -05:00
Jakub Červený c80bbb034a Improved documentation, added const. 2020-12-26 20:20:17 +01:00
Jakub Červený 44a954c5f8 Improvements in fespace.hpp suggested by Will 2020-12-26 19:49:12 +01:00
Jakub Červený f99d8c3116 NC mesh header is now "MFEM NC mesh v1.0". 2020-12-26 18:53:58 +01:00
Will Pazner 42300412e7 Merge branch 'feature/vtk_high_order' into lor-all-elements 2020-12-26 00:09:50 -08:00
Tzanio 03c596d001 make style 2020-12-24 11:34:43 -08:00
Guillaume Latu 3e2977568f Improve several comments 2020-12-24 11:01:00 +01:00
Tzanio e7dd9bfee6 typo 2020-12-23 14:03:34 -08:00
Veselin Dobrev 293a9e1c03 In slepc.hpp, instead of defining globally SLEPc's EPS type use
an alias: mfem::slepc::EPS, aka `struct _p_EPS *`.

This resolves GitHub issue #1962.
2020-12-22 19:01:37 -08:00
Tzanio acef3849d2 Update CHANGELOG for #1392 2020-12-22 15:49:07 -08:00
Tzanio 97c88fc34d Merge branch 'master' into par-ncmesh-saving-dev 2020-12-22 15:41:19 -08:00
Adrien M. Bernede 3dd1f5cd99 Update mfem-uberenv 2020-12-16 10:00:52 -08:00
Adrien M. Bernede db56d7b87d Moving gitlab scripts to tests dir and patch to uberenv repo 2020-12-16 09:59:22 -08:00
Gauthier Folzan e60e9a0a81 Using static_cast instead of a const reference 2020-12-15 10:03:00 +01:00
Gauthier Folzan 88558ba552 Correction in the example description 2020-12-15 09:54:11 +01:00
LATU Guillaume 224549 89090af019 Propose another algorithm, which is in a more conservative form. It only adds new capabilities whenever periodicities are defined in multiple directions. 2020-12-11 08:59:48 +01:00
LATU Guillaume 224549 7e975076ac Propose another algorithm, which is in a more conservative form. It only adds new capabilities whenever periodicities are defined in multiple directions. 2020-12-11 08:51:41 +01:00
Dylan Copeland 75318943cc Simplified ParMesh::GetGlobalElementIndices by eliminating use of a ParFiniteElementSpace. 2020-12-10 21:26:12 -08:00
Adrien M. Bernede c81537641f Merge branch 'master' into feature/testing-with-spack 2020-12-09 18:33:36 -08:00
Adrien M. Bernede 6a6336b0e2 Returning to github repo, error was in spack database permissions 2020-12-09 18:11:45 -08:00
Adrien M. Bernede c13aed4f85 Temp: use https on gitlab + fix case were directory already exist (out of CI) 2020-12-09 17:50:05 -08:00
Adrien M. Bernede dba572b671 Temp: use repo on gitlab to workaround sync issues 2020-12-09 14:03:40 -08:00
LATU Guillaume 224549 6f617ba4f6 Indentation fix 2020-12-09 18:28:35 +01:00
LATU Guillaume 224549 40087ad639 Fix issue #1937
Reading GMSH mesh as input file, in the $Periodic section, we now consider that the Affine keyword and associated line are optional
2020-12-09 16:21:55 +01:00
LATU Guillaume 224549 6cb79525e2 In 2D case and for negative determinant, vi variable is undefined and it leads to segmentation fault 2020-12-09 15:28:03 +01:00
Gauthier Folzan 307656ae04 Force using const version to prevent error when accessing undefined terms 2020-12-09 09:47:54 +01:00
Gauthier Folzan 2fc7f65dbe Correction in the non const version 2020-12-09 09:09:30 +01:00
Adrien Bernede 581dae9dbe Merge pull request #1903 from mfem/feature/external-uberenv
Feature/external uberenv
2020-12-08 17:16:32 -08:00
Gauthier Folzan 3560806662 Fixing wrong index for null block test 2020-12-08 16:34:51 +01:00
LATU Guillaume 224549 6f92eee532 Bugfix proposal for issue #1928 2020-12-08 15:40:16 +01:00
Will Pazner d50d924f7e Fix bug when using closed uniform LOR
Caused by using BasisType::ClosedUniform instead of
Quadrature1D::ClosedUniform. Have to be careful, especially since
ref_type in the Mesh constructor and t in GeometryRefiner::SetType are
both ints (i.e. weakly typed), so the compiler will not complain when
using one instead of the other.
2020-12-05 11:24:56 -08:00
Jakub Červený 25ba1f7eb3 Unit test: added solve check with exact solution. 2020-12-05 19:18:59 +01:00
Adrien M. Bernede f862a50433 Use mfem-uberenv github repo 2020-12-04 22:45:02 -08:00
Adrien M. Bernede ecc3dcbb87 Update mfem-uberenv 2020-12-04 18:22:27 -08:00
Adrien M. Bernede a9e47b5ff1 Update mfem-uberenv 2020-12-04 18:22:27 -08:00
Adrien M. Bernede 6ae0d3bf78 Update mfem-uberenv 2020-12-04 18:22:27 -08:00
Adrien M. Bernede de1c9894f8 Update mfem-uberenv 2020-12-04 18:22:27 -08:00
Adrien M. Bernede a990445590 Use an script to retrieve uberenv (useful out of CI context) 2020-12-04 18:22:27 -08:00
Adrien M. Bernede 399fa19506 First attempt at using external uberenv 2020-12-04 18:22:27 -08:00
Adrien M. Bernede df324e2663 Remove uberenv 2020-12-04 18:22:27 -08:00
Jakub Červený 05cfc5ee70 Updated CHANGELOG 2020-12-04 17:54:39 +01:00
Jakub Červený 917bdf9588 Merge branch 'master' into var-order-space-dev 2020-12-04 17:20:08 +01:00
Jakub Červený bfdb3baa7d Added prism test (edge-face constraint) 2020-12-04 17:18:22 +01:00
Jakub Červený 6d71876ac6 Unit tests for quad/hex meshes. Improved docs. 2020-12-04 15:28:11 +01:00
Yohann Dudouit 63953f55ff Add an error message for L2 Positive mesh. 2020-12-03 15:57:24 -08:00
Yohann Dudouit a0576314a1 make style 2020-12-03 15:32:19 -08:00
Yohann Dudouit a157286e4e make style 2020-12-03 15:08:11 -08:00
Yohann 22fb26d920 Merge branch 'master' into yohann/ceed-convection 2020-12-03 15:03:07 -08:00
YohannandWill Pazner dc79999f3e Update CHANGELOG
Co-authored-by: Will Pazner <11493037+pazner@users.noreply.github.com>
2020-12-03 15:01:56 -08:00
Yohann Dudouit 40799aa8bc Check the value of alpha for Convection with libCEED. 2020-12-03 14:58:08 -08:00
Yohann Dudouit 308d9c4c8a Fix VecQuad strided restrictions. 2020-12-03 11:55:03 -08:00
Jakub Červený f7695e1587 WIP unit tests for var-order space. 2020-12-03 19:15:09 +01:00
Jakub Červený ff2af90308 Cleanup and minor changes. 2020-12-03 12:07:49 +01:00
Jakub Červený 2f2a7d5f4e Renamed FEColl::NewOrder() to CloneOrder(). 2020-12-03 10:44:39 +01:00
Jakub Červený d2bc2b24a8 Don't allocate var_face_orders for mixed faces. Renamed DefaultOrder to GetOrder. 2020-12-03 10:34:09 +01:00
Yohann Dudouit 02b6f77c85 Even more complex velocity coefficient. 2020-12-02 16:06:55 -08:00
Yohann Dudouit cd838a0c46 Remove static 2020-12-02 15:59:07 -08:00
Yohann Dudouit 2a911f6779 Change velocity coefficient in tests. 2020-12-02 15:58:51 -08:00
Yohann Dudouit c497589234 Handles Positive basis in mesh and pmesh. 2020-12-02 15:46:41 -08:00
Yohann Dudouit 16446449eb Add Bernstein basis in the test. 2020-12-02 15:09:00 -08:00
Yohann Dudouit eef2a04f72 Fix a bug in the trace elements of L2_FECollection 2020-12-02 14:31:05 -08:00
Yohann Dudouit 7d3b60f5bb Revert SpMat. 2020-12-02 12:53:40 -08:00
Jakub Červený b3b34b56b2 Fixed support of mixed meshes (edge-face constraints). 2020-12-02 20:00:55 +01:00
Jakub Červený b82f13a3b2 Reworked edge/face variant orders, mixed 3D meshes now work. 2020-12-02 18:06:23 +01:00
Yohann Dudouit 982f38e20d Fix bugs in libCEED's Convection. 2020-12-01 19:25:21 -08:00
Yohann Dudouit 33e3cb7c5e Reorder values at quad pts for VecCoeff. 2020-12-01 19:23:42 -08:00
Adrien M. Bernede 524473ee55 Helper to generate spack upstream of MFEM dependencies 2020-12-01 14:55:53 -08:00
Yohann Dudouit 7c84ffe4e3 Remove DGMult from private methods for device use. 2020-12-01 11:07:27 -08:00
Adrien M. Bernede b97561cb06 Fix use shared upstream 2020-12-01 10:28:31 -08:00
Adrien M. Bernede a00c2496a3 Fix use spack_branch instead of spack_commit 2020-12-01 10:18:02 -08:00
Yohann Dudouit bb0b9bd62c make style. 2020-11-30 16:59:09 -08:00
Yohann Dudouit cfaea45f1b Remove warning. 2020-11-30 16:42:42 -08:00
Yohann Dudouit 198a2bd3ab Factorize DG code into DGMult and DGMultTranspose. 2020-11-30 16:40:29 -08:00
Yohann Dudouit 0888b8a831 make style 2020-11-30 15:58:35 -08:00
Jakub Červený c7c5ae1541 Fixed R_hp matrix for 3D, renamed to HpConformingRestriction, documented. 2020-11-27 16:38:43 +01:00
Jakub Červený 0b5bacf4a6 Renamed GetElementPolyDegree to a simpler GetElementDegree. 2020-11-27 15:41:01 +01:00
Jakub Červený 3b31ed12dc Fixed variant, order in GetDegenerateFaceDofs. 2020-11-27 15:35:55 +01:00
Jakub Červený 20840b9127 Fixed ndof->order mapping in FES::GetEdgeDofs. 2020-11-27 14:22:31 +01:00
Jakub Červený f929589e99 Fixed 3D cases (incorrectly merged AddEdgeFaceDependencies). 2020-11-27 13:50:41 +01:00
Jakub Červený 69bcfa5e87 Debugging 3D var-order interpolation... 2020-11-26 19:58:22 +01:00
Jakub Červený 6e17853ac4 Fixed uninitilized 'orders_changed'. 2020-11-26 14:37:27 +01:00
Jakub Červený adb58e26f5 Added orders_changed checks. 2020-11-26 12:50:40 +01:00
Jakub Červený 47c9eec203 Fixed incorrectly finalized mesh in polar-nc miniapp. 2020-11-25 18:01:50 +01:00
Jakub Červený 03220b5e01 Replaced more occurrences of FESpace::GetOrder. 2020-11-25 16:16:38 +01:00
Jakub Červený 6e8a3372fc Introduced GetElementPolyDegree, deprecated GetOrder. 2020-11-25 14:56:17 +01:00
Adrien M. Bernede 0cdb23f106 Add mumps to petsc for ex5p to pass. comment out serac specs 2020-11-24 22:13:36 -08:00
Adrien M. Bernede 917ae2d7b2 Do not use spec to create directory 2020-11-24 13:36:40 -08:00
Josh Essman 06883c6719 organization: replace HIP_FOUND with MFEM_USE_HIP for consistency 2020-11-24 10:52:00 -08:00
Josh Essman 0359da06ce organization: move HIP find_package 2020-11-24 10:49:46 -08:00
Josh Essman 7e26ee335d cleanup: switch to set_source_files properties for consistency 2020-11-24 10:44:18 -08:00
Josh Essman 371e8cd48c fix: convert macros to functions to allow HIP variables to propagate correctly 2020-11-24 09:26:06 -08:00
Adrien M. Bernede b12c04b42c Add necessary patches 2020-11-23 18:49:21 -08:00
Adrien M. Bernede 14ceee69c2 update spack package based on WIP branch 2020-11-23 17:35:52 -08:00
Adrien M. Bernede 51a2409754 Spack config: fix deprecated yaml syntax 2020-11-23 14:19:37 -08:00
Yohann Dudouit 28b86dd378 Add a virtual to a base class method... (use override next time...) 2020-11-23 14:02:49 -08:00
Yohann Dudouit 526b394940 Rewritte Full Assembly. 2020-11-23 13:23:41 -08:00
Will Pazner 043d9c820b Merge remote-tracking branch 'origin/xml_vtk' into lor-all-elements 2020-11-20 11:21:15 -08:00
Jakub Červený 7955174550 Fixed ParFESpace::GetFaceDofs virtual overload 2020-11-20 19:26:22 +01:00
Will Pazner 681214fcfb Arbitrary element and mixed mesh support in LOR transfer 2020-11-20 09:32:48 -08:00
Will Pazner b97f772c65 Fix minor issues in LOR mesh creation 2020-11-20 09:32:27 -08:00
Jakub Červený 6ea59a8a5e Add hpdemo to .gitignore 2020-11-20 16:50:42 +01:00
Jakub Červený a2aa3d8dcc Fixed dim == 0 space (test_linear_fes) 2020-11-20 16:36:19 +01:00
Jakub Červený d90ba7b8f1 Moved ex1 demo to "hpdemo"; fixed NC check; cleaned up 2020-11-20 15:24:35 +01:00
Jakub Červený 9a4446d0ea Added checks for NC mesh if var-order, fixed CreateRefinedMesh (LOR) 2020-11-20 14:36:45 +01:00
Will Pazner 2a94a3f240 LOR for all element types 2020-11-19 17:06:45 -08:00
Will Pazner 547a9e999e Merge remote-tracking branch 'origin/xml_vtk' into lor-all-elements 2020-11-19 17:06:24 -08:00
Will Pazner 4d00fea67a Add (trivial) lexicographic ordering for point element 2020-11-19 16:57:45 -08:00
Jakub Červený 1fbfad9cf2 Fixed FESpace::GetFaceDofs for 2D faces. 2020-11-19 17:30:12 +01:00
Adrien M. Bernede 0f1d9f8f87 Merge branch 'master' into feature/testing-with-spack 2020-11-18 15:07:15 -08:00
Josh Essman ec6cbc67e7 build: add initial FindHIP utils from ROCm develop 2020-11-18 10:23:15 -08:00
Jakub Červený a2fb8e2fda Added a check when attempting to convert conforming ParMesh to an NC mesh. 2020-11-18 11:10:21 +01:00
Jakub Červený 755fe0c3ff Added some comments and clarifications. 2020-11-18 10:36:50 +01:00
chakshinglee 93edc87839 minor 2020-11-16 17:38:32 -08:00
chakshinglee 2bc9cff24b add preprocessor flag to address serial build 2020-11-16 17:24:03 -08:00
chakshinglee dac171ab88 fix tab 2020-11-16 16:12:06 -08:00
chakshinglee 921118340a update make clean and .gitignore 2020-11-16 15:23:37 -08:00
chakshinglee f7595fec2a better printout 2020-11-16 15:05:02 -08:00
chakshinglee db53da2fa4 call hypre instead of the Threshold routine in HypreParMatrix 2020-11-16 14:41:17 -08:00
chakshinglee b39e226e7e fix style and add some debug prints 2020-11-16 13:17:16 -08:00
Dylan Copeland 17d9ae23ac Compiler warning fix 2020-11-16 13:13:14 -08:00
Dylan Copeland aed0c96eba Minor 2020-11-16 12:23:22 -08:00
Dylan Copeland 8211cfe56e Adding new ParMesh member functions for getting an arbitrarily-defined global indexing of vertices, edges, faces, or elements. Unit tests are also added. 2020-11-16 12:15:13 -08:00
chakshinglee 027c286882 better documentation 2020-11-16 11:38:39 -08:00
chakshinglee 83e6ec018b Merge branch 'master' of https://github.com/mfem/mfem into chak/div-free-solver 2020-11-16 08:23:53 -08:00
Jakub Červený 8ee6026073 Reverted to star.mesh in ex6p (star-hilbert is better but it would probably throw off testing). 2020-11-14 11:01:40 +01:00
Adrien M. Bernede c3661682a8 Optim: move setup and have baseline starting right after it 2020-11-13 18:13:00 -08:00
Adrien M. Bernede 30b4bf9db4 Build on /dev/shm 2020-11-13 18:13:00 -08:00
Adrien M. Bernede 9536b73fe9 Update uberenv 2020-11-13 18:13:00 -08:00
Adrien M. Bernede b04a9c8e78 Limit threads per builds and update uberenv 2020-11-13 18:12:29 -08:00
Adrien M. Bernede 5b13af72f6 Fix host-config issue: use config.mk and skip config phase 2020-11-13 18:04:40 -08:00
Adrien M. Bernede 1b983a2a52 Use upstream on Pull Requests 2020-11-13 18:04:39 -08:00
Jakub Červený 5094db3bb9 Fixed FESpace::Update() for NURBS meshes. 2020-11-13 16:26:02 +01:00
Jakub Červený 5a8b15785e Merge branch 'master' into var-order-space-dev 2020-11-13 13:26:11 +01:00
Jakub Červený 3b2d278a57 Fix style, prepare to fix GetDegenerateFaceDofs. 2020-11-13 13:10:36 +01:00
Jakub Červený 11e162d8f5 FESpace::GetOrder(i): workaround for AMS/ADS solvers. 2020-11-13 12:36:28 +01:00
Jakub Červený dd24809ceb electromagnetics/cylinder-{hex,tet}.mesh: convert to v1.0 format, convert CRLF 2020-11-13 10:34:53 +01:00
Jakub Červený e887dba671 Reverting miniapps/electromagnetics/cylinder-*.mesh 2020-11-13 10:33:30 +01:00
Yohann c6eb726148 Merge branch 'master' into yohann/ceed-convection 2020-11-12 16:11:33 -08:00
Yohann Dudouit eeaa46b281 @barker29 review remarks. 2020-11-12 16:07:30 -08:00
chakshinglee b87893db5e fix makefile 2020-11-12 12:15:19 -08:00
chakshinglee f0c0ca4fbd fix makefile 2020-11-12 10:38:34 -08:00
chakshinglee c2d45363ac fix makefile 2020-11-12 09:51:44 -08:00
chakshinglee 1055859b91 fix tab in makefile 2020-11-12 09:40:46 -08:00
chakshinglee 7f924174f2 include both coupled and decoupled modes divfree solver in the comparison instead of just one of them (based on the user provided input) 2020-11-12 09:30:20 -08:00
chakshinglee 77008ec8bf allow user to provide mesh, coefficient, essential boundary attribute files 2020-11-12 08:29:36 -08:00
Jakub Červený 6f8fbb43f3 Improved detection of non-matching communicator size in ParNCMesh. 2020-11-11 11:53:58 +01:00
Jakub Červený 8c45889881 ex6p: added the option --max-dofs to the command line. 2020-11-11 11:23:51 +01:00
Jakub Červený 210c1c2b3c Merge branch 'master' into par-ncmesh-saving-dev 2020-11-11 09:54:44 +01:00
chakshinglee 62a315a77d use MPI_Session in driver 2020-11-09 15:31:35 -08:00
Adrien M. Bernede 5553f8071a Switch to mpich 2020-11-09 11:48:41 -08:00
chakshinglee 24ba4653c5 fix style 2020-11-05 07:49:27 -08:00
chakshinglee 4fa7aa637b add a README file 2020-11-05 07:21:28 -08:00
chakshinglee a2697569de better documentation 2020-11-05 05:32:14 -08:00
chakshinglee 60e3a2fca2 remove the case when BT has nullity 1 because the solution is not unique in this case. Special treatment of div-free solver when number of refinements is 0, in which case no geometric multigrid will be generated 2020-11-05 04:24:27 -08:00
Yohann Dudouit 5b75ed9678 Fix a bug in GetFullAssemblySparseMatrix. 2020-11-04 16:19:20 -08:00
Yohann Dudouit c9fcf69a36 Revert removing the symmetric terms. 2020-11-04 14:43:45 -08:00
Adrien M. Bernede ebf1896fc5 Merge remote-tracking branch 'origin/master' into feature/testing-with-spack 2020-11-03 17:31:40 -08:00
Adrien M. Bernede fa583054da clean up 2020-11-03 16:28:26 -08:00
chakshinglee e1fa0ac17a make DFSSpaces to work in 2D 2020-11-02 18:37:41 -08:00
chakshinglee f9e234a7f9 take a mesh from input instead of fixing the domain to be the unit cube 2020-11-02 18:26:10 -08:00
chakshinglee e67bc86f8b move AuxSpaceSmoother into mfem solvers 2020-11-02 14:22:39 -08:00
chakshinglee bf5d8a39cd rename KernalSmoother to AuxSpaceSmoother 2020-11-02 14:09:22 -08:00
chakshinglee 75a8db546c Merge branch 'chak/multigird-without-fe' of https://github.com/mfem/mfem into chak/div-free-solver 2020-11-02 13:04:43 -08:00
chakshinglee 7138cb3835 Merge branch 'chak/multigird-without-fe' of https://github.com/mfem/mfem into chak/div-free-solver 2020-11-02 12:51:58 -08:00
chakshinglee 58fb9d527f remove the block structure of KernelSmoother 2020-11-02 12:47:05 -08:00
chakshinglee e7c2cf00b8 rename SchwarzSmoother to SaddleSchwarzSmoother 2020-11-02 10:50:21 -08:00
Jakub Červený 41271fc551 Clean up ex1 2020-10-30 16:20:50 +01:00
Jakub Červený 994bfc3314 ParFESpace compatibility with variable order/mixed faces. 2020-10-30 16:20:06 +01:00
Yohann Dudouit 2fa52fe58f What about this? 2020-10-29 13:03:10 -07:00
Yohann Dudouit b7fc641bf2 Try to understand why travis doesn't work when my machine and lassen do. 2020-10-29 10:14:04 -07:00
Yohann Dudouit 3923a682e6 Try something 2020-10-29 10:04:09 -07:00
Yohann Dudouit 3ee66190dd Refine meshes for parallel runs. 2020-10-29 09:37:09 -07:00
Jakub Červený 801d6bb4b3 Added internal GetElementOrderImpl() 2020-10-29 15:12:19 +01:00
Jakub Červený f6de51d209 Fix GetElementInteriorDofs; more cleanup. 2020-10-29 13:41:27 +01:00
Yohann Dudouit 66076a5197 Improve logic in pbilinearform 2020-10-28 16:47:51 -07:00
Yohann Dudouit e9907d5011 Use Par as much as possible. 2020-10-28 16:08:56 -07:00
Yohann Dudouit 7e2801a1b0 Don't allocate the SparseMatrix if there is an extension. 2020-10-28 16:06:16 -07:00
Yohann Dudouit 9edde53a92 Minor 2020-10-28 15:04:43 -07:00
Yohann Dudouit 1615c4802b Remove trailing space 2020-10-28 11:29:19 -07:00
Yohann Dudouit f57a05075d make style 2020-10-28 11:09:46 -07:00
chakshinglee 7b43cbe428 move ProductSolver into mfem solvers 2020-10-28 05:12:05 -07:00
chakshinglee 5a3c1f2581 add more documentation, move BlockDiagSolver into mfem solvers 2020-10-28 04:25:25 -07:00
chakshinglee 76dc7c95ef rename DFSDataCollector to DFSSpaces 2020-10-27 18:49:15 -07:00
chakshinglee 2132161129 minor adjustment in DFSDataCollector 2020-10-27 18:34:55 -07:00
chakshinglee 8659be81bb better documentation, print, naming 2020-10-27 17:09:11 -07:00
Dylan Copeland db4504a0f8 Merge branch 'pa-id-interp' of github.com:mfem/mfem into barker29/matrix-free-ams 2020-10-27 16:43:23 -07:00
chakshinglee 09f9a7f921 fix doxygen style 2020-10-27 15:17:20 -07:00
chakshinglee 3fe7ce6295 remove unused header 2020-10-27 14:50:35 -07:00
chakshinglee 58756315c8 better naming 2020-10-27 14:49:53 -07:00
chakshinglee 99323c46d9 Merge branch 'chak/multigird-without-fe' of https://github.com/mfem/mfem into chak/div-free-solver 2020-10-27 14:27:14 -07:00
chakshinglee 525552fc45 add documentation 2020-10-27 13:32:20 -07:00
chakshinglee 6f88fb6428 use the Multigrid class in MFEM instead of the simplified version in the miniapps, change the level numbering convention to match with Multigrid in MFEM 2020-10-27 13:02:13 -07:00
chakshinglee 86b9f4d7d1 Merge branch 'chak/multigird-without-fe' of https://github.com/mfem/mfem into chak/div-free-solver 2020-10-27 01:30:30 -07:00
chakshinglee 0a4e4ce7ba Merge branch 'chak/multigird-without-fe' of https://github.com/mfem/mfem into chak/div-free-solver 2020-10-27 00:32:04 -07:00
chakshinglee 09797c35f0 resolve conflicts from merging multigird-without-fe 2020-10-26 16:08:02 -07:00
Yohann Dudouit 03deb200e2 Remove fa-test.cpp 2020-10-26 15:05:00 -07:00
Yohann Dudouit 55d7c0ce5e Add a unit test. 2020-10-26 15:03:33 -07:00
Yohann Dudouit c1ecabcdac Merge branch 'master' into yohann/single-SpMat 2020-10-26 13:43:33 -07:00
Adrien M. Bernede c65c5d32fb Update PUMI package and version requirement 2020-10-23 15:42:51 -07:00
Adrien M. Bernede ec9f8a00b5 Merge branch 'master' into feature/testing-with-spack 2020-10-23 15:21:20 -07:00
Jakub Červený 1731f301be Fixed FESpace::GetFaceOrder() for var. order 2020-10-23 16:15:16 +02:00
Jakub Červený 2fba509d8b Added proper mapping from dof count to polynomial order. 2020-10-23 09:41:33 +02:00
Adrien M. Bernede 57d92bd7a2 Update MFEM package 2020-10-22 22:10:34 -07:00
Adrien M. Bernede 0854ed7b61 Attempt to fix manual job 2020-10-22 22:07:02 -07:00
Adrien M. Bernede 6d6a72a8a3 Test: split +sundials+petsc+pumi in 3 2020-10-22 21:44:01 -07:00
Adrien M. Bernede 56faea7d81 Improve spack config on toss3 2020-10-22 19:07:41 -07:00
Yohann Dudouit 6b4ab62f90 Add fichera.mesh to the test for nlconvection. 2020-10-22 17:48:51 -07:00
Yohann Dudouit a51200053f Rename CeedPAAsemble and CeedMFAssemble to CeedAssemble. 2020-10-22 17:16:19 -07:00
Andrew T. Barker 240b2b811c Merge branch 'barker29/matrix-free-ams' of github.com:mfem/mfem into barker29/matrix-free-ams 2020-10-22 15:59:35 -07:00
Dylan Copeland 1e58fca11e Debugged usage of AmgX in MatrixFreeAMS. 2020-10-22 15:48:17 -07:00
Yohann Dudouit b0e1f409c6 Merge branch 'master' into yohann/ceed-convection 2020-10-22 14:33:01 -07:00
Jakub Červený 6cb984b67f Cleanup. 2020-10-22 19:37:39 +02:00
Jakub Červený 925b065b73 Table face_dof contains variant 0 DOFs. Renamed var_edge_dofs and var_face_dofs. 2020-10-22 15:20:34 +02:00
Jakub Červený 30dfb40482 Merge branch 'master' into var-order-space-dev 2020-10-22 14:33:29 +02:00
Adrien M. Bernede c93284f2e9 Add config that triggers more examples 2020-10-21 18:22:16 -07:00
Adrien M. Bernede 6b8ffe3194 More serac config 2020-10-21 17:59:39 -07:00
Adrien M. Bernede b5ea693ceb Try 2020-10-21 17:25:05 -07:00
Adrien M. Bernede 3b6964633a Add gcc 8.3.1 2020-10-21 15:23:30 -07:00
Adrien M. Bernede e698a04775 fix 2020-10-21 14:01:16 -07:00
Adrien M. Bernede 56c830cad1 Build serac-like config 2020-10-21 13:41:59 -07:00
Adrien M. Bernede 74f35822b8 Increase time for build 2020-10-21 13:41:44 -07:00
Dylan Copeland a3a99b0345 Added the option to use AmgX for the LOR solvers in MatrixFreeAMS. 2020-10-21 11:07:06 -07:00
Dylan Copeland 80a3f24731 Merge branch 'master' of github.com:mfem/mfem into barker29/matrix-free-ams 2020-10-21 09:09:32 -07:00
Adrien M. Bernede 7e4f57212c Fix 2020-10-19 22:25:25 -07:00
Adrien M. Bernede 21e75d693f Fix 2020-10-19 21:59:24 -07:00
Adrien M. Bernede d616a6c657 Set MPIEXEC when on toss3 2020-10-19 21:32:51 -07:00
Adrien M. Bernede e64f3a0c08 Test: not using spack compiler wrapper 2020-10-19 17:17:45 -07:00
Adrien M. Bernede eed817c0eb Fix: loosen constraint on compiler 2020-10-19 10:01:22 -07:00
Adrien M. Bernede 5c63a2eee7 spec fix 2020-10-16 12:08:56 -07:00
Adrien M. Bernede f6b966dc96 fix 2020-10-16 11:57:04 -07:00
Jakub Červený 925995cbf7 More cleanup. 2020-10-16 16:11:14 +02:00
Jakub Červený 99f4a6df1b Cleaning up. 2020-10-16 14:59:44 +02:00
Jakub Červený 72c8f7c64e Removing miniapps/hpfem, there will be another PR for it. 2020-10-16 14:58:10 +02:00
Jakub Červený 938e6cbe79 Much less disruptive implementation of variable-order FE collections! 2020-10-16 12:04:56 +02:00
Jakub Červený 6033792327 Branching var-order-space-dev from p-refinement-dev, this will be
the basis for all hp-refinement work, but with simplified variable
order FE collections.
2020-10-16 09:05:51 +02:00
Adrien M. Bernede bb9ceee647 Pause CI on Lassen 2020-10-15 18:57:18 -07:00
Adrien M. Bernede e599d5f86f Adapt CI 2020-10-15 18:56:00 -07:00
Adrien M. Bernede a25da13f0d Add config for toss3 2020-10-15 18:55:36 -07:00
Dylan Copeland b2f542bd84 Fixing ZeroWrap to work on device. 2020-10-15 16:00:31 -07:00
Dylan Copeland 22f2591c9e Adding support for beta to be a MatrixCoefficient. 2020-10-15 15:39:40 -07:00
Dylan Copeland 98d7e056ad Allowing for a general MPI communicator. 2020-10-15 14:08:24 -07:00
Adrien M. Bernede 5e83fc9750 Add Gitlab script 2020-10-15 11:31:19 -07:00
Adrien M. Bernede 39a199b354 Add Uberenv 2020-10-15 11:31:13 -07:00
Jakub Červený 6c9e670584 Merge branch 'master' into p-refinement-dev 2020-10-15 15:43:47 +02:00
Yohann Dudouit 117f20dbdb Build the SparseMatrix only if mat == NULL. 2020-10-12 14:58:51 -07:00
Yohann Dudouit 86d2e8cabd Change SpMat() to return a SparseMatrix when using an extension. 2020-10-12 14:49:14 -07:00
Jakub Červený 6fbd9e5bfc Don't generate any boundary elements on mesh load. 2020-10-07 15:11:33 +02:00
Jakub Červený d72d65badf Fixed crash in ex6p when restarting on an NC tet mesh. 2020-10-07 12:25:00 +02:00
Andrew T. Barker 2ea3200f0c Style. 2020-10-02 09:30:13 -07:00
Andrew T. Barker 32683f180b Remove mfem:: qualifies, improve comments. 2020-10-02 08:39:52 -07:00
Jakub Červený 3737cf56bc Updated CHANGELOG and ex6p description. 2020-10-02 17:39:05 +02:00
Andrew T. Barker 68c7351757 MatrixFreeAuxiliarySpace: allow NULL coefficients (assume constant 1)
(this commit also improves some documentation in auxiliary.hpp)
2020-10-02 08:26:47 -07:00
Jakub Červený 5730de26b6 Merge branch 'master' into par-ncmesh-saving-dev 2020-10-02 16:57:02 +02:00
Jakub Červený 3e7e467291 ParMesh::EnsureParNodes() converts curvature to ParGridFunction when the mesh is loaded. 2020-10-02 15:20:39 +02:00
Jakub Červený 667c588c71 Documented the main constructor of ParMesh. 2020-10-02 13:53:10 +02:00
Jakub Červený 56490a1f21 Fixed crash in release build. 2020-10-01 16:13:49 +02:00
Jakub Červený ce2d318e88 Converted curved v1.1 NC meshes in the repo. 2020-09-30 20:46:48 +02:00
Jakub Červený edba6edff3 Fixed loading of legacy (v1.1) curved NC meshes. 2020-09-30 20:45:37 +02:00
Jakub Červený f1b712d5a0 Converted v1.1 meshes in data/ directory to the new format. 2020-09-25 18:49:47 +02:00
Jakub Červený 0a7d991d48 NCMesh::coordinates are now deleted when the Mesh becomes curved. 2020-09-25 18:29:38 +02:00
Jakub Červený 88fb82e9d4 Debugged polar-nc miniapp, initialization of hanging nodes works again. 2020-09-25 18:12:21 +02:00
Yohann Dudouit 0533bafa67 Rename Assemble to Setup. 2020-09-24 10:21:05 -07:00
Yohann Dudouit 7f246e4498 Update CHANGELOG 2020-09-24 10:19:40 -07:00
Yohann Dudouit ad888ae02f Update CMakeLists 2020-09-24 10:12:30 -07:00
Yohann Dudouit e9ab616297 Remove fichera-q3 from tests. 2020-09-24 10:08:05 -07:00
Yohann Dudouit 40669a03d6 Add MF for VectorConvectionNLFIntegrator. 2020-09-24 10:07:31 -07:00
Yohann Dudouit b35cc7222a Add support for MF in NonlinearForm. 2020-09-24 10:07:00 -07:00
Andrew T. Barker 7e3d262c63 Clean up some debug information and std::cout stuff. 2020-09-24 09:38:28 -07:00
Jakub Červený e858ab7fbd Mesh::tmp_vertex_parents should not be public. 2020-09-24 11:37:17 +02:00
Jakub Červený 3ca9c9a94d Merge branch 'master' into par-ncmesh-saving-dev 2020-09-24 11:37:08 +02:00
Jakub Červený abb03bff97 Remove parprint-test 2020-09-24 11:14:52 +02:00
Jakub Červený 94bbf37350 Cleanup. 2020-09-24 10:31:29 +02:00
Jakub Červený 4127ebdd06 Revert ex1p. 2020-09-24 10:20:53 +02:00
Jakub Červený d0c6aa5cef Reverted ex1p, improved comments in ex6p. 2020-09-24 10:17:49 +02:00
Yohann Dudouit 76ab1627c5 Minor 2020-09-23 19:17:25 -07:00
Yohann Dudouit 1852d0c8b7 Remove AMR meshes from NLConvection tests. 2020-09-23 18:46:52 -07:00
Yohann Dudouit 8d0ff60769 Fix bugs and typos. 2020-09-23 18:10:14 -07:00
Yohann Dudouit 7d3a9e89b4 Set CeedDataPtr to NULL. 2020-09-23 18:10:03 -07:00
Yohann Dudouit bdfcbe5631 Add Setup... 2020-09-23 18:09:45 -07:00
Yohann Dudouit f674379b84 Fix bug/typo. 2020-09-23 15:27:07 -07:00
Yohann Dudouit 80e9c825a9 Merge branch 'yohann/test-ceed' into yohann/ceed-convection 2020-09-23 13:31:36 -07:00
Yohann Dudouit 236a1f2e26 Readd inadvertently deleted ceed_tests makefile target. 2020-09-23 11:38:18 -07:00
Jakub Červený 46747db439 One more fix when loading ParMesh. 2020-09-23 17:23:43 +02:00
Jakub Červený a6a0f69799 ParMesh::Load should now work properly, for parallel conforming and NC meshes. 2020-09-23 16:39:04 +02:00
Andrew T. Barker 61bd7dcc8d A bit of cleanup (still needs more). 2020-09-22 09:27:42 -07:00
Andrew T. Barker 222d13eabf Boundary condition tweak.
This now matches results from old 2D templated code, used for the NLA paper.
2020-09-22 09:15:29 -07:00
Andrew T. Barker 3dbbfdbdd6 Merge remote-tracking branch 'origin/pa-id-interp' into barker29/matrix-free-ams 2020-09-22 08:09:43 -07:00
Yohann Dudouit 489536a681 Remove warnings 2020-09-21 16:28:39 -07:00
Yohann Dudouit bbf09d0f1e Update test_ceed 2020-09-21 16:16:26 -07:00
Yohann Dudouit 11fcf14ba1 Rename AssemblePA to Assemble and support MF. 2020-09-21 16:15:50 -07:00
Yohann Dudouit 8b8d2b13a4 Add MF support to nonlininteg. 2020-09-21 16:15:00 -07:00
Yohann Dudouit fccf55121a Remove dead code 2020-09-21 13:13:59 -07:00
Yohann Dudouit ae8cd8b3a2 make style 2020-09-21 11:55:01 -07:00
Yohann Dudouit 74997bdbfd Update fa-test to work in parallel. 2020-09-21 11:51:59 -07:00
Yohann Dudouit b74d9c6bd9 Change GetFullAssemblySparseMatrix to return a rectangular SparseMatrix. 2020-09-21 11:19:13 -07:00
Yohann Dudouit 38ab3d62ea Always more style. 2020-09-18 17:16:21 -07:00
Yohann Dudouit 8b451e38bb Even more style. 2020-09-18 17:14:46 -07:00
Yohann Dudouit 8533d5cea2 make more style. 2020-09-18 17:12:29 -07:00
Yohann Dudouit d9fd945607 make some style. 2020-09-18 17:03:35 -07:00
Yohann Dudouit 7f8b33bdb1 Update CMakeLists. 2020-09-18 16:57:18 -07:00
Yohann Dudouit 25514e8b72 Add non-linear convection support with libCEED. 2020-09-18 16:50:15 -07:00
Yohann Dudouit 11a5e119b3 Add an enum EvalMode to support InterpAndGrad for non-linear operators. 2020-09-18 16:01:32 -07:00
Yohann Dudouit 87504e919f Merge branch 'yohann/ceed-convection' of https://github.com/mfem/mfem into yohann/ceed-convection 2020-09-18 15:27:07 -07:00
Yohann Dudouit b85d9e71d8 More updates to CMakeLists 2020-09-18 15:27:04 -07:00
Yohann 89f885a41f Merge branch 'master' into yohann/ceed-convection 2020-09-18 15:25:09 -07:00
Yohann Dudouit 36de0aaf5d Update CMakeLists 2020-09-18 15:24:18 -07:00
Yohann Dudouit 10d5838ecd Change velocity function. 2020-09-18 15:22:13 -07:00
Yohann Dudouit 32d1797302 Fix VectorGridFunctionCoefficient initialization. 2020-09-18 15:11:01 -07:00
Yohann Dudouit 02610b14c9 Fix a bunch of typos/bugs. 2020-09-18 15:10:11 -07:00
Yohann Dudouit 6f1916ae88 Update CeedData destructor. 2020-09-18 15:09:47 -07:00
Yohann Dudouit 774cf0f0e6 Fix convection QFunction. 2020-09-18 15:09:26 -07:00
Yohann Dudouit c0698bee0e Refactor test_ceed 2020-09-18 12:57:28 -07:00
Jakub Červený cb20730ad7 Moved ghost edge/face enumeration from ParNCMesh to NCMesh. Everything is almost working. 2020-09-18 17:34:07 +02:00
Yohann Dudouit b2c9bfe6ab Fix a bug. 2020-09-17 17:45:01 -07:00
Yohann Dudouit a1325dc06d Add support for Vector Coefficient. 2020-09-17 17:38:12 -07:00
Yohann Dudouit e40834053c fix typos. 2020-09-17 14:59:10 -07:00
Yohann Dudouit 6b89b761df Initial commit for supporting ConvectionIntegrator and VectorConvectionIntegrator. 2020-09-17 14:29:50 -07:00
Jakub Červený 1005c6579b Loading parallel partial file works in serial GlVis. 2020-09-17 18:04:59 +02:00
Jakub Červený 626bd67000 Document NCMesh::UpdateVertices, clean up. 2020-09-17 16:19:24 +02:00
Yohann Dudouit b4a5f9a4c7 Modify fa-test to print 2020-09-16 16:46:04 -07:00
Yohann Dudouit 1be8f491ce Improve documentation. 2020-09-16 13:19:26 -07:00
Yohann Dudouit 0115e17c55 Initialize "I" correctly for a single SparseMatrix. 2020-09-16 13:03:44 -07:00
Andrew T. Barker 573e1ab7f4 WIP: Ugly hack to try to get around zero row problem with hypre AMG initialization 2020-09-16 09:46:43 -07:00
Jakub Červený fa83fa528f Fixed problem in new NCMesh::UpdateVertices, seems to work now. 2020-09-16 17:39:48 +02:00
Andrew T. Barker bbe9a15202 Cleaner includes/build. 2020-09-15 14:41:32 -07:00
Andrew T. Barker 0f6555e9ae Begin implementing matrix-free PA AMS cycle, does not work yet. 2020-09-15 14:18:39 -07:00
Yohann Dudouit 00f2e725ce make style 2020-09-11 17:13:36 -07:00
Yohann Dudouit f3401cde89 make style 2020-09-11 11:23:18 -07:00
Jakub Červený 7aea4b8f83 WIP ultimate version of NCMesh::UpdateVertices compatible with everything 2020-09-11 17:09:50 +02:00
Yohann Dudouit 0e89593748 Add a more meaningful error in fa-test. 2020-09-10 17:05:58 -07:00
Jakub Červený 7cb0c6a41c NCMesh::leaf_sfc_index replaces ParNCMesh::leaf_glob_order. Some cleanup. 2020-09-10 18:11:43 +02:00
Arturo Vargas 8330be28bc skip zeros = 1 2020-09-03 13:58:12 -07:00
Yohann Dudouit 25bff1cb80 Fix a bug in the size of I. 2020-09-03 11:59:00 -07:00
Arturo Vargas 7892a8d762 add missing assemble 2020-09-03 09:51:14 -07:00
Arturo Vargas 86cbe25baa full assembly test for convection + trace term 2020-09-03 09:07:18 -07:00
Yohann Dudouit e37298a2e1 Change the interface. 2020-09-02 16:58:54 -07:00
Yohann Dudouit 1babf67eff Add the actual function... 2020-09-02 15:53:37 -07:00
Yohann Dudouit 99493c5c62 make style 2020-09-02 15:41:05 -07:00
Yohann Dudouit ad85b01f00 Add a function to Get the fully-assembled operator in a single SparseMatrix. 2020-08-31 17:28:50 -07:00
Jakub Červený 43c548be3f WIP unified leaf/vertex index assignment. 2020-08-21 13:10:38 +02:00
Jakub Červený c40851137f WIP, making serial NCMesh know about ghost elements. 2020-08-20 16:38:00 +02:00
Jakub Červený d644aad99e Minor naming/comment changes. 2020-08-20 09:36:52 +02:00
Jakub Červený eff4c58e30 hptest: testing UMFPACK solver 2020-08-18 17:25:09 +02:00
Jakub Červený a5b0b06be0 Cleaned up cQ matrix construction. 2020-08-18 17:24:18 +02:00
Jakub Červený 2807805f99 Refactor: move special edge-face stuff to AddEdgeFaceDependencies. 2020-08-18 15:49:55 +02:00
Jakub Červený 0578203e09 Added DG integrator to the relaxed_hp option in hptest. Added convergence plot. 2020-08-14 17:35:23 +02:00
Lenka Červená a2401e9e35 Refactored and cleaned up the code
hp adaptivity with relaxed hp spaces works for lshape and layer benchmark problems
2020-08-14 10:30:32 +02:00
Jakub Červený 89860f895d Fixed generating spurious boundary elements when loading parallel NC mesh. 2020-08-13 16:32:22 +02:00
Lenka Červená eba8668ba8 wip: hp adaptivity for lshape and layer problems with hp_relaxed works 2020-08-13 13:49:14 +02:00
Jakub Červený 2489db4b2f New var order DOF assignemnt works. 2020-08-12 13:07:38 +02:00
Jakub Červený 2167cb89bd WIP reworking DOF assignemn due to failing 3D cases. 2020-08-11 18:06:33 +02:00
Jakub Červený 374831ffde ParNCMesh::GetFaceNeighbors: fixed crash on curved meshes. 2020-08-06 21:26:55 +02:00
Jakub Červený f885f8febc Added parprint-test to check loading of solutions saved with ParPrint in ex1p. 2020-08-06 17:21:57 +02:00
Jakub Červený 73885a5e89 Merge branch 'master' into par-ncmesh-saving-dev 2020-08-05 20:20:48 +02:00
Lenka Červená 736fc21104 wip: hp-adaptivity for lshape problem
tested several strategies
2020-07-24 15:06:23 +02:00
Lenka Červená 94473c2cd8 hptest: hp refinement strategy based on known singularity 2020-07-17 10:05:45 +02:00
Jakub Červený 122730e105 Debugging 3D case: ./ex1_hp_check -m ../data/inline-hex.mesh -r 2 -s 190 2020-07-16 16:32:54 +02:00
Jakub Červený c6c48a6c35 Fixed GridFunction::ProjectBdrCoefficient for 3D var. order spaces. 2020-07-15 20:38:39 +02:00
Jakub Červený ec193df8d6 hp_check: added more test problems. 2020-07-15 13:46:47 +02:00
Jakub Červený 5b4d54a38f hp_check: debugging ProjectBdrCoefficient on 3D var-order meshes. 2020-07-10 17:23:12 +02:00
Lenka Červená 9d9bb116eb Merge branch 'p-refinement-dev' of https://github.com/mfem/mfem into p-refinement-dev 2020-07-10 15:15:55 +02:00
Lenka Červená 6b801040b0 WIP: hptest - more refinement candidates added 2020-07-10 15:14:23 +02:00
Jakub Červený 07a3aba5af hp_check: this is the x^2+y^2 test, run with '-vis' or with '-vis -x' 2020-07-09 16:23:06 +02:00
Lenka Červená 19e0a7fd41 bugfix: computation of conforming restriction interpolation matrix cQ 2020-07-09 13:57:36 +02:00
Jakub Červený abbcf5691f hp_check: testing relaxed conformity. 2020-07-06 11:19:10 +02:00
Jakub Červený 2b4c406ef1 hptest: trying error decrease rate again. 2020-07-01 17:14:17 +02:00
Jakub Červený f9718b712e Added 3D option and meshes. 2020-07-01 15:36:23 +02:00
Jakub Červený f0cc8eb40b Some refactoring and cleanup. 2020-07-01 15:15:50 +02:00
Jakub Červený af5e4ceb51 hptest: actually solving p+1 and h/2 problems, this improves convergence. 2020-06-30 18:27:02 +02:00
Jakub Červený 87b65c2566 Simplified hp refinement decisions as much as possible, but convergence still not good. 2020-06-26 17:45:21 +02:00
Lenka Červená 15f20c36f4 Added quad.mesh for use in ex1_hp_check 2020-06-25 17:47:10 +02:00
Lenka Červená 75c78b89c3 Merge branch 'p-refinement-dev' of https://github.com/mfem/mfem into p-refinement-dev 2020-06-25 17:42:07 +02:00
Lenka Červená e08b1dd596 Added example for checking hp-FEM with random refinements and random orders 2020-06-25 17:38:34 +02:00
Jakub Červený 1d7e59fb16 hptest: better visualization and some refactoring. 2020-06-25 11:35:36 +02:00
chakshinglee a883ec834c fix clean-exec 2020-06-13 17:02:54 -07:00
chakshinglee bb2e12c851 add visualization 2020-06-13 16:32:05 -07:00
chakshinglee 2a6b75c43a fix gitignore 2020-06-13 16:00:10 -07:00
chakshinglee 3ca7443733 fix test 2020-06-13 15:26:54 -07:00
chakshinglee 42ba5ffd43 fix makefile 2020-06-12 18:28:29 -07:00
Jakub Červený 65f3855f74 Merge Lenka's changes, refactor a bit. 2020-06-12 17:28:02 +02:00
Lenka Červená 198d0915d1 Added dependency on mfem library 2020-06-12 16:10:44 +02:00
Lenka Červená a7109190d9 hptest: improved hp decisions, fixed solution projection (Q matrix) 2020-06-12 16:07:42 +02:00
Lenka Červená ae19fdd784 Reverted R matrix, added Q restriction interpolation matrix 2020-06-12 16:00:30 +02:00
chakshinglee 21c27e05e2 Merge branch 'master' of https://github.com/mfem/mfem into chak/div-free-solver 2020-06-11 20:43:19 -07:00
chakshinglee 0a575eb978 better documentation 2020-06-11 20:42:23 -07:00
chakshinglee 27d0d74a4e make style 2020-06-11 19:50:07 -07:00
chakshinglee dc29fb3c52 better documentation 2020-06-11 17:16:28 -07:00
chakshinglee d30b62733d fix make files 2020-06-11 17:08:25 -07:00
chakshinglee 058f983da4 rename blocksystems folder 2020-06-11 16:58:55 -07:00
chakshinglee a9fea2277a fix header 2020-06-11 16:58:18 -07:00
chakshinglee 4edc12966a more files renaming 2020-06-11 16:47:28 -07:00
chakshinglee fbc9f2ecc2 better file name 2020-06-11 16:27:10 -07:00
Jakub Červený 7169368f05 Refactored R matrix computation. 2020-06-11 18:51:14 +02:00
chakshinglee b1547a56c1 fix documentation 2020-06-11 02:30:58 -07:00
chakshinglee a100e1796b remove algebraic MG option 2020-06-11 02:03:57 -07:00
chakshinglee 1897919f1e add minimal documentations and remove some debug code 2020-06-10 20:51:07 -07:00
chakshinglee 20d545e2dc minor simplification 2020-06-10 16:53:22 -07:00
chakshinglee ba84daecf0 replace MLDivSolver by level solvers 2020-06-10 15:42:13 -07:00
Lenka Červená 464d1e5841 Implemented R matrix for hp edges 2020-06-05 21:58:35 +02:00
Jakub Červený 3acbbbef16 Refactored building of edge_dofs/face_dofs Tables. 2020-06-04 19:21:55 +02:00
Jakub Červený c6cc4f0d8a Fixed 2D spaces broken by lateste changes. 2020-06-04 14:01:42 +02:00
Jakub Červený 33ecad162a Minimum order propagation seems to work correctly now. 2020-06-03 21:24:49 +02:00
Jakub Červený 3fe09c0160 Implemented FiniteElementSpace::CalculateMinimumOrders. 2020-06-03 19:58:52 +02:00
Jakub Červený 78f377d050 Simplified minimum rule enforcement code. 2020-06-02 13:15:00 +02:00
chakshinglee 512639aee0 make div-free solver to work for both coupled solve and separate solve 2020-06-02 01:05:43 -07:00
chakshinglee dc75b72a75 remove unused classes 2020-06-01 23:47:52 -07:00
chakshinglee 1816fd7515 modularize HiptmairSmoother 2020-06-01 21:57:05 -07:00
chakshinglee e70ac1a881 add some handy const get functions for BlockOperator 2020-06-01 21:56:27 -07:00
chakshinglee 7bf292ce12 a better definition of Q_l2 2020-06-01 21:38:09 -07:00
chakshinglee d755dd4290 remove unused HiptmairSmoother constructor 2020-06-01 18:12:05 -07:00
chakshinglee b9a8c65d24 clear out some commented lines (that was for debug purpose) 2020-06-01 12:06:11 -07:00
chakshinglee 9c492e26e6 make MG to work in mixed boundary condition 2020-06-01 11:13:30 -07:00
Jakub Červený 588e97b298 Improved skipping of face boundary edges. 2020-05-29 17:19:34 +02:00
Jakub Červený 032d8e4407 Debugging random hp refinements. 2020-05-29 10:17:02 +02:00
Jakub Červený dacc1f4b81 Skip edges conicident with master face edges. More cases now work. 2020-05-28 15:18:37 +02:00
Jakub Červený 9332985345 Constraining face edges separately fixed mid-face problems. 2020-05-28 12:04:57 +02:00
chakshinglee b6ffe56e64 initial version of make div-free solver as MG directly for saddle-point system 2020-05-28 00:07:06 -07:00
Jakub Červený 65288415d8 Skip vertex and edge DOFs of a slave face. 2020-05-26 17:43:31 +02:00
Jakub Červený 1f9cf602d9 Improved face constraints - face boundaries that coincide with master face boundaries
are skipped and left to be constrained by edges. Seems to work in relaxed mode.
2020-05-22 15:01:51 +02:00
Jakub Červený 6d192ded04 Debugging hp dependencies. 2020-05-21 12:54:20 +02:00
Lenka Červená 4554cc0175 Merge branch 'p-refinement-dev' of https://github.com/mfem/mfem into p-refinement-dev 2020-05-20 15:14:01 +02:00
Lenka Červená 2fa95800a8 Fixed GetBE for variable order spaces 2020-05-20 15:11:09 +02:00
Jakub Červený 38381c54ad Added diagnostic dumps for DOF constraints. 2020-05-19 17:43:49 +02:00
Jakub Červený b678b17a0a Still debugging 3D hp constraints. 2020-05-15 17:39:43 +02:00
chakshinglee 5f5602a359 add components of MG in DivFreeSolver 2020-05-14 08:28:26 -07:00
Lenka Červená 4a79da48e5 Merge branch 'p-refinement-dev' of https://github.com/mfem/mfem into p-refinement-dev 2020-05-14 16:00:43 +02:00
Lenka Červená a239de456f hptest: implemented EstimateHPErrors, added decision for h or p refinement, added h and p refinements of the mesh, WIP 2020-05-14 15:54:10 +02:00
Jakub Červený f358362a74 Debugging edge/face orders and interpolation. 2020-05-14 10:13:58 +02:00
chakshinglee f8719af020 fix vector size in MG 2020-05-13 18:40:47 -07:00
chakshinglee 17595bbd13 use HypreParMatrix type explicitly instead of OperatorPtr in TwoStepRAP 2020-05-13 18:31:52 -07:00
chakshinglee 68bce3628e rename and simplify AbstractMultigrid 2020-05-13 18:15:16 -07:00
chakshinglee 9071a049ac add level solver for MLDivSolver 2020-05-11 15:22:49 -07:00
Jakub Červený ba8d730c5c 3D hp: propagation of min face order to edges.
Renamed edge_dof -> edge_dofs, face_dof -> face_dofs.

Bug: broken basis functions in 3D, repro:
  ./ex1 -m ../data/inline-hex.mesh -r 1 -s 1
2020-05-08 16:46:46 +02:00
Jakub Červený a20f4e3465 Parallel version compiles (but ParFESpace does not yet work for hp) 2020-05-07 14:57:15 +02:00
Jakub Červený e69700d786 More consistent ordering of arguments of H1_FECollection::GetDofMap() 2020-05-07 13:31:42 +02:00
chakshinglee c63456696a add option to solve saddle point system in coarsest solver 2020-05-06 15:57:55 -07:00
Will Pazner 7676bbe5f9 Create LOR meshes for p-refinement case 2020-05-06 11:34:07 -07:00
chakshinglee 0691e591cd add option to solve saddle point system in LocalSolver 2020-05-05 15:48:41 -07:00
chakshinglee aa6297dfb5 minor renaming due to new Multigrid class in main library 2020-05-04 19:51:54 -07:00
Jakub Červený 02c9a3b5eb WIP estimating hp errors 2020-05-01 16:44:36 +02:00
Jakub Červený f0c25629d5 hptest: calculation of H^1_0 error, h-refinement. 2020-05-01 14:52:36 +02:00
Jakub Červený e0e06b4130 Starting hp-refinement test miniapp 2020-05-01 13:57:36 +02:00
Jakub Červený 798736bf74 Merge branch 'p-refinement-dev' of github.com:mfem/mfem into p-refinement-dev 2020-04-30 09:02:31 +02:00
Jakub Červený 59970aed4b Fixed: face constraints in 3D only 2020-04-30 09:02:21 +02:00
Lenka Červená 7de6ee2235 Fixed hp-conforming block in AssignFaceDofs 2020-04-29 22:30:13 +02:00
Lenka Červená 78f1229b83 WIP: p-FEM in 3D example ex1 works with different element orders 2020-04-29 14:38:48 +02:00
chakshinglee e4eec1cf81 resolve conflicts 2020-04-27 14:28:45 -07:00
Jakub Červený 89c9b34805 Reworked face DOF assignement, should now work for all cases:
- cheap uniform geom & order spaces
- mixed meshes
- variable order spaces and/or mixed meshes
2020-04-24 18:23:13 +02:00
Jakub Červený 3131dec50f Fixed bug in FiniteElementSpace::GetEdgeDofs. 2020-04-23 16:16:27 +02:00
Jakub Červený b2921cc100 Added the option to control hp conformity (SetRelaxedHpConformity) 2020-04-23 12:32:10 +02:00
Jakub Červený 47924543c2 Merge branch 'master' into p-refinement-dev 2020-04-22 18:42:41 +02:00
Jakub Červený c52238e6e9 Don't add the slave order to the master edge if not lower. 2020-04-22 16:39:50 +02:00
Jakub Červený 7a92956cb4 Merge branch 'master' into p-refinement-dev 2020-04-22 15:28:41 +02:00
Jakub Červený dde87e5b20 Tested hp-refinement in 2D, works now. 2020-04-22 14:52:48 +02:00
Jakub Červený 477744ae8f Simple hp- cases seem to work in 2D. 2020-04-22 13:21:45 +02:00
Jakub Červený dd80e83e86 Debugging hp basis functions. 2020-04-17 18:25:00 +02:00
Jakub Červený 997e564583 WIP update master-slave interpolation to work with var orders. 2020-04-17 08:41:29 +02:00
Jakub Červený 8f99121c44 Update the elem_order array when the mesh is refined. 2020-04-16 12:51:42 +02:00
Jakub Červený 48a0bf4b81 Updated test code in ex1. 2020-04-16 10:42:49 +02:00
Jakub Červený f39f60ebc1 Updated FESpace::GetBdrElementDofs for variable order. 2020-04-15 15:53:02 +02:00
Jakub Červený fdca54fd70 Minor improvements in GetElementFaces etc. 2020-04-15 15:52:13 +02:00
Lenka Červená bac8c5befb fespace - bug fixed in handling variable orders
example 1 - visualization of solution on variable order spaces finished
2020-04-09 14:17:16 +02:00
Jakub Červený e95e7041ef Replaced iterator typedefs with auto. 2020-04-03 14:44:07 +02:00
Jakub Červený 324b4b0b74 Fixed loading of legacy format. 2020-04-03 13:08:21 +02:00
Jakub Červený 0fe53c2d70 Fix doxygen and .gitignore complaints. 2020-04-02 21:33:31 +02:00
Jakub Červený bb3d2c4887 make style, updated .gitignore 2020-04-02 18:18:04 +02:00
Jakub Červený 2cd5033246 Revert ex1, ex1p. Fix some comments. 2020-04-02 18:13:34 +02:00
Jakub Červený 1c10c9136b Example 6p now allows restarting from a checkpoint. 2020-04-02 17:32:58 +02:00
Jakub Červený 3fd3d757d4 Fixed setting the Iso flag on load. 2020-04-02 17:29:10 +02:00
Jakub Červený 67528d5ad8 Fixed saving/loading of empty elements. Parallel NC I/O seems to work. 2020-04-02 16:16:07 +02:00
Lenka Červená 8d78ce7aca L2 fe collection fixed
example ex1: visualization of spaces with variable orders works
example ex1: solution is wrong
2020-04-02 14:55:38 +02:00
Jakub Červený bccc7af31a Fixed PrintBoundary in parallel. Better solution of traversing all leaves. 2020-04-01 16:24:03 +02:00
Jakub Červený dbb5548852 Fixed node/face management when loading parallel NC mesh. 2020-04-01 15:15:05 +02:00
Jakub Červený e8062ce85b Fixed handling of empty processors. 2020-04-01 12:29:37 +02:00
Jakub Červený cde8face89 WIP loading parallel NC mesh. 2020-03-27 17:49:40 +01:00
Jakub Červený a863dcaf71 Sections "boundary" and "vertex_parents" are optional. 2020-03-26 12:47:16 +01:00
Jakub Červený 01bf0926a5 Fixed saving/loading curved meshes. 2020-03-26 10:35:26 +01:00
Jakub Červený 19fc1f6a82 Fixed loading vertices/coordinates, renamed 'top_vertex_pos' to 'coordinates'. 2020-03-25 19:48:26 +01:00
Jakub Červený b5a401b7b0 Debugged loading new NC mesh format. 2020-03-25 13:27:03 +01:00
Jakub Červený 36ed0cdb93 Finished loading new NC mesh format. 2020-03-24 18:14:36 +01:00
Jakub Červený 3fe44155e9 Merge branch 'master' into par-ncmesh-saving-dev 2020-03-24 11:39:33 +01:00
Jakub Červený ed52906b14 Finished constructor loading the new format. 2020-03-20 19:33:13 +01:00
Jakub Červený 838381afbe Merge branch 'p-refinement-dev' of github.com:mfem/mfem into p-refinement-dev 2020-03-20 15:26:38 +01:00
Lenka Cervena e484012ef6 Converted L2_FECollection to arbitrary order. 2020-03-20 15:20:16 +01:00
Jakub Červený ea0c1eb4e2 WIP loading new NC format. 2020-03-20 12:43:42 +01:00
Jakub Červený aacef704ab Printing NCMesh in new format. 2020-03-19 17:41:29 +01:00
Jakub Červený fc0516ddd6 Tables in ncmesh_tables are const and in an anonymous namespace. 2020-03-19 17:40:58 +01:00
Lenka Cervena 7386539131 WIP visualization of variable order solution 2020-03-19 14:36:52 +01:00
Jakub Cerveny 87e3686664 Fixed bug in GetElementOrder
Removed debug prints
2020-03-19 14:33:53 +01:00
Jakub Červený d63f01d980 WIP saving in the new nonconforming format. 2020-03-18 17:47:03 +01:00
Jakub Červený 15c94dc5b4 Debugged NCMesh::LoadLegacyFormat, works now. 2020-03-18 15:45:42 +01:00
Lenka Cervena 1ee44b1a77 p-FEM: Computation of Prolongation matrix cP fixed
Example ex1 works
2020-03-18 13:59:04 +01:00
Jakub Červený b4b2118c0e Moved loading old format to NCMesh::LoadLegacyFormat. 2020-03-17 16:41:06 +01:00
Jakub Červený 3e6a5ec46c WIP loading "MFEM nonconforming mesh v1.0" in NCMesh constructor. 2020-03-13 13:56:09 +01:00
Jakub Červený f6f20bedd5 Starting branch par-ncmesh-saving-dev -- parallel NCMesh format and I/O 2020-03-13 09:17:49 +01:00
Jakub Červený 835935d4bb Simplified code with "T.SetIdentityTransformation". 2020-03-06 11:10:31 +01:00
Jakub Červený 92ed5389e7 Updated FESpace::GetEdgeDofs for variable order. 2020-03-05 18:12:36 +01:00
Jakub Červený a96d5f7375 Variable-order edge interpolation in FESpace::BuildConformingInterpolation. 2020-03-05 14:26:06 +01:00
Jakub Červený c1e60d12bd Ex1 works on (broken) variable order space. 2020-02-29 21:59:35 +01:00
Jakub Červený 94fcc8e5fd Reworked FESpace::GetElementDofs for variable order space. 2020-02-29 13:18:28 +01:00
Jakub Červený b1e80a1427 Added Table edge_dof and its initialization in AssignEdgeDofs(). 2020-02-28 16:15:54 +01:00
Jakub Červený f67044fa23 FESpace get/set order implementation. 2020-02-21 10:33:36 +01:00
Jakub Červený 070e96f107 FESpace set/get element order interface. 2020-02-14 09:11:27 +01:00
Jakub Červený f6762fb85b More changes to make ex1 compilable. 2020-02-13 13:31:44 +01:00
Jakub Červený 165425a992 All compilable in serial except fespace.cpp. 2020-02-12 13:41:58 +01:00
Jakub Červený 77452249e2 Finished modifying H1_FECollection 2020-02-12 13:41:29 +01:00
Jakub Červený c60766c8e8 Starting work on variable order spaces. 2020-02-07 17:49:22 +01:00
Chak Shing Lee ddaf211259 mesh size depend on num_procs 2019-09-04 12:39:32 -07:00
Chak Shing Lee 19d691d21f fix bugs in modifying rhs in DivFreeSolver::Mult. better output printing 2019-09-04 12:07:18 -07:00
chakshinglee 82b2b81f11 put problem setup in a class in mixed_fe.cpp 2019-09-04 09:47:26 -07:00
Chak Shing Lee d9dede69d1 some simplifications 2019-09-03 19:15:20 -07:00
Chak Shing Lee 6810f61347 move construction of some div free solver data to when raw data are collected 2019-09-03 18:55:44 -07:00
chakshinglee 8b1c442167 make div free solver more object-oriented 2019-09-03 05:08:06 -07:00
chakshinglee 0cb7b68691 better structural arrangement 2019-09-02 22:45:16 -07:00
chakshinglee cc11f27dd0 make div-free solver to work for higher order 2019-09-02 16:16:28 -07:00
chakshinglee 15c236ec8c add shared tdofs to boundary tdofs (of the subdomain owned by the processor) 2019-08-31 15:10:48 -07:00
Chak Shing Lee 1b30e4e4e8 make div free solver to work with non-homogeneous boundary condition 2019-08-30 18:05:49 -07:00
chakshinglee 1b5c5c4eff minor simplifications 2019-08-30 09:49:10 -07:00
chakshinglee 95ab83f67a make div free solver to work with mixed boundary conditions 2019-08-30 01:26:21 -07:00
chakshinglee 6bf3e41bb8 combine ML algorithm data and Hcurl MG data: complete 2019-08-29 23:08:41 -07:00
Chak Shing Lee 051c966b68 combine ML algorithm data and Hcurl MG data: incomplete 2019-08-29 19:02:54 -07:00
Chak Shing Lee 9b854227eb clean up 2019-08-29 16:28:49 -07:00
Chak Shing Lee 1369acc570 more efficient way to extract submatrices, remove some unnecessary members, better naming of functions and variables 2019-08-29 15:58:26 -07:00
chakshinglee 845bd485b5 use true dofs only in div-free solver: complete 2019-08-29 09:28:07 -07:00
chakshinglee b2ba4a5c12 add blocksystems to cmake script 2019-08-29 00:57:23 -07:00
Chak Shing Lee 7eb5fb6cca use true dofs only in div-free solver: in progress 2019-08-28 19:05:18 -07:00
Chak Shing Lee ab1d24cf17 completely wrap div-free solver, add some struct for better organization 2019-08-28 16:35:50 -07:00
Chak Shing Lee 6d81a5165f add a warpper to set various options of an IterativeSolver at once 2019-08-28 11:30:09 -07:00
Chak Shing Lee e3bce65238 add a wrapper for BBT solver 2019-08-27 19:52:52 -07:00
Chak Shing Lee 0f806ec0bb add a wrapper for multilevel div free solver 2019-08-27 19:06:34 -07:00
Chak Shing Lee 1a323ffff2 use the convention level 0 being finest level in Multigrid 2019-08-27 17:54:47 -07:00
Chak Shing Lee 94c08c11ae take a coarse solver from outside instead of building one in Multigrid 2019-08-27 12:01:15 -07:00
Chak Shing Lee e888be13fd use OperatorHandle to handle Coarse Solver 2019-08-27 11:09:37 -07:00
Chak Shing Lee 5e7f5c683d use OperatorHandle to handle HypreSmoother raw pointers 2019-08-27 10:49:31 -07:00
Chak Shing Lee 7e6a91a34d remove some old implementation 2019-08-27 10:27:39 -07:00
Chak Shing Lee 3153ed30b0 add a miniapp for solving mixed finite element problem 2019-08-27 10:18:07 -07:00
586 changed files with 21044 additions and 11156 deletions
+42
View File
@@ -0,0 +1,42 @@
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
# This file is part of the MFEM library. For more information and source code
# availability visit https://mfem.org.
#
# MFEM is free software; you can redistribute it and/or modify it under the
# terms of the BSD-3 license. We welcome feedback and contributions, see file
# CONTRIBUTING.md for details.
name: repo-check
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
copyright-check:
runs-on: ubuntu-latest
steps:
- name: checkout mfem
uses: actions/checkout@v2
with:
path: mfem
- name: copyright check
run: |
cd mfem
if git grep -l "^#.*\-2020" > matches.txt
then
echo "Please update the following files to Copyright (c) 2010-2021:"
cat matches.txt
exit 1
else
echo "No outdated copyright found."
fi
+6
View File
@@ -66,6 +66,7 @@ examples/sol_u.*
examples/sol_p.*
examples/sol_r.*
examples/sol_i.*
examples/ex6p-checkpoint.*
examples/ex9.mesh
examples/ex9-mesh.*
examples/ex9-init.*
@@ -237,6 +238,9 @@ miniapps/performance/refined.mesh
miniapps/performance/mesh.*
miniapps/performance/sol.*
miniapps/shifted/distance
miniapps/shifted/ParaViewDistance
miniapps/tools/display-basis
miniapps/tools/load-dc
miniapps/tools/convert-dc
@@ -264,6 +268,8 @@ miniapps/toys/lissajous.mesh
miniapps/toys/lissajous.gf
miniapps/toys/mondrian.mesh
miniapps/solvers/block-solvers
# Unit test binary and outputs
tests/unit/output_meshes
tests/unit/unit_tests
+24 -101
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -23,10 +23,6 @@
# also means that the BUILD_ROOT directory will never be cleaned.
# TODO: add a clean-up mechanism
#
# BUILD_PATH:
# In BUILD_ROOT, we want to separate builds depending on the machine used,
# typically because we build on a set of dependencies per machine.
#
# REBASELINE:
# Defines the default choice for updating the saved baseline results. By default
# the baseline can only be updated from the master branch. This variable offers
@@ -45,9 +41,8 @@
variables:
BUILD_ROOT: ${CI_BUILDS_DIR}/${CI_PROJECT_NAME}_${CI_COMMIT_REF_SLUG}_${CI_PIPELINE_ID}
BUILD_PATH: ${CI_BUILDS_DIR}/${CI_PROJECT_NAME}_${CI_COMMIT_REF_SLUG}_${CI_PIPELINE_ID}/${PLAT}/${TOOLCHAIN}
REBASELINE: "NO"
MFEM_ALLOC_NAME: ${CI_PROJECT_NAME}_ci_${CI_PIPELINE_ID}
ALLOC_NAME: ${CI_PROJECT_NAME}_ci_${CI_PIPELINE_ID}
TPLS_REPO: ssh://git@mybitbucket.llnl.gov:7999/mfem/tpls.git
TESTS_REPO: ssh://git@mybitbucket.llnl.gov:7999/mfem/tests.git
ARTIFACTS_DIR: artifacts
@@ -56,23 +51,18 @@ variables:
# points, however, we use "needs" keyword to express the DAG of jobs for more
# efficiency.
# - We use setup phase to download content outside of mfem directory.
# - Allocate is where quartz resources are allocated once for all.
# - Libs is where dependencies are built.
# - Build is where we build MFEM for multiple toolchains.
# - Test is where we perform a first set of tests on MFEM build.
# - Allocate/Release is where quartz resources are allocated/released once for all.
# - Build and Test is where we build and MFEM for multiple toolchains.
# - Baseline_checks gathers baseline-type test suites execution
# - Baseline_publish, only available on master, allows to update baseline
# results
# - Deallocate releases quartz resources
stages:
- q_allocate_resources
- q_build_and_test
- q_release_resources
- l_build_and_test
- c_build_and_test
- setup
- allocate
- libs
- build
- test
- deallocate
- lassen_build
- lassen_test
- baseline_check
- baseline_publish
@@ -95,92 +85,25 @@ setup:
- if [ ! -d "tests" ]; then git clone ${TESTS_REPO}; fi
- cd tpls && git pull && cd ..
- cd tests && git pull && cd ..
needs: []
# Share configurations (templates) for toolchain configuration.
# Note: Any job using this template shouldn't redefine "before_script" key.
.with_gcc_6_1_0:
variables:
TOOLCHAIN: gcc_6_1_0
CXX: g++
CC: gcc
before_script:
- module load gcc/6.1.0
# On lassen
.with_gcc_8_3_1:
variables:
TOOLCHAIN: gcc_8_3_1
CXX: g++
CC: gcc
before_script:
- module load gcc/8.3.1
.with_gcc_4_9_3:
variables:
TOOLCHAIN: gcc_4_9_3
CXX: g++
CC: gcc
before_script:
- module load gcc/4.9.3
.if_srun_alloc_for_make: &if_srun_alloc_for_make |
if [[ "${MPIEXEC}" == "srun" ]]
then
export JOB_ID=$(squeue -h --name=${MFEM_ALLOC_NAME} --format=%A)
[[ -n "JOB_ID" ]] && export JOB_ID="--jobid=${JOB_ID}"
RESOURCES="--extra-node-info=1:${MAKE_PAR}:1 --cpus-per-task=${MAKE_PAR} --ntasks=1"
# Allocation prefix:
export EXEC_PREFIX="srun ${JOB_ID} ${RESOURCES}"
fi
# Build of dependencies and mfem:
# if on quartz, uses a part of preallocated resources
# Note: Those jobs don't rely on MFEM repository, hence the use of
# "GIT_STRATEGY: none" preventing its clone.
.build_hypre:
variables:
EXEC_PREFIX: ""
GIT_STRATEGY: none
stage: libs
.build_toss_3_x86_64_ib_script:
script:
- cd ${BUILD_ROOT}/tpls
- mkdir -p ${BUILD_PATH}
- make clean
- *if_srun_alloc_for_make
- ${EXEC_PREFIX} make -j ${MAKE_PAR} hypre PREFIX=${BUILD_PATH}/hypre/src/ BUILD_DIR=${BUILD_PATH} LOG_DIR=${BUILD_PATH}
- export THREADS=12
- echo ${ALLOC_NAME}
- export JOBID=$(squeue -h --name=${ALLOC_NAME} --format=%A)
- echo ${JOBID}
- srun $( [[ -n "${JOBID}" ]] && echo "--jobid=${JOBID}" ) -t 30 -N 1 tests/gitlab/build_and_test
.build_metis:
variables:
EXEC_PREFIX: ""
GIT_STRATEGY: none
stage: libs
.build_toss_3_x86_64_ib_corona_script:
script:
- cd ${BUILD_ROOT}/tpls
- mkdir -p ${BUILD_PATH}
- *if_srun_alloc_for_make
- ${EXEC_PREFIX} make -j ${MAKE_PAR} ${METIS} PREFIX=${BUILD_PATH}/ BUILD_DIR=${BUILD_PATH} LOG_DIR=${BUILD_PATH} CC=${CC} CXX=${CXX}
- srun -p mi60 -t 15 -N 1 tests/gitlab/build_and_test
# Building MFEM
.build_mfem:
variables:
EXEC_PREFIX: ""
stage: build
# Lassen and Butte use a different job scheduler (spectrum lsf) that does not
# allow pre-allocation the same way slurm does.
.build_blueos_3_ppc64le_ib_script:
script:
- mkdir -p ${BUILD_PATH}
- cp -r ${CI_PROJECT_DIR} ${BUILD_PATH}/${CI_PROJECT_NAME}_${MFEM_USE_MPI}_${MFEM_DEBUG}
- cd ${BUILD_PATH}/${CI_PROJECT_NAME}_${MFEM_USE_MPI}_${MFEM_DEBUG}
- *if_srun_alloc_for_make
- make config CXX=${CXX} MPICXX=mpicxx MFEM_USE_MPI=${MFEM_USE_MPI} MFEM_DEBUG=${MFEM_DEBUG} MFEM_MPIEXEC="${EXEC_PREFIX}" MFEM_MPIEXEC_NP=${MPIEXEC_NP}
- ${EXEC_PREFIX} make -j ${MAKE_PAR} all
# TODO: Could this phase use a parallel run?
.sanitycheck_mfem:
stage: test
variables:
GIT_STRATEGY: none
script:
- cd ${BUILD_PATH}/${CI_PROJECT_NAME}_${MFEM_USE_MPI}_${MFEM_DEBUG}
- make test
- lalloc 1 -W 15 tests/gitlab/build_and_test
# Shared script for baseline and sample-run-baseline, the value of BASELINE_TEST
# differentiates between the two tests.
@@ -202,7 +125,7 @@ setup:
cd tests
mkdir _${BASELINE_TEST} && cd _${BASELINE_TEST}
# run
salloc --nodes=1 -p pdebug ../runtest ../../mfem "${BASELINE_TEST} ${ADDITIONAL_DIR}"
srun --nodes=1 -p pdebug ../runtest ../../mfem "${BASELINE_TEST} ${ADDITIONAL_DIR}"
# post
mkdir ${CI_PROJECT_DIR}/${ARTIFACTS_DIR}
if [[ -s ${_glob_err} ]]
@@ -305,4 +228,4 @@ setup:
# The list on jobs is defined in machine-specific files.
include:
- local: .gitlab/quartz.yml
- local: .gitlab/lassen.yml
# - local: .gitlab/lassen.yml
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+45 -91
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -15,131 +15,85 @@
tags:
- shell
- quartz
variables:
PLAT: quartz
MPIEXEC: srun
MPIEXEC_NP: "-n"
MAKE_PAR: 6
BASELINE_PAR: 18
rules:
- if: '$CI_COMMIT_BRANCH =~ /_qnone/ || $ON_QUARTZ == "OFF"' #run except if ...
when: never
- if: '$CI_JOB_NAME =~ /release_resources/'
when: always
- when: on_success
# Allocate
allocate_quartz:
q_allocate_resources:
variables:
GIT_STRATEGY: none
extends: .on_quartz
stage: allocate
stage: q_allocate_resources
script:
- |
if [[ "${MPIEXEC}" == "srun" ]]
then
salloc --nodes=1 --extra-node-info=2:18:1 --partition=pdebug --time=30 --no-shell --job-name=${MFEM_ALLOC_NAME}
fi
- salloc --exclusive --nodes=1 --partition=pdebug --time=30 --no-shell --job-name=${ALLOC_NAME}
timeout: 6h
# Release
deallocate_quartz:
q_release_resources:
variables:
GIT_STRATEGY: none
extends: .on_quartz
stage: deallocate
stage: q_release_resources
script:
- |
if [[ "${MPIEXEC}" == "srun" ]]
then
export JOB_ID=$(squeue -h --name=${MFEM_ALLOC_NAME} --format=%A)
([[ -n "${JOB_ID}" ]] && scancel ${JOB_ID})
fi
when: always
- export JOBID=$(squeue -h --name=${ALLOC_NAME} --format=%A)
- ([[ -n "${JOBID}" ]] && scancel ${JOBID})
# Build external libraries (tpls)
build_hypre_gcc_6_1_0_quartz:
extends: [.build_hypre, .with_gcc_6_1_0, .on_quartz]
build_parmetis_gcc_6_1_0_quartz:
extends: [.build_metis, .with_gcc_6_1_0, .on_quartz]
variables:
METIS: parmetis
build_metis4_gcc_6_1_0_quartz:
extends: [.build_metis, .with_gcc_6_1_0, .on_quartz]
variables:
METIS: metis4
build_metis5_gcc_6_1_0_quartz:
extends: [.build_metis, .with_gcc_6_1_0, .on_quartz]
variables:
METIS: metis5
allow_failure: true
# Spack helped builds
# Generic quartz build job, extending build script
.build_and_test_on_quartz:
extends: [.build_toss_3_x86_64_ib_script, .on_quartz]
stage: q_build_and_test
# Build MFEM
build_mfem_debug_ser_gcc_4_9_3_quartz:
extends: [.build_mfem, .with_gcc_4_9_3, .on_quartz]
debug_ser_gcc_4_9_3:
variables:
MFEM_DEBUG: "YES"
MFEM_USE_MPI: "NO"
SPEC: "%gcc@4.9.3 +debug~mpi"
extends: .build_and_test_on_quartz
build_mfem_debug_ser_gcc_6_1_0_quartz:
extends: [.build_mfem, .with_gcc_6_1_0, .on_quartz]
debug_ser_gcc_6_1_0:
variables:
MFEM_DEBUG: "YES"
MFEM_USE_MPI: "NO"
SPEC: "%gcc@6.1.0 +debug~mpi"
extends: .build_and_test_on_quartz
build_mfem_debug_par_gcc_6_1_0_quartz:
extends: [.build_mfem, .with_gcc_6_1_0, .on_quartz]
debug_par_gcc_6_1_0:
variables:
MFEM_DEBUG: "YES"
MFEM_USE_MPI: "YES"
needs: [build_hypre_gcc_6_1_0_quartz, build_parmetis_gcc_6_1_0_quartz]
SPEC: "%gcc@6.1.0 +debug+mpi"
extends: .build_and_test_on_quartz
build_mfem_opt_ser_gcc_6_1_0_quartz:
extends: [.build_mfem, .with_gcc_6_1_0, .on_quartz]
opt_ser_gcc_6_1_0:
variables:
MFEM_DEBUG: "NO"
MFEM_USE_MPI: "NO"
SPEC: "%gcc@6.1.0 ~mpi"
extends: .build_and_test_on_quartz
build_mfem_opt_par_gcc_6_1_0_quartz:
extends: [.build_mfem, .with_gcc_6_1_0, .on_quartz]
opt_par_gcc_6_1_0:
variables:
MFEM_DEBUG: "NO"
MFEM_USE_MPI: "YES"
needs: [build_hypre_gcc_6_1_0_quartz, build_parmetis_gcc_6_1_0_quartz]
SPEC: "%gcc@6.1.0"
extends: .build_and_test_on_quartz
### Tests
# Sanity check
sanitycheck_mfem_debug_ser_gcc_4_9_3_quartz:
extends: [.sanitycheck_mfem, .with_gcc_4_9_3, .on_quartz]
opt_par_gcc_6_1_0_sundials:
variables:
MFEM_DEBUG: "YES"
MFEM_USE_MPI: "NO"
needs: [build_mfem_debug_ser_gcc_4_9_3_quartz, allocate_quartz]
SPEC: "%gcc@6.1.0 +sundials"
extends: .build_and_test_on_quartz
sanitycheck_mfem_debug_ser_gcc_6_1_0_quartz:
extends: [.sanitycheck_mfem, .with_gcc_6_1_0, .on_quartz]
opt_par_gcc_6_1_0_petsc:
variables:
MFEM_DEBUG: "YES"
MFEM_USE_MPI: "NO"
needs: [build_mfem_debug_ser_gcc_6_1_0_quartz, allocate_quartz]
SPEC: "%gcc@6.1.0 +petsc ^petsc+mumps"
extends: .build_and_test_on_quartz
sanitycheck_opt_ser_mfem_gcc_6_1_0_quartz:
extends: [.sanitycheck_mfem, .with_gcc_6_1_0, .on_quartz]
opt_par_gcc_6_1_0_pumi:
variables:
MFEM_DEBUG: "NO"
MFEM_USE_MPI: "NO"
needs: [build_mfem_opt_ser_gcc_6_1_0_quartz, allocate_quartz]
sanitycheck_opt_par_mfem_gcc_6_1_0_quartz:
extends: [.sanitycheck_mfem, .with_gcc_6_1_0, .on_quartz]
variables:
MFEM_DEBUG: "NO"
MFEM_USE_MPI: "YES"
needs: [build_mfem_opt_par_gcc_6_1_0_quartz, allocate_quartz]
SPEC: "%gcc@6.1.0 +pumi"
extends: .build_and_test_on_quartz
# Baseline
baselinecheck_mfem_intel_quartz:
extends: [.baselinecheck_mfem, .on_quartz]
needs: [allocate_quartz]
needs: [setup]
baselinepublish_mfem_quartz:
extends: [.rebaseline_mfem, .on_quartz]
extends: [.on_quartz, .rebaseline_mfem]
needs: [baselinecheck_mfem_intel_quartz]
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+59 -6
View File
@@ -11,6 +11,21 @@
Version 4.2.1 (development)
===========================
- Added high-order matrix-free auxiliary Maxwell solver for H(curl) problems,
as described in Barker and Kolev 2020 (https://doi.org/10.1002/nla.2348). See
Example 3p and linalg/auxiliary.?pp.
- Added a new miniapp block-solvers that compares the performance of various
solvers for mixed finite element discretization of the second order scalar
elliptic equations. Currently available solvers in the miniapp include a
block-diagonal preconditioner that is based on approximate Schur complement
(implemented in ex5p), and a newly implemented solver DivFreeSolver, which
exploits a multilevel decomposition of the Raviart-Thomas space and its
divergence-free subspace. See the miniapps/solvers directory for more details.
- Added a new miniapp for computing (signed) distance functions to a point
source or zero level set. See miniapps/shifted/distance.cpp.
- Added matrix-free GPU-enabled implementations of GradientInterpolator and
IdentityInterpolator.
@@ -20,6 +35,14 @@ Version 4.2.1 (development)
- Added three ESDIRK time integrators: implicit trapezoid rule, L-stable
ESDIRK-32, and A-stable ESDIRK-33.
- Introduced a new non-conforming mesh format that fixes known inconsistencies
of legacy "MFEM mesh v1.1" NC format and works consistently in both serial and
parallel. ParMesh::ParPrint can now print non-conforming AMR meshes that can
be used to restart a parallel AMR computation. Example 6p has been extended to
demonstrate restarting from a previously saved checkpoint. Note that parallel
NC data files are compatible with serial code, e.g., can be viewed with serial
GLVis. Loading of legacy NC mesh files is still supported.
- Added a "scaled Jacobian" visualization option in the Mesh Explorer miniapp to
help identify elements with poor mesh quality.
@@ -35,9 +58,11 @@ Version 4.2.1 (development)
- Implemented a filter method for the Navier miniapp to stabilize highly
turbulent flows in direct numerical simulation.
- Added HIP support to the CMake build system.
- Added support for reading high-order Lagrange meshes in VTK format. Arbitrary-
orders and all element types are supported. See the VTK blog for more info:
https://blog.kitware.com/wp-content/uploads/2018/09/Source_Issue_43.pdf
https://blog.kitware.com/wp-content/uploads/2018/09/Source_Issue_43.pdf.
- Added support for reading VTK meshes in XML format.
@@ -49,6 +74,9 @@ Version 4.2.1 (development)
- Added new mesh quality metrics and improved the untangling capabilities of the
TMOP-based mesh optimization algorithms.
- Added convective and skew-symmetric integrators for the nonlinear term in the
Navier-Stokes equations.
- Changed the interface for the error estimator.
- Implemented the parallel Kelly error indicator for scalar-valued problems.
@@ -66,9 +94,34 @@ Version 4.2.1 (development)
- Implemented an adaptive linear solver tolerance option for NewtonSolver based
on the algorithm of Eisenstat and Walker.
- Added support for nonscalar coefficient with VectorDiffusionIntegrator.
- Extending support for L2 basis functions using MapTypes VALUE and INTEGRAL in
linear interpolators and GridFunction "GetValue" methods.
- Variable order spaces, p- and hp-refinement. This is the initial (serial)
support for variable-order FiniteElementCollection and FiniteElementSpace.
The new method FiniteElementSpace::SetElementOrder can be called to set an
arbitrary order for each mesh element. The conforming interpolation matrix
will now automatically constrain p- and hp- interfaces, enabling general
hp-refinement in both 2D and 3D, on uniform or mixed NC meshes. Support for
parallel variable-order spaces will follow shortly.
- Added support for creating refined meshes for all element types (e.g. by
splitting high-order elements into low-order refined elements), including
mixed meshes. The LOR Transfer miniapp (miniapps/tools/lor-transfer.cpp) now
supports meshes with any element geometry.
- Gitlab CI: use Spack (and Uberenv) to automate the build of TPLs.
libCEED integration improvements
--------------------------------
- Refactor the libCEED integration
- Add support for VectorCoefficient with libCEED backends.
- Add support for ConvectionIntegrator, and VectorConvectionNLFIntegrator with libCEED backends.
Version 4.2, released on October 30, 2020
=========================================
@@ -941,7 +994,7 @@ New and updated examples and miniapps
- Added a new meshing miniapp, Shaper, that can be used to resolve complicated
material interfaces by mesh refinement, e.g. as a tool for initial mesh
generation from prescribed "material()" function. Both conforming and
generation from prescribed "material()" function. Both conforming and
non-conforming (isotropic and anisotropic) refinements are supported.
- Added a new meshing miniapp, Mesh Optimizer, that demonstrates the use of TMOP
@@ -953,7 +1006,7 @@ Discretization improvements
---------------------------
- Added a FindPoints method of the Mesh and ParMesh classes that returns the
elements that contain a given set of points, together with the coordinates of
the points in the reference space of the corresponding element. In parallel,
the points in the reference space of the corresponding element. In parallel,
if a point is shared by multiple processors, only one of them will mark that
point as found. Note that the current implementation of this method is not
optimal and/or 100% reliable. See the mesh-explorer miniapp for an example.
@@ -1280,7 +1333,7 @@ New and improved linear solvers
which is a sparse direct solver for distributed memory architectures. As such
it can only be enabled along with MFEM_USE_MPI. When MFEM is configured with
MFEM_USE_SUPERLU, one also needs to alter the version of METIS, since SuperLU
requires ParMETIS (which comes packaged with a serial version of METIS). See
requires ParMETIS (which comes packaged with a serial version of METIS). See
http://crd-legacy.lbl.gov/~xiaoye/SuperLU for SuperLU_DIST details.
- Added a wrapper for the KLU solver in SuiteSparse see
@@ -1691,7 +1744,7 @@ New and updated examples
(ADS) in hypre.
- Modified Example 1 to use isoparametric discretization (use the FE space from
the mesh) including NURBS meshes and spaces. Updated Example 2 to support
the mesh) including NURBS meshes and spaces. Updated Example 2 to support
arbitrary order spaces. Updated all examples to work with NURBS meshes and
spaces, as well as to not use projection onto discontinuous polynomial spaces
for visualization (this is now handled directly in GLVis when necessary).
@@ -1783,7 +1836,7 @@ Version 1.1, released on Sep 13, 2010
New MFEM format for general meshes
----------------------------------
- New MFEM mesh v1.0 format with uniform structure for any dimension and support
for curved meshes including in 3D. Class Mesh will recognize and read the new
for curved meshes including in 3D. Class Mesh will recognize and read the new
format (in addition to all previously used formats) and Mesh::Print uses the
new format by default. The old print function was renamed to Mesh::PrintXG.
+18 -6
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -88,6 +88,9 @@ include("${CMAKE_CURRENT_SOURCE_DIR}/config/XSDKDefaults.cmake")
# Enable languages.
enable_language(CXX)
if (MFEM_USE_CUDA)
if (MFEM_USE_HIP)
message(FATAL_ERROR " *** MFEM_USE_HIP cannot be combined with MFEM_USE_CUDA.")
endif()
# MFEM_USE_CUDA requires CMake 3.8 or newer (for direct CUDA support)
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
# Use ${CMAKE_CXX_COMPILER} as the cuda host compiler.
@@ -357,6 +360,15 @@ if (MFEM_USE_UMPIRE)
find_package(UMPIRE REQUIRED)
endif()
# AMD HIP
if (MFEM_USE_HIP)
find_package(HIP REQUIRED)
if (HIP_ARCH)
message(STATUS "Using HIP architecture: ${HIP_ARCH}")
list(APPEND HIP_HIPCC_FLAGS "--amdgpu-target=${HIP_ARCH}")
endif()
endif()
# ADIOS2 for parallel I/O
if (MFEM_USE_ADIOS2)
find_package(ADIOS2 REQUIRED)
@@ -432,9 +444,9 @@ foreach(DIR IN LISTS MFEM_SOURCE_DIRS)
endforeach()
if (MFEM_USE_CUDA)
foreach(file IN LISTS SOURCES)
set_property(SOURCE ${file} PROPERTY LANGUAGE CUDA)
endforeach()
set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CUDA)
elseif(MFEM_USE_HIP)
set_source_files_properties(${SOURCES} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT TRUE)
endif()
add_subdirectory(config)
@@ -453,7 +465,7 @@ set(MFEM_INSTALL_DIR ${CMAKE_INSTALL_PREFIX} CACHE PATH
"The MFEM install directory" FORCE)
# Declaring the library
add_library(mfem ${SOURCES} ${HEADERS} ${MASTER_HEADERS})
mfem_add_library(mfem ${SOURCES} ${HEADERS} ${MASTER_HEADERS})
# message(STATUS "TPL_LIBRARIES = ${TPL_LIBRARIES}")
if (CMAKE_VERSION VERSION_GREATER 2.8.11)
target_link_libraries(mfem PUBLIC ${TPL_LIBRARIES})
@@ -610,7 +622,7 @@ endif()
if (MFEM_USE_CEED)
install(DIRECTORY ${MFEM_SOURCE_DIRS}
DESTINATION ${INSTALL_INCLUDE_DIR}/mfem
FILES_MATCHING PATTERN "fem/libceed/*.h")
FILES_MATCHING PATTERN "fem/ceed/*.h")
endif()
# Install ${HEADERS}
+7 -2
View File
@@ -104,7 +104,7 @@ The MFEM source code has the following structure:
│ ├── sundials
| └── superlu
├── fem
│ └── libceed
│ └── ceed
├── general
├── linalg
│ └── simd
@@ -118,10 +118,13 @@ The MFEM source code has the following structure:
│ ├── navier
│ ├── nurbs
│ ├── performance
│ ├── shifted
│ ├── solvers
│ ├── tools
│ └── toys
└── tests
├── convergence
├── gitlab
├── par-mesh-format
├── scripts
└── unit
@@ -561,7 +564,9 @@ MFEM uses a `master`/`next`-branch workflow as described below:
Computing systems. Gitlab pipeline status is reported in the corresponding
GitHub pull request.
- No change can be made on this instance.
- In Gitlab pipelines, TPLs (dependencies) are built using Spack, driven by Uberenv.
- No change to the MFEM repo can be made on this instance.
## Automated Testing
+1 -1
View File
@@ -692,7 +692,7 @@ The specific libraries and their options are:
- CUDA (optional), used when MFEM_USE_CUDA = YES.
URL: https://developer.nvidia.com/cuda-toolkit
Options: CUDA_CXX, CUDA_ARCH, CUDA_OPT, CUDA_LIB.
Versions: CUDA >= 9.1, older versions may work too.
Versions: CUDA >= 10.1.168.
- HIP (optional), used when MFEM_USE_HIP = YES.
URL: https://rocm.github.io/ROCmInstall.html
+1 -1
View File
@@ -1,6 +1,6 @@
BSD 3-Clause License
Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC
Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+5 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -132,6 +132,10 @@
// Requires a CUDA compiler (nvcc).
#cmakedefine MFEM_USE_CUDA
// Build the HIP-enabled version of the MFEM library.
// Requires a HIP compiler (hipcc).
#cmakedefine MFEM_USE_HIP
// Enable MFEM functionality based on the RAJA library
#cmakedefine MFEM_USE_RAJA
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+692
View File
@@ -0,0 +1,692 @@
###############################################################################
# FindHIP.cmake
###############################################################################
include(CheckCXXCompilerFlag)
###############################################################################
# SET: Variable defaults
###############################################################################
# User defined flags
set(HIP_HIPCC_FLAGS "" CACHE STRING "Semicolon delimited flags for HIPCC")
set(HIP_HCC_FLAGS "" CACHE STRING "Semicolon delimited flags for HCC")
set(HIP_CLANG_FLAGS "" CACHE STRING "Semicolon delimited flags for CLANG")
set(HIP_NVCC_FLAGS "" CACHE STRING "Semicolon delimted flags for NVCC")
mark_as_advanced(HIP_HIPCC_FLAGS HIP_HCC_FLAGS HIP_CLANG_FLAGS HIP_NVCC_FLAGS)
set(_hip_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo)
list(REMOVE_DUPLICATES _hip_configuration_types)
foreach(config ${_hip_configuration_types})
string(TOUPPER ${config} config_upper)
set(HIP_HIPCC_FLAGS_${config_upper} "" CACHE STRING "Semicolon delimited flags for HIPCC")
set(HIP_HCC_FLAGS_${config_upper} "" CACHE STRING "Semicolon delimited flags for HCC")
set(HIP_CLANG_FLAGS_${config_upper} "" CACHE STRING "Semicolon delimited flags for CLANG")
set(HIP_NVCC_FLAGS_${config_upper} "" CACHE STRING "Semicolon delimited flags for NVCC")
mark_as_advanced(HIP_HIPCC_FLAGS_${config_upper} HIP_HCC_FLAGS_${config_upper} HIP_CLANG_FLAGS_${config_upper} HIP_NVCC_FLAGS_${config_upper})
endforeach()
option(HIP_HOST_COMPILATION_CPP "Host code compilation mode" ON)
option(HIP_VERBOSE_BUILD "Print out the commands run while compiling the HIP source file. With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF)
mark_as_advanced(HIP_HOST_COMPILATION_CPP)
###############################################################################
# FIND: HIP and associated helper binaries
###############################################################################
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../" REALPATH)
# HIP is supported on Linux only
if(UNIX AND NOT APPLE AND NOT CYGWIN)
# Search for HIP installation
if(NOT HIP_ROOT_DIR)
# Search in user specified path first
find_path(
HIP_ROOT_DIR
NAMES bin/hipconfig
PATHS
"$ENV{ROCM_PATH}/hip"
ENV HIP_PATH
${_IMPORT_PREFIX}
/opt/rocm/hip
DOC "HIP installed location"
NO_DEFAULT_PATH
)
if(NOT EXISTS ${HIP_ROOT_DIR})
if(HIP_FIND_REQUIRED)
message(FATAL_ERROR "Specify HIP_ROOT_DIR")
elseif(NOT HIP_FIND_QUIETLY)
message("HIP_ROOT_DIR not found or specified")
endif()
endif()
# And push it back to the cache
set(HIP_ROOT_DIR ${HIP_ROOT_DIR} CACHE PATH "HIP installed location" FORCE)
endif()
# Find HIPCC executable
find_program(
HIP_HIPCC_EXECUTABLE
NAMES hipcc
PATHS
"${HIP_ROOT_DIR}"
ENV ROCM_PATH
ENV HIP_PATH
/opt/rocm
/opt/rocm/hip
PATH_SUFFIXES bin
NO_DEFAULT_PATH
)
if(NOT HIP_HIPCC_EXECUTABLE)
# Now search in default paths
find_program(HIP_HIPCC_EXECUTABLE hipcc)
endif()
mark_as_advanced(HIP_HIPCC_EXECUTABLE)
# Find HIPCONFIG executable
find_program(
HIP_HIPCONFIG_EXECUTABLE
NAMES hipconfig
PATHS
"${HIP_ROOT_DIR}"
ENV ROCM_PATH
ENV HIP_PATH
/opt/rocm
/opt/rocm/hip
PATH_SUFFIXES bin
NO_DEFAULT_PATH
)
if(NOT HIP_HIPCONFIG_EXECUTABLE)
# Now search in default paths
find_program(HIP_HIPCONFIG_EXECUTABLE hipconfig)
endif()
mark_as_advanced(HIP_HIPCONFIG_EXECUTABLE)
# Find HIPCC_CMAKE_LINKER_HELPER executable
find_program(
HIP_HIPCC_CMAKE_LINKER_HELPER
NAMES hipcc_cmake_linker_helper
PATHS
"${HIP_ROOT_DIR}"
ENV ROCM_PATH
ENV HIP_PATH
/opt/rocm
/opt/rocm/hip
PATH_SUFFIXES bin
NO_DEFAULT_PATH
)
if(NOT HIP_HIPCC_CMAKE_LINKER_HELPER)
# Now search in default paths
find_program(HIP_HIPCC_CMAKE_LINKER_HELPER hipcc_cmake_linker_helper)
endif()
mark_as_advanced(HIP_HIPCC_CMAKE_LINKER_HELPER)
if(HIP_HIPCONFIG_EXECUTABLE AND NOT HIP_VERSION)
# Compute the version
execute_process(
COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --version
OUTPUT_VARIABLE _hip_version
ERROR_VARIABLE _hip_error
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
)
if(NOT _hip_error)
set(HIP_VERSION ${_hip_version} CACHE STRING "Version of HIP as computed from hipcc")
else()
set(HIP_VERSION "0.0.0" CACHE STRING "Version of HIP as computed by FindHIP()")
endif()
mark_as_advanced(HIP_VERSION)
endif()
if(HIP_VERSION)
string(REPLACE "." ";" _hip_version_list "${HIP_VERSION}")
list(GET _hip_version_list 0 HIP_VERSION_MAJOR)
list(GET _hip_version_list 1 HIP_VERSION_MINOR)
list(GET _hip_version_list 2 HIP_VERSION_PATCH)
set(HIP_VERSION_STRING "${HIP_VERSION}")
endif()
if(HIP_HIPCONFIG_EXECUTABLE AND NOT HIP_PLATFORM)
# Compute the platform
execute_process(
COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --platform
OUTPUT_VARIABLE _hip_platform
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(HIP_PLATFORM ${_hip_platform} CACHE STRING "HIP platform as computed by hipconfig")
mark_as_advanced(HIP_PLATFORM)
endif()
if(HIP_HIPCONFIG_EXECUTABLE AND NOT HIP_COMPILER)
# Compute the compiler
execute_process(
COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --compiler
OUTPUT_VARIABLE _hip_compiler
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(HIP_COMPILER ${_hip_compiler} CACHE STRING "HIP compiler as computed by hipconfig")
mark_as_advanced(HIP_COMPILER)
endif()
if(HIP_HIPCONFIG_EXECUTABLE AND NOT HIP_RUNTIME)
# Compute the runtime
execute_process(
COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --runtime
OUTPUT_VARIABLE _hip_runtime
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(HIP_RUNTIME ${_hip_runtime} CACHE STRING "HIP runtime as computed by hipconfig")
mark_as_advanced(HIP_RUNTIME)
endif()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
HIP
REQUIRED_VARS
HIP_ROOT_DIR
HIP_HIPCC_EXECUTABLE
HIP_HIPCONFIG_EXECUTABLE
HIP_PLATFORM
HIP_COMPILER
HIP_RUNTIME
VERSION_VAR HIP_VERSION
)
###############################################################################
# Set HIP CMAKE Flags
###############################################################################
# Copy the invocation styles from CXX to HIP
set(CMAKE_HIP_ARCHIVE_CREATE ${CMAKE_CXX_ARCHIVE_CREATE})
set(CMAKE_HIP_ARCHIVE_APPEND ${CMAKE_CXX_ARCHIVE_APPEND})
set(CMAKE_HIP_ARCHIVE_FINISH ${CMAKE_CXX_ARCHIVE_FINISH})
set(CMAKE_SHARED_LIBRARY_SONAME_HIP_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG})
set(CMAKE_SHARED_LIBRARY_CREATE_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS})
set(CMAKE_SHARED_LIBRARY_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
#set(CMAKE_SHARED_LIBRARY_LINK_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS})
set(CMAKE_SHARED_LIBRARY_RUNTIME_HIP_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
set(CMAKE_SHARED_LIBRARY_RUNTIME_HIP_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP})
set(CMAKE_SHARED_LIBRARY_LINK_STATIC_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS})
set(CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS})
set(HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS "")
set(HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS "")
if("${HIP_COMPILER}" STREQUAL "nvcc")
# Set the CMake Flags to use the nvcc Compiler.
set(CMAKE_HIP_CREATE_SHARED_LIBRARY "${HIP_HIPCC_CMAKE_LINKER_HELPER} <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
set(CMAKE_HIP_CREATE_SHARED_MODULE "${HIP_HIPCC_CMAKE_LINKER_HELPER} <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <LINK_LIBRARIES> -shared" )
set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
elseif("${HIP_COMPILER}" STREQUAL "hcc")
# Set the CMake Flags to use the hcc Compiler.
set(CMAKE_HIP_CREATE_SHARED_LIBRARY "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_HOME} <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
set(CMAKE_HIP_CREATE_SHARED_MODULE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_HOME} <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <LINK_LIBRARIES> -shared" )
set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_HOME} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
elseif("${HIP_COMPILER}" STREQUAL "clang")
#Number of parallel jobs by default is 1
if(NOT DEFINED HIP_CLANG_NUM_PARALLEL_JOBS)
set(HIP_CLANG_NUM_PARALLEL_JOBS 1)
endif()
#Add support for parallel build and link
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
check_cxx_compiler_flag("-parallel-jobs=1" HIP_CLANG_SUPPORTS_PARALLEL_JOBS)
endif()
if(HIP_CLANG_NUM_PARALLEL_JOBS GREATER 1)
if(${HIP_CLANG_SUPPORTS_PARALLEL_JOBS})
set(HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS "-Wno-format-nonliteral -parallel-jobs=${HIP_CLANG_NUM_PARALLEL_JOBS}")
set(HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS "-parallel-jobs=${HIP_CLANG_NUM_PARALLEL_JOBS}")
else()
message("clang compiler doesn't support parallel jobs")
endif()
endif()
# Set the CMake Flags to use the HIP-Clang Compiler.
set(CMAKE_HIP_CREATE_SHARED_LIBRARY "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HIP_CLANG_PATH} ${HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS} <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
set(CMAKE_HIP_CREATE_SHARED_MODULE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HIP_CLANG_PATH} ${HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS} <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <LINK_LIBRARIES> -shared" )
set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HIP_CLANG_PATH} ${HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
if("${HIP_RUNTIME}" STREQUAL "rocclr")
if(TARGET host)
message(STATUS "host interface - found")
set(HIP_HOST_INTERFACE host)
endif()
endif()
endif()
###############################################################################
# MACRO: Locate helper files
###############################################################################
macro(HIP_FIND_HELPER_FILE _name _extension)
set(_hip_full_name "${_name}.${_extension}")
get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(HIP_${_name} "${CMAKE_CURRENT_LIST_DIR}/FindHIP/${_hip_full_name}")
if(NOT EXISTS "${HIP_${_name}}")
set(error_message "${_hip_full_name} not found in ${CMAKE_CURRENT_LIST_DIR}/FindHIP")
if(HIP_FIND_REQUIRED)
message(FATAL_ERROR "${error_message}")
else()
if(NOT HIP_FIND_QUIETLY)
message(STATUS "${error_message}")
endif()
endif()
endif()
# Set this variable as internal, so the user isn't bugged with it.
set(HIP_${_name} ${HIP_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE)
endmacro()
###############################################################################
hip_find_helper_file(run_make2cmake cmake)
hip_find_helper_file(run_hipcc cmake)
###############################################################################
###############################################################################
# MACRO: Reset compiler flags
###############################################################################
macro(HIP_RESET_FLAGS)
unset(HIP_HIPCC_FLAGS)
unset(HIP_HCC_FLAGS)
unset(HIP_CLANG_FLAGS)
unset(HIP_NVCC_FLAGS)
foreach(config ${_hip_configuration_types})
string(TOUPPER ${config} config_upper)
unset(HIP_HIPCC_FLAGS_${config_upper})
unset(HIP_HCC_FLAGS_${config_upper})
unset(HIP_CLANG_FLAGS_${config_upper})
unset(HIP_NVCC_FLAGS_${config_upper})
endforeach()
endmacro()
###############################################################################
# MACRO: Separate the options from the sources
###############################################################################
macro(HIP_GET_SOURCES_AND_OPTIONS _sources _cmake_options _hipcc_options _hcc_options _clang_options _nvcc_options)
set(${_sources})
set(${_cmake_options})
set(${_hipcc_options})
set(${_hcc_options})
set(${_clang_options})
set(${_nvcc_options})
set(_hipcc_found_options FALSE)
set(_hcc_found_options FALSE)
set(_clang_found_options FALSE)
set(_nvcc_found_options FALSE)
foreach(arg ${ARGN})
if("x${arg}" STREQUAL "xHIPCC_OPTIONS")
set(_hipcc_found_options TRUE)
set(_hcc_found_options FALSE)
set(_clang_found_options FALSE)
set(_nvcc_found_options FALSE)
elseif("x${arg}" STREQUAL "xHCC_OPTIONS")
set(_hipcc_found_options FALSE)
set(_hcc_found_options TRUE)
set(_clang_found_options FALSE)
set(_nvcc_found_options FALSE)
elseif("x${arg}" STREQUAL "xCLANG_OPTIONS")
set(_hipcc_found_options FALSE)
set(_hcc_found_options FALSE)
set(_clang_found_options TRUE)
set(_nvcc_found_options FALSE)
elseif("x${arg}" STREQUAL "xNVCC_OPTIONS")
set(_hipcc_found_options FALSE)
set(_hcc_found_options FALSE)
set(_clang_found_options FALSE)
set(_nvcc_found_options TRUE)
elseif(
"x${arg}" STREQUAL "xEXCLUDE_FROM_ALL" OR
"x${arg}" STREQUAL "xSTATIC" OR
"x${arg}" STREQUAL "xSHARED" OR
"x${arg}" STREQUAL "xMODULE"
)
list(APPEND ${_cmake_options} ${arg})
else()
if(_hipcc_found_options)
list(APPEND ${_hipcc_options} ${arg})
elseif(_hcc_found_options)
list(APPEND ${_hcc_options} ${arg})
elseif(_clang_found_options)
list(APPEND ${_clang_options} ${arg})
elseif(_nvcc_found_options)
list(APPEND ${_nvcc_options} ${arg})
else()
# Assume this is a file
list(APPEND ${_sources} ${arg})
endif()
endif()
endforeach()
endmacro()
###############################################################################
# MACRO: Add include directories to pass to the hipcc command
###############################################################################
set(HIP_HIPCC_INCLUDE_ARGS_USER "")
macro(HIP_INCLUDE_DIRECTORIES)
foreach(dir ${ARGN})
list(APPEND HIP_HIPCC_INCLUDE_ARGS_USER $<$<BOOL:${dir}>:-I${dir}>)
endforeach()
endmacro()
###############################################################################
# FUNCTION: Helper to avoid clashes of files with the same basename but different paths
###############################################################################
function(HIP_COMPUTE_BUILD_PATH path build_path)
# Convert to cmake style paths
file(TO_CMAKE_PATH "${path}" bpath)
if(IS_ABSOLUTE "${bpath}")
string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos)
if(_binary_dir_pos EQUAL 0)
file(RELATIVE_PATH bpath "${CMAKE_CURRENT_BINARY_DIR}" "${bpath}")
else()
file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}")
endif()
endif()
# Remove leading /
string(REGEX REPLACE "^[/]+" "" bpath "${bpath}")
# Avoid absolute paths by removing ':'
string(REPLACE ":" "_" bpath "${bpath}")
# Avoid relative paths that go up the tree
string(REPLACE "../" "__/" bpath "${bpath}")
# Avoid spaces
string(REPLACE " " "_" bpath "${bpath}")
# Strip off the filename
get_filename_component(bpath "${bpath}" PATH)
set(${build_path} "${bpath}" PARENT_SCOPE)
endfunction()
###############################################################################
# MACRO: Parse OPTIONS from ARGN & set variables prefixed by _option_prefix
###############################################################################
macro(HIP_PARSE_HIPCC_OPTIONS _option_prefix)
set(_hip_found_config)
foreach(arg ${ARGN})
# Determine if we are dealing with a per-configuration flag
foreach(config ${_hip_configuration_types})
string(TOUPPER ${config} config_upper)
if(arg STREQUAL "${config_upper}")
set(_hip_found_config _${arg})
# Clear arg to prevent it from being processed anymore
set(arg)
endif()
endforeach()
if(arg)
list(APPEND ${_option_prefix}${_hip_found_config} "${arg}")
endif()
endforeach()
endmacro()
###############################################################################
# MACRO: Try and include dependency file if it exists
###############################################################################
macro(HIP_INCLUDE_HIPCC_DEPENDENCIES dependency_file)
set(HIP_HIPCC_DEPEND)
set(HIP_HIPCC_DEPEND_REGENERATE FALSE)
# Create the dependency file if it doesn't exist
if(NOT EXISTS ${dependency_file})
file(WRITE ${dependency_file} "# Generated by: FindHIP.cmake. Do not edit.\n")
endif()
# Include the dependency file
include(${dependency_file})
# Verify the existence of all the included files
if(HIP_HIPCC_DEPEND)
foreach(f ${HIP_HIPCC_DEPEND})
if(NOT EXISTS ${f})
# If they aren't there, regenerate the file again
set(HIP_HIPCC_DEPEND_REGENERATE TRUE)
endif()
endforeach()
else()
# No dependencies, so regenerate the file
set(HIP_HIPCC_DEPEND_REGENERATE TRUE)
endif()
# Regenerate the dependency file if needed
if(HIP_HIPCC_DEPEND_REGENERATE)
set(HIP_HIPCC_DEPEND ${dependency_file})
file(WRITE ${dependency_file} "# Generated by: FindHIP.cmake. Do not edit.\n")
endif()
endmacro()
###############################################################################
# MACRO: Prepare cmake commands for the target
###############################################################################
macro(HIP_PREPARE_TARGET_COMMANDS _target _format _generated_files _source_files)
set(_hip_flags "")
string(TOUPPER "${CMAKE_BUILD_TYPE}" _hip_build_configuration)
if(HIP_HOST_COMPILATION_CPP)
set(HIP_C_OR_CXX CXX)
else()
set(HIP_C_OR_CXX C)
endif()
set(generated_extension ${CMAKE_${HIP_C_OR_CXX}_OUTPUT_EXTENSION})
# Initialize list of includes with those specified by the user. Append with
# ones specified to cmake directly.
set(HIP_HIPCC_INCLUDE_ARGS ${HIP_HIPCC_INCLUDE_ARGS_USER})
# Add the include directories
set(include_directories_generator "$<TARGET_PROPERTY:${_target},INCLUDE_DIRECTORIES>")
list(APPEND HIP_HIPCC_INCLUDE_ARGS "$<$<BOOL:${include_directories_generator}>:-I$<JOIN:${include_directories_generator}, -I>>")
get_directory_property(_hip_include_directories INCLUDE_DIRECTORIES)
list(REMOVE_DUPLICATES _hip_include_directories)
if(_hip_include_directories)
foreach(dir ${_hip_include_directories})
list(APPEND HIP_HIPCC_INCLUDE_ARGS $<$<BOOL:${dir}>:-I${dir}>)
endforeach()
endif()
HIP_GET_SOURCES_AND_OPTIONS(_hip_sources _hip_cmake_options _hipcc_options _hcc_options _clang_options _nvcc_options ${ARGN})
HIP_PARSE_HIPCC_OPTIONS(HIP_HIPCC_FLAGS ${_hipcc_options})
HIP_PARSE_HIPCC_OPTIONS(HIP_HCC_FLAGS ${_hcc_options})
HIP_PARSE_HIPCC_OPTIONS(HIP_CLANG_FLAGS ${_clang_options})
HIP_PARSE_HIPCC_OPTIONS(HIP_NVCC_FLAGS ${_nvcc_options})
# Add the compile definitions
set(compile_definition_generator "$<TARGET_PROPERTY:${_target},COMPILE_DEFINITIONS>")
list(APPEND HIP_HIPCC_FLAGS "$<$<BOOL:${compile_definition_generator}>:-D$<JOIN:${compile_definition_generator}, -D>>")
# Check if we are building shared library.
set(_hip_build_shared_libs FALSE)
list(FIND _hip_cmake_options SHARED _hip_found_SHARED)
list(FIND _hip_cmake_options MODULE _hip_found_MODULE)
if(_hip_found_SHARED GREATER -1 OR _hip_found_MODULE GREATER -1)
set(_hip_build_shared_libs TRUE)
endif()
list(FIND _hip_cmake_options STATIC _hip_found_STATIC)
if(_hip_found_STATIC GREATER -1)
set(_hip_build_shared_libs FALSE)
endif()
# If we are building a shared library, add extra flags to HIP_HIPCC_FLAGS
if(_hip_build_shared_libs)
list(APPEND HIP_HCC_FLAGS "-fPIC")
list(APPEND HIP_CLANG_FLAGS "-fPIC")
list(APPEND HIP_NVCC_FLAGS "--shared -Xcompiler '-fPIC'")
endif()
# Set host compiler
set(HIP_HOST_COMPILER "${CMAKE_${HIP_C_OR_CXX}_COMPILER}")
# Set compiler flags
set(_HIP_HOST_FLAGS "set(CMAKE_HOST_FLAGS ${CMAKE_${HIP_C_OR_CXX}_FLAGS})")
set(_HIP_HIPCC_FLAGS "set(HIP_HIPCC_FLAGS ${HIP_HIPCC_FLAGS})")
set(_HIP_HCC_FLAGS "set(HIP_HCC_FLAGS ${HIP_HCC_FLAGS})")
set(_HIP_CLANG_FLAGS "set(HIP_CLANG_FLAGS ${HIP_CLANG_FLAGS})")
set(_HIP_NVCC_FLAGS "set(HIP_NVCC_FLAGS ${HIP_NVCC_FLAGS})")
foreach(config ${_hip_configuration_types})
string(TOUPPER ${config} config_upper)
set(_HIP_HOST_FLAGS "${_HIP_HOST_FLAGS}\nset(CMAKE_HOST_FLAGS_${config_upper} ${CMAKE_${HIP_C_OR_CXX}_FLAGS_${config_upper}})")
set(_HIP_HIPCC_FLAGS "${_HIP_HIPCC_FLAGS}\nset(HIP_HIPCC_FLAGS_${config_upper} ${HIP_HIPCC_FLAGS_${config_upper}})")
set(_HIP_HCC_FLAGS "${_HIP_HCC_FLAGS}\nset(HIP_HCC_FLAGS_${config_upper} ${HIP_HCC_FLAGS_${config_upper}})")
set(_HIP_CLANG_FLAGS "${_HIP_CLANG_FLAGS}\nset(HIP_CLANG_FLAGS_${config_upper} ${HIP_CLANG_FLAGS_${config_upper}})")
set(_HIP_NVCC_FLAGS "${_HIP_NVCC_FLAGS}\nset(HIP_NVCC_FLAGS_${config_upper} ${HIP_NVCC_FLAGS_${config_upper}})")
endforeach()
# Reset the output variable
set(_hip_generated_files "")
set(_hip_source_files "")
# Iterate over all arguments and create custom commands for all source files
foreach(file ${ARGN})
# Ignore any file marked as a HEADER_FILE_ONLY
get_source_file_property(_is_header ${file} HEADER_FILE_ONLY)
# Allow per source file overrides of the format. Also allows compiling non .cu files.
get_source_file_property(_hip_source_format ${file} HIP_SOURCE_PROPERTY_FORMAT)
if((${file} MATCHES "\\.cu$" OR _hip_source_format) AND NOT _is_header)
set(host_flag FALSE)
else()
set(host_flag TRUE)
endif()
if(NOT host_flag)
# Determine output directory
HIP_COMPUTE_BUILD_PATH("${file}" hip_build_path)
set(hip_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${_target}.dir/${hip_build_path}")
get_filename_component(basename ${file} NAME)
set(generated_file_path "${hip_compile_output_dir}/${CMAKE_CFG_INTDIR}")
set(generated_file_basename "${_target}_generated_${basename}${generated_extension}")
# Set file names
set(generated_file "${generated_file_path}/${generated_file_basename}")
set(cmake_dependency_file "${hip_compile_output_dir}/${generated_file_basename}.depend")
set(custom_target_script_pregen "${hip_compile_output_dir}/${generated_file_basename}.cmake.pre-gen")
set(custom_target_script "${hip_compile_output_dir}/${generated_file_basename}.cmake")
# Set properties for object files
set_source_files_properties("${generated_file}"
PROPERTIES
EXTERNAL_OBJECT true # This is an object file not to be compiled, but only be linked
)
# Don't add CMAKE_CURRENT_SOURCE_DIR if the path is already an absolute path
get_filename_component(file_path "${file}" PATH)
if(IS_ABSOLUTE "${file_path}")
set(source_file "${file}")
else()
set(source_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
endif()
# Bring in the dependencies
HIP_INCLUDE_HIPCC_DEPENDENCIES(${cmake_dependency_file})
# Configure the build script
configure_file("${HIP_run_hipcc}" "${custom_target_script_pregen}" @ONLY)
file(GENERATE
OUTPUT "${custom_target_script}"
INPUT "${custom_target_script_pregen}"
)
set(main_dep DEPENDS ${source_file})
if(CMAKE_GENERATOR MATCHES "Makefiles")
set(verbose_output "$(VERBOSE)")
elseif(HIP_VERBOSE_BUILD)
set(verbose_output ON)
else()
set(verbose_output OFF)
endif()
# Create up the comment string
file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}")
set(hip_build_comment_string "Building HIPCC object ${generated_file_relative_path}")
# Build the generated file and dependency file
add_custom_command(
OUTPUT ${generated_file}
# These output files depend on the source_file and the contents of cmake_dependency_file
${main_dep}
DEPENDS ${HIP_HIPCC_DEPEND}
DEPENDS ${custom_target_script}
# Make sure the output directory exists before trying to write to it.
COMMAND ${CMAKE_COMMAND} -E make_directory "${generated_file_path}"
COMMAND ${CMAKE_COMMAND} ARGS
-D verbose:BOOL=${verbose_output}
-D build_configuration:STRING=${_hip_build_configuration}
-D "generated_file:STRING=${generated_file}"
-P "${custom_target_script}"
WORKING_DIRECTORY "${hip_compile_output_dir}"
COMMENT "${hip_build_comment_string}"
)
# Make sure the build system knows the file is generated
set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE)
list(APPEND _hip_generated_files ${generated_file})
list(APPEND _hip_source_files ${file})
endif()
endforeach()
# Set the return parameter
set(${_generated_files} ${_hip_generated_files})
set(${_source_files} ${_hip_source_files})
endmacro()
###############################################################################
# HIP_ADD_EXECUTABLE
###############################################################################
macro(HIP_ADD_EXECUTABLE hip_target)
# Separate the sources from the options
HIP_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _hipcc_options _hcc_options _clang_options _nvcc_options ${ARGN})
HIP_PREPARE_TARGET_COMMANDS(${hip_target} OBJ _generated_files _source_files ${_sources} HIPCC_OPTIONS ${_hipcc_options} HCC_OPTIONS ${_hcc_options} CLANG_OPTIONS ${_clang_options} NVCC_OPTIONS ${_nvcc_options})
if(_source_files)
list(REMOVE_ITEM _sources ${_source_files})
endif()
if("${HIP_COMPILER}" STREQUAL "hcc")
if("x${HCC_HOME}" STREQUAL "x")
if (DEFINED ENV{ROCM_PATH})
set(HCC_HOME "$ENV{ROCM_PATH}/hcc")
elseif(DEFINED ENV{HIP_PATH})
set(HCC_HOME "$ENV{HIP_PATH}/../hcc")
else()
set(HCC_HOME "/opt/rocm/hcc")
endif()
endif()
set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_HOME} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
elseif("${HIP_COMPILER}" STREQUAL "clang")
if("x${HIP_CLANG_PATH}" STREQUAL "x")
if(DEFINED ENV{HIP_CLANG_PATH})
set(HIP_CLANG_PATH $ENV{HIP_CLANG_PATH})
elseif(DEFINED ENV{ROCM_PATH})
set(HIP_CLANG_PATH "$ENV{ROCM_PATH}/llvm/bin")
elseif(DEFINED ENV{HIP_PATH})
set(HIP_CLANG_PATH "$ENV{HIP_PATH}/../llvm/bin")
else()
set(HIP_CLANG_PATH "/opt/rocm/llvm/bin")
endif()
endif()
set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HIP_CLANG_PATH} ${HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
else()
set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
endif()
if ("${_sources}" STREQUAL "")
add_executable(${hip_target} ${_cmake_options} ${_generated_files} "")
else()
add_executable(${hip_target} ${_cmake_options} ${_generated_files} ${_sources})
endif()
set_target_properties(${hip_target} PROPERTIES LINKER_LANGUAGE HIP)
# Link with host
if (HIP_HOST_INTERFACE)
# hip rt should be rocclr, compiler should be clang
target_link_libraries(${hip_target} ${HIP_HOST_INTERFACE})
endif()
endmacro()
###############################################################################
# HIP_ADD_LIBRARY
###############################################################################
macro(HIP_ADD_LIBRARY hip_target)
# Separate the sources from the options
HIP_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _hipcc_options _hcc_options _clang_options _nvcc_options ${ARGN})
HIP_PREPARE_TARGET_COMMANDS(${hip_target} OBJ _generated_files _source_files ${_sources} ${_cmake_options} HIPCC_OPTIONS ${_hipcc_options} HCC_OPTIONS ${_hcc_options} CLANG_OPTIONS ${_clang_options} NVCC_OPTIONS ${_nvcc_options})
if(_source_files)
list(REMOVE_ITEM _sources ${_source_files})
endif()
if ("${_sources}" STREQUAL "")
add_library(${hip_target} ${_cmake_options} ${_generated_files} "")
else()
add_library(${hip_target} ${_cmake_options} ${_generated_files} ${_sources})
endif()
set_target_properties(${hip_target} PROPERTIES LINKER_LANGUAGE ${HIP_C_OR_CXX})
# Link with host
if (HIP_HOST_INTERFACE)
# hip rt should be rocclr, compiler should be clang
target_link_libraries(${hip_target} ${HIP_HOST_INTERFACE})
endif()
endmacro()
# vim: ts=4:sw=4:expandtab:smartindent
@@ -0,0 +1,182 @@
###############################################################################
# Runs commands using HIPCC
###############################################################################
###############################################################################
# This file runs the hipcc commands to produce the desired output file
# along with the dependency file needed by CMake to compute dependencies.
#
# Input variables:
#
# verbose:BOOL=<> OFF: Be as quiet as possible (default)
# ON : Describe each step
# build_configuration:STRING=<> Build configuration. Defaults to Debug.
# generated_file:STRING=<> File to generate. Mandatory argument.
if(NOT build_configuration)
set(build_configuration Debug)
endif()
if(NOT generated_file)
message(FATAL_ERROR "You must specify generated_file on the command line")
endif()
# Set these up as variables to make reading the generated file easier
set(HIP_HIPCC_EXECUTABLE "@HIP_HIPCC_EXECUTABLE@") # path
set(HIP_HIPCONFIG_EXECUTABLE "@HIP_HIPCONFIG_EXECUTABLE@") #path
set(HIP_HOST_COMPILER "@HIP_HOST_COMPILER@") # path
set(CMAKE_COMMAND "@CMAKE_COMMAND@") # path
set(HIP_run_make2cmake "@HIP_run_make2cmake@") # path
set(HCC_HOME "@HCC_HOME@") #path
set(HIP_CLANG_PATH "@HIP_CLANG_PATH@") #path
set(HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS "@HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS@")
@HIP_HOST_FLAGS@
@_HIP_HIPCC_FLAGS@
@_HIP_HCC_FLAGS@
@_HIP_CLANG_FLAGS@
@_HIP_NVCC_FLAGS@
#Needed to bring the HIP_HIPCC_INCLUDE_ARGS variable in scope
set(HIP_HIPCC_INCLUDE_ARGS @HIP_HIPCC_INCLUDE_ARGS@) # list
set(cmake_dependency_file "@cmake_dependency_file@") # path
set(source_file "@source_file@") # path
set(host_flag "@host_flag@") # bool
# Determine compiler and compiler flags
execute_process(COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --platform OUTPUT_VARIABLE HIP_PLATFORM OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --compiler OUTPUT_VARIABLE HIP_COMPILER OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --runtime OUTPUT_VARIABLE HIP_RUNTIME OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT host_flag)
set(__CC ${HIP_HIPCC_EXECUTABLE})
if("${HIP_PLATFORM}" STREQUAL "amd")
if("${HIP_COMPILER}" STREQUAL "hcc")
if(NOT "x${HCC_HOME}" STREQUAL "x")
set(ENV{HCC_HOME} ${HCC_HOME})
endif()
set(__CC_FLAGS ${HIP_HIPCC_FLAGS} ${HIP_HCC_FLAGS} ${HIP_HIPCC_FLAGS_${build_configuration}} ${HIP_HCC_FLAGS_${build_configuration}})
elseif("${HIP_COMPILER}" STREQUAL "clang")
if(NOT "x${HIP_CLANG_PATH}" STREQUAL "x")
set(ENV{HIP_CLANG_PATH} ${HIP_CLANG_PATH})
endif()
# Temporarily include HIP_HCC_FLAGS for HIP-Clang for PyTorch builds
set(__CC_FLAGS ${HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS} ${HIP_HIPCC_FLAGS} ${HIP_HCC_FLAGS} ${HIP_CLANG_FLAGS} ${HIP_HIPCC_FLAGS_${build_configuration}} ${HIP_HCC_FLAGS_${build_configuration}} ${HIP_CLANG_FLAGS_${build_configuration}})
endif()
else()
set(__CC_FLAGS ${HIP_HIPCC_FLAGS} ${HIP_NVCC_FLAGS} ${HIP_HIPCC_FLAGS_${build_configuration}} ${HIP_NVCC_FLAGS_${build_configuration}})
endif()
else()
set(__CC ${HIP_HOST_COMPILER})
set(__CC_FLAGS ${CMAKE_HOST_FLAGS} ${CMAKE_HOST_FLAGS_${build_configuration}})
endif()
set(__CC_INCLUDES ${HIP_HIPCC_INCLUDE_ARGS})
# hip_execute_process - Executes a command with optional command echo and status message.
# status - Status message to print if verbose is true
# command - COMMAND argument from the usual execute_process argument structure
# ARGN - Remaining arguments are the command with arguments
# HIP_result - Return value from running the command
macro(hip_execute_process status command)
set(_command ${command})
if(NOT "x${_command}" STREQUAL "xCOMMAND")
message(FATAL_ERROR "Malformed call to hip_execute_process. Missing COMMAND as second argument. (command = ${command})")
endif()
if(verbose)
execute_process(COMMAND "${CMAKE_COMMAND}" -E echo -- ${status})
# Build command string to print
set(hip_execute_process_string)
foreach(arg ${ARGN})
# Escape quotes if any
string(REPLACE "\"" "\\\"" arg ${arg})
# Surround args with spaces with quotes
if(arg MATCHES " ")
list(APPEND hip_execute_process_string "\"${arg}\"")
else()
list(APPEND hip_execute_process_string ${arg})
endif()
endforeach()
# Echo the command
execute_process(COMMAND ${CMAKE_COMMAND} -E echo ${hip_execute_process_string})
endif()
# Run the command
execute_process(COMMAND ${ARGN} RESULT_VARIABLE HIP_result)
endmacro()
# Delete the target file
hip_execute_process(
"Removing ${generated_file}"
COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
)
# Generate the dependency file
hip_execute_process(
"Generating dependency file: ${cmake_dependency_file}.pre"
COMMAND "${__CC}"
-M
"${source_file}"
-o "${cmake_dependency_file}.pre"
${__CC_FLAGS}
${__CC_INCLUDES}
)
if(HIP_result)
message(FATAL_ERROR "Error generating ${generated_file}")
endif()
# Generate the cmake readable dependency file to a temp file
hip_execute_process(
"Generating temporary cmake readable file: ${cmake_dependency_file}.tmp"
COMMAND "${CMAKE_COMMAND}"
-D "input_file:FILEPATH=${cmake_dependency_file}.pre"
-D "output_file:FILEPATH=${cmake_dependency_file}.tmp"
-D "verbose=${verbose}"
-P "${HIP_run_make2cmake}"
)
if(HIP_result)
message(FATAL_ERROR "Error generating ${generated_file}")
endif()
# Copy the file if it is different
hip_execute_process(
"Copy if different ${cmake_dependency_file}.tmp to ${cmake_dependency_file}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${cmake_dependency_file}.tmp" "${cmake_dependency_file}"
)
if(HIP_result)
message(FATAL_ERROR "Error generating ${generated_file}")
endif()
# Delete the temporary file
hip_execute_process(
"Removing ${cmake_dependency_file}.tmp and ${cmake_dependency_file}.pre"
COMMAND "${CMAKE_COMMAND}" -E remove "${cmake_dependency_file}.tmp" "${cmake_dependency_file}.pre"
)
if(HIP_result)
message(FATAL_ERROR "Error generating ${generated_file}")
endif()
# Generate the output file
hip_execute_process(
"Generating ${generated_file}"
COMMAND "${__CC}"
-c
"${source_file}"
-o "${generated_file}"
${__CC_FLAGS}
${__CC_INCLUDES}
)
if(HIP_result)
# Make sure that we delete the output file
hip_execute_process(
"Removing ${generated_file}"
COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
)
message(FATAL_ERROR "Error generating file ${generated_file}")
else()
if(verbose)
message("Generated ${generated_file} successfully.")
endif()
endif()
# vim: ts=4:sw=4:expandtab:smartindent
@@ -0,0 +1,50 @@
###############################################################################
# Computes dependencies using HIPCC
###############################################################################
###############################################################################
# This file converts dependency files generated using hipcc to a format that
# cmake can understand.
# Input variables:
#
# input_file:STRING=<> Dependency file to parse. Required argument
# output_file:STRING=<> Output file to generate. Required argument
if(NOT input_file OR NOT output_file)
message(FATAL_ERROR "You must specify input_file and output_file on the command line")
endif()
file(READ ${input_file} depend_text)
if (NOT "${depend_text}" STREQUAL "")
string(REPLACE " /" "\n/" depend_text ${depend_text})
string(REGEX REPLACE "^.*:" "" depend_text ${depend_text})
string(REGEX REPLACE "[ \\\\]*\n" ";" depend_text ${depend_text})
set(dependency_list "")
foreach(file ${depend_text})
string(REGEX REPLACE "^ +" "" file ${file})
if(NOT EXISTS "${file}")
message(WARNING " Removing non-existent dependency file: ${file}")
set(file "")
endif()
if(NOT IS_DIRECTORY "${file}")
get_filename_component(file_absolute "${file}" ABSOLUTE)
list(APPEND dependency_list "${file_absolute}")
endif()
endforeach()
endif()
# Remove the duplicate entries and sort them.
list(REMOVE_DUPLICATES dependency_list)
list(SORT dependency_list)
foreach(file ${dependency_list})
set(hip_hipcc_depend "${hip_hipcc_depend} \"${file}\"\n")
endforeach()
file(WRITE ${output_file} "# Generated by: FindHIP.cmake. Do not edit.\nSET(HIP_HIPCC_DEPEND\n ${hip_hipcc_depend})\n\n")
# vim: ts=4:sw=4:expandtab:smartindent
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+32 -11
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -43,6 +43,24 @@ function(convert_filenames_to_full_paths NAMES)
set(${NAMES} ${tmp_names} PARENT_SCOPE)
endfunction()
# Wrapper for add_executable that calls the HIP wrapper if applicable
macro(mfem_add_executable NAME)
if (MFEM_USE_HIP)
hip_add_executable(${NAME} ${ARGN})
else()
add_executable(${NAME} ${ARGN})
endif()
endmacro()
# Wrapper for add_library that calls the HIP wrapper if applicable
macro(mfem_add_library NAME)
if (MFEM_USE_HIP)
hip_add_library(${NAME} ${ARGN})
else()
add_library(${NAME} ${ARGN})
endif()
endmacro()
# Simple shortcut to add_custom_target() with option to add the target to the
# main target.
function(add_mfem_target TARGET_NAME ADD_TO_ALL)
@@ -56,7 +74,7 @@ function(add_mfem_target TARGET_NAME ADD_TO_ALL)
endfunction()
# Add mfem examples
function(add_mfem_examples EXE_SRCS)
macro(add_mfem_examples EXE_SRCS)
set(EXE_PREFIX "")
set(EXE_PREREQUISITE "")
set(EXE_NEEDED_BY "")
@@ -72,13 +90,15 @@ function(add_mfem_examples EXE_SRCS)
foreach(SRC_FILE IN LISTS ${EXE_SRCS})
# If CUDA is enabled, tag source files to be compiled with nvcc.
if (MFEM_USE_CUDA)
set_property(SOURCE ${SRC_FILE} PROPERTY LANGUAGE CUDA)
set_source_files_properties(${SRC_FILE} PROPERTIES LANGUAGE CUDA)
elseif(MFEM_USE_HIP)
set_source_files_properties(${SRC_FILE} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT TRUE)
endif()
get_filename_component(SRC_FILENAME ${SRC_FILE} NAME)
string(REPLACE ".cpp" "" EXE_NAME "${EXE_PREFIX}${SRC_FILENAME}")
add_executable(${EXE_NAME} ${SRC_FILE})
mfem_add_executable(${EXE_NAME} ${SRC_FILE})
add_dependencies(${MFEM_ALL_EXAMPLES_TARGET_NAME} ${EXE_NAME})
if (EXE_NEEDED_BY)
add_dependencies(${EXE_NEEDED_BY} ${EXE_NAME})
@@ -107,10 +127,10 @@ function(add_mfem_examples EXE_SRCS)
endif()
endif()
endforeach(SRC_FILE)
endfunction()
endmacro()
# A slightly more versatile function for adding miniapps to MFEM
function(add_mfem_miniapp MFEM_EXE_NAME)
macro(add_mfem_miniapp MFEM_EXE_NAME)
# Parse the input arguments looking for the things we need
set(POSSIBLE_ARGS "MAIN" "EXTRA_SOURCES" "EXTRA_HEADERS" "EXTRA_OPTIONS" "EXTRA_DEFINES" "LIBRARIES")
set(CURRENT_ARG)
@@ -126,8 +146,7 @@ function(add_mfem_miniapp MFEM_EXE_NAME)
# If CUDA is enabled, tag source files to be compiled with nvcc.
if (MFEM_USE_CUDA)
set_property(SOURCE ${MAIN_LIST} ${EXTRA_SOURCES_LIST}
PROPERTY LANGUAGE CUDA)
set_source_files_properties(${MAIN_LIST} ${EXTRA_SOURCES_LIST} PROPERTIES LANGUAGE CUDA)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0)
list(TRANSFORM EXTRA_OPTIONS_LIST PREPEND "-Xcompiler=")
else()
@@ -137,11 +156,13 @@ function(add_mfem_miniapp MFEM_EXE_NAME)
endforeach()
set(EXTRA_OPTIONS_LIST ${LIST_})
endif()
elseif(MFEM_USE_HIP)
set_source_files_properties(${MAIN_LIST} ${EXTRA_SOURCES_LIST} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT TRUE)
endif()
# Actually add the executable
add_executable(${MFEM_EXE_NAME} ${MAIN_LIST}
${EXTRA_SOURCES_LIST} ${EXTRA_HEADERS_LIST})
mfem_add_executable(${MFEM_EXE_NAME} ${MAIN_LIST}
${EXTRA_SOURCES_LIST} ${EXTRA_HEADERS_LIST})
add_dependencies(${MFEM_ALL_MINIAPPS_TARGET_NAME} ${MFEM_EXE_NAME})
add_dependencies(${MFEM_EXE_NAME} ${MFEM_EXEC_PREREQUISITES_TARGET_NAME})
@@ -194,7 +215,7 @@ function(add_mfem_miniapp MFEM_EXE_NAME)
LINK_FLAGS "${MPI_CXX_LINK_FLAGS}")
endif()
endif()
endfunction()
endmacro()
# Auxiliary function, used in mfem_find_package().
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+4 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -76,6 +76,9 @@ option(MFEM_ENABLE_MINIAPPS "Build all of the miniapps" OFF)
# Set the target CUDA architecture
set(CUDA_ARCH "sm_60" CACHE STRING "Target CUDA architecture.")
# Set the target HIP architecture
set(HIP_ARCH "gfx900" CACHE STRING "Target HIP architecture.")
set(MFEM_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# The *_DIR paths below will be the first place searched for the corresponding
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+206 -422
View File
@@ -1,241 +1,257 @@
MFEM mesh v1.1
MFEM NC mesh v1.0
#
# MFEM Geometry Types (see mesh/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
# NCMesh supported geometry types:
# TRIANGLE = 2
# SQUARE = 3
# TETRAHEDRON = 4
# CUBE = 5
#
# PRISM = 6
dimension
3
# rank attr geom ref_type nodes/children
elements
120
1 5 0 27 81 30 35 82 87 85
1 5 30 81 29 11 85 87 84 38
1 5 85 87 84 38 34 86 33 24
1 5 35 82 87 85 16 31 86 34
1 5 82 36 83 87 31 21 32 86
1 5 180 94 181 185 93 32 95 184
1 5 92 180 185 183 86 93 184 97
1 5 183 185 182 99 97 184 96 33
1 5 185 181 98 182 184 95 26 96
1 5 179 89 37 90 185 181 98 182
1 5 91 179 90 84 183 185 182 99
1 5 87 88 179 91 92 180 185 183
1 5 88 83 89 179 180 94 181 185
1 5 81 28 20 29 87 83 37 84
1 5 27 8 28 81 82 36 83 87
1 5 8 39 100 28 36 101 105 83
1 5 36 101 105 83 21 42 104 32
1 5 101 45 102 105 42 17 43 104
1 5 39 1 40 100 101 45 102 105
1 5 100 40 9 41 105 102 46 103
1 5 105 102 46 103 104 43 22 44
1 5 186 107 103 108 191 188 112 189
1 5 106 105 107 186 187 110 188 191
1 5 187 110 188 191 109 104 111 190
1 5 191 188 112 189 190 111 44 113
1 5 181 191 189 98 95 190 113 26
1 5 94 187 191 181 32 109 190 95
1 5 83 106 186 89 94 187 191 181
1 5 89 186 108 37 181 191 189 98
1 5 28 100 41 20 83 105 103 37
1 5 20 41 114 49 37 103 119 117
1 5 37 108 192 122 98 189 197 195
1 5 122 192 121 117 195 197 194 127
1 5 195 197 194 127 125 196 124 52
1 5 98 189 197 195 26 113 196 125
1 5 189 112 193 197 113 44 123 196
1 5 197 193 126 194 196 123 118 124
1 5 192 120 119 121 197 193 126 194
1 5 108 103 120 192 189 112 193 197
1 5 103 46 115 119 44 22 50 118
1 5 41 9 47 114 103 46 115 119
1 5 114 47 3 48 119 115 53 116
1 5 119 115 53 116 118 50 18 51
1 5 117 119 116 54 52 118 51 23
1 5 49 114 48 10 117 119 116 54
1 5 128 49 10 55 132 117 54 129
1 5 56 128 55 2 130 132 129 59
1 5 11 29 128 56 38 84 132 130
1 5 29 20 49 128 84 37 117 132
1 5 84 90 198 133 99 182 202 200
1 5 90 37 122 198 182 98 195 202
1 5 198 122 117 134 202 195 127 199
1 5 133 198 134 132 200 202 199 136
1 5 200 202 199 136 135 201 137 131
1 5 202 195 127 199 201 125 52 137
1 5 182 98 195 202 96 26 125 201
1 5 99 182 202 200 33 96 201 135
1 5 38 84 132 130 24 33 131 58
1 5 130 132 129 59 58 131 57 19
1 5 132 117 54 129 131 52 23 57
1 5 131 52 23 57 143 139 77 140
1 5 58 131 57 19 141 143 140 80
1 5 24 33 131 58 67 138 143 141
1 5 33 96 201 135 145 203 208 206
1 5 96 26 125 201 203 150 204 208
1 5 201 125 52 137 208 204 151 205
1 5 135 201 137 131 206 208 205 146
1 5 206 208 205 146 144 207 149 143
1 5 208 204 151 205 207 148 139 149
1 5 203 150 204 208 147 66 148 207
1 5 145 203 208 206 138 147 207 144
1 5 138 66 139 143 62 25 75 142
1 5 67 138 143 141 15 62 142 79
1 5 141 143 140 80 79 142 78 6
1 5 143 139 77 140 142 75 14 78
1 5 139 156 154 77 75 155 74 14
1 5 52 118 51 23 139 156 154 77
1 5 118 50 18 51 156 153 76 154
1 5 156 153 76 154 155 73 7 74
1 5 152 72 153 156 70 13 73 155
1 5 44 22 50 118 152 72 153 156
1 5 209 160 210 213 157 152 158 212
1 5 213 210 161 211 212 158 156 159
1 5 196 123 118 124 213 210 161 211
1 5 113 44 123 196 209 160 210 213
1 5 26 113 196 125 150 209 213 204
1 5 125 196 124 52 204 213 211 151
1 5 204 213 211 151 148 212 159 139
1 5 150 209 213 204 66 157 212 148
1 5 66 152 156 139 25 70 155 75
1 5 164 166 152 66 61 165 70 25
1 5 216 218 209 150 171 217 157 66
1 5 169 214 218 216 164 167 217 171
1 5 32 109 190 95 169 214 218 216
1 5 95 190 113 26 216 218 209 150
1 5 190 111 44 113 218 215 160 209
1 5 109 104 111 190 214 168 215 218
1 5 214 168 215 218 167 166 170 217
1 5 218 215 160 209 217 170 152 157
1 5 104 43 22 44 166 163 72 152
1 5 166 163 72 152 165 69 13 70
1 5 162 71 163 166 68 5 69 165
1 5 42 17 43 104 162 71 163 166
1 5 21 42 104 32 65 162 166 164
1 5 65 162 166 164 12 68 165 61
1 5 172 65 164 175 60 12 61 174
1 5 175 164 66 138 174 61 25 62
1 5 219 169 216 222 177 164 171 221
1 5 176 219 222 220 175 177 221 178
1 5 220 222 203 145 178 221 147 138
1 5 222 216 150 203 221 171 66 147
1 5 184 95 26 96 222 216 150 203
1 5 97 184 96 33 220 222 203 145
1 5 86 93 184 97 176 219 222 220
1 5 93 32 95 184 219 169 216 222
1 5 31 21 32 86 172 65 164 175
1 5 16 31 86 34 64 172 175 173
1 5 34 86 33 24 173 175 138 67
1 5 173 175 138 67 63 174 62 15
1 5 64 172 175 173 4 60 174 63
137
-1 1 5 7 1 18 35 52 69 86 103 120
-1 1 5 7 2 3 4 5 6 7 8 17
0 1 5 0 0 27 81 30 35 82 87 85
0 1 5 0 27 8 28 81 82 36 83 87
0 1 5 0 81 28 20 29 87 83 37 84
0 1 5 0 30 81 29 11 85 87 84 38
0 1 5 0 35 82 87 85 16 31 86 34
0 1 5 0 82 36 83 87 31 21 32 86
-1 1 5 7 9 10 11 12 13 14 15 16
0 1 5 0 87 88 179 91 92 180 185 183
0 1 5 0 88 83 89 179 180 94 181 185
0 1 5 0 179 89 37 90 185 181 98 182
0 1 5 0 91 179 90 84 183 185 182 99
0 1 5 0 92 180 185 183 86 93 184 97
0 1 5 0 180 94 181 185 93 32 95 184
0 1 5 0 185 181 98 182 184 95 26 96
0 1 5 0 183 185 182 99 97 184 96 33
0 1 5 0 85 87 84 38 34 86 33 24
-1 1 5 7 19 20 21 22 23 24 25 26
0 1 5 0 8 39 100 28 36 101 105 83
0 1 5 0 39 1 40 100 101 45 102 105
0 1 5 0 100 40 9 41 105 102 46 103
0 1 5 0 28 100 41 20 83 105 103 37
0 1 5 0 36 101 105 83 21 42 104 32
0 1 5 0 101 45 102 105 42 17 43 104
0 1 5 0 105 102 46 103 104 43 22 44
-1 1 5 7 27 28 29 30 31 32 33 34
0 1 5 0 83 106 186 89 94 187 191 181
0 1 5 0 106 105 107 186 187 110 188 191
0 1 5 0 186 107 103 108 191 188 112 189
0 1 5 0 89 186 108 37 181 191 189 98
0 1 5 0 94 187 191 181 32 109 190 95
0 1 5 0 187 110 188 191 109 104 111 190
0 1 5 0 191 188 112 189 190 111 44 113
0 1 5 0 181 191 189 98 95 190 113 26
-1 1 5 7 36 37 38 39 40 49 50 51
0 1 5 0 20 41 114 49 37 103 119 117
0 1 5 0 41 9 47 114 103 46 115 119
0 1 5 0 114 47 3 48 119 115 53 116
0 1 5 0 49 114 48 10 117 119 116 54
-1 1 5 7 41 42 43 44 45 46 47 48
0 1 5 0 37 108 192 122 98 189 197 195
0 1 5 0 108 103 120 192 189 112 193 197
0 1 5 0 192 120 119 121 197 193 126 194
0 1 5 0 122 192 121 117 195 197 194 127
0 1 5 0 98 189 197 195 26 113 196 125
0 1 5 0 189 112 193 197 113 44 123 196
0 1 5 0 197 193 126 194 196 123 118 124
0 1 5 0 195 197 194 127 125 196 124 52
0 1 5 0 103 46 115 119 44 22 50 118
0 1 5 0 119 115 53 116 118 50 18 51
0 1 5 0 117 119 116 54 52 118 51 23
-1 1 5 7 53 54 55 56 57 58 67 68
0 1 5 0 11 29 128 56 38 84 132 130
0 1 5 0 29 20 49 128 84 37 117 132
0 1 5 0 128 49 10 55 132 117 54 129
0 1 5 0 56 128 55 2 130 132 129 59
0 1 5 0 38 84 132 130 24 33 131 58
-1 1 5 7 59 60 61 62 63 64 65 66
0 1 5 0 84 90 198 133 99 182 202 200
0 1 5 0 90 37 122 198 182 98 195 202
0 1 5 0 198 122 117 134 202 195 127 199
0 1 5 0 133 198 134 132 200 202 199 136
0 1 5 0 99 182 202 200 33 96 201 135
0 1 5 0 182 98 195 202 96 26 125 201
0 1 5 0 202 195 127 199 201 125 52 137
0 1 5 0 200 202 199 136 135 201 137 131
0 1 5 0 132 117 54 129 131 52 23 57
0 1 5 0 130 132 129 59 58 131 57 19
-1 1 5 7 70 71 72 81 82 83 84 85
0 1 5 0 16 31 86 34 64 172 175 173
0 1 5 0 31 21 32 86 172 65 164 175
-1 1 5 7 73 74 75 76 77 78 79 80
0 1 5 0 86 93 184 97 176 219 222 220
0 1 5 0 93 32 95 184 219 169 216 222
0 1 5 0 184 95 26 96 222 216 150 203
0 1 5 0 97 184 96 33 220 222 203 145
0 1 5 0 176 219 222 220 175 177 221 178
0 1 5 0 219 169 216 222 177 164 171 221
0 1 5 0 222 216 150 203 221 171 66 147
0 1 5 0 220 222 203 145 178 221 147 138
0 1 5 0 34 86 33 24 173 175 138 67
0 1 5 0 64 172 175 173 4 60 174 63
0 1 5 0 172 65 164 175 60 12 61 174
0 1 5 0 175 164 66 138 174 61 25 62
0 1 5 0 173 175 138 67 63 174 62 15
-1 1 5 7 87 88 89 90 99 100 101 102
0 1 5 0 21 42 104 32 65 162 166 164
0 1 5 0 42 17 43 104 162 71 163 166
0 1 5 0 104 43 22 44 166 163 72 152
-1 1 5 7 91 92 93 94 95 96 97 98
0 1 5 0 32 109 190 95 169 214 218 216
0 1 5 0 109 104 111 190 214 168 215 218
0 1 5 0 190 111 44 113 218 215 160 209
0 1 5 0 95 190 113 26 216 218 209 150
0 1 5 0 169 214 218 216 164 167 217 171
0 1 5 0 214 168 215 218 167 166 170 217
0 1 5 0 218 215 160 209 217 170 152 157
0 1 5 0 216 218 209 150 171 217 157 66
0 1 5 0 65 162 166 164 12 68 165 61
0 1 5 0 162 71 163 166 68 5 69 165
0 1 5 0 166 163 72 152 165 69 13 70
0 1 5 0 164 166 152 66 61 165 70 25
-1 1 5 7 104 113 114 115 116 117 118 119
-1 1 5 7 105 106 107 108 109 110 111 112
0 1 5 0 26 113 196 125 150 209 213 204
0 1 5 0 113 44 123 196 209 160 210 213
0 1 5 0 196 123 118 124 213 210 161 211
0 1 5 0 125 196 124 52 204 213 211 151
0 1 5 0 150 209 213 204 66 157 212 148
0 1 5 0 209 160 210 213 157 152 158 212
0 1 5 0 213 210 161 211 212 158 156 159
0 1 5 0 204 213 211 151 148 212 159 139
0 1 5 0 44 22 50 118 152 72 153 156
0 1 5 0 118 50 18 51 156 153 76 154
0 1 5 0 52 118 51 23 139 156 154 77
0 1 5 0 66 152 156 139 25 70 155 75
0 1 5 0 152 72 153 156 70 13 73 155
0 1 5 0 156 153 76 154 155 73 7 74
0 1 5 0 139 156 154 77 75 155 74 14
-1 1 5 7 121 122 131 132 133 134 135 136
0 1 5 0 24 33 131 58 67 138 143 141
-1 1 5 7 123 124 125 126 127 128 129 130
0 1 5 0 33 96 201 135 145 203 208 206
0 1 5 0 96 26 125 201 203 150 204 208
0 1 5 0 201 125 52 137 208 204 151 205
0 1 5 0 135 201 137 131 206 208 205 146
0 1 5 0 145 203 208 206 138 147 207 144
0 1 5 0 203 150 204 208 147 66 148 207
0 1 5 0 208 204 151 205 207 148 139 149
0 1 5 0 206 208 205 146 144 207 149 143
0 1 5 0 131 52 23 57 143 139 77 140
0 1 5 0 58 131 57 19 141 143 140 80
0 1 5 0 67 138 143 141 15 62 142 79
0 1 5 0 138 66 139 143 62 25 75 142
0 1 5 0 143 139 77 140 142 75 14 78
0 1 5 0 141 143 140 80 79 142 78 6
# attr geom nodes
boundary
96
1 3 30 81 27 0
2 3 0 27 82 35
5 3 30 0 35 85
1 3 81 28 8 27
2 3 27 8 36 82
1 3 29 20 28 81
1 3 11 29 81 30
5 3 11 30 85 38
5 3 38 85 34 24
2 3 35 82 31 16
5 3 85 35 16 34
2 3 82 36 21 31
1 3 29 20 28 81
1 3 81 28 8 27
2 3 27 8 36 82
5 3 38 85 34 24
1 3 28 100 39 8
2 3 8 39 101 36
2 3 36 101 42 21
2 3 101 45 17 42
3 3 45 102 43 17
1 3 100 40 1 39
2 3 39 1 45 101
3 3 1 40 102 45
1 3 41 9 40 100
3 3 40 9 46 102
3 3 102 46 22 43
1 3 20 41 100 28
2 3 36 101 42 21
2 3 101 45 17 42
3 3 45 102 43 17
3 3 102 46 22 43
1 3 49 114 41 20
3 3 46 115 50 22
1 3 114 47 9 41
3 3 9 47 115 46
1 3 48 3 47 114
3 3 47 3 53 115
4 3 3 48 116 53
1 3 10 48 114 49
4 3 48 10 54 116
3 3 46 115 50 22
3 3 115 53 18 50
4 3 53 116 51 18
4 3 116 54 23 51
1 3 10 48 114 49
4 3 48 10 54 116
1 3 56 128 29 11
5 3 56 11 38 130
1 3 128 49 20 29
1 3 55 10 49 128
4 3 10 55 129 54
1 3 2 55 128 56
4 3 55 2 59 129
5 3 2 56 130 59
1 3 56 128 29 11
5 3 56 11 38 130
1 3 128 49 20 29
5 3 130 38 24 58
4 3 54 129 57 23
4 3 129 59 19 57
5 3 59 130 58 19
4 3 54 129 57 23
4 3 23 57 140 77
4 3 57 19 80 140
5 3 19 58 141 80
5 3 58 24 67 141
6 3 62 25 75 142
5 3 141 67 15 79
6 3 15 62 142 79
4 3 140 80 6 78
5 3 80 141 79 6
6 3 79 142 78 6
4 3 77 140 78 14
6 3 142 75 14 78
4 3 154 77 14 74
6 3 75 155 74 14
4 3 51 23 77 154
3 3 50 18 76 153
4 3 18 51 154 76
3 3 153 76 7 73
4 3 76 154 74 7
6 3 155 73 7 74
3 3 72 153 73 13
6 3 70 13 73 155
3 3 22 50 153 72
6 3 25 70 155 75
6 3 61 165 70 25
3 3 43 22 72 163
3 3 163 72 13 69
6 3 165 69 13 70
2 3 162 71 5 68
3 3 71 163 69 5
6 3 68 5 69 165
2 3 42 17 71 162
3 3 17 43 163 71
2 3 21 42 162 65
2 3 65 162 68 12
6 3 12 68 165 61
2 3 172 65 12 60
6 3 60 12 61 174
6 3 174 61 25 62
2 3 31 21 65 172
2 3 16 31 172 64
5 3 34 16 64 173
2 3 31 21 65 172
5 3 24 34 173 67
5 3 67 173 63 15
6 3 63 174 62 15
2 3 64 172 60 4
5 3 173 64 4 63
6 3 4 60 174 63
2 3 172 65 12 60
6 3 60 12 61 174
6 3 174 61 25 62
5 3 67 173 63 15
6 3 63 174 62 15
2 3 21 42 162 65
2 3 42 17 71 162
3 3 17 43 163 71
3 3 43 22 72 163
2 3 65 162 68 12
6 3 12 68 165 61
2 3 162 71 5 68
3 3 71 163 69 5
6 3 68 5 69 165
3 3 163 72 13 69
6 3 165 69 13 70
6 3 61 165 70 25
3 3 22 50 153 72
3 3 50 18 76 153
4 3 18 51 154 76
4 3 51 23 77 154
6 3 25 70 155 75
3 3 72 153 73 13
6 3 70 13 73 155
3 3 153 76 7 73
4 3 76 154 74 7
6 3 155 73 7 74
4 3 154 77 14 74
6 3 75 155 74 14
5 3 58 24 67 141
4 3 23 57 140 77
4 3 57 19 80 140
5 3 19 58 141 80
5 3 141 67 15 79
6 3 15 62 142 79
6 3 62 25 75 142
4 3 77 140 78 14
6 3 142 75 14 78
4 3 140 80 6 78
5 3 80 141 79 6
6 3 79 142 78 6
# vert_id p1 p2
vertex_parents
215
8 0 1
@@ -454,28 +470,9 @@ vertex_parents
221 171 178
222 203 219
coarse_elements
17
7 11 12 9 10 6 5 8 7
7 0 14 13 1 3 4 120 2
7 27 22 21 28 26 23 24 25
7 15 18 19 29 16 17 20 122
7 31 38 37 32 34 35 36 33
7 30 40 41 44 124 39 42 43
7 49 50 51 52 56 55 54 53
7 47 48 45 46 57 126 59 58
7 113 114 111 112 108 107 110 109
7 116 115 128 117 119 105 106 118
7 93 96 95 94 92 97 98 91
7 103 102 99 130 104 101 100 90
7 85 84 83 86 88 81 82 87
7 132 80 77 76 89 79 78 75
7 63 64 65 66 70 69 68 67
7 62 134 60 61 72 71 74 73
7 121 123 125 127 129 131 133 135
vertices
223
# top-level node coordinates
coordinates
8
3
0 0 0
1 0 0
@@ -485,218 +482,5 @@ vertices
1 0 1
0 1 1
1 1 1
0.5 0 0
1 0.5 0
0.5 1 0
0 0.5 0
0.5 0 1
1 0.5 1
0.5 1 1
0 0.5 1
0 0 0.5
1 0 0.5
1 1 0.5
0 1 0.5
0.5 0.5 0
0.5 0 0.5
1 0.5 0.5
0.5 1 0.5
0 0.5 0.5
0.5 0.5 1
0.5 0.5 0.5
0.25 0 0
0.5 0.25 0
0.25 0.5 0
0 0.25 0
0.25 0 0.5
0.5 0.25 0.5
0.25 0.5 0.5
0 0.25 0.5
0 0 0.25
0.5 0 0.25
0.5 0.5 0.25
0 0.5 0.25
0.75 0 0
1 0.25 0
0.75 0.5 0
0.75 0 0.5
1 0.25 0.5
0.75 0.5 0.5
1 0 0.25
1 0.5 0.25
1 0.75 0
0.75 1 0
0.5 0.75 0
1 0.75 0.5
0.75 1 0.5
0.5 0.75 0.5
1 1 0.25
0.5 1 0.25
0.25 1 0
0 0.75 0
0.25 1 0.5
0 0.75 0.5
0 1 0.25
0.25 0 1
0.5 0.25 1
0.25 0.5 1
0 0.25 1
0 0 0.75
0.5 0 0.75
0.5 0.5 0.75
0 0.5 0.75
0.75 0 1
1 0.25 1
0.75 0.5 1
1 0 0.75
1 0.5 0.75
1 0.75 1
0.75 1 1
0.5 0.75 1
1 1 0.75
0.5 1 0.75
0.25 1 1
0 0.75 1
0 1 0.75
0.25 0.25 0
0.25 0 0.25
0.5 0.25 0.25
0.25 0.5 0.25
0 0.25 0.25
0.25 0.25 0.5
0.25 0.25 0.25
0.375 0.25 0.25
0.5 0.375 0.25
0.375 0.5 0.25
0.25 0.375 0.25
0.25 0.25 0.375
0.375 0.25 0.5
0.5 0.25 0.375
0.5 0.375 0.5
0.375 0.5 0.5
0.25 0.375 0.5
0.5 0.5 0.375
0.25 0.5 0.375
0.75 0.25 0
0.75 0 0.25
1 0.25 0.25
0.75 0.5 0.25
0.75 0.25 0.5
0.75 0.25 0.25
0.625 0.25 0.25
0.75 0.375 0.25
0.625 0.5 0.25
0.625 0.25 0.5
0.75 0.25 0.375
0.75 0.375 0.5
0.75 0.5 0.375
0.625 0.5 0.5
0.75 0.75 0
1 0.75 0.25
0.75 1 0.25
0.5 0.75 0.25
0.75 0.75 0.5
0.75 0.75 0.25
0.75 0.625 0.25
0.625 0.75 0.25
0.5 0.625 0.25
0.75 0.625 0.5
0.625 0.75 0.5
0.5 0.625 0.5
0.75 0.75 0.375
0.5 0.75 0.375
0.25 0.75 0
0.25 1 0.25
0 0.75 0.25
0.25 0.75 0.5
0.25 0.75 0.25
0.25 0.625 0.25
0.375 0.75 0.25
0.25 0.625 0.5
0.25 0.75 0.375
0.375 0.75 0.5
0.25 0.5 0.75
0.5 0.75 0.75
0.25 1 0.75
0 0.75 0.75
0.25 0.75 1
0.25 0.75 0.75
0.25 0.625 0.75
0.25 0.5 0.625
0.25 0.75 0.625
0.375 0.5 0.75
0.5 0.625 0.75
0.375 0.75 0.75
0.5 0.5 0.625
0.5 0.75 0.625
0.75 0.5 0.75
1 0.75 0.75
0.75 1 0.75
0.75 0.75 1
0.75 0.75 0.75
0.625 0.5 0.75
0.75 0.625 0.75
0.625 0.75 0.75
0.75 0.5 0.625
0.75 0.75 0.625
0.75 0 0.75
1 0.25 0.75
0.5 0.25 0.75
0.75 0.25 1
0.75 0.25 0.75
0.625 0.25 0.75
0.75 0.25 0.625
0.5 0.25 0.625
0.75 0.375 0.75
0.5 0.375 0.75
0.25 0 0.75
0 0.25 0.75
0.25 0.25 1
0.25 0.25 0.75
0.25 0.25 0.625
0.375 0.25 0.75
0.25 0.375 0.75
0.375 0.375 0.25
0.375 0.25 0.375
0.5 0.375 0.375
0.375 0.5 0.375
0.25 0.375 0.375
0.375 0.375 0.5
0.375 0.375 0.375
0.625 0.375 0.25
0.625 0.25 0.375
0.75 0.375 0.375
0.625 0.5 0.375
0.625 0.375 0.5
0.625 0.375 0.375
0.625 0.625 0.25
0.75 0.625 0.375
0.625 0.75 0.375
0.5 0.625 0.375
0.625 0.625 0.5
0.625 0.625 0.375
0.375 0.625 0.25
0.375 0.75 0.375
0.25 0.625 0.375
0.375 0.625 0.5
0.375 0.625 0.375
0.375 0.5 0.625
0.5 0.625 0.625
0.375 0.75 0.625
0.25 0.625 0.625
0.375 0.625 0.75
0.375 0.625 0.625
0.625 0.5 0.625
0.75 0.625 0.625
0.625 0.75 0.625
0.625 0.625 0.75
0.625 0.625 0.625
0.625 0.25 0.625
0.75 0.375 0.625
0.5 0.375 0.625
0.625 0.375 0.75
0.625 0.375 0.625
0.375 0.25 0.625
0.25 0.375 0.625
0.375 0.375 0.75
0.375 0.375 0.625
mfem_mesh_end
+51 -89
View File
@@ -1,56 +1,63 @@
MFEM mesh v1.1
MFEM NC mesh v1.0
#
# MFEM Geometry Types (see mesh/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
# NCMesh supported geometry types:
# TRIANGLE = 2
# SQUARE = 3
# TETRAHEDRON = 4
# CUBE = 5
#
# PRISM = 6
dimension
2
# rank attr geom ref_type nodes/children
elements
28
1 3 0 9 21 12
1 3 12 21 11 7
1 3 21 22 37 25
1 3 25 37 24 11
1 3 37 23 8 24
1 3 22 10 23 37
1 3 9 4 10 21
1 3 4 13 26 10
1 3 13 1 14 26
1 3 26 14 5 15
1 3 38 28 15 29
1 3 27 26 28 38
1 3 10 27 38 23
1 3 23 38 29 8
1 3 8 29 39 33
1 3 33 39 32 18
1 3 39 31 30 32
1 3 29 15 31 39
1 3 15 5 16 30
1 3 30 16 3 17
1 3 18 30 17 6
1 3 34 18 6 19
1 3 40 33 18 36
1 3 24 8 33 40
1 3 11 24 40 35
1 3 35 40 36 34
1 3 7 11 34 20
1 3 20 34 19 2
37
-1 1 3 3 1 10 19 28
-1 1 3 3 2 3 4 9
0 1 3 0 0 9 21 12
0 1 3 0 9 4 10 21
-1 1 3 3 5 6 7 8
0 1 3 0 21 22 37 25
0 1 3 0 22 10 23 37
0 1 3 0 37 23 8 24
0 1 3 0 25 37 24 11
0 1 3 0 12 21 11 7
-1 1 3 3 11 12 13 14
0 1 3 0 4 13 26 10
0 1 3 0 13 1 14 26
0 1 3 0 26 14 5 15
-1 1 3 3 15 16 17 18
0 1 3 0 10 27 38 23
0 1 3 0 27 26 28 38
0 1 3 0 38 28 15 29
0 1 3 0 23 38 29 8
-1 1 3 3 20 25 26 27
-1 1 3 3 21 22 23 24
0 1 3 0 8 29 39 33
0 1 3 0 29 15 31 39
0 1 3 0 39 31 30 32
0 1 3 0 33 39 32 18
0 1 3 0 15 5 16 30
0 1 3 0 30 16 3 17
0 1 3 0 18 30 17 6
-1 1 3 3 29 30 35 36
0 1 3 0 7 11 34 20
-1 1 3 3 31 32 33 34
0 1 3 0 11 24 40 35
0 1 3 0 24 8 33 40
0 1 3 0 40 33 18 36
0 1 3 0 35 40 36 34
0 1 3 0 34 18 6 19
0 1 3 0 20 34 19 2
# attr geom nodes
boundary
16
1 1 0 9
4 1 12 0
4 1 7 12
1 1 9 4
4 1 7 12
1 1 4 13
1 1 13 1
2 1 1 14
@@ -59,11 +66,12 @@ boundary
2 1 16 3
3 1 3 17
3 1 17 6
3 1 6 19
4 1 20 7
3 1 6 19
3 1 19 2
4 1 2 20
# vert_id p1 p2
vertex_parents
37
4 0 1
@@ -104,59 +112,13 @@ vertex_parents
39 29 32
40 24 36
coarse_elements
9
3 2 5 4 3
3 0 6 28 1
3 12 11 10 13
3 7 8 9 30
3 14 17 16 15
3 32 18 19 20
3 24 23 22 25
3 26 34 21 27
3 29 31 33 35
vertices
41
# top-level node coordinates
coordinates
4
2
0 0
1 0
0 1
1 1
0.5 0
1 0.5
0.5 1
0 0.5
0.5 0.5
0.25 0
0.5 0.25
0.25 0.5
0 0.25
0.75 0
1 0.25
0.75 0.5
1 0.75
0.75 1
0.5 0.75
0.25 1
0 0.75
0.25 0.25
0.375 0.25
0.5 0.375
0.375 0.5
0.25 0.375
0.75 0.25
0.625 0.25
0.75 0.375
0.625 0.5
0.75 0.75
0.75 0.625
0.625 0.75
0.5 0.625
0.25 0.75
0.25 0.625
0.375 0.75
0.375 0.375
0.625 0.375
0.625 0.625
0.375 0.625
mfem_mesh_end
+53 -56
View File
@@ -1,51 +1,42 @@
MFEM mesh v1.1
MFEM NC mesh v1.0
#
# MFEM Geometry Types (see mesh/geom.hpp):
#
# POINT = 0
# SEGMENT = 1
# NCMesh supported geometry types:
# TRIANGLE = 2
# SQUARE = 3
# TETRAHEDRON = 4
# CUBE = 5
#
# PRISM = 6
dimension
2
# rank attr geom ref_type nodes/children
elements
17
1 3 0 23 30 26
1 3 26 30 25 21
1 3 30 24 22 25
1 3 23 18 24 30
1 3 18 1 19 22
1 3 22 19 10 20
1 3 31 27 20 28
1 3 25 22 27 31
1 3 21 25 31 29
1 3 29 31 28 9
1 3 1 2 11 10
1 3 2 3 12 11
1 3 3 4 13 12
2 3 4 5 14 13
2 3 5 6 15 14
2 3 6 7 16 15
2 3 7 8 17 16
20
0 1 3 0 1 2 11 10
0 1 3 0 2 3 12 11
0 1 3 0 3 4 13 12
0 2 3 0 4 5 14 13
0 2 3 0 5 6 15 14
0 2 3 0 6 7 16 15
0 2 3 0 7 8 17 16
-1 1 3 3 8 13 14 15
-1 1 3 3 9 10 11 12
0 1 3 0 0 23 30 26
0 1 3 0 23 18 24 30
0 1 3 0 30 24 22 25
0 1 3 0 26 30 25 21
0 1 3 0 18 1 19 22
0 1 3 0 22 19 10 20
-1 1 3 3 16 17 18 19
0 1 3 0 21 25 31 29
0 1 3 0 25 22 27 31
0 1 3 0 31 27 20 28
0 1 3 0 29 31 28 9
# attr geom nodes
boundary
25
3 1 0 23
1 1 26 0
1 1 21 26
3 1 23 18
3 1 18 1
3 1 10 20
3 1 20 28
1 1 29 21
3 1 28 9
1 1 9 29
3 1 1 2
3 1 11 10
3 1 2 3
@@ -61,7 +52,18 @@ boundary
3 1 7 8
2 1 8 17
3 1 17 16
3 1 0 23
1 1 26 0
3 1 23 18
1 1 21 26
3 1 18 1
3 1 10 20
1 1 29 21
3 1 20 28
3 1 28 9
1 1 9 29
# vert_id p1 p2
vertex_parents
14
18 0 1
@@ -79,14 +81,21 @@ vertex_parents
30 23 25
31 25 28
coarse_elements
3
3 0 3 2 1
3 8 7 6 9
3 17 4 5 18
# root element orientation
root_state
8
1
1
1
1
1
1
0
0
vertices
32
# top-level node coordinates
coordinates
18
2
0 0
1 0
@@ -106,17 +115,5 @@ vertices
6 1
7 1
8 1
0.5 0
1 0.5
0.5 1
0 0.5
0.5 0.5
0.25 0
0.5 0.25
0.25 0.5
0 0.25
0.5 0.75
0.25 1
0 0.75
0.25 0.25
0.25 0.75
mfem_mesh_end
+757 -1592
View File
File diff suppressed because it is too large Load Diff
+7
View File
@@ -0,0 +1,7 @@
MFEM INLINE mesh v1.0
type = tri
nx = 1
ny = 1
sx = 3.14
sy = 3.14
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+2
View File
@@ -781,6 +781,8 @@ INPUT = @MFEM_SOURCE_DIR@/doc/CodeDocumentation.dox \
@MFEM_SOURCE_DIR@/miniapps/navier \
@MFEM_SOURCE_DIR@/miniapps/nurbs \
@MFEM_SOURCE_DIR@/miniapps/performance \
@MFEM_SOURCE_DIR@/miniapps/shifted \
@MFEM_SOURCE_DIR@/miniapps/solvers \
@MFEM_SOURCE_DIR@/miniapps/tools \
@MFEM_SOURCE_DIR@/miniapps/toys
+2
View File
@@ -176,6 +176,8 @@ namespace mfem {
* - <a class="el" href="findpts_8cpp_source.html">Find Points</a>: evaluate grid function in physical space, <a class="el" href="findpts_8cpp_source.html">serial</a> and <a class="el" href="pfindpts_8cpp_source.html">parallel</a> versions
* - <a class="el" href="field-diff_8cpp_source.html">Field Diff</a>: compare grid functions on different meshes
* - <a class="el" href="field-interp_8cpp_source.html">Field Interp</a>: transfer a grid functions between meshes
* - <a class="el" href="distance_8cpp_source.html">Distance</a>: finite element distance function solver
* - <a class="el" href="distance_8cpp_source.html">Block Solvers</a>: comparison of saddle point system solvers
* - <a class="el" href="miniapps_2performance_2ex1_8cpp_source.html">HPC Example 1</a>: high-performance nodal H1 FEM for the Laplace problem
* - <a class="el" href="miniapps_2performance_2ex1p_8cpp_source.html">HPC Example 1p</a>: high-performance parallel nodal H1 FEM for the Laplace problem
*
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -2
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -34,7 +34,6 @@ list(APPEND ALL_EXE_SRCS
ex25.cpp
ex26.cpp
ex27.cpp
ex91.cpp
)
if (MFEM_USE_MPI)
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+19 -10
View File
@@ -69,7 +69,10 @@ int main(int argc, char *argv[])
bool static_cond = false;
bool pa = false;
const char *device_config = "cpu";
bool visualization = 1;
bool visualization = true;
#ifdef MFEM_USE_AMGX
bool useAmgX = false;
#endif
OptionsParser args(argc, argv);
args.AddOption(&mesh_file, "-m", "--mesh",
@@ -87,6 +90,11 @@ int main(int argc, char *argv[])
args.AddOption(&visualization, "-vis", "--visualization", "-no-vis",
"--no-visualization",
"Enable or disable GLVis visualization.");
#ifdef MFEM_USE_AMGX
args.AddOption(&useAmgX, "-amgx", "--useAmgX", "-no-amgx",
"--no-useAmgX",
"Enable or disable AmgX in MatrixFreeAMS.");
#endif
args.Parse();
if (!args.Good())
@@ -159,9 +167,10 @@ int main(int argc, char *argv[])
// by marking all the boundary attributes from the mesh as essential
// (Dirichlet) and converting them to a list of true dofs.
Array<int> ess_tdof_list;
Array<int> ess_bdr;
if (pmesh->bdr_attributes.Size())
{
Array<int> ess_bdr(pmesh->bdr_attributes.Max());
ess_bdr.SetSize(pmesh->bdr_attributes.Max());
ess_bdr = 1;
fespace->GetEssentialTrueDofs(ess_bdr, ess_tdof_list);
}
@@ -205,20 +214,20 @@ int main(int argc, char *argv[])
Vector B, X;
a->FormLinearSystem(ess_tdof_list, x, *b, A, X, B);
// 13. Solve the system AX=B using PCG with the AMS preconditioner from hypre
// (in the full assembly case) or CG with Jacobi preconditioner (in the
// partial assembly case).
if (pa) // Jacobi preconditioning in partial assembly mode
// 13. Solve the system AX=B using PCG with an AMS preconditioner.
if (pa)
{
OperatorJacobiSmoother Jacobi(*a, ess_tdof_list);
#ifdef MFEM_USE_AMGX
MatrixFreeAMS ams(*a, *A, *fespace, muinv, sigma, NULL, ess_bdr, useAmgX);
#else
MatrixFreeAMS ams(*a, *A, *fespace, muinv, sigma, NULL, ess_bdr);
#endif
CGSolver cg(MPI_COMM_WORLD);
cg.SetRelTol(1e-12);
cg.SetMaxIter(1000);
cg.SetPrintLevel(1);
cg.SetOperator(*A);
cg.SetPreconditioner(Jacobi);
cg.SetPreconditioner(ams);
cg.Mult(B, X);
}
else
+1 -1
View File
@@ -29,7 +29,7 @@
// finite elements (velocity u) and piecewise discontinuous
// polynomials (pressure p).
//
// The example demonstrates the use of the BlockMatrix class, as
// The example demonstrates the use of the BlockOperator class, as
// well as the collective saving of several grid functions in
// VisIt (visit.llnl.gov) and ParaView (paraview.org) formats.
//
+1 -1
View File
@@ -29,7 +29,7 @@
// finite elements (velocity u) and piecewise discontinuous
// polynomials (pressure p).
//
// The example demonstrates the use of the BlockMatrix class, as
// The example demonstrates the use of the BlockOperator class, as
// well as the collective saving of several grid functions in
// VisIt (visit.llnl.gov) and ParaView (paraview.org) formats.
// Optional saving with ADIOS2 (adios2.readthedocs.io) streams is
+94 -50
View File
@@ -4,9 +4,11 @@
//
// Sample runs: mpirun -np 4 ex6p -m ../data/square-disc.mesh -o 1
// mpirun -np 4 ex6p -m ../data/square-disc.mesh -o 2
// mpirun -np 4 ex6p -m ../data/square-disc.mesh -o 2 -ns
// mpirun -np 4 ex6p -m ../data/square-disc-nurbs.mesh -o 2
// mpirun -np 4 ex6p -m ../data/star.mesh -o 3
// mpirun -np 4 ex6p -m ../data/escher.mesh -o 2
// mpirun -np 4 ex6p -m ../data/escher.mesh -o 2 -ns
// mpirun -np 4 ex6p -m ../data/fichera.mesh -o 2
// mpirun -np 4 ex6p -m ../data/disc-nurbs.mesh -o 2
// mpirun -np 4 ex6p -m ../data/ball-nurbs.mesh
@@ -14,6 +16,7 @@
// mpirun -np 4 ex6p -m ../data/star-surf.mesh -o 2
// mpirun -np 4 ex6p -m ../data/square-disc-surf.mesh -o 2
// mpirun -np 4 ex6p -m ../data/amr-quad.mesh
// mpirun -np 4 ex6p --restart
//
// Device sample runs:
// mpirun -np 4 ex6p -pa -d cuda
@@ -34,8 +37,8 @@
// The example demonstrates MFEM's capability to work with both
// conforming and nonconforming refinements, in 2D and 3D, on
// linear, curved and surface meshes. Interpolation of functions
// from coarse to fine meshes, as well as persistent GLVis
// visualization are also illustrated.
// from coarse to fine meshes, restarting from a checkpoint, as
// well as persistent GLVis visualization are also illustrated.
//
// We recommend viewing Example 1 before viewing this example.
@@ -59,6 +62,9 @@ int main(int argc, char *argv[])
int order = 1;
bool pa = false;
const char *device_config = "cpu";
bool nc_simplices = false;
int max_dofs = 100000;
bool restart = false;
bool visualization = true;
OptionsParser args(argc, argv);
@@ -70,6 +76,14 @@ int main(int argc, char *argv[])
"--no-partial-assembly", "Enable Partial Assembly.");
args.AddOption(&device_config, "-d", "--device",
"Device configuration string, see Device::Configure().");
args.AddOption(&nc_simplices, "-ns", "--nonconforming-simplices",
"-cs", "--conforming-simplices",
"For simplicial meshes, enable/disable nonconforming"
" refinement");
args.AddOption(&max_dofs, "-md", "--max-dofs",
"Stop after reaching this many degrees of freedom.");
args.AddOption(&restart, "-res", "--restart", "-no-res", "--no-restart",
"Restart computation from the last checkpoint.");
args.AddOption(&visualization, "-vis", "--visualization", "-no-vis",
"--no-visualization",
"Enable or disable GLVis visualization.");
@@ -93,39 +107,52 @@ int main(int argc, char *argv[])
Device device(device_config);
if (myid == 0) { device.Print(); }
// 4. Read the (serial) mesh from the given mesh file on all processors. We
// can handle triangular, quadrilateral, tetrahedral, hexahedral, surface
// and volume meshes with the same code.
Mesh *mesh = new Mesh(mesh_file, 1, 1);
int dim = mesh->Dimension();
int sdim = mesh->SpaceDimension();
// 5. Refine the serial mesh on all processors to increase the resolution.
// Also project a NURBS mesh to a piecewise-quadratic curved mesh. Make
// sure that the mesh is non-conforming.
if (mesh->NURBSext)
ParMesh *pmesh;
if (!restart)
{
mesh->UniformRefinement();
mesh->SetCurvature(2);
// 4. Read the (serial) mesh from the given mesh file on all processors.
// We can handle triangular, quadrilateral, tetrahedral, hexahedral,
// surface and volume meshes with the same code.
Mesh mesh(mesh_file, 1, 1);
// 5. Refine the serial mesh on all processors to increase the resolution.
// Also project a NURBS mesh to a piecewise-quadratic curved mesh. Make
// sure that the mesh is non-conforming.
if (mesh.NURBSext)
{
mesh.UniformRefinement();
mesh.SetCurvature(2);
}
mesh.EnsureNCMesh(nc_simplices);
// 6. Define a parallel mesh by partitioning the serial mesh.
// Once the parallel mesh is defined, the serial mesh can be deleted.
pmesh = new ParMesh(MPI_COMM_WORLD, mesh);
}
else
{
// 7. We can also restart the computation by loading the mesh from a
// previously saved check-point.
string fname(MakeParFilename("ex6p-checkpoint.", myid));
ifstream ifs(fname);
MFEM_VERIFY(ifs.good(), "Checkpoint file " << fname << " not found.");
pmesh = new ParMesh(MPI_COMM_WORLD, ifs);
}
mesh->EnsureNCMesh();
// 6. Define a parallel mesh by partitioning the serial mesh.
// Once the parallel mesh is defined, the serial mesh can be deleted.
ParMesh pmesh(MPI_COMM_WORLD, *mesh);
delete mesh;
int dim = pmesh->Dimension();
int sdim = pmesh->SpaceDimension();
MFEM_VERIFY(pmesh.bdr_attributes.Size() > 0,
MFEM_VERIFY(pmesh->bdr_attributes.Size() > 0,
"Boundary attributes required in the mesh.");
Array<int> ess_bdr(pmesh.bdr_attributes.Max());
Array<int> ess_bdr(pmesh->bdr_attributes.Max());
ess_bdr = 1;
// 7. Define a finite element space on the mesh. The polynomial order is
// 8. Define a finite element space on the mesh. The polynomial order is
// one (linear) by default, but this can be changed on the command line.
H1_FECollection fec(order, dim);
ParFiniteElementSpace fespace(&pmesh, &fec);
ParFiniteElementSpace fespace(pmesh, &fec);
// 8. As in Example 1p, we set up bilinear and linear forms corresponding to
// 9. As in Example 1p, we set up bilinear and linear forms corresponding to
// the Laplace problem -\Delta u = 1. We don't assemble the discrete
// problem yet, this will be done in the main loop.
ParBilinearForm a(&fespace);
@@ -142,12 +169,12 @@ int main(int argc, char *argv[])
a.AddDomainIntegrator(integ);
b.AddDomainIntegrator(new DomainLFIntegrator(one));
// 9. The solution vector x and the associated finite element grid function
// will be maintained over the AMR iterations. We initialize it to zero.
// 10. The solution vector x and the associated finite element grid function
// will be maintained over the AMR iterations. We initialize it to zero.
ParGridFunction x(&fespace);
x = 0;
// 10. Connect to GLVis.
// 11. Connect to GLVis.
char vishost[] = "localhost";
int visport = 19916;
@@ -169,30 +196,29 @@ int main(int argc, char *argv[])
sout.precision(8);
}
// 11. Set up an error estimator. Here we use the Zienkiewicz-Zhu estimator
// 12. Set up an error estimator. Here we use the Zienkiewicz-Zhu estimator
// with L2 projection in the smoothing step to better handle hanging
// nodes and parallel partitioning. We need to supply a space for the
// discontinuous flux (L2) and a space for the smoothed flux (H(div) is
// used here).
L2_FECollection flux_fec(order, dim);
ParFiniteElementSpace flux_fes(&pmesh, &flux_fec, sdim);
ParFiniteElementSpace flux_fes(pmesh, &flux_fec, sdim);
RT_FECollection smooth_flux_fec(order-1, dim);
ParFiniteElementSpace smooth_flux_fes(&pmesh, &smooth_flux_fec);
ParFiniteElementSpace smooth_flux_fes(pmesh, &smooth_flux_fec);
// Another possible option for the smoothed flux space:
// H1_FECollection smooth_flux_fec(order, dim);
// ParFiniteElementSpace smooth_flux_fes(&pmesh, &smooth_flux_fec, dim);
// ParFiniteElementSpace smooth_flux_fes(pmesh, &smooth_flux_fec, dim);
L2ZienkiewiczZhuEstimator estimator(*integ, x, flux_fes, smooth_flux_fes);
// 12. A refiner selects and refines elements based on a refinement strategy.
// 13. A refiner selects and refines elements based on a refinement strategy.
// The strategy here is to refine elements with errors larger than a
// fraction of the maximum element error. Other strategies are possible.
// The refiner will call the given error estimator.
ThresholdRefiner refiner(estimator);
refiner.SetTotalErrorFraction(0.7);
// 13. The main AMR loop. In each iteration we solve the problem on the
// 14. The main AMR loop. In each iteration we solve the problem on the
// current mesh, visualize the solution, and refine the mesh.
const int max_dofs = 100000;
for (int it = 0; ; it++)
{
HYPRE_Int global_dofs = fespace.GlobalTrueVSize();
@@ -202,19 +228,19 @@ int main(int argc, char *argv[])
cout << "Number of unknowns: " << global_dofs << endl;
}
// 14. Assemble the right-hand side and determine the list of true
// 15. Assemble the right-hand side and determine the list of true
// (i.e. parallel conforming) essential boundary dofs.
Array<int> ess_tdof_list;
fespace.GetEssentialTrueDofs(ess_bdr, ess_tdof_list);
b.Assemble();
// 15. Assemble the stiffness matrix. Note that MFEM doesn't care at this
// 16. Assemble the stiffness matrix. Note that MFEM doesn't care at this
// point that the mesh is nonconforming and parallel. The FE space is
// considered 'cut' along hanging edges/faces, and also across
// processor boundaries.
a.Assemble();
// 16. Create the parallel linear system: eliminate boundary conditions.
// 17. Create the parallel linear system: eliminate boundary conditions.
// The system will be solved for true (unconstrained/unique) DOFs only.
OperatorPtr A;
Vector B, X;
@@ -222,7 +248,7 @@ int main(int argc, char *argv[])
const int copy_interior = 1;
a.FormLinearSystem(ess_tdof_list, x, b, A, X, B, copy_interior);
// 17. Solve the linear system A X = B.
// 18. Solve the linear system A X = B.
// * With full assembly, use the BoomerAMG preconditioner from hypre.
// * With partial assembly, use a diagonal preconditioner.
Solver *M = NULL;
@@ -245,19 +271,19 @@ int main(int argc, char *argv[])
cg.Mult(B, X);
delete M;
// 18. Switch back to the host and extract the parallel grid function
// 19. Switch back to the host and extract the parallel grid function
// corresponding to the finite element approximation X. This is the
// local solution on each processor.
a.RecoverFEMSolution(X, b, x);
// 19. Send the solution by socket to a GLVis server.
// 20. Send the solution by socket to a GLVis server.
if (visualization)
{
sout << "parallel " << num_procs << " " << myid << "\n";
sout << "solution\n" << pmesh << x << flush;
sout << "solution\n" << *pmesh << x << flush;
}
if (global_dofs > max_dofs)
if (global_dofs >= max_dofs)
{
if (myid == 0)
{
@@ -266,11 +292,11 @@ int main(int argc, char *argv[])
break;
}
// 20. Call the refiner to modify the mesh. The refiner calls the error
// 21. Call the refiner to modify the mesh. The refiner calls the error
// estimator to obtain element errors, then it selects elements to be
// refined and finally it modifies the mesh. The Stop() method can be
// used to determine if a stopping criterion was met.
refiner.Apply(pmesh);
refiner.Apply(*pmesh);
if (refiner.Stop())
{
if (myid == 0)
@@ -280,7 +306,7 @@ int main(int argc, char *argv[])
break;
}
// 21. Update the finite element space (recalculate the number of DOFs,
// 22. Update the finite element space (recalculate the number of DOFs,
// etc.) and create a grid function update matrix. Apply the matrix
// to any GridFunctions over the space. In this case, the update
// matrix is an interpolation matrix so the updated GridFunction will
@@ -288,11 +314,11 @@ int main(int argc, char *argv[])
fespace.Update();
x.Update();
// 22. Load balance the mesh, and update the space and solution. Currently
// 23. Load balance the mesh, and update the space and solution. Currently
// available only for nonconforming meshes.
if (pmesh.Nonconforming())
if (pmesh->Nonconforming())
{
pmesh.Rebalance();
pmesh->Rebalance();
// Update the space and the GridFunction. This time the update matrix
// redistributes the GridFunction among the processors.
@@ -300,12 +326,30 @@ int main(int argc, char *argv[])
x.Update();
}
// 23. Inform also the bilinear and linear forms that the space has
// 24. Inform also the bilinear and linear forms that the space has
// changed.
a.Update();
b.Update();
// 25. Save the current state of the mesh every 5 iterations. The
// computation can be restarted from this point. Note that unlike in
// visualization, we need to use the 'ParPrint' method to save all
// internal parallel data structures.
if ((it + 1) % 5 == 0)
{
ofstream ofs(MakeParFilename("ex6p-checkpoint.", myid));
ofs.precision(8);
pmesh->ParPrint(ofs);
if (myid == 0)
{
cout << "\nCheckpoint saved." << endl;
}
}
}
delete pmesh;
MPI_Finalize();
return 0;
}
+1 -1
View File
@@ -450,7 +450,7 @@ FE_Evolution::FE_Evolution(BilinearForm &_M, BilinearForm &_K, const Vector &_b)
: TimeDependentOperator(_M.Height()), M(_M), K(_K), b(_b), z(_M.Height())
{
Array<int> ess_tdof_list;
if (M.GetAssemblyLevel() == AssemblyLevel::LEGACYFULL)
if (M.GetAssemblyLevel() == AssemblyLevel::LEGACY)
{
M_prec = new DSmoother(M.SpMat());
M_solver.SetOperator(M.SpMat());
-672
View File
@@ -1,672 +0,0 @@
#include"mfem.hpp"
#include<memory>
#include<iostream>
#include<fstream>
namespace mfem {
class LinDiffQFunc
{
public:
LinDiffQFunc(mfem::Coefficient& dd, mfem::Coefficient& ll, double gg_,
double pp0_, double pp1_):diff(dd),load(ll),gg(gg_),pp0(pp0_),pp1(pp1_)
{
}
double QEnergy(ElementTransformation &T,
const IntegrationPoint &ip,
mfem::Vector& param, mfem::Vector& uu)
{
double dd=diff.Eval(T,ip);
double ll=load.Eval(T,ip);
double rho0=param[0];
double rho1=param[1];
double fd=dd*std::pow(rho0,pp0)*std::pow(rho1,pp1);
double rez = 0.5*(uu[0]*uu[0]+uu[1]*uu[1]+uu[2]*uu[2])*fd
+ 0.5*gg*uu[3]*uu[3] -uu[3]*ll;
return rez;
}
void QResidual(ElementTransformation &T,
const IntegrationPoint &ip,
mfem::Vector& param, mfem::Vector& uu, mfem::Vector& rr)
{
rr.SetSize(4);
double dd=diff.Eval(T,ip);
double ll=load.Eval(T,ip);
double rho0=param[0];
double rho1=param[1];
double fd=dd*std::pow(rho0,pp0)*std::pow(rho1,pp1);
rr[0]=uu[0]*fd;
rr[1]=uu[1]*fd;
rr[2]=uu[2]*fd;
rr[3]=gg*uu[3]-ll;
}
void AQResidual(ElementTransformation &T,
const IntegrationPoint &ip,
mfem::Vector& param,
mfem::Vector& uu, mfem::Vector& aa, mfem::Vector& rr)
{
rr.SetSize(2);
double dd=diff.Eval(T,ip);
double ll=load.Eval(T,ip);
double rho0=param[0];
double rho1=param[1];
double fd0=dd*pp0*std::pow(rho0,pp0-1.0)*std::pow(rho1,pp1);
double fd1=dd*std::pow(rho0,pp0)*pp1*std::pow(rho1,pp1-1.0);
rr[0] = (aa[0]*uu[0]+aa[1]*uu[1]+aa[2]*uu[2])*fd0;
rr[1] = (aa[0]*uu[0]+aa[1]*uu[1]+aa[2]*uu[2])*fd1;
}
void QGradResidual(ElementTransformation &T,
const IntegrationPoint &ip,
mfem::Vector& param, mfem::Vector& uu, mfem::DenseMatrix& hh)
{
hh.SetSize(4);
double dd=diff.Eval(T,ip);
//double ll=load.Eval(T,ip);
double rho0=param[0];
double rho1=param[1];
double fd=dd*std::pow(rho0,pp0)*std::pow(rho1,pp1);
hh=0.0;
hh(0,0)=fd;
hh(1,1)=fd;
hh(2,2)=fd;
hh(3,3)=gg;
}
private:
mfem::Coefficient& diff;
mfem::Coefficient& load;
double gg;
double pp0;
double pp1;
};
class PrmBlockLSFEMDiffusion: public PrmBlockNonlinearFormIntegrator
{
public:
PrmBlockLSFEMDiffusion(LinDiffQFunc& qfun_)
{
qfunc=&qfun_;
}
/// Compute the local energy
virtual double GetElementEnergy(const Array<const FiniteElement *>&el,
const Array<const FiniteElement *>&pel,
ElementTransformation &Tr,
const Array<const Vector *>&elfun,
const Array<const Vector *>&pelfun)
{
int dof_u0 = el[0]->GetDof();
int dof_r0 = pel[0]->GetDof();
int dof_r1 = pel[1]->GetDof();
int dim = el[0]->GetDim();
int spaceDim = Tr.GetSpaceDim();
if (dim != spaceDim)
{
mfem::mfem_error(" PrmBlockLSFEMDiffusion::GetElementEnergy"
" is not defined on manifold meshes");
}
//shape functions
Vector shu0(dof_u0);
Vector shr0(dof_r0);
Vector shr1(dof_r1);
DenseMatrix dsu0(dof_u0,dim);
DenseMatrix B(dof_u0, 4);
B=0.0;
double w;
Vector param(2); param=0.0;
Vector uu(4); uu=0.0;
double energy =0.0;
const IntegrationRule *ir = nullptr;
if(ir==nullptr){
int order= 2 * el[0]->GetOrder() + Tr.OrderGrad(el[0])
+pel[0]->GetOrder()+pel[1]->GetOrder();
ir=&IntRules.Get(Tr.GetGeometryType(),order);
}
for (int i = 0; i < ir->GetNPoints(); i++)
{
const IntegrationPoint &ip = ir->IntPoint(i);
Tr.SetIntPoint(&ip);
w=Tr.Weight();
w = ip.weight * w;
el[0]->CalcPhysDShape(Tr,dsu0);
el[0]->CalcPhysShape(Tr,shu0);
pel[0]->CalcPhysShape(Tr,shr0);
pel[1]->CalcPhysShape(Tr,shr1);
param[0]=shr0*(*pelfun[0]);
param[1]=shr1*(*pelfun[1]);
//set the matrix B
for(int jj=0;jj<dim;jj++)
{
B.SetCol(jj,dsu0.GetColumn(jj));
}
B.SetCol(3,shu0);
B.MultTranspose(*elfun[0],uu);
energy=energy+w * qfunc->QEnergy(Tr,ip,param,uu);
}
return energy;
}
/// Perform the local action of the BlockNonlinearFormIntegrator
virtual void AssembleElementVector(const Array<const FiniteElement *> &el,
const Array<const FiniteElement *>&pel,
ElementTransformation &Tr,
const Array<const Vector *> &elfun,
const Array<const Vector *>&pelfun,
const Array<Vector *> &elvec)
{
int dof_u0 = el[0]->GetDof();
int dof_r0 = pel[0]->GetDof();
int dof_r1 = pel[1]->GetDof();
int dim = el[0]->GetDim();
elvec[0]->SetSize(dof_u0);
*elvec[0]=0.0;
int spaceDim = Tr.GetSpaceDim();
if (dim != spaceDim)
{
mfem::mfem_error(" PrmBlockLSFEMDiffusion::AssembleElementVector"
" is not defined on manifold meshes");
}
//shape functions
Vector shu0(dof_u0);
Vector shr0(dof_r0);
Vector shr1(dof_r1);
DenseMatrix dsu0(dof_u0,dim);
DenseMatrix B(dof_u0, 4);
B=0.0;
double w;
Vector param(2); param=0.0;
Vector uu(4); uu=0.0;
Vector rr;
Vector lvec; lvec.SetSize(dof_u0);
const IntegrationRule *ir = nullptr;
if(ir==nullptr){
int order= 2 * el[0]->GetOrder() + Tr.OrderGrad(el[0])
+pel[0]->GetOrder()+pel[1]->GetOrder();
ir=&IntRules.Get(Tr.GetGeometryType(),order);
}
for (int i = 0; i < ir->GetNPoints(); i++)
{
const IntegrationPoint &ip = ir->IntPoint(i);
Tr.SetIntPoint(&ip);
w=Tr.Weight();
w = ip.weight * w;
el[0]->CalcPhysDShape(Tr,dsu0);
el[0]->CalcPhysShape(Tr,shu0);
pel[0]->CalcPhysShape(Tr,shr0);
pel[1]->CalcPhysShape(Tr,shr1);
param[0]=shr0*(*pelfun[0]);
param[1]=shr1*(*pelfun[1]);
//set the matrix B
for(int jj=0;jj<dim;jj++)
{
B.SetCol(jj,dsu0.GetColumn(jj));
}
B.SetCol(3,shu0);
B.MultTranspose(*elfun[0],uu);
qfunc->QResidual(Tr,ip,param, uu, rr);
B.Mult(rr,lvec);
elvec[0]->Add(w,lvec);
}
}
virtual void AssembleFaceVector(const Array<const FiniteElement *> &el1,
const Array<const FiniteElement *> &el2,
const Array<const FiniteElement *> &pel1,
const Array<const FiniteElement *> &pel2,
FaceElementTransformations &Tr,
const Array<const Vector *> &elfun,
const Array<const Vector *>&pelfun,
const Array<Vector *> &elvect)
{
}
/// Assemble the local gradient matrix
virtual void AssembleElementGrad(const Array<const FiniteElement*> &el,
const Array<const FiniteElement *>&pel,
ElementTransformation &Tr,
const Array<const Vector *> &elfun,
const Array<const Vector *>&pelfun,
const Array2D<DenseMatrix *> &elmats)
{
int dof_u0 = el[0]->GetDof();
int dof_r0 = pel[0]->GetDof();
int dof_r1 = pel[1]->GetDof();
int dim = el[0]->GetDim();
//elmats[0]->Size(dof_u0, dof_u0);
//*elmats[0]=0.0;
DenseMatrix* K=elmats(0,0);
K->SetSize(dof_u0,dof_u0);
(*K)=0.0;
int spaceDim = Tr.GetSpaceDim();
if (dim != spaceDim)
{
mfem::mfem_error(" PrmBlockLSFEMDiffusion::AssembleElementVector"
" is not defined on manifold meshes");
}
//shape functions
Vector shu0(dof_u0);
Vector shr0(dof_r0);
Vector shr1(dof_r1);
DenseMatrix dsu0(dof_u0,dim);
DenseMatrix B(dof_u0, 4);
DenseMatrix A(dof_u0, 4);
B=0.0;
double w;
Vector param(2); param=0.0;
Vector uu(4); uu=0.0;
DenseMatrix hh;
Vector lvec; lvec.SetSize(dof_u0);
const IntegrationRule *ir = nullptr;
if(ir==nullptr){
int order= 2 * el[0]->GetOrder() + Tr.OrderGrad(el[0])
+pel[0]->GetOrder()+pel[1]->GetOrder();
ir=&IntRules.Get(Tr.GetGeometryType(),order);
}
for (int i = 0; i < ir->GetNPoints(); i++)
{
const IntegrationPoint &ip = ir->IntPoint(i);
Tr.SetIntPoint(&ip);
w = Tr.Weight();
w = ip.weight * w;
el[0]->CalcPhysDShape(Tr,dsu0);
el[0]->CalcPhysShape(Tr,shu0);
pel[0]->CalcPhysShape(Tr,shr0);
pel[1]->CalcPhysShape(Tr,shr1);
param[0]=shr0*(*pelfun[0]);
param[1]=shr1*(*pelfun[1]);
//set the matrix B
for(int jj=0;jj<dim;jj++)
{
B.SetCol(jj,dsu0.GetColumn(jj));
}
B.SetCol(3,shu0);
B.MultTranspose(*elfun[0],uu);
qfunc->QGradResidual(Tr,ip,param,uu,hh);
Mult(B,hh,A);
AddMult_a_ABt(w,A,B,*K);
}
}
virtual void AssembleFaceGrad(const Array<const FiniteElement *>&el1,
const Array<const FiniteElement *>&el2,
const Array<const FiniteElement *> &pel1,
const Array<const FiniteElement *> &pel2,
FaceElementTransformations &Tr,
const Array<const Vector *> &elfun,
const Array<const Vector *>&pelfun,
const Array2D<DenseMatrix *> &elmats)
{
}
virtual void AssemblePrmElementVector(const Array<const FiniteElement *> &el,
const Array<const FiniteElement *> &pel,
ElementTransformation &Tr,
const Array<const Vector *> &elfun,
const Array<const Vector *> &alfun,
const Array<const Vector *> &pelfun,
const Array<Vector *> &elvec)
{
int dof_u0 = el[0]->GetDof();
int dof_r0 = pel[0]->GetDof();
int dof_r1 = pel[1]->GetDof();
int dim = el[0]->GetDim();
Vector& e0 = *(elvec[0]);
Vector& e1 = *(elvec[1]);
e0.SetSize(dof_r0);
e0=0.0;
e1.SetSize(dof_r1);
e1=0.0;
int spaceDim = Tr.GetSpaceDim();
if (dim != spaceDim)
{
mfem::mfem_error(" PrmBlockLSFEMDiffusion::AssembleElementVector"
" is not defined on manifold meshes");
}
//shape functions
Vector shu0(dof_u0);
Vector shr0(dof_r0);
Vector shr1(dof_r1);
DenseMatrix dsu0(dof_u0,dim);
DenseMatrix B(dof_u0, 4);
B=0.0;
double w;
Vector param(2); param=0.0;
Vector uu(4); uu=0.0;
Vector aa(4); aa=0.0;
Vector rr;
Vector lvec0; lvec0.SetSize(dof_r0);
Vector lvec1; lvec1.SetSize(dof_r1);
const IntegrationRule *ir = nullptr;
if(ir==nullptr){
int order= 2 * el[0]->GetOrder() + Tr.OrderGrad(el[0])
+pel[0]->GetOrder()+pel[1]->GetOrder();
ir=&IntRules.Get(Tr.GetGeometryType(),order);
}
for (int i = 0; i < ir->GetNPoints(); i++)
{
const IntegrationPoint &ip = ir->IntPoint(i);
Tr.SetIntPoint(&ip);
w=Tr.Weight();
w = ip.weight * w;
el[0]->CalcPhysDShape(Tr,dsu0);
el[0]->CalcPhysShape(Tr,shu0);
pel[0]->CalcPhysShape(Tr,shr0);
pel[1]->CalcPhysShape(Tr,shr1);
param[0]=shr0*(*pelfun[0]);
param[1]=shr1*(*pelfun[1]);
//set the matrix B
for(int jj=0;jj<dim;jj++)
{
B.SetCol(jj,dsu0.GetColumn(jj));
}
B.SetCol(3,shu0);
B.MultTranspose(*elfun[0],uu);
B.MultTranspose(*alfun[0],aa);
qfunc->AQResidual(Tr, ip, param, uu, aa, rr);
lvec0=shr0;
lvec0*=rr[0];
lvec1=shr1;
lvec1*=rr[1];
e0.Add(w,lvec0);
e1.Add(w,lvec1);
}
}
virtual void AssemblePrmFaceVector(const Array<const FiniteElement *> &el1,
const Array<const FiniteElement *> &el2,
const Array<const FiniteElement *> &pel1,
const Array<const FiniteElement *> &pel2,
FaceElementTransformations &Tr,
const Array<const Vector *> &elfun,
const Array<const Vector *> &alfun,
const Array<const Vector *> &pelfun,
const Array<Vector *> &elvect)
{
}
private:
LinDiffQFunc* qfunc;
};
}
int main(int argc, char *argv[])
{
const char *mesh_file = "../../data/beam-tet.mesh";
int ser_ref_levels = 1;
int order = 2;
bool visualization = true;
double newton_rel_tol = 1e-4;
double newton_abs_tol = 1e-6;
int newton_iter = 10;
int print_level = 0;
mfem::OptionsParser args(argc, argv);
args.AddOption(&mesh_file, "-m", "--mesh", "Mesh file to use.");
args.AddOption(&ser_ref_levels,
"-rs",
"--refine-serial",
"Number of times to refine the mesh uniformly in serial.");
args.AddOption(&order,
"-o",
"--order",
"Order (degree) of the finite elements.");
args.AddOption(&visualization,
"-vis",
"--visualization",
"-no-vis",
"--no-visualization",
"Enable or disable GLVis visualization.");
args.AddOption(&newton_rel_tol,
"-rel",
"--relative-tolerance",
"Relative tolerance for the Newton solve.");
args.AddOption(&newton_abs_tol,
"-abs",
"--absolute-tolerance",
"Absolute tolerance for the Newton solve.");
args.AddOption(&newton_iter,
"-it",
"--newton-iterations",
"Maximum iterations for the Newton solve.");
args.Parse();
if (!args.Good())
{
args.PrintUsage(std::cout);
return 1;
}
args.PrintOptions(std::cout);
// 3. Read the (serial) mesh from the given mesh file on all processors. We
// can handle triangular, quadrilateral, tetrahedral and hexahedral meshes
// with the same code.
mfem::Mesh *mesh = new mfem::Mesh(mesh_file, 1, 1);
int dim = mesh->Dimension();
// 4. Refine the mesh in serial to increase the resolution. In this example
// we do 'ser_ref_levels' of uniform refinement, where 'ser_ref_levels' is
// a command-line parameter.
for (int lev = 0; lev < ser_ref_levels; lev++)
{
mesh->UniformRefinement();
}
/// Define the q-function
mfem::ConstantCoefficient* dc=new mfem::ConstantCoefficient(1.0);
mfem::ConstantCoefficient* lc=new mfem::ConstantCoefficient(1.0);
mfem::LinDiffQFunc* qfun=new mfem::LinDiffQFunc(*dc,*lc,1.0,1.0,1.0);
mfem::H1_FECollection fec00(order, dim);
mfem::L2_FECollection fec01(order, dim);
mfem::FiniteElementSpace* bfes00=new mfem::FiniteElementSpace(mesh,&fec00,1,mfem::Ordering::byVDIM);
mfem::FiniteElementSpace* pfes00=new mfem::FiniteElementSpace(mesh,&fec00,1,mfem::Ordering::byVDIM);
mfem::FiniteElementSpace* pfes01=new mfem::FiniteElementSpace(mesh,&fec01,1,mfem::Ordering::byVDIM);
/// Define parametric nonlinear form
mfem::Array<mfem::FiniteElementSpace*> bfes;
mfem::Array<mfem::FiniteElementSpace*> pfes;
bfes.Append(bfes00);
pfes.Append(pfes00);
pfes.Append(pfes01);
mfem::PrmBlockNonlinearForm* nf=new mfem::PrmBlockNonlinearForm(bfes,pfes);
nf->AddDomainIntegrator(new mfem::PrmBlockLSFEMDiffusion(*qfun));
/// Define the grid functions
mfem::GridFunction* bgf00=new mfem::GridFunction(bfes00);
mfem::GridFunction* pgf00=new mfem::GridFunction(pfes00);
mfem::GridFunction* pgf01=new mfem::GridFunction(pfes01);
mfem::GridFunction* ggf00=new mfem::GridFunction(pfes00);
mfem::GridFunction* ggf01=new mfem::GridFunction(pfes01);
*bgf00=0.0;
*pgf00=1.0;
*pgf01=1.0;
mfem::BlockVector solbv; solbv.Update(nf->GetBlockTrueOffsets()); solbv=0.0;
mfem::BlockVector resbv; resbv.Update(nf->GetBlockTrueOffsets()); resbv=0.0;
mfem::BlockVector adjbv; adjbv.Update(nf->GetBlockTrueOffsets()); adjbv=0.0;
mfem::BlockVector prmbv; prmbv.Update(nf->PrmGetBlockTrueOffsets()); prmbv=1.0;
mfem::BlockVector grdbv; grdbv.Update(nf->PrmGetBlockTrueOffsets()); grdbv=0.0;
bgf00->SetFromTrueDofs(solbv.GetBlock(0));
pgf00->SetFromTrueDofs(prmbv.GetBlock(0));
pgf01->SetFromTrueDofs(prmbv.GetBlock(1));
nf->SetPrmFields(prmbv);
double energy = nf->GetEnergy(solbv);
nf->Mult(solbv,resbv);
std::cout<<"Norm res="<<resbv.Norml2()<<std::endl;
//mfem::Operator& K=nf->GetGradient(solbv);
std::cout<<"energy ="<< energy<<std::endl;
nf->SetStateFields(solbv);
nf->SetAdjointFields(adjbv);
nf->PrmMult(prmbv,grdbv);
//set the BC for the physics
mfem::Array<mfem::Array<int> *> ess_bdr;
mfem::Array<mfem::Vector*> ess_rhs;
ess_bdr.Append(new mfem::Array<int>(mesh->bdr_attributes.Max()));
ess_rhs.Append(nullptr);
(*ess_bdr[0]) = 1;
nf->SetEssentialBC(ess_bdr,ess_rhs);
//define the solvers
mfem::UMFPackSolver* umfsolv=new mfem::UMFPackSolver();
mfem::GMRESSolver *gmres;
gmres = new mfem::GMRESSolver();
gmres->SetAbsTol(newton_abs_tol/10);
gmres->SetRelTol(newton_rel_tol/10);
gmres->SetMaxIter(100);
gmres->SetPrintLevel(print_level);
//gmres->SetPreconditioner(*prec);
mfem::NewtonSolver *ns;
ns = new mfem::NewtonSolver();
ns->iterative_mode = true;
ns->SetSolver(*gmres);
ns->SetOperator(*nf);
ns->SetPrintLevel(print_level);
ns->SetRelTol(newton_rel_tol);
ns->SetAbsTol(newton_abs_tol);
ns->SetMaxIter(newton_iter);
mfem::Vector b; //RHS is zero
solbv=0.0;
ns->Mult(b, solbv);
nf->SetStateFields(solbv);
nf->SetAdjointFields(solbv);
nf->PrmMult(prmbv,grdbv);
mfem::ParaViewDataCollection *dacol = new mfem::ParaViewDataCollection("Example91",
mesh);
ggf00->SetFromTrueDofs(grdbv.GetBlock(0));
ggf01->SetFromTrueDofs(grdbv.GetBlock(1));
pgf00->SetFromTrueDofs(solbv.GetBlock(0));
dacol->SetLevelsOfDetail(order);
dacol->RegisterField("sol", pgf00);
dacol->RegisterField("grad00", ggf00);
dacol->RegisterField("grad01", ggf01);
dacol->SetTime(1.0);
dacol->SetCycle(1);
dacol->Save();
delete dacol;
delete ns;
delete umfsolv;
delete gmres;
delete ess_bdr[0];
delete bgf00;
delete pgf00;
delete pgf01;
delete ggf00;
delete ggf01;
delete nf;
delete pfes01;
delete pfes00;
delete bfes00;
delete qfun;
delete lc;
delete dc;
delete mesh;
}
+2 -2
View File
@@ -655,7 +655,7 @@ FE_Evolution::FE_Evolution(ParBilinearForm &_M, ParBilinearForm &_K,
M_solver(_M.ParFESpace()->GetComm()),
z(_M.Height())
{
if (_M.GetAssemblyLevel()==AssemblyLevel::LEGACYFULL)
if (_M.GetAssemblyLevel()==AssemblyLevel::LEGACY)
{
M.Reset(_M.ParallelAssemble(), true);
K.Reset(_K.ParallelAssemble(), true);
@@ -669,7 +669,7 @@ FE_Evolution::FE_Evolution(ParBilinearForm &_M, ParBilinearForm &_K,
M_solver.SetOperator(*M);
Array<int> ess_tdof_list;
if (_M.GetAssemblyLevel()==AssemblyLevel::LEGACYFULL)
if (_M.GetAssemblyLevel()==AssemblyLevel::LEGACY)
{
HypreParMatrix &M_mat = *M.As<HypreParMatrix>();
HypreParMatrix &K_mat = *K.As<HypreParMatrix>();
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+471
View File
@@ -0,0 +1,471 @@
// h-refinement examples
//
// Compile with: make href_exs
//
// Sample runs:
//
// Description: Make h-refinement data sets for neural net
// comparison
#include "mfem.hpp"
#include <fstream>
#include <iostream>
using namespace std;
using namespace mfem;
// Exact smooth analytic solution for convergence study
double u_exact(const Vector &);
void u_grad_exact(const Vector &, Vector &);
double u_exact_2(const Vector &);
void u_grad_exact_2(const Vector &, Vector &);
double u_exact_3(const Vector &);
void u_grad_exact_3(const Vector &, Vector &);
void convergenceStudy(const char *mesh_file, int num_ref, int &order,
double &l2_err_prev, double &h1_err_prev, bool &visualization,
int &exact, int &solvePDE, bool static_cond)
{
Mesh *mesh = new Mesh(mesh_file, 1, 1);
int dim = mesh->Dimension();
// 4. Refine the mesh num_ref times
for (int l = 1; l < num_ref+1; l++)
{
mesh->UniformRefinement();
}
// 5. Define a finite element space on the mesh. Here we use continuous
// Lagrange finite elements of the specified order.
FiniteElementCollection *fec;
if (order == 1)
{
fec = new H1_FECollection(1, 2);
}
else if (order > 1)
{
fec = new H1_FECollection(order, 2);
}
else if (order < 0)
{
// fec = new H1_FECollection(-order, 2, BasisType::Positive);
fec = new H1_FECollection(-order, 2);
}
else
{
cout << "Error - something went wrong in processing order input." << endl;
fec = NULL;
}
// Set exact solution
// exact == 1 case:
FunctionCoefficient *u1 = new FunctionCoefficient(u_exact);
VectorFunctionCoefficient *(u1_grad) = new VectorFunctionCoefficient(dim, u_grad_exact);
// exact == 2 case:
FunctionCoefficient *u2 = new FunctionCoefficient(u_exact_2);
VectorFunctionCoefficient *u2_grad = new VectorFunctionCoefficient(dim, u_grad_exact_2);
// exact == 3 case:
FunctionCoefficient *u3 = new FunctionCoefficient(u_exact_3);
VectorFunctionCoefficient *u3_grad = new VectorFunctionCoefficient(dim, u_grad_exact_3);
FiniteElementSpace *fespace = new FiniteElementSpace(mesh, fec);
// 6. Determine the list of true (i.e. conforming) essential boundary dofs.
// In this example, the boundary conditions are defined by marking all
// the boundary attributes from the mesh as essential (Dirichlet) and
// converting them to a list of true dofs.
// this variable may not be right for more general meshes than lattices?
int gotNdofs = fespace->GetNDofs();
Array<int> ess_tdof_list;
Array<int> ess_bdr(mesh->bdr_attributes.Max());
ess_bdr = 1;
if (solvePDE==1)
{
if (mesh->bdr_attributes.Size())
{
fespace->GetEssentialTrueDofs(ess_bdr, ess_tdof_list);
}
}
// For L2 Projection:
// Do not get boundary dofs
// 7. Set up the linear form b(.) which corresponds to the right-hand side of
// the FEM linear system, which in this case is (1,phi_i) where phi_i are
// the basis functions in the finite element fespace.
LinearForm *b = new LinearForm(fespace);
if (solvePDE==1)
{
ConstantCoefficient zero(0.0);
b->AddDomainIntegrator(new DomainLFIntegrator(zero));
}
else // L2 Projection
{
if (exact == 1)
{
b->AddDomainIntegrator(new DomainLFIntegrator(*u1));
}
else if (exact == 2)
{
b->AddDomainIntegrator(new DomainLFIntegrator(*u2));
}
else // exact == 3
{
b->AddDomainIntegrator(new DomainLFIntegrator(*u3));
}
}
b->Assemble();
// 8. Define the solution vector x as a finite element grid function
// corresponding to fespace. Initialize x with initial guess of zero,
// which satisfies the boundary conditions.
GridFunction x(fespace);
x=0.0;
// 9. Set up the bilinear form a(.,.) on the finite element space
// corresponding to the Laplacian operator -Delta, by adding the Diffusion
// domain integrator.
BilinearForm *a = new BilinearForm(fespace);
// DiffusionIntegrator *my_diff_integrator = new DiffusionIntegrator;
// MassIntegrator *my_mass_integrator = new MassIntegrator;
if (solvePDE==1)
{
if (exact == 1)
{
x.ProjectBdrCoefficient(*u1, ess_bdr);
}
else if (exact == 2)
{
x.ProjectBdrCoefficient(*u2, ess_bdr);
}
else if (exact == 3)
{
x.ProjectBdrCoefficient(*u3, ess_bdr);
}
a->AddDomainIntegrator(new DiffusionIntegrator);
}
else // L2 Projection
{
a->AddDomainIntegrator(new MassIntegrator);
}
// 10. Assemble the bilinear form and the corresponding linear system,
// applying any necessary transformations such as: eliminating boundary
// conditions, applying conforming constraints for non-conforming AMR,
// static condensation, etc.
if (static_cond) { a->EnableStaticCondensation(); }
a->Assemble();
OperatorPtr A;
Vector B, X;
a->FormLinearSystem(ess_tdof_list, x, *b, A, X, B);
// cout << "Size of linear system: " << A->Height() << endl;
// 11. Solve the linear system A X = B.
GSSmoother M((SparseMatrix&)(*A));
X = 0.0;
PCG(*A, M, B, X, 0, 200, 1e-24, 0.0);
// 12. Recover the solution as a finite element grid function.
a->RecoverFEMSolution(X, *b, x);
// 13. Save the refined mesh and the solution. This output can be viewed later
// using GLVis: "glvis -m refined.mesh -g sol.gf".
ofstream mesh_ofs("refined.mesh");
mesh_ofs.precision(8);
mesh->Print(mesh_ofs);
ofstream sol_ofs("sol.gf");
sol_ofs.precision(8);
x.Save(sol_ofs);
// 14. Send the solution by socket to a GLVis server.
if (visualization)
{
char vishost[] = "localhost";
int visport = 19916;
socketstream sol_sock(vishost, visport);
sol_sock.precision(8);
sol_sock << "solution\n" << *mesh << x << flush;
}
// Compute and print the L^2 and H^1 norms of the error.
ConstantCoefficient one(1.0);
double l2_err = 0;
double h1_err = 0;
if (exact == 1)
{
l2_err = x.ComputeL2Error(*u1);
h1_err = x.ComputeH1Error(u1, u1_grad, &one, 1.0, 1);
}
else if (exact == 2)
{
l2_err = x.ComputeL2Error(*u2);
h1_err = x.ComputeH1Error(u2, u2_grad, &one, 1.0, 1);
}
else if (exact == 3)
{
l2_err = x.ComputeL2Error(*u3);
h1_err = x.ComputeH1Error(u3, u3_grad, &one, 1.0, 1);
}
double l2_rate, h1_rate;
if (num_ref != 0)
{
l2_rate = -log(l2_err/l2_err_prev) / log(2);
h1_rate = -log(h1_err/h1_err_prev) / log(2);
}
else
{
l2_rate = 0.0;
h1_rate = 0.0;
}
int one_over_h = mesh->GetNE();
one_over_h = sqrt(one_over_h);
cout << setw(16) << gotNdofs << setw(16) << one_over_h << setw(
16) << l2_err << setw( 16) << l2_rate;
cout << setw(16) << h1_err << setw(16) << h1_rate << endl;
l2_err_prev = l2_err;
h1_err_prev = h1_err;
// Save the data to pass to neural network
cout << "Mesh vertex array = " << endl;
cout << mesh->GetVertex(0) << endl;
// 15. Free the used memory.
// delete pcg;
// delete amg;
// delete my_diff_integrator;
// delete my_mass_integrator;
delete a;
delete b;
delete fespace;
delete u1;
delete u1_grad;
delete u2;
delete u2_grad;
delete u3;
delete u3_grad;
delete fec;
delete mesh;
return;
}
double u_exact(const Vector &x)
{
return(x(0)+x(1));
}
void u_grad_exact(const Vector &x, Vector &u)
{
u(0) = 1;
u(1) = 1;
}
double u_exact_2(const Vector &x)
{
return sin(x(1))*exp(x(0));
}
void u_grad_exact_2(const Vector &x, Vector &u)
{
u(0) = sin(x(1))*exp(x(0));
u(1) = cos(x(1))*exp(x(0));
}
double u_exact_3(const Vector &x)
{
// return (x(0)*x(0) + (0.5)*x(1)*x(1));
int m=10;
double total = sin(x(0))* pow( sin( x(0)*x(0) / M_PI ), 2*m );
total += sin(x(1))* pow( sin( 2*x(1)*x(1) / M_PI ), 2*m );
total *= -1;
return total;
}
void u_grad_exact_3(const Vector &x, Vector &u)
{
// presumes m=10
u(0) = - (40.0 * x(0) * cos( x(0)*x(0)/M_PI ) * sin(x(0)) * pow(sin( x(0)*x(0)/M_PI ),19)) / M_PI;
u(0) += - cos(x(0))*pow(sin( x(0)*x(0)/M_PI ),20);
u(1) = - (80.0 * x(1) * cos( 2.0 * x(1)*x(1)/M_PI ) * sin(x(1)) * pow(sin( 2.0 * x(1)*x(1)/M_PI ),19) ) / M_PI;
u(1) += - cos(x(1))*pow(sin( 2.0 * x(1)*x(1)/M_PI ),20);
}
int main(int argc, char *argv[])
{
// 1. Parse command-line options.
int total_refinements = 0;
// const char *mesh_file = "../../data/twoSquare.mesh";
// const char *mesh_file = "../../data/star-q3.mesh";
const char *mesh_file = "../../data/inline-oneTri.mesh";
int order = 1;
bool static_cond = false;
const char *device_config = "cpu";
bool visualization = false;
int exact = 3;
int solvePDE = 1;
OptionsParser args(argc, argv);
args.AddOption(&total_refinements, "-r", "--refine",
"Number of refinements to do.");
args.AddOption(&mesh_file, "-m", "--mesh",
"Mesh file to use.");
args.AddOption(&order, "-o", "--order",
"Finite element order (polynomial degree) or -1 for"
" isoparametric space.");
args.AddOption(&static_cond, "-sc", "--static-condensation", "-no-sc",
"--no-static-condensation", "Enable static condensation.");
//args.AddOption(&pa, "-pa", "--partial-assembly", "-no-pa",
// "--no-partial-assembly", "Enable Partial Assembly.");
args.AddOption(&device_config, "-d", "--device",
"Device configuration string, see Device::Configure().");
args.AddOption(&visualization, "-vis", "--visualization", "-no-vis",
"--no-visualization",
"Enable or disable GLVis visualization.");
args.AddOption(&exact, "-e", "--exact",
"Choice of exact solution. 1=constant 1; 2=sin(x)e^y; 3=michalewicz.");
args.AddOption(&solvePDE, "-L", "--L2Project",
"Solve a PDE (1) or do L2 Projection (2)");
args.Parse();
if (!args.Good())
{
args.PrintUsage(cout);
return 1;
}
args.PrintOptions(cout);
if (order != 1)
{
cout << "Only allowing order 1 triangle elements for now." << endl;
return 1;
}
else if (order == 1)
{
cout << "Using H1 triangular elements of order " << order << "." << endl;
}
if (solvePDE == 1)
{
cout << "Approximating solution to Laplace problem with ";
if (exact == 1)
{
cout << "exact solution u(x,y)=x+y" << endl;
}
else if (exact == 2)
{
cout << "exact solution u(x,y)=sin(y)e^x" << endl;
}
else if (exact == 3)
{
cout << endl << "Michalewicz is not harmonic. Use option -L 2 to do L2 projection instead."
<< endl;
return 1;
}
else
{
cout << endl << "*** Wrong usage of exact solution parameter (-e)"
<< endl;
return 1;
}
}
else if (solvePDE == 2)
{
cout << "Doing L^2 projection of basis with right hand side ";
if (exact == 1)
{
cout << "u(x,y)=x+y" << endl;
}
else if (exact == 2)
{
cout << "u(x,y)=sin(y)e^x" << endl;
}
else if (exact == 3)
{
cout << "u(x,y)=michalewicz function" << endl;
}
else
{
cout << endl << "*** Wrong usage of exact solution parameter (-e)"
<< endl;
return 1;
}
}
else
{
cout << "Wrong usage of solve vs. L2 Projection option -L."
<< endl;
return 1;
}
// 2. Enable hardware devices such as GPUs, and programming models such as
// CUDA, OCCA, RAJA and OpenMP based on command line options.
Device device(device_config);
device.Print();
// Set output options and print header
cout.precision(4);
cout << "----------------------------------------------------------------------------------------"
<< endl;
cout << left << setw(16) << "DOFs "<< setw(16) <<"1/h "<< setw(
16) << "L^2 error "<< setw(16);
cout << "L^2 rate "<< setw(16) << "H^1 error "<< setw(16) << "H^1 rate" << endl;
cout << "----------------------------------------------------------------------------------------"
<< endl;
double l2_err_prev = 0.0;
double h1_err_prev = 0.0;
// 3. Read the mesh from the given mesh file.
// Run last round with vis, if desired.
// can use this as a max DoF tolerance: (int)floor(log(50000./mesh->GetNE())/log(2.)/dim);
// Loop over number of refinements for convergence study
bool noVisYet = false;
for (int i = 0; i < (total_refinements); i++)
{
convergenceStudy(mesh_file, i, order, l2_err_prev, h1_err_prev, noVisYet,
exact, solvePDE, static_cond);
}
convergenceStudy(mesh_file, total_refinements, order, l2_err_prev, h1_err_prev, visualization,
exact, solvePDE, static_cond);
return 0;
}
+2 -2
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -144,7 +144,7 @@ clean-build:
rm -rf *.dSYM *.TVD.*breakpoints
clean-exec:
@rm -f refined.mesh displaced.mesh mesh.* ex5.mesh
@rm -f refined.mesh displaced.mesh mesh.* ex5.mesh ex6p-checkpoint.*
@rm -rf Example5* Example9* Example15* Example16* Example23* ParaView
@rm -f sphere_refined.* sol.* sol_u.* sol_p.* sol_r.* sol_i.*
@rm -f ex9.mesh ex9-mesh.* ex9-init.* ex9-final.*
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -475,7 +475,7 @@ FE_Evolution::FE_Evolution(BilinearForm &_M, BilinearForm &_K, const Vector &_b)
: TimeDependentOperator(_M.Height()), M(_M), K(_K), b(_b), z(_M.Height())
{
Array<int> ess_tdof_list;
if (M.GetAssemblyLevel() == AssemblyLevel::LEGACYFULL)
if (M.GetAssemblyLevel() == AssemblyLevel::LEGACY)
{
M_prec = new DSmoother(M.SpMat());
M_solver.SetOperator(M.SpMat());
+2 -2
View File
@@ -595,7 +595,7 @@ FE_Evolution::FE_Evolution(ParBilinearForm &_M, ParBilinearForm &_K,
M_solver(_M.ParFESpace()->GetComm()),
z(_M.Height())
{
if (_M.GetAssemblyLevel()==AssemblyLevel::LEGACYFULL)
if (_M.GetAssemblyLevel()==AssemblyLevel::LEGACY)
{
M.Reset(_M.ParallelAssemble(), true);
K.Reset(_K.ParallelAssemble(), true);
@@ -609,7 +609,7 @@ FE_Evolution::FE_Evolution(ParBilinearForm &_M, ParBilinearForm &_K,
M_solver.SetOperator(*M);
Array<int> ess_tdof_list;
if (_M.GetAssemblyLevel()==AssemblyLevel::LEGACYFULL)
if (_M.GetAssemblyLevel()==AssemblyLevel::LEGACY)
{
HypreParMatrix &M_mat = *M.As<HypreParMatrix>();
HypreParMatrix &K_mat = *K.As<HypreParMatrix>();
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
+19 -13
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
@@ -14,6 +14,7 @@ set(SRCS
bilinearform_ext.cpp
bilininteg.cpp
bilininteg_br2.cpp
bilininteg_convection_mf.cpp
bilininteg_convection_pa.cpp
bilininteg_convection_ea.cpp
bilininteg_dgtrace_pa.cpp
@@ -47,9 +48,12 @@ set(SRCS
gridfunc.cpp
hybridization.cpp
intrules.cpp
libceed/ceed.cpp
libceed/diffusion.cpp
libceed/mass.cpp
ceed/convection.cpp
ceed/diffusion.cpp
ceed/nlconvection.cpp
ceed/mass.cpp
ceed/operator.cpp
ceed/util.cpp
linearform.cpp
lininteg.cpp
multigrid.cpp
@@ -58,6 +62,7 @@ set(SRCS
nonlininteg.cpp
fespacehierarchy.cpp
nonlininteg_vectorconvection.cpp
nonlininteg_vectorconvection_mf.cpp
quadinterpolator.cpp
quadinterpolator_face.cpp
restriction.cpp
@@ -66,7 +71,6 @@ set(SRCS
tmop_tools.cpp
gslib.cpp
transfer.cpp
prmnonlinearform.cpp
)
set(HDRS
@@ -87,9 +91,14 @@ set(HDRS
gridfunc.hpp
hybridization.hpp
intrules.hpp
libceed/ceed.hpp
libceed/diffusion.hpp
libceed/mass.hpp
ceed/coefficient.hpp
ceed/convection.hpp
ceed/diffusion.hpp
ceed/integrator.hpp
ceed/mass.hpp
ceed/nlconvection.hpp
ceed/operator.hpp
ceed/util.hpp
linearform.hpp
lininteg.hpp
multigrid.hpp
@@ -113,7 +122,6 @@ set(HDRS
tmop_tools.hpp
gslib.hpp
transfer.hpp
prmnonlinearform.hpp
)
if (MFEM_USE_SIDRE)
@@ -138,8 +146,7 @@ if (MFEM_USE_MPI)
pgridfunc.cpp
plinearform.cpp
pnonlinearform.cpp
prestriction.cpp
pprmnonlinearform.cpp)
prestriction.cpp)
# If this list (HDRS -> HEADERS) is used for install, we probably want the
# headers added all the time.
list(APPEND HDRS
@@ -148,8 +155,7 @@ if (MFEM_USE_MPI)
pgridfunc.hpp
plinearform.hpp
pnonlinearform.hpp
prestriction.hpp
pprmnonlinearform.hpp)
prestriction.hpp)
endif()
convert_filenames_to_full_paths(SRCS)
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
+14 -14
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -76,7 +76,7 @@ BilinearForm::BilinearForm(FiniteElementSpace * f)
precompute_sparsity = 0;
diag_policy = DIAG_KEEP;
assembly = AssemblyLevel::LEGACYFULL;
assembly = AssemblyLevel::LEGACY;
batch = 1;
ext = NULL;
}
@@ -94,7 +94,7 @@ BilinearForm::BilinearForm (FiniteElementSpace * f, BilinearForm * bf, int ps)
precompute_sparsity = ps;
diag_policy = DIAG_KEEP;
assembly = AssemblyLevel::LEGACYFULL;
assembly = AssemblyLevel::LEGACY;
batch = 1;
ext = NULL;
@@ -121,7 +121,7 @@ void BilinearForm::SetAssemblyLevel(AssemblyLevel assembly_level)
assembly = assembly_level;
switch (assembly)
{
case AssemblyLevel::LEGACYFULL:
case AssemblyLevel::LEGACY:
break;
case AssemblyLevel::FULL:
ext = new FABilinearFormExtension(this);
@@ -143,7 +143,7 @@ void BilinearForm::SetAssemblyLevel(AssemblyLevel assembly_level)
void BilinearForm::EnableStaticCondensation()
{
delete static_cond;
if (assembly != AssemblyLevel::LEGACYFULL)
if (assembly != AssemblyLevel::LEGACY)
{
static_cond = NULL;
MFEM_WARNING("Static condensation not supported for this assembly level");
@@ -168,7 +168,7 @@ void BilinearForm::EnableHybridization(FiniteElementSpace *constr_space,
const Array<int> &ess_tdof_list)
{
delete hybridization;
if (assembly != AssemblyLevel::LEGACYFULL)
if (assembly != AssemblyLevel::LEGACY)
{
delete constr_integ;
hybridization = NULL;
@@ -223,7 +223,7 @@ MatrixInverse * BilinearForm::Inverse() const
void BilinearForm::Finalize (int skip_zeros)
{
if (assembly == AssemblyLevel::LEGACYFULL)
if (assembly == AssemblyLevel::LEGACY)
{
if (!static_cond) { mat->Finalize(skip_zeros); }
if (mat_e) { mat_e->Finalize(skip_zeros); }
@@ -1109,7 +1109,7 @@ MixedBilinearForm::MixedBilinearForm (FiniteElementSpace *tr_fes,
mat = NULL;
mat_e = NULL;
extern_bfs = 0;
assembly = AssemblyLevel::LEGACYFULL;
assembly = AssemblyLevel::LEGACY;
ext = NULL;
}
@@ -1134,7 +1134,7 @@ MixedBilinearForm::MixedBilinearForm (FiniteElementSpace *tr_fes,
bbfi_marker = mbf->bbfi_marker;
btfbfi_marker = mbf->btfbfi_marker;
assembly = AssemblyLevel::LEGACYFULL;
assembly = AssemblyLevel::LEGACY;
ext = NULL;
}
@@ -1147,7 +1147,7 @@ void MixedBilinearForm::SetAssemblyLevel(AssemblyLevel assembly_level)
assembly = assembly_level;
switch (assembly)
{
case AssemblyLevel::LEGACYFULL:
case AssemblyLevel::LEGACY:
break;
case AssemblyLevel::FULL:
// ext = new FAMixedBilinearFormExtension(this);
@@ -1219,7 +1219,7 @@ void MixedBilinearForm::AddMultTranspose(const Vector & x, Vector & y,
MatrixInverse * MixedBilinearForm::Inverse() const
{
if (assembly != AssemblyLevel::LEGACYFULL)
if (assembly != AssemblyLevel::LEGACY)
{
MFEM_WARNING("MixedBilinearForm::Inverse not possible with this assembly level!");
return NULL;
@@ -1232,7 +1232,7 @@ MatrixInverse * MixedBilinearForm::Inverse() const
void MixedBilinearForm::Finalize (int skip_zeros)
{
if (assembly == AssemblyLevel::LEGACYFULL)
if (assembly == AssemblyLevel::LEGACY)
{
mat -> Finalize (skip_zeros);
}
@@ -1509,7 +1509,7 @@ void MixedBilinearForm::AssembleDiagonal_ADAt(const Vector &D,
void MixedBilinearForm::ConformingAssemble()
{
if (assembly != AssemblyLevel::LEGACYFULL)
if (assembly != AssemblyLevel::LEGACY)
{
MFEM_WARNING("Conforming assemble not supported for this assembly level!");
return;
@@ -1779,7 +1779,7 @@ void DiscreteLinearOperator::SetAssemblyLevel(AssemblyLevel assembly_level)
assembly = assembly_level;
switch (assembly)
{
case AssemblyLevel::LEGACYFULL:
case AssemblyLevel::LEGACY:
case AssemblyLevel::FULL:
// Use the original implementation for now
break;
+13 -6
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -29,8 +29,13 @@ namespace mfem
form classes derived from Operator. */
enum class AssemblyLevel
{
/// Legacy fully assembled form, i.e. a global sparse matrix in MFEM, Hypre
/// or PETSC format. This assembly is ALWAYS performed on the host.
/// In the case of a BilinearForm LEGACY corresponds to a fully assembled
/// form, i.e. a global sparse matrix in MFEM, Hypre or PETSC format.
/// In the case of a NonlinearForm LEGACY corresponds to an operator that
/// is fully evaluated on the fly.
/// This assembly level is ALWAYS performed on the host.
LEGACY = 0,
/// @deprecated Use LEGACY instead.
LEGACYFULL = 0,
/// Fully assembled form, i.e. a global sparse matrix in MFEM format. This
/// assembly is compatible with device execution.
@@ -53,6 +58,8 @@ enum class AssemblyLevel
SetAssemblyLevel() function. */
class BilinearForm : public Matrix
{
friend FABilinearFormExtension;
protected:
/// Sparse matrix \f$ M \f$ to be associated with the form. Owned.
SparseMatrix *mat;
@@ -122,7 +129,7 @@ protected:
static_cond = NULL; hybridization = NULL;
precompute_sparsity = 0;
diag_policy = DIAG_KEEP;
assembly = AssemblyLevel::LEGACYFULL;
assembly = AssemblyLevel::LEGACY;
batch = 1;
ext = NULL;
}
@@ -157,7 +164,7 @@ public:
/// Set the desired assembly level.
/** Valid choices are:
- AssemblyLevel::LEGACYFULL (default)
- AssemblyLevel::LEGACY (default)
- AssemblyLevel::FULL
- AssemblyLevel::PARTIAL
- AssemblyLevel::ELEMENT
@@ -763,7 +770,7 @@ public:
/// Sets all sparse values of \f$ M \f$ to @a a.
void operator=(const double a) { *mat = a; }
/// Set the desired assembly level. The default is AssemblyLevel::LEGACYFULL.
/// Set the desired assembly level. The default is AssemblyLevel::LEGACY.
/** This method must be called before assembly. */
void SetAssemblyLevel(AssemblyLevel assembly_level);
+203 -94
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -14,8 +14,9 @@
#include "../general/forall.hpp"
#include "bilinearform.hpp"
#include "libceed/ceed.hpp"
#include "pbilinearform.hpp"
#include "pgridfunc.hpp"
#include "ceed/util.hpp"
namespace mfem
{
@@ -821,20 +822,14 @@ void EABilinearFormExtension::MultTranspose(const Vector &x, Vector &y) const
// Data and methods for fully-assembled bilinear forms
FABilinearFormExtension::FABilinearFormExtension(BilinearForm *form)
: EABilinearFormExtension(form),
mat(form->FESpace()->GetVSize(),form->FESpace()->GetVSize(),0),
face_mat(form->FESpace()->GetVSize(),0,0),
use_face_mat(false)
mat(a->mat)
{
#ifdef MFEM_USE_MPI
if ( ParFiniteElementSpace* pfes =
dynamic_cast<ParFiniteElementSpace*>(form->FESpace()) )
ParFiniteElementSpace *pfes = nullptr;
if ( a->GetFBFI()->Size()>0 &&
(pfes = dynamic_cast<ParFiniteElementSpace*>(form->FESpace())) )
{
if (pfes->IsDGSpace())
{
use_face_mat = true;
pfes->ExchangeFaceNbrData();
face_mat.SetWidth(pfes->GetFaceNbrVSize());
}
pfes->ExchangeFaceNbrData();
}
#endif
}
@@ -843,111 +838,225 @@ void FABilinearFormExtension::Assemble()
{
EABilinearFormExtension::Assemble();
FiniteElementSpace &fes = *a->FESpace();
if (fes.IsDGSpace())
int width = fes.GetVSize();
int height = fes.GetVSize();
bool keep_nbr_block = false;
#ifdef MFEM_USE_MPI
ParFiniteElementSpace *pfes = nullptr;
if ( a->GetFBFI()->Size()>0 &&
(pfes = dynamic_cast<ParFiniteElementSpace*>(&fes)) )
{
const L2ElementRestriction *restE =
static_cast<const L2ElementRestriction*>(elem_restrict);
const L2FaceRestriction *restF =
static_cast<const L2FaceRestriction*>(int_face_restrict_lex);
// 1. Fill I
// 1.1 Increment with restE
restE->FillI(mat);
// 1.2 Increment with restF
if (restF) { restF->FillI(mat, face_mat); }
// 1.3 Sum the non-zeros in I
auto h_I = mat.HostReadWriteI();
int cpt = 0;
const int vd = fes.GetVDim();
const int ndofs = ne*elemDofs*vd;
for (int i = 0; i < ndofs; i++)
pfes->ExchangeFaceNbrData();
width += pfes->GetFaceNbrVSize();
dg_x.SetSize(width);
ParBilinearForm *pb = nullptr;
if ((pb = dynamic_cast<ParBilinearForm*>(a)) && (pb->keep_nbr_block))
{
const int nnz = h_I[i];
h_I[i] = cpt;
cpt += nnz;
}
const int nnz = cpt;
h_I[ndofs] = nnz;
mat.GetMemoryJ().New(nnz, mat.GetMemoryJ().GetMemoryType());
mat.GetMemoryData().New(nnz, mat.GetMemoryData().GetMemoryType());
if (use_face_mat && restF)
{
auto h_I_face = face_mat.HostReadWriteI();
int cpt = 0;
for (int i = 0; i < ndofs; i++)
{
const int nnz = h_I_face[i];
h_I_face[i] = cpt;
cpt += nnz;
}
const int nnz_face = cpt;
h_I_face[ndofs] = nnz_face;
face_mat.GetMemoryJ().New(nnz_face,
face_mat.GetMemoryJ().GetMemoryType());
face_mat.GetMemoryData().New(nnz_face,
face_mat.GetMemoryData().GetMemoryType());
}
// 2. Fill J and Data
// 2.1 Fill J and Data with Elem ea_data
restE->FillJAndData(ea_data, mat);
// 2.2 Fill J and Data with Face ea_data_ext
if (restF) { restF->FillJAndData(ea_data_ext, mat, face_mat); }
// 2.3 Shift indirections in I back to original
auto I = mat.HostReadWriteI();
for (int i = ndofs; i > 0; i--)
{
I[i] = I[i-1];
}
I[0] = 0;
if (use_face_mat && restF)
{
auto I_face = face_mat.HostReadWriteI();
for (int i = ndofs; i > 0; i--)
{
I_face[i] = I_face[i-1];
}
I_face[0] = 0;
height += pfes->GetFaceNbrVSize();
dg_y.SetSize(height);
keep_nbr_block = true;
}
}
else // continuous Galerkin case
#endif
if (a->mat) // We reuse the sparse matrix memory
{
const ElementRestriction &rest =
static_cast<const ElementRestriction&>(*elem_restrict);
rest.FillSparseMatrix(ea_data, mat);
if (fes.IsDGSpace())
{
const L2ElementRestriction *restE =
static_cast<const L2ElementRestriction*>(elem_restrict);
const L2FaceRestriction *restF =
static_cast<const L2FaceRestriction*>(int_face_restrict_lex);
// 1. Fill J and Data
// 1.1 Fill J and Data with Elem ea_data
restE->FillJAndData(ea_data, *mat);
// 1.2 Fill J and Data with Face ea_data_ext
if (restF) { restF->FillJAndData(ea_data_ext, *mat, keep_nbr_block); }
// 1.3 Shift indirections in I back to original
auto I = mat->HostReadWriteI();
for (int i = height; i > 0; i--)
{
I[i] = I[i-1];
}
I[0] = 0;
}
else
{
const ElementRestriction &rest =
static_cast<const ElementRestriction&>(*elem_restrict);
rest.FillJAndData(ea_data, *mat);
}
}
else // We create, compute the sparsity, and fill the sparse matrix
{
mat = new SparseMatrix(height, width, 0);
if (fes.IsDGSpace())
{
const L2ElementRestriction *restE =
static_cast<const L2ElementRestriction*>(elem_restrict);
const L2FaceRestriction *restF =
static_cast<const L2FaceRestriction*>(int_face_restrict_lex);
// 1. Fill I
mat->GetMemoryI().New(height+1, mat->GetMemoryI().GetMemoryType());
// 1.1 Increment with restE
restE->FillI(*mat);
// 1.2 Increment with restF
if (restF) { restF->FillI(*mat, keep_nbr_block); }
// 1.3 Sum the non-zeros in I
auto h_I = mat->HostReadWriteI();
int cpt = 0;
for (int i = 0; i < height; i++)
{
const int nnz = h_I[i];
h_I[i] = cpt;
cpt += nnz;
}
const int nnz = cpt;
h_I[height] = nnz;
mat->GetMemoryJ().New(nnz, mat->GetMemoryJ().GetMemoryType());
mat->GetMemoryData().New(nnz, mat->GetMemoryData().GetMemoryType());
// 2. Fill J and Data
// 2.1 Fill J and Data with Elem ea_data
restE->FillJAndData(ea_data, *mat);
// 2.2 Fill J and Data with Face ea_data_ext
if (restF) { restF->FillJAndData(ea_data_ext, *mat, keep_nbr_block); }
// 2.3 Shift indirections in I back to original
auto I = mat->HostReadWriteI();
for (int i = height; i > 0; i--)
{
I[i] = I[i-1];
}
I[0] = 0;
}
else // continuous Galerkin case
{
const ElementRestriction &rest =
static_cast<const ElementRestriction&>(*elem_restrict);
rest.FillSparseMatrix(ea_data, *mat);
}
a->mat = mat;
}
}
void FABilinearFormExtension::DGMult(const Vector &x, Vector &y) const
{
#ifdef MFEM_USE_MPI
const ParFiniteElementSpace *pfes;
if ( (pfes = dynamic_cast<const ParFiniteElementSpace*>(testFes)) )
{
// DG Prolongation
ParGridFunction x_gf;
x_gf.MakeRef(const_cast<ParFiniteElementSpace*>(pfes),
const_cast<Vector&>(x),0);
x_gf.ExchangeFaceNbrData();
Vector &shared_x = x_gf.FaceNbrData();
const int local_size = a->FESpace()->GetVSize();
auto dg_x_ptr = dg_x.Write();
auto x_ptr = x.Read();
MFEM_FORALL(i,local_size,
{
dg_x_ptr[i] = x_ptr[i];
});
const int shared_size = shared_x.Size();
auto shared_x_ptr = shared_x.Read();
MFEM_FORALL(i,shared_size,
{
dg_x_ptr[local_size+i] = shared_x_ptr[i];
});
ParBilinearForm *pform = nullptr;
if ((pform = dynamic_cast<ParBilinearForm*>(a)) && (pform->keep_nbr_block))
{
mat->Mult(dg_x, dg_y);
// DG Restriction
auto dg_y_ptr = dg_y.Read();
auto y_ptr = y.ReadWrite();
MFEM_FORALL(i,local_size,
{
y_ptr[i] += dg_y_ptr[i];
});
}
else
{
mat->Mult(dg_x, y);
}
}
else
#endif
{
mat->Mult(x, y);
}
}
void FABilinearFormExtension::Mult(const Vector &x, Vector &y) const
{
mat.Mult(x, y);
#ifdef MFEM_USE_MPI
if (const ParFiniteElementSpace *pfes =
dynamic_cast<const ParFiniteElementSpace*>(testFes))
if ( a->GetFBFI()->Size()>0 )
{
DGMult(x, y);
}
else
{
mat->Mult(x, y);
}
}
void FABilinearFormExtension::DGMultTranspose(const Vector &x, Vector &y) const
{
#ifdef MFEM_USE_MPI
const ParFiniteElementSpace *pfes;
if ( (pfes = dynamic_cast<const ParFiniteElementSpace*>(testFes)) )
{
// DG Prolongation
ParGridFunction x_gf;
x_gf.MakeRef(const_cast<ParFiniteElementSpace*>(pfes),
const_cast<Vector&>(x),0);
x_gf.ExchangeFaceNbrData();
Vector &shared_x = x_gf.FaceNbrData();
if (shared_x.Size()) { face_mat.AddMult(shared_x, y); }
const int local_size = a->FESpace()->GetVSize();
auto dg_x_ptr = dg_x.Write();
auto x_ptr = x.Read();
MFEM_FORALL(i,local_size,
{
dg_x_ptr[i] = x_ptr[i];
});
const int shared_size = shared_x.Size();
auto shared_x_ptr = shared_x.Read();
MFEM_FORALL(i,shared_size,
{
dg_x_ptr[local_size+i] = shared_x_ptr[i];
});
ParBilinearForm *pb = nullptr;
if ((pb = dynamic_cast<ParBilinearForm*>(a)) && (pb->keep_nbr_block))
{
mat->MultTranspose(dg_x, dg_y);
// DG Restriction
auto dg_y_ptr = dg_y.Read();
auto y_ptr = y.ReadWrite();
MFEM_FORALL(i,local_size,
{
y_ptr[i] += dg_y_ptr[i];
});
}
else
{
mat->MultTranspose(dg_x, y);
}
}
else
#endif
{
mat->MultTranspose(x, y);
}
}
void FABilinearFormExtension::MultTranspose(const Vector &x, Vector &y) const
{
mat.MultTranspose(x, y);
#ifdef MFEM_USE_MPI
if (const ParFiniteElementSpace *pfes =
dynamic_cast<const ParFiniteElementSpace*>(testFes))
if ( a->GetFBFI()->Size()>0 )
{
ParGridFunction x_gf;
x_gf.MakeRef(const_cast<ParFiniteElementSpace*>(pfes),
const_cast<Vector&>(x),0);
x_gf.ExchangeFaceNbrData();
Vector &shared_x = x_gf.FaceNbrData();
if (shared_x.Size()) { face_mat.AddMultTranspose(shared_x, y); }
DGMultTranspose(x, y);
}
else
{
mat->MultTranspose(x, y);
}
#endif
}
+8 -5
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
@@ -118,10 +118,8 @@ public:
class FABilinearFormExtension : public EABilinearFormExtension
{
private:
SparseMatrix mat;
/// face_mat handles parallelism for DG face terms.
SparseMatrix face_mat;
bool use_face_mat;
SparseMatrix *mat;
mutable Vector dg_x, dg_y;
public:
FABilinearFormExtension(BilinearForm *form);
@@ -129,6 +127,11 @@ public:
void Assemble();
void Mult(const Vector &x, Vector &y) const;
void MultTranspose(const Vector &x, Vector &y) const;
/** DGMult and DGMultTranspose use the extended L-vector to perform the
computation. */
void DGMult(const Vector &x, Vector &y) const;
void DGMultTranspose(const Vector &x, Vector &y) const;
};
/// Data and methods for matrix-free bilinear forms

Some files were not shown because too many files have changed in this diff Show More