Compare commits

..
Author SHA1 Message Date
Jan Nikl 1eb9f5d697 Enabled reconstruction of the total flux for rotated HDG. 2025-08-18 17:56:10 -07:00
Jan Nikl 72ad06034f Minor formatting. 2025-08-16 09:48:03 -07:00
Jan Nikl 68a48baa3c Fixed assembly of LDG faces. 2025-08-13 23:03:17 -07:00
Jan Nikl a878e6119a Added a switch for formulation. 2025-08-13 17:11:22 -07:00
Jan Nikl ffcf6e3bec Added hybridization with strong formulation. 2025-08-13 15:31:38 -07:00
Jan Nikl cda5aecb6f Reworked strong rotated formulation. 2025-08-13 15:29:56 -07:00
Jan Nikl 45e9ea731d Fixed weak rotated formulation. 2025-08-13 04:41:07 -07:00
Jan Nikl 3f7721789c Added strong rotated formulation. 2025-08-12 20:34:13 -07:00
Jan Nikl f342a9e0f2 Added nonconservative rotated scheme. 2025-08-12 14:13:15 -07:00
Jan Nikl d9cf719074 Moved problem type to parameters in ex5-aniso. 2025-08-11 11:23:46 -07:00
Jan Nikl 40391859fb Moved hdg integrators to a separate file. 2025-08-11 10:24:00 -07:00
Jan Nikl 8fe587cd89 Added BrokenRT to ex5p-nguyen. 2025-08-08 16:31:55 -07:00
Jan Nikl 1c7e022475 Added reconstruction to ex5p-nguyen. 2025-08-08 15:26:07 -07:00
Jan Nikl 978530445a Added MPI support to reconstruction. 2025-08-08 15:25:35 -07:00
Jan Nikl c2a113cee1 Added support for nonlinear advection in flux reconstruction. 2025-08-08 12:54:23 -07:00
Jan Nikl 56507045d8 Added single-sided integration to the convection integrators and used it in reconstruction. 2025-08-08 12:28:30 -07:00
Jan Nikl 40d26fecf6 Added single-side HDG matrix integration. 2025-08-08 11:53:34 -07:00
Jan Nikl 8113e2c577 Fixed detection of sources for reconstruction. 2025-08-07 14:31:14 -07:00
Jan Nikl 859ba6d1e2 Added boundary pontetial constraint integration to the total flux reconstruction. 2025-08-07 11:18:45 -07:00
Jan Nikl 6b361b5e06 Added reconstruction to DPG diffusion miniapp. 2025-08-05 21:42:07 -07:00
Jan Nikl 3272b93379 Added reconstruction to ex5-aniso. 2025-08-05 00:09:36 -07:00
Jan Nikl b97eef1cef Added non-singular problem support to reconstruction. 2025-08-05 00:08:29 -07:00
Jan Nikl 9bd2f36fa0 Changed ex5-nguyen to reconstrution of all quantities. 2025-08-04 22:36:34 -07:00
Jan Nikl 03bc0b1178 Added reconstruction of superconvergent quantities. 2025-08-04 20:55:28 -07:00
Jan Nikl 7034eccbab Added automatic setup of the reconstructed flux space. 2025-08-04 14:59:48 -07:00
Jan Nikl 0eca9e3df7 Moved randomization of mesh to darcyop and used it in ex5-nguyen. 2025-08-04 14:52:44 -07:00
Jan Nikl 30ba27b131 Added automated reconstruction of the total flux with detection of the integrators. 2025-07-29 09:41:25 -07:00
Jan Nikl dc014c533d Enabled access to the velocity coefficient of convection integrators. 2025-07-29 09:40:02 -07:00
Jan Nikl 27ea3c3b49 Fixed cloning of RT trace and DG interface FE collections. 2025-07-28 08:34:29 -07:00
Jan Nikl a322dfa1f1 Merge branch 'najlkin/own-data' into darcy-hdg-dev 2025-07-28 07:22:23 -07:00
Jan Nikl 0ea2624feb Added description of aniso problems. 2025-07-28 01:21:47 -07:00
Jan Nikl 121a1c73a8 Added BoundaryHyperbolicLFIntegrator. 2025-07-27 22:55:20 -07:00
Jan Nikl 983297448a Minor reformatting of HyperbolicFormIntegrator. 2025-07-27 22:53:04 -07:00
Jan Nikl 4e63a55a7e Minor fixes. 2025-07-22 06:53:48 -07:00
Jan Nikl 09487b9fe5 Added parallel iterative glvis monitor. 2025-07-10 19:22:56 -07:00
Jan Nikl 0f68e7bcc8 Fixed mapping of rhs in DarcyOperator. 2025-07-10 00:27:26 -07:00
Jan Nikl 7df42f2b1d Fixed a typo in DarcyOperator interface. 2025-07-10 00:12:28 -07:00
Jan Nikl 019ca84072 Added analytic flux solution to sine diffusion ring. 2025-07-09 18:24:37 -07:00
Jan Nikl 2c1b05481a Added analytic flux solution to Sovinec. 2025-07-09 18:03:34 -07:00
Jan Nikl 0534182d23 Added centering of analytic solution to DPG diffusion following ex5-aniso. 2025-07-09 17:49:18 -07:00
Jan Nikl 7ef77bfa92 Added reduction to DPG diffusion miniapp. 2025-07-09 17:22:56 -07:00
Jan Nikl 4b58d905ca Added tolerance/iters settings to DarcyOperator. 2025-07-09 14:22:24 -07:00
Jan Nikl 649823c5c9 Generalized IterativeGLVis monitor. 2025-07-09 13:03:00 -07:00
Jan Nikl 2aad23842c Generalized solution-based controller to all linear solvers and shared the solution/rhs vectors with DarcyOperator. 2025-07-09 12:54:31 -07:00
Jan Nikl 6208b21a7e Fixed GLVis visualization monitor for GMRES-type solvers. 2025-07-09 12:14:11 -07:00
Jan Nikl 1d8b80330c Added randomization of the mesh to ex5-aniso. 2025-07-02 16:25:07 -07:00
Jan Nikl b49f4d8ed5 Added diffusion ring problem with sine source. 2025-07-02 10:08:02 -07:00
Jan Nikl dc3b056e18 Added centering of some problems in ex5-aniso to the bounding box. 2025-07-02 04:38:56 -07:00
Jan Nikl c53a61c09b Added switches for direct solver usage in DarcyOperator. 2025-07-01 23:08:23 -07:00
Jan Nikl 61f65ba57e Fixed broken RT FE collection. 2025-07-01 20:10:18 -07:00
Jan Nikl 50e9b81cf0 Added manual refinement option to ex5-aniso. 2025-07-01 19:21:42 -07:00
Jan Nikl 9d3c1889ba Minor fix in Umansky width. 2025-07-01 19:19:55 -07:00
Jan Nikl 557a5ca384 Added direct solver option to DPG diffusion. 2025-07-01 16:54:13 -07:00
Jan Nikl 6f981f39a8 Fixed t_0 init in DPG diffusion. 2025-07-01 16:43:54 -07:00
Jan Nikl 8e5be10a5a Replaced element DPG stabilization factors by coefficients. 2025-07-01 16:13:38 -07:00
Jan Nikl dd8de42886 Added vector c2 coefficient. 2025-07-01 15:48:46 -07:00
Jan Nikl adab064363 Added stabilization coefficients to DPG diffusion miniapp. Mut be tested. 2025-07-01 15:06:38 -07:00
Jan Nikl 0630549065 Added Umansky width measurement to ex5-aniso. 2025-07-01 11:17:57 -07:00
Jan Nikl ff724d701d Fixed Umansky test with refinement. 2025-07-01 10:53:24 -07:00
Jan Nikl 4867cc5925 Added Umansky test to ex5-aniso and DPG diffusion miniapp. 2025-07-01 10:49:58 -07:00
Jan Nikl b7ede570eb Added anisotropic tests to the DPG diffusion miniapp. 2025-07-01 04:08:23 -07:00
Jan Nikl 7a1ec81609 Added analytic solution visualization to diffusion DPG miniapp. 2025-07-01 04:00:25 -07:00
Jan Nikl f54d14f26f Added steady peak, steady varying angle and Sovinec problems. 2025-06-30 23:28:39 -07:00
Jan Nikl 6784a8d2ae Moved params in ex5-aniso to a struct. 2025-06-30 23:25:58 -07:00
Jan Nikl 6565fed780 Fixed reduction without essential dofs. 2025-06-30 16:41:20 -07:00
Jan Nikl 2c0db86051 Added diffusion ring with Gaussian source. 2025-06-30 16:29:13 -07:00
Jan Nikl b8f768b4a8 Added boundary layer problem. 2025-06-30 15:23:05 -07:00
Jan Nikl e2f53c54e8 Fixed DarcyOperator to work serially when compiled with MPI. 2025-06-30 12:06:15 -07:00
Jan Nikl ad3dd1a3e1 Added total flux reconstruction for nonlinear regime. 2025-06-30 11:23:21 -07:00
Jan Nikl c78ef218f9 Added total flux reconstruction. 2025-06-27 20:40:13 -07:00
Jan Nikl 23ea6d33fb Implemented vector assembly for HDG integrators. 2025-06-27 19:01:13 -07:00
Jan Nikl 1f4c12434a Implemented NLF integrator methods in SumIntegrator. 2025-06-27 09:43:07 -07:00
Jan Nikl 067933a8f5 Fixed virtual/override in NLF sum (block) integrators. 2025-06-27 09:32:50 -07:00
Jan Nikl cc77a7ce35 Added regression tests for nonlinear diffusion in parallel. 2025-06-23 19:20:46 -07:00
Jan Nikl e4066c08e6 Fixed integration order in VectorBoundaryFluxLFIntegrator. 2025-06-23 16:22:04 -07:00
Jan Nikl 62bc0ea0db Fixed HDG in diffusion miniapp. 2025-06-20 13:36:14 -07:00
Jan Nikl a71d31da7d Added iter count info to convection-diffusion miniapp. 2025-06-20 11:54:13 -07:00
Jan Nikl 2189ca2522 Minor fixes in diffusion. 2025-06-20 10:57:35 -07:00
Jan Nikl d2ba8af9f2 Fixed L/HDG in diffusion. 2025-06-20 10:57:35 -07:00
Jan Nikl 92aa9746f8 Added system dofs info to DPG miniapps. 2025-06-20 10:16:41 -07:00
Jan Nikl db3d4fc413 Added timing info to diffusion/convection-diffusion miniapps. 2025-06-20 10:03:45 -07:00
Jan Nikl 20251c1b67 Added DarcyForm to convection-diffusion DPG miniapp. TODO: Problem 1, Neumann BCs. 2025-06-18 16:09:11 -07:00
Jan Nikl b845628086 Minor fixes in diffusion. 2025-06-18 16:06:15 -07:00
Jan Nikl e08bbc37a1 Added sign parameter to NormalTraceJumpIntegrator. 2025-06-18 16:05:06 -07:00
Jan Nikl 06a2195b2c Added internal rhs vector option with demo in dpg/diffusion. 2025-06-15 21:12:29 -07:00
Jan Nikl 60223eae06 Fixed flux orientation. 2025-06-15 19:29:39 -07:00
Jan Nikl 543e50ded4 Added (B)RT/LDG including hybridization to DPG diffusion miniapp. 2025-06-15 18:12:10 -07:00
Jan Nikl 491b26d75b Fixed update of offsets and size of (Par)DarcyForm. 2025-06-15 17:58:22 -07:00
Jan Nikl 18e141b881 Deallocation fix. 2025-06-12 11:25:48 -07:00
Jan Nikl 1b8577a1e0 Fixed gradient construction in Schur complement for nonlinear solvers. 2025-06-12 11:24:09 -07:00
Jan Nikl 34540e80f8 Revert "Removed unused dynamic cast to BlockOperator of the system operator."
This reverts commit e6ae361737.
2025-06-11 16:17:20 -07:00
Jan Nikl 3378ae5d55 Added gradient of ParDarcyForm. 2025-06-11 14:11:05 -07:00
Jan Nikl 5c7bd476ed Minor fix in gradient construction. 2025-06-11 14:10:21 -07:00
Jan Nikl 02a2cc4afd Added a rege test for nonlinear diffusion regime with DGs. 2025-06-11 11:38:18 -07:00
Jan Nikl 8a6cedb626 Implemented gradient of ParBlockNonlinearForm with shared face contributions. 2025-06-11 11:33:53 -07:00
Jan Nikl 459ddab3f9 Fix of ParBlockNonlinearForm::Mult(). 2025-06-11 11:31:32 -07:00
Jan Nikl c9787949fb Implemented Mult of ParBlockNonlinearForm with shared face contributions. 2025-06-10 05:29:17 -07:00
Jan Nikl a8f370df36 Added nonlinear diffusion to parallel darcy form and ex5p-nguyen. 2025-06-10 04:31:10 -07:00
Jan Nikl e6ae361737 Removed unused dynamic cast to BlockOperator of the system operator. 2025-06-10 04:13:50 -07:00
Jan Nikl c2a8bede6a Changed forms to parallel in ex5p-nguyen. 2025-06-09 23:31:33 -07:00
Jan Nikl b2fad5bb87 Revert "Updated tests affected by Schur preconditioning."
This reverts commit aae4068d5f.
2025-06-09 20:21:18 -07:00
Jan Nikl 179a8a260f Added mixed nonlinear regime and regression tests. 2025-06-09 19:18:59 -07:00
Jan Nikl 984da839a1 Fixed linear potential gradient and moved factorization of A for gradient to construction of H. 2025-06-09 17:45:00 -07:00
Jan Nikl c6b117b8c1 Fixed gradient construction for linear flux/pot parts. 2025-06-09 13:56:35 -07:00
Jan Nikl c45a5f1a33 Fixed linear face stabilization in the nonlinear regime. 2025-06-06 18:12:52 -07:00
Jan Nikl d8ec65d1b2 Fixed construction of gradient in mixed nonlinear regime. 2025-06-06 18:02:07 -07:00
Jan Nikl 36c1126e25 Fixed initial guess in the nonlinear regime. 2025-06-06 16:14:51 -07:00
Jan Nikl ae2af6c86f Added AIR AMG setup to hybridization and reduction, enabling problem 3 with the latter. 2025-06-06 14:29:16 -07:00
Jan Nikl d9731c7e19 Added AIR AMG setup to Schur complement preconditioner, enabling problem 3. 2025-06-06 13:37:09 -07:00
Jan Nikl 45d39fa4bb Updated non-linear convection linear regression tests. 2025-06-06 10:32:09 -07:00
Jan Nikl fd1f16a00d Added regression tests with linear hyperbolic flux. 2025-06-05 17:03:55 -07:00
Jan Nikl 018a0a4bc4 Added support for boundary integration to HyperbolicFormIntegrator. 2025-06-05 16:26:35 -07:00
Jan Nikl 44fc8c072b Added a check of number of iterations to regression tests. 2025-04-16 01:02:50 -07:00
Jan Nikl aae4068d5f Updated tests affected by Schur preconditioning. 2025-04-15 23:44:14 -07:00
Jan Nikl 368005d9f1 Added GS/HypreAMG preconditioning to gradient of the hybridized system. 2025-04-15 21:26:56 -07:00
Jan Nikl e46ab62167 Added matrix assembly of the gradient in DarcyHybridiztation. 2025-04-15 21:04:16 -07:00
Jan Nikl 9ca2bbe6ba Made Af_data and ipiv mutable in Hybridization for construction of gradient. 2025-04-15 19:26:11 -07:00
Jan Nikl bdc3be07e4 Improved memory safety by RAII. 2025-04-14 18:08:56 -07:00
Jan Nikl 6cd0da0309 Merge branch 'najlkin/fix-sol-ctrlr' into darcy-hdg-dev 2025-04-14 14:01:52 -07:00
Jan Nikl 043ccf6231 Merge branch 'najlkin/fix-sol-ctrlr' into darcy-hdg-dev 2025-04-11 13:38:07 -07:00
Jan Nikl c91f3ea67f Added solution-based iterative solver controller to DarcyOperator. 2025-04-11 12:21:03 -07:00
Jan Nikl 5018355aad Fixed ex5p-hdg Schur complement construction. 2025-04-11 12:02:49 -07:00
Jan Nikl 5243009e3e Made RecoverFEMSolution virtual. 2025-04-11 10:26:06 -07:00
Jan Nikl 2f82c74a2e Fixed IterativeSolverController to be able to indicate updated solution is needed. 2025-04-09 09:10:12 -07:00
Jan Nikl 5a776d814a Improvements following Hybridization for memory safety and cleaner codebase. 2025-04-09 04:52:04 -07:00
Jan Nikl 374f4ff61d Post-merging fixes for parallel. 2025-04-09 04:49:01 -07:00
Jan Nikl f8657ddd68 Post-merging fixes. 2025-04-08 09:03:37 -07:00
Jan Nikl 84454d671d Added access to the number of boundary constraint integrators in Hybridization. 2025-04-08 08:56:40 -07:00
Jan Nikl 2b8dd750a4 Merge branch 'master' into darcy-hdg-dev 2025-04-08 08:51:38 -07:00
Jan Nikl 48665156cf Merge branch 'master' into darcy-hdg-dev 2025-04-08 08:48:40 -07:00
Jan Nikl cdce019196 Fixed some serial rege tests. 2025-03-31 17:19:43 -07:00
Jan Nikl 92abfb1be2 Removed some broken parallel reduction rege tests. 2025-03-31 16:47:13 -07:00
Jan Nikl fd8f9d95cd Added nonlinear parallel rege tests. 2025-03-31 16:39:59 -07:00
Jan Nikl a0b9d810fc Fixed print level of AMG in Schur. 2025-03-31 16:09:34 -07:00
Jan Nikl e9404d29ff Fixed nonlin hybridization and unified shared face handling. 2025-03-31 15:42:43 -07:00
Jan Nikl b698d62d1c Updated documentation and naming in ex5-scatter. 2025-03-27 16:29:07 -07:00
Jan Nikl b808e4732f Unified coupling in the wave coupling and scaterring problems. 2025-03-27 16:12:08 -07:00
Jan Nikl 3a4d531d56 Added output of E and B to ex5-scatter. 2025-03-25 10:41:25 -07:00
Jan Nikl f350e3b965 Added scattering problem. 2025-03-25 08:54:46 -07:00
Jan Nikl bb4ff928cf Fixed hybridization of coupled operator. 2025-03-25 08:43:04 -07:00
Jan Nikl 549654a683 Added hybridization to ex5-scatter. 2025-03-25 02:21:56 -07:00
Jan Nikl a63b50190e Added BRT to ex5-scatter. 2025-03-25 02:10:27 -07:00
Jan Nikl 19d20e426f Merge branch 'darcy-hrt-dev' into darcy-hdg-dev 2025-03-25 01:28:53 -07:00
Jan Nikl fa2128e583 Added coupling coefficient function. 2025-03-25 01:26:38 -07:00
Jan Nikl f218bd60e3 Initial commit of the scaterring example. 2025-03-24 22:42:44 -07:00
Jan Nikl 1828746552 Added parallelization of non-linear DarcyForm. 2025-03-18 21:04:33 -07:00
Jan Nikl d3d049e024 Unified the hybridized matrix/operator retrieval. 2025-03-18 21:01:33 -07:00
Jan Nikl 092d24622c Removed the hack with DarcyForm directly as operator. 2025-03-18 20:57:51 -07:00
Jan Nikl ac7fd04c9e Added construction of DarcyForm gradient with eliminated matrices. 2025-03-18 20:55:01 -07:00
Jan Nikl 2d7e0cf459 Added gradient of ParNonlinearForm with face integrators. 2025-03-18 16:43:55 -07:00
Jan Nikl df8369ec00 Fixed skipping of zeros + cleanup in DarcyHybridization. 2025-03-13 10:13:05 -07:00
Jan Nikl 57a38e7506 Documented coefficients. 2025-03-13 09:51:55 -07:00
Jan Nikl b881ba6fd9 Minor cleanup in DarcyOperator. 2025-03-13 09:22:25 -07:00
Jan Nikl 5be9c43b9e Changed problem 2 rege tests to Neumann BC. 2025-03-13 09:21:14 -07:00
Jan Nikl dd35659bd9 Fixed Neumann BC for RT. 2025-03-13 08:43:14 -07:00
Jan Nikl 8cc9d0a092 Fixed upwinding of diffusion. 2025-03-13 08:40:49 -07:00
Jan Nikl c586d8da81 Fixed doxygen of NonconservativeDGTraceIntegrator. 2025-03-11 22:43:23 -07:00
Jan Nikl cdcb69e505 Merge branch 'darcy-hdg-dev' into darcy-hrt-dev 2025-03-11 21:29:08 -07:00
Jan Nikl d9c2eb1b9a Added problem 3 regression tests for HDG. 2025-03-11 09:58:09 -07:00
Jan Nikl b5680f31ee Changed problem 2 to Neumann BC for HDG/RT. 2025-03-11 09:24:48 -07:00
Jan Nikl 4332811cb2 Fixed Neumann BC in hybridized DarcyOperator. 2025-03-10 15:40:25 -07:00
Jan Nikl bcee4633c9 Implemented essential BCs in HRT. 2025-03-10 13:16:14 -07:00
Jan Nikl 66b90bc36c Added linear hybridization problem 1 and 2 regression tests. 2025-03-10 10:16:45 -07:00
Jan Nikl a86ed1c085 Propagated skip zeros parameter to HDG. 2025-03-10 09:59:11 -07:00
Jan Nikl 41308f2bd5 Fixed HDG parallelization. 2025-03-10 09:49:43 -07:00
Jan Nikl c4c2ee8298 Minor change of silent error to assert in matrix accessors. 2025-03-10 09:36:28 -07:00
Jan Nikl 6e727f1b65 Fixed trace space to use DG_Interface collection without sign convention. 2025-03-06 11:09:31 -08:00
Jan Nikl eb11a35633 Minor parallelization fix. 2025-03-06 11:05:38 -08:00
Jan Nikl 10ec0d10a3 Added non-linear hybridized operator. Must be tested. 2025-03-01 13:59:47 -08:00
Jan Nikl 2bc5667a77 Added ADS/AMS preconditioner for the hybridized system. 2025-02-28 20:28:20 -08:00
Jan Nikl 1ab420aa4e Initial MPI parallelization of hybridization. 2025-02-28 20:27:02 -08:00
Jan Nikl 5a4af12ae9 Removed some unnecessary conditional compilations for MPI. 2025-02-25 05:23:57 -08:00
Jan Nikl bba868fe62 Added BRT to ex5-aniso. 2025-02-25 01:46:02 -08:00
Jan Nikl ec456564f4 Added BRT to ex5-nguyen. 2025-02-25 01:17:35 -08:00
Jan Nikl bc790c4d0c Minor fixup of ex5-hdg. 2025-02-25 01:04:57 -08:00
Jan Nikl 7911451c14 Added reduction of BRT to ex5-hdg. 2025-02-24 21:35:16 -08:00
Jan Nikl d66f8c529b Fixed reduction check. 2025-02-24 21:34:49 -08:00
Jan Nikl 33d69d55b7 Added broken RT to ex5-hdg. 2025-02-24 21:19:31 -08:00
Jan Nikl 03f3881211 Added broken RT to FiniteElementCollection::New. 2025-02-24 21:17:59 -08:00
Jan Nikl 3f4ebf776e Added support for vector elements to DGNormalTraceIntegrator. 2025-02-24 19:02:53 -08:00
Jan Nikl 51ee27f897 Renamed BrokenHdivFECollection to BrokenRT_FECollection. 2025-02-24 18:34:27 -08:00
Jan Nikl 2c8974154b Fixed VectorFEBoundaryFluxLFIntegrator. 2025-02-24 18:34:27 -08:00
Jan Nikl 9612d6259e Added VectorFEBoundaryFluxLFIntegrator for boundary faces. 2025-02-24 14:11:43 -08:00
Will Pazner 215884ab2e Add BrokenHdivFECollection 2025-02-24 13:23:11 -08:00
Jan Nikl 8b0c4f34cc Added parallel regression tests. 2025-02-12 17:41:06 -08:00
Jan Nikl 55a02d2e7f Added upwinded p2 DG regression test. 2025-02-12 17:40:08 -08:00
Jan Nikl fdfe80fd40 Added parallel ex5p-nguyen. 2025-02-12 15:26:14 -08:00
Jan Nikl c4e42b6e2b Parallelized DarcyOperator and Schur preconditioner. 2025-02-12 15:24:56 -08:00
Jan Nikl f1c0ec6591 Removed update of the recovered FEM solution vector causing undesired allocation. 2025-02-12 15:18:25 -08:00
Jan Nikl d686a629ed Fixes of parallelization. 2025-02-12 00:59:26 -08:00
Jan Nikl d56e84e647 Parallelization of potential reduction. 2025-02-12 00:55:49 -08:00
Jan Nikl 81aa998fde Cleaned construction of parallel matrices. 2025-02-11 20:46:06 -08:00
Jan Nikl ac6459d641 Fixed reduction setup in ex5p-hdg.cpp 2025-02-11 20:02:38 -08:00
Jan Nikl ac4c7a0cb2 Parallelization of Darcy flux reduction. 2025-02-11 02:18:08 -08:00
Jan Nikl afe8c2557c Optimized the face matrix access functions in hybridization to retrieve only one side. 2025-02-04 17:16:11 -08:00
Jan Nikl 1de376122c Changed face transformations to GetFaceElements(). 2025-02-04 17:16:11 -08:00
Jan Nikl 85fe37c27d Fixed name of ParallelEliminateTrialEssentialBC(). 2025-01-09 10:48:15 -08:00
Jan Nikl d8624712f8 Added assembly of ParDarcyForm. 2025-01-08 15:37:19 -08:00
Jan Nikl d8019f03ce WIP: Added support for trace face integrators in ParMixedBilinearForm. 2025-01-08 15:35:05 -08:00
Jan Nikl ec26f8a345 Added support for interior face integrators to ParMixedBilinearForm. 2025-01-08 10:32:21 -08:00
Jan Nikl 266261cd4b Fixed constness in some HyperParMatrix constructors. 2025-01-08 10:06:42 -08:00
Jan Nikl 8cdfd2d034 Added parallel version of ex5-hdg. 2025-01-07 16:11:32 -08:00
Jan Nikl ccd762bdec Initial commit of ParDarcyForm. 2025-01-07 16:11:32 -08:00
Jan Nikl b9c881c614 Added methods to Par(Mixed)BilinearForm for elimination of essential BCs. 2025-01-07 11:15:22 -08:00
Jan Nikl 52ceae595b Extended ParMixedBilinearForm methods for parallel assembly. 2025-01-06 11:31:54 -08:00
Jan Nikl 0d3d6fa9b9 Moved Darcy files to fem directory. 2025-01-03 17:00:32 -08:00
Jan Nikl dc06c832fd Added cmdline parameter for stabilization to ex5-hdg. 2025-01-02 14:20:39 -08:00
Jan Nikl 42e6cebc6a Added missing versions of rege tests using Newton with Schur. 2024-12-25 19:27:27 +01:00
Jan Nikl eb982eb9a5 Added rege tests combining non-linear diffusion with non-linear mass. 2024-12-25 18:21:10 +01:00
Jan Nikl 07738a067e Fixed non-linear gradient in DarcyForm. 2024-12-25 18:03:47 +01:00
Jan Nikl 3f6626cc12 Replaced nonlinear flag by a method in DarcyHybridization. 2024-12-25 16:16:56 +01:00
Jan Nikl 070c8634b6 Added rege tests for problem 2 with nonlinear diffusion. 2024-12-17 23:24:27 +01:00
Jan Nikl 48bbebe726 Added nonlinear diffusion upwinding. 2024-12-17 23:08:45 +01:00
Jan Nikl 199b3b1a8e Added hybridization of nonlinear diffusion. 2024-12-17 22:54:40 +01:00
Jan Nikl ebaeec4d1d Added HDG extension for MixedConductionNLFIntegrator. 2024-12-17 18:34:33 +01:00
Jan Nikl cb861e2398 Added SumBlockNLFIntegrator. 2024-12-17 18:29:16 +01:00
Jan Nikl 07d549d8fc WIP: HDG non-linear diffusion. 2024-12-15 00:08:31 -08:00
Jan Nikl 39ada69386 Moved sign convention to DarcyForm for non-linear diffusion. 2024-12-12 13:06:24 -08:00
Jan Nikl 879d5cd2a1 Improved the gradient construction for non-linear regime. 2024-12-12 13:06:24 -08:00
Jan Nikl 36460bc805 Added Schur preconditioner for non-linear diffusion. 2024-12-05 19:01:35 -08:00
Jan Nikl a0cc1aa1b6 Changed solver string format for local solver and simplified the testing logic. 2024-12-05 18:09:38 -08:00
Jan Nikl 9f13fc9347 Fixed non-linear diffusion LDG stabilization. 2024-12-05 17:13:51 -08:00
Jan Nikl 1e859b33f2 Moved setup of the solvers to methods. 2024-12-05 15:50:53 -08:00
Jan Nikl 0378b0b258 Moved Schur complement preconditioner to a class. 2024-12-05 09:57:43 -08:00
Jan Nikl bd0585fd56 Added LDG stabilization to non-linear diffusion and removed duplicite tests. 2024-12-04 10:47:08 -08:00
Jan Nikl 768a0f7002 Fixed tolerance in rege tests and increased precision of the local solver to converge in some tests. 2024-12-03 14:36:37 -08:00
Jan Nikl 1cd07b4da0 Added info about running rege test and other small changes. 2024-12-03 13:16:23 -08:00
Jan Nikl d06dd8b0e2 Changed MixedConductionNLFIntegrator to be compatible with indication of non-used vectors/matrices. 2024-12-02 16:21:37 -08:00
Jan Nikl 44ac98c570 Fixed gradient on interior faces in BlockNonlinearForm. 2024-11-27 16:32:45 -08:00
Jan Nikl 5cc45d170b Added rege tests for linear kappa. 2024-11-26 14:52:33 -08:00
Jan Nikl 55cfabb110 Changed manual formatting to f-string in rege tests. 2024-11-26 14:32:54 -08:00
Jan Nikl 2e121d7f8b Added rege output with the number of skipped tests. 2024-11-26 14:15:17 -08:00
Jan Nikl 43e1185b91 Added non-linear solvers for the mixed formulation, but keeping the linear solve for backward compatibility. 2024-11-26 13:38:18 -08:00
Jan Nikl 3ca81ddd83 Fixed hybridization with non-linear diffusion instead of flux mass. 2024-11-26 10:02:59 -08:00
Jan Nikl e8da6e1123 Minor refactor in DarcyHybridization. 2024-11-26 09:50:43 -08:00
Jan Nikl e92c3f4a5b Moved the selection of local operator to Finalize(). 2024-11-21 16:55:33 -08:00
Jan Nikl 0b3744ca60 Added linear kappa problem to Nguyen. 2024-11-20 17:37:43 -08:00
Jan Nikl 89876186e4 Changed manual init to brace init. 2024-11-20 14:20:06 -08:00
Jan Nikl a849d47b7e Added diagonal policies to hybridization and completition of the diagonal by ones. 2024-11-20 10:53:31 -08:00
Jan Nikl 825cdedca0 Cleaned ex5-hdg. 2024-11-20 10:12:51 -08:00
Jan Nikl a8a9aaa4ea Added reduction to ex5-hdg. 2024-11-13 10:36:13 -08:00
Jan Nikl 75cf4e1286 Added FunctionDiffusionFlux mixed flux function. 2024-11-12 16:34:21 -08:00
Jan Nikl ac8c031a6c Added case number to rege tests. 2024-11-12 15:38:27 -08:00
Jan Nikl 89c29c3917 Added backup of linear A with NL diff. 2024-11-12 15:32:35 -08:00
Jan Nikl 5d58b03ee7 Fixed sizes of the gradient matrices in mixed NLF integrator. 2024-11-12 14:53:18 -08:00
Jan Nikl 0c77eb4354 Added inverse conductivity to the non-linear conduction intergrator and mixed flux function. 2024-11-12 11:37:08 -08:00
Jan Nikl 7248303c8a Used diagonal construction based on misc-impro. 2024-11-05 15:24:36 -08:00
Jan Nikl 07c84e0c82 Merge branch 'najlkin/misc-impro' into darcy-hdg-dev 2024-11-05 15:22:09 -08:00
Jan Nikl d72ddcec9b Added const to the data array constructor of DenseMatrix. 2024-11-05 15:19:43 -08:00
Jan Nikl cdfbcee577 Added diagonal matrix construction from a vector. 2024-11-05 15:17:53 -08:00
Jan Nikl 2105280e03 Added support for anisotropic diffusion to the nonlinear diffusion framework. 2024-11-05 15:13:38 -08:00
Jan Nikl 9f7a2782b6 Init fix in hybridization. 2024-11-05 15:11:10 -08:00
Jan Nikl 6ba9503771 Softed the edge of the diffusion ring IC. 2024-11-05 11:36:22 -08:00
Jan Nikl 0a52e89ba7 Added the diffusion ring problem to ex5-aniso. 2024-11-05 10:38:28 -08:00
Jan Nikl c526a55e90 Merge branch 'master' into najlkin/own-data 2024-11-01 16:44:00 -07:00
Jan Nikl f0829c4c2e Added Sundials KINSolver. 2024-10-31 11:49:36 -07:00
Jan Nikl 9e274dcc81 Added linear reduction rege tests. 2024-10-30 10:14:37 -07:00
Jan Nikl 11db3051b8 Fixed flux reconstruction in flux reduction. 2024-10-30 10:00:35 -07:00
Jan Nikl 66af7061b5 Fixed assembly of bdr B for reduction. 2024-10-30 10:00:01 -07:00
Jan Nikl 38d2061ece Fixed greps in rege tests to prevent confusion. 2024-10-30 09:12:09 -07:00
Jan Nikl c9819d6bcf Fixed exception handling in rege tests. 2024-10-29 17:51:33 -07:00
Jan Nikl f3a940122a Added optional arguments for filenames of rege tests. 2024-10-29 17:47:21 -07:00
Jan Nikl a91e5659fb Added reduction of the face terms in B. 2024-10-29 17:04:40 -07:00
Jan Nikl 78a2bd7a47 Merged E and G in reduction to D_face. 2024-10-29 15:12:54 -07:00
Jan Nikl 18000439d2 Renamed D data removing f suffix as all dofs are always free. 2024-10-29 14:33:02 -07:00
Jan Nikl 23b52fdab1 Fixed reser in reduction. 2024-10-29 14:11:09 -07:00
Jan Nikl 70e6bbc712 Added assembly of LDG faces. 2024-10-29 11:02:33 -07:00
Jan Nikl 3a8cf1b6ba Improved description of ex5-aniso. 2024-10-25 16:36:08 -07:00
Jan Nikl 223bc2e32c Added output to files for GMRES interations. 2024-10-25 16:14:59 -07:00
Jan Nikl c6d768fe3e Added steps for GMRES iteration vis. 2024-10-25 16:13:19 -07:00
Jan Nikl 7a344ffafe Added visualization of GMRES iterations to ex5-aniso. 2024-10-25 16:12:14 -07:00
Jan Nikl 9f22970228 Make style 2024-10-20 21:06:11 -07:00
Jan Nikl 2796aa1ef8 Added random gaussian blobs in conductivity and circular velocity. 2024-10-20 19:13:10 -07:00
Jan Nikl 387c2212e6 Added MFEM logo problem to aniso. 2024-10-18 14:50:07 -07:00
Jan Nikl bafbcedc55 Added generalization of the anisotropic diffusion example with DarcyOperator. 2024-10-18 13:33:47 -07:00
Jan Nikl 6a1272abc3 Fixed curl sign. 2024-10-17 16:49:59 -07:00
Jan Nikl ef2f9d41ca Added time dependency to mag field. 2024-10-17 16:45:56 -07:00
Jan Nikl e655d90a8f Moved essential BCs handling to DarcyPotentialReduction. 2024-10-17 14:44:16 -07:00
Jan Nikl 5691a690d3 Fixed numbering of problems and their cmd-line list in plasma. 2024-10-17 12:54:24 -07:00
Jan Nikl 62609725fd Added flux reduction. Does not support face integration. 2024-10-17 12:10:33 -07:00
Jan Nikl 5e6e9c834d Abstracted reduction and separated potential reduction. 2024-10-17 11:48:16 -07:00
Jan Nikl 2167542063 Added reduction of potential. 2024-10-16 16:55:00 -07:00
Jan Nikl c7422ba2b7 Made allocation of block operator optional. 2024-10-16 12:58:02 -07:00
Jan Nikl 0c46ec1aa8 Added getter for flux mass nl integrator. 2024-10-16 11:44:43 -07:00
Jan Nikl 027f28cb4d Separated DarcyHybridization. 2024-10-16 10:55:08 -07:00
Jan Nikl 8e90b1f690 Merge fixup. 2024-10-16 10:28:43 -07:00
Jan Nikl fe055a256c Merge branch 'master' into najlkin/misc-impro 2024-10-16 10:22:54 -07:00
Jan Nikl 95f666ff21 Added masks to Get*FaceTrasnformations(). 2024-10-16 10:06:48 -07:00
Jan Nikl 2fe5e0d39c Added (non)steady linear dumping problem. 2024-10-16 09:57:27 -07:00
Jan Nikl 40b6bb36f3 Fixed hybridization setup in plasma. 2024-10-16 09:57:27 -07:00
Jan Nikl b48202fccc Moved projection of essential BC for time-dependent problems. 2024-10-16 09:57:27 -07:00
Jan Nikl a25e4ccd99 Guarded the mass term to be used only for steady state. 2024-10-16 09:57:27 -07:00
Jan Nikl b939d5cfcc Added frequency parameter. 2024-10-16 09:57:27 -07:00
Jan Nikl 8292b0daaf Renamed the problem from example 3 to steady Maxwell. 2024-10-16 09:57:27 -07:00
Jan Nikl a1aefa4904 Renamed (inverse) of kappa to sigma. 2024-10-16 09:57:27 -07:00
Jan Nikl 11f6e3db41 Fixed deallocation of ODE solver (and Darcy). 2024-10-16 09:57:27 -07:00
Jan Nikl 3df42aa8df Removed unused Mt0 form. 2024-10-16 09:57:27 -07:00
Jan Nikl c508ff1208 Added plasma example based on ex3-max with DarcyOperator. 2024-10-16 09:57:27 -07:00
Jan Nikl 551ebd7cc0 Added Burgers to file description of Nguyen. 2024-10-16 09:35:39 -07:00
Jan Nikl 50cbc10d67 Renamed the operator from Nguyen to DarcyOperator. 2024-10-16 09:35:39 -07:00
Jan Nikl 7191be7c73 Minor removal of garbagge from darcyform. 2024-10-16 09:35:39 -07:00
Jan Nikl 85fd2cee5e Separated the operator from Nguyen. 2024-10-16 09:35:39 -07:00
Jan Nikl c6cb36a1bf Added rege tests with Newton for non-lin diff. 2024-10-16 09:35:39 -07:00
Jan Nikl e5585bbd68 Added construction of gradient with non-linear diffusion. 2024-10-16 09:35:39 -07:00
Jan Nikl cb76c79072 Fixed the D inversion condition. 2024-10-16 09:35:39 -07:00
Jan Nikl 5a58fc0525 Added nonlin solver rege tests. 2024-10-16 09:35:39 -07:00
Jan Nikl ab47164b47 Refactored regression tests script a bit. 2024-10-16 09:35:39 -07:00
Jan Nikl 52ccee0c47 Fixed initialization of max char speed in HyperbolicFormIntegrator. 2024-10-16 09:35:39 -07:00
Jan Nikl c6ffccf198 Fixed assembly of HDG gradient. 2024-10-16 09:35:39 -07:00
Jan Nikl 87f553e7ea Fixed assembly of face grad for BilinearFormIntegrator. 2024-10-16 09:35:39 -07:00
Jan Nikl f0226c23e7 Minimized retrivals of constraint dofs. 2024-10-16 09:35:39 -07:00
Jan Nikl 7069c564df Added a switch for nonlinear solver. 2024-10-16 09:35:39 -07:00
Jan Nikl c7bbfff37c Initial implementation of gradient. Works for A only atm. 2024-10-16 09:35:39 -07:00
Jan Nikl e1f39d9923 Optimized face element retrival in face matrix getters. 2024-10-16 09:35:39 -07:00
Jan Nikl 5c992c95d4 Fixed rege tests to include nonlin diff cmd line option. 2024-10-16 09:35:39 -07:00
Jan Nikl 6e5b238dfc Renamed nonlin diff tests to indicate optional nonlin regime and added tests in linear regime. 2024-10-16 09:35:39 -07:00
Jan Nikl 72ccfa642b Fixed non-linear diffusion with linear advection. 2024-10-16 09:35:39 -07:00
Jan Nikl 0be0da7158 Clarified the modes in MultNL() by enum class. 2024-10-16 09:35:39 -07:00
Jan Nikl fc848e4ec9 A fix for Windows CI. 2024-10-16 09:35:39 -07:00
Jan Nikl e34329a50e Added tolerance for comparison of states. 2024-10-16 09:35:39 -07:00
Jan Nikl 1d5630f7be Added gradient to DarcyForm. 2024-10-16 09:35:39 -07:00
Jan Nikl ff74d6fbb7 Moved definitions of Linear diffusion flux to the cpp file. 2024-10-16 09:35:39 -07:00
Jan Nikl 0d41d63903 Moved the mixed conduction framework to MFEM and renamed the integrator to mixed to avoid confusion. 2024-10-16 09:35:39 -07:00
Jan Nikl 76c504971d Added nonlinear diffusion rege tests for problem 1. 2024-10-16 09:35:39 -07:00
Jan Nikl 3ae198b74a Removed duplicit conditions for local solvers. 2024-10-16 09:35:39 -07:00
Jan Nikl 429df4db5d Added hybridization with nonlinear diffusion. Only diagonal terms of the gradient matrix are considered. 2024-10-16 09:35:39 -07:00
Jan Nikl c1e209a826 Changed the gradient matrix of the local operator to block operator. Some regression tests have slightly different convergence. 2024-10-16 09:35:39 -07:00
Jan Nikl 8980609802 Fixed accidental addition to GetHeatFluxFun(). 2024-10-16 09:35:39 -07:00
Jan Nikl 96d4d7e0b9 Added getters for integrators in BlockNonlinearForm. 2024-10-16 09:35:39 -07:00
Jan Nikl 825fcf1365 Added a framework for nonlinear diffusion based on flux functions. 2024-10-16 09:35:39 -07:00
Jan Nikl 3b5266cc4c Added non-linear diffusion with only linear stabilization to Nguyen. 2024-10-16 09:35:39 -07:00
Jan Nikl 0facfbd362 Added block nonlinear form into DarcyForm. 2024-10-16 09:35:39 -07:00
Jan Nikl 8300d89e8b Added update of BlockNonlinearForm. 2024-10-16 09:35:39 -07:00
Jan Nikl 6c597ba3b1 Improved problem declaration to be safer. 2024-10-16 09:35:39 -07:00
Jan Nikl d1e8487b20 Reorganized linear diffusion. 2024-10-16 09:35:39 -07:00
Jan Nikl a05b2025ed Turned off total flux visualization for non-convective problems. 2024-10-16 09:35:39 -07:00
Jan Nikl 553470713f Improved problem list. 2024-10-16 09:35:39 -07:00
Jan Nikl 92464945a4 Fixed preconditioner in FEOperator. 2024-10-16 09:35:39 -07:00
Jan Nikl aca2ab5bd0 Added a rege test for empty D check. 2024-10-16 09:35:39 -07:00
Jan Nikl 88203fc415 Added non-linear diffusion regime to Nguyen. 2024-10-16 09:35:39 -07:00
Jan Nikl 6e179be968 Increased precision of the local solver. 2024-10-16 09:35:39 -07:00
Jan Nikl a25c55b6c1 Added detection of saddle-point problems to treat them as fully non-linear. 2024-10-16 09:35:39 -07:00
Jan Nikl 58ed6cd783 Added a check of empty D matrix during inversion. 2024-10-16 09:35:39 -07:00
Jan Nikl ae0fe1468a Added G and H linear multiplication. 2024-10-16 09:35:39 -07:00
Jan Nikl a9f967e444 Added flux local solver for non-linear hybridization with linear potentials.
TODO: zero potentials matrix.
2024-10-16 09:35:39 -07:00
Jan Nikl f7bab44bcb Renamed methods to clarify contribution of E. 2024-10-16 09:35:39 -07:00
Jan Nikl 424297f720 Added hybridization of non-linear flux mass. Only total local solver is implemented. 2024-10-16 09:35:39 -07:00
Jan Nikl 0e7391f10b Added nonlinear flux mass matrix. 2024-10-16 09:35:39 -07:00
Jan Nikl d44533cb75 Removed Engquist-Osher flux as it conincides with Godunov. 2024-10-16 09:35:39 -07:00
Jan Nikl b07c48287b Added regression tests with the non-linear schemes for problem 1 and 2. 2024-10-16 09:35:39 -07:00
Jan Nikl 57d9c8f70c Fixed detection of the preconditioner. 2024-10-16 09:35:39 -07:00
Jan Nikl cd333d81d6 Moved the file info to the top. 2024-10-16 09:35:39 -07:00
Jan Nikl 0d81fc9a07 Added gradient of the non-linear form to the preconditioner of non-hybridized system. 2024-10-16 09:35:39 -07:00
Jan Nikl 917effd9c9 Minor fix of dox in hyperbolic. 2024-10-16 09:35:39 -07:00
Jan Nikl 38edc1968f Fixed @see usage in hyperbolic. 2024-10-16 09:35:39 -07:00
Jan Nikl f173e48a5a Added names to the flux functions. 2024-10-16 09:35:39 -07:00
Jan Nikl 8afdf00499 Minor unification of dox in hyperbolic. 2024-10-16 09:35:39 -07:00
Jan Nikl a68e444b93 Added face gradient to HyperbolicFormIntegrator. 2024-10-16 09:35:39 -07:00
Jan Nikl 221fd7a44f Added gradient to Riemann solvers. 2024-10-16 09:35:39 -07:00
Jan Nikl e880f70172 Minor dox improvement in hyperbolic. 2024-10-16 09:35:39 -07:00
Jan Nikl b5f3e6f6a5 Improved Engquist-Osher Jacobian of average flux to use the limit form. 2024-10-16 09:35:39 -07:00
Jan Nikl 410b00b252 Improved Godunov Jacobian of average flux to use the limit form. 2024-10-16 09:35:39 -07:00
Jan Nikl 7c479cf739 Added a warning about non-linear regime without hybridization. 2024-10-16 09:35:39 -07:00
Jan Nikl 0f04109184 Added side=1 implementation of Jacobian to RusanovFlux. 2024-10-16 09:35:39 -07:00
Jan Nikl 712523c4b5 Added side=1 implementation of Jacobian to GodunovFlux. 2024-10-16 09:35:39 -07:00
Jan Nikl 516100c7fe Added side=1 implementation of Jacobian to EngquistOsherFlux. 2024-10-16 09:35:39 -07:00
Jan Nikl e3f135fa24 Minor dox improvement in hyperbolic. 2024-10-16 09:35:39 -07:00
Jan Nikl 7d8c5223ca Added Engquist-Osher flux to Nguyen and rege tests. 2024-10-16 09:35:39 -07:00
Jan Nikl 038057feb2 Added Engquist-Osher flux. 2024-10-16 09:35:39 -07:00
Jan Nikl 7f4f49c4ee Minor doc fix for GodunovFlux. 2024-10-16 09:35:39 -07:00
Jan Nikl f7d2cd3a20 Changed non-decresing to monotonous for Riemann solvers, which accounts for different signs. 2024-10-16 09:35:39 -07:00
Jan Nikl 0515b1f709 Make style. 2024-10-16 09:35:39 -07:00
Jan Nikl db4d643372 Added BCs for nonsteady Burgers. 2024-10-16 09:35:39 -07:00
Jan Nikl 4bb45451b8 Added regression tests for HDG-I and Rusanov for problem 2 with Neumann BC. 2024-10-16 09:35:39 -07:00
Jan Nikl 09d9124482 Added an option for Neumann BC in steady advection problems. 2024-10-16 09:35:39 -07:00
Jan Nikl 9bbd4deaab Decreased conductivity in rege tests of problem 6 for Rusanov and Godunov to get closer to HDG-I and II. 2024-10-16 09:35:39 -07:00
Jan Nikl df3f795d27 Changed relative tolerance of the local solver to be well under the global solver. 2024-10-16 09:35:39 -07:00
Jan Nikl bca11edf60 Added regression tests Godunov and Rusanov. 2024-10-16 09:35:39 -07:00
Jan Nikl d9ae730709 Added Godunov to Nguyen. 2024-10-16 09:35:39 -07:00
Jan Nikl e7acde6eab Unified fluxes to use indexing parenthesis. 2024-10-16 09:35:39 -07:00
Jan Nikl 144ea6d555 Added Godunov average and average Jacobian. 2024-10-16 09:35:39 -07:00
Jan Nikl 7c165830c3 Minor dox fixup in hyperbolic. 2024-10-16 09:35:39 -07:00
Jan Nikl 5a73323875 Added Godunov flux. 2024-10-16 09:35:39 -07:00
Jan Nikl c76bb12405 Minor fix of dox in hyperbolic. 2024-10-16 09:35:39 -07:00
Jan Nikl 6b8d6f0782 Separated Rusanov flux from HDGFlux. 2024-10-16 09:35:39 -07:00
Jan Nikl a00bc8d4c0 Added a note about monotonicity of F in Rusanov. 2024-10-16 09:35:39 -07:00
Jan Nikl 1e2fd6289a Minor dox fixes in hyperbolic.hpp. 2024-10-16 09:35:39 -07:00
Jan Nikl cb0c1de754 Fixed the rege test for non-linear regime of convection in problem 2. 2024-10-16 09:35:39 -07:00
Jan Nikl 3187d268af Replaced the generic formula for gradient by the specific for Rusanov. 2024-10-16 09:35:39 -07:00
Jan Nikl 23eb002d38 Fixed general formula for gradient. 2024-10-16 09:35:39 -07:00
Jan Nikl 10fb514110 Fixed collision of the auxiliary fluxes variables. 2024-10-16 09:35:39 -07:00
Jan Nikl 7f6dcd2cca Added Rusanov Jacobian. 2024-10-16 09:35:39 -07:00
Jan Nikl 8e85f3912d Changed general HDG flux to Rusanov. TODO: Jacobian. 2024-10-16 09:35:39 -07:00
Jan Nikl f4f493e9a5 Minor cleanup of RusanovFlux. 2024-10-16 09:35:39 -07:00
Jan Nikl 836a95ddce Added general HDG scheme. 2024-10-16 09:35:39 -07:00
Jan Nikl 45905d0424 Added average fluxes to advection and Burgers FluxFunctions. 2024-10-16 09:35:39 -07:00
Jan Nikl 8112c59815 Minor optimization of HDGFlux::Average(). 2024-10-16 09:35:39 -07:00
Jan Nikl 0dc5750dcd Merged HDG and normal hyperbolic form integrator. 2024-10-16 09:35:39 -07:00
Jan Nikl 5681f9012f Moved HDG schemes to new HDGFlux RiemannSolver class. 2024-10-16 09:35:39 -07:00
Jan Nikl 5da7bd9cd8 Added average gradient method to RiemannSolver. 2024-10-16 09:35:39 -07:00
Jan Nikl a6a4fdd47d Added a regression test for nonlinear regime of linear convection. 2024-10-16 09:35:39 -07:00
Jan Nikl f532714ed4 Added a switch for non-linear convection regime for linear convection problems. 2024-10-16 09:35:39 -07:00
Jan Nikl 70c99b09d9 Added a check for nonlin conv in linear regime. 2024-10-16 09:35:39 -07:00
Jan Nikl b73e093dbe Added normal fluxes to advection and Burgers FluxFunctions. 2024-10-16 09:35:39 -07:00
Jan Nikl 5579cec79e Added average numerical flux to RiemannSolver. 2024-10-16 09:35:39 -07:00
Jan Nikl 8f8e88c618 Added average (normal) flux methods to FluxFunction. 2024-10-16 09:35:39 -07:00
Jan Nikl 941b82ea4d Dimensions clarification in FluxFunction. 2024-10-16 09:35:39 -07:00
Jan Nikl f5461a3e0c Changed face/el information -> transformation. 2024-10-16 09:35:39 -07:00
Jan Nikl a3d694275d Minor fix of dox for RiemannSolver::Eval(). 2024-10-16 09:35:39 -07:00
Jan Nikl 1937a24660 Fixed source of time-dependent Burgers. 2024-10-16 09:35:39 -07:00
Jan Nikl 066fdd36b7 Added problem 6 (Burgers) rege tests. 2024-10-16 09:35:39 -07:00
Jan Nikl 5995b20ce0 Added HDG scheme param to rege tests. 2024-10-16 09:35:39 -07:00
Jan Nikl f40adf931d Added a default parameter to rege driver. 2024-10-16 09:35:39 -07:00
Jan Nikl 043e3a767a Removed some old comment from rege tests. 2024-10-16 09:35:39 -07:00
Jan Nikl c2430e9910 Added loading of options from the reference rege file. 2024-10-16 09:35:39 -07:00
Jan Nikl 1c6af292ab Cleaned loading of params in rege tests and added problem and order to be loaded from the reference. 2024-10-16 09:35:39 -07:00
Jan Nikl 22c3afb017 Added a switch for HDG scheme. 2024-10-16 09:35:39 -07:00
Jan Nikl 8e1273ac39 Added Jacobians to AdvectionFlux. 2024-10-16 09:35:39 -07:00
Jan Nikl 4ad825b8a3 Optimized Burgers taking into account it has num_equations=1. 2024-10-16 09:35:39 -07:00
Jan Nikl f8e3b1f308 Extended documentation in hyperbolic.hpp. 2024-10-16 09:35:39 -07:00
Jan Nikl 910007165a Fixed stabilization for HDG face gradient. 2024-10-16 09:35:39 -07:00
Jan Nikl 70de0bf9c7 Fixed the source term of Burgers. 2024-10-16 09:35:39 -07:00
Jan Nikl 4f6b76b427 Added JdotN to Burgers. 2024-10-16 09:35:39 -07:00
Jan Nikl 297e22749d Added thread-safe vectors to HDGHyperbolicFormIntegrator. 2024-10-16 09:35:39 -07:00
Jan Nikl 807e1e9e2f Moved the constructor of HyperbolivFormIntegrator to the top. 2024-10-16 09:35:39 -07:00
Jan Nikl df426700f5 Added Buergers convection to Nguyen example. Does not work atm. 2024-10-16 09:35:39 -07:00
Jan Nikl 50d72129e9 Added HDGHyperbolicFormIntegrator. 2024-10-16 09:35:39 -07:00
Jan Nikl fa7f137ced Fixed physical dshape dimension in HyperbolicFormIntegrator. 2024-10-16 09:35:39 -07:00
Jan Nikl 3ffc3537a7 Added gradient to HyperbolicFormIntegrator. 2024-10-16 09:35:39 -07:00
Jan Nikl b49e497595 Added optinal sign parameter to HyperbolicFormIntegrator. 2024-10-16 09:35:39 -07:00
Jan Nikl e2883f9298 Added Jacobian to BurgersFlux. 2024-10-16 09:35:39 -07:00
Jan Nikl 62e3b9e385 Added ComputeFluxJacobianDotN(). 2024-10-16 09:35:39 -07:00
Jan Nikl 09f8b4b8b7 Improved documentation in hyperboli.hpp. 2024-10-16 09:35:39 -07:00
Jan Nikl 280b3cd649 Changed allocation of flux in FluxFunction on-demand. 2024-10-16 09:35:39 -07:00
Jan Nikl bba6f0eedd Added definitions of Burgers problems. 2024-10-16 09:35:39 -07:00
Jan Nikl af034de5a3 Added summary to regression tests. 2024-10-16 09:35:39 -07:00
Jan Nikl 879b2ccc72 Added some problem 3 regression tests with hybridization and non-lin. 2024-10-16 09:35:39 -07:00
Jan Nikl 2e6e1e6bcd Added preinit of face transformation. 2024-10-16 09:35:39 -07:00
Jan Nikl 5cd6320298 Fixed element transformation in local NL operator. 2024-10-16 09:35:39 -07:00
Jan Nikl 6f77a21eb8 Fixed deletion of the arrays in hybridization. 2024-10-16 09:35:39 -07:00
Jan Nikl 902ceffdc0 Added initial guesses for the pressure in local solve. 2024-10-16 09:35:39 -07:00
Jan Nikl d0031d6b1d Moved LBB sovler to solvers.cpp. 2024-10-16 09:35:39 -07:00
Jan Nikl e6381b5425 Added an option for LBB for local solve. 2024-10-16 09:35:38 -07:00
Jan Nikl 5fd9bdf309 Added LBB solver. 2024-10-16 09:35:38 -07:00
Jan Nikl c77705d2a2 Fixed init of hybridization with non-linear mass. 2024-10-16 09:35:38 -07:00
Jan Nikl 2d756329ff Added non-linear tests. 2024-10-16 09:35:38 -07:00
Jan Nikl 1713915aef Added a switch for the non-linear regime. 2024-10-16 09:35:38 -07:00
Jan Nikl 8e0209c219 Added solver string. 2024-10-16 09:35:38 -07:00
Jan Nikl 0666b624bc Fixed reduction of RHS in non-linear case. 2024-10-16 09:35:38 -07:00
Jan Nikl d8684d1193 Minor optimization of the local face values retrieval. 2024-10-16 09:35:38 -07:00
Jan Nikl e3489b5a41 Moved local trace block vector out of MultInvNL(). 2024-10-16 09:35:38 -07:00
Jan Nikl a2f6211dac Added non-linear operator to Finalize(). 2024-10-16 09:35:38 -07:00
Jan Nikl 63ab23e518 Added mesurement of hybridization init. 2024-10-16 09:35:38 -07:00
Jan Nikl ba6dd1f26f Added boundary terms to the non-linear local solve. 2024-10-16 09:35:38 -07:00
Jan Nikl 7c308b826b Changed the default print level of the local solver. 2024-10-16 09:35:38 -07:00
Jan Nikl 5147d9c645 Added options for the local preconditioner. 2024-10-16 09:35:38 -07:00
Jan Nikl de5821ad21 Added Newton solver and gradient evaluation to the local operator. 2024-10-16 09:35:38 -07:00
Jan Nikl b5b29b17ae Improved local solver printout. 2024-10-16 09:35:38 -07:00
Jan Nikl 2e8d54e304 Added access to the options of the local solver. 2024-10-16 09:35:38 -07:00
Jan Nikl 634b990002 Replaced SLI by LBFGS. 2024-10-16 09:35:38 -07:00
Jan Nikl dd08eca204 Replaced won implementation of SLI by SLISolver. 2024-10-16 09:35:38 -07:00
Jan Nikl 411f33e796 Moved collection of the local traces before construction of the local operator. 2024-10-16 09:35:38 -07:00
Jan Nikl 0c1fa1a171 Added an initial implementation of a local operator. 2024-10-16 09:35:38 -07:00
Jan Nikl 4579d20701 Added default implementation of AssembleHDGFaceGrad to BilinearFormIntegrator. 2024-10-16 09:35:38 -07:00
Jan Nikl c1ebf0c73f Minor cleanup in BilinearFormInterator::AssembleHDGFaceVector(). 2024-10-16 09:35:38 -07:00
Jan Nikl 1c10ce19cc Fixed implementation of HDG face matrix assembly in BiliniearFormIntegrator. 2024-10-16 09:35:38 -07:00
Jan Nikl 928dbcd282 Added gradient assembly method to NonlinearFormIntegrator. 2024-10-16 09:35:38 -07:00
Jan Nikl 8e4dda871d Fixed SumNLFIntegrator. 2024-10-16 09:35:38 -07:00
Jan Nikl 1cb05021bb Fixed face integration. 2024-10-16 09:35:38 -07:00
Jan Nikl dc5672ce85 Partially fixed constraints to skip boundaries. 2024-10-16 09:35:38 -07:00
Jan Nikl 26fd1b6893 Fixed definition of HDG face types. 2024-10-16 09:35:38 -07:00
Jan Nikl 314b8de8e9 Fixed default implementation of AssembleHDGFaceVector for boundaries. 2024-10-16 09:35:38 -07:00
Jan Nikl 3c0031d18e Minor fixes. 2024-10-16 09:35:38 -07:00
Jan Nikl 1894adfd75 Added default implementation of AssembleHDGFaceVector for bliniear integrators. 2024-10-16 09:35:38 -07:00
Jan Nikl 17156522c4 Added inversion of A to get U directly. 2024-10-16 09:35:38 -07:00
Jan Nikl 34f89c98a9 Added initial version of non-linear hybridization with only fixed point iterations. 2024-10-16 09:35:38 -07:00
Jan Nikl 5d63034260 Minor renaming in DarcyForm. 2024-10-16 09:35:38 -07:00
Jan Nikl 82ef079672 Added HDG face vector integration method. 2024-10-16 09:35:38 -07:00
Jan Nikl 0f39683d59 Added overrides to SumNLFIntegrator. 2024-10-16 09:35:38 -07:00
Jan Nikl e42e23519f Removed the mixed methods from SumNLFIntegrator. 2024-10-16 09:35:38 -07:00
Jan Nikl 68c3e073df Revert "Added support of mixed elements to the non-linear form integrator."
This reverts commit 736f0aca8a.
2024-10-16 09:35:38 -07:00
Jan Nikl 7a4e97ff36 Added sum integrator for non-linear forms. 2024-10-16 09:35:38 -07:00
Jan Nikl 7acc0eedf8 Fixed SumIntegrator for MF. 2024-10-16 09:35:38 -07:00
Jan Nikl 6d1b698008 Added trace face integration to NonlinearFormIntegrator. 2024-10-16 09:35:38 -07:00
Jan Nikl 3b48f04db3 Added access to bdr markers in NonlinearForm. 2024-10-16 09:35:38 -07:00
Jan Nikl 2fa4a3837b Added non-linear potential mass form. 2024-10-16 09:35:38 -07:00
Jan Nikl 9cfc5c7700 Added time-resolved names of MFEM files. 2024-10-16 09:35:38 -07:00
Jan Nikl 74bf772a1f Used non-symmetrized Darcy in ex5. 2024-10-16 09:35:38 -07:00
Jan Nikl 1137c71b72 Changed bsym flag to switch between already symmetrized and to-be-symmetrized inputs. 2024-10-16 09:35:38 -07:00
Jan Nikl bb3f1803d8 Removed unused hdg flag. 2024-10-16 09:35:38 -07:00
Jan Nikl e9f4303036 Added p3 basline with umfpack. 2024-10-16 09:35:38 -07:00
migliore f315cbddaf Adds a different kappa to reference case 2024-10-16 09:35:38 -07:00
migliore 22cc8d92d0 Adds kappa into command line to regression script 2024-10-16 09:35:38 -07:00
migliore d1b5dfbf17 Adds kappa into command line 2024-10-16 09:35:38 -07:00
migliore c1bd5386a3 Changes naming convention of the reference cases 2024-10-16 09:35:38 -07:00
Jan Nikl 1c9dcafd8c Fixed constructor parameters. 2024-10-16 09:35:38 -07:00
Jan Nikl 1043da2ee7 Fixed Dirichlet BC. Centered scheme has a workaround. 2024-10-16 09:35:38 -07:00
Jan Nikl c6d291c738 Made the regression script executable. 2024-10-16 09:35:38 -07:00
Jan Nikl 6f744a11d1 Added 1310 UMFPACK baseline. 2024-10-16 09:35:38 -07:00
migliore 993ee81785 Adds more cases to regression testing 2024-10-16 09:35:38 -07:00
Jan Nikl 5cbe464434 Removed the unnecessary parameter of the trace space. 2024-10-16 09:35:38 -07:00
Jan Nikl 33de8bc9fe Added trace to the solution vector. 2024-10-16 09:35:38 -07:00
Jan Nikl 61e2e495d6 Reordered main a bit. 2024-10-16 09:35:38 -07:00
migliore eb12b00f83 Minor variable fix 2024-10-16 09:35:38 -07:00
migliore c0fbd204c9 Renaming variables 2024-10-16 09:35:38 -07:00
migliore 74586be9c6 Adds command line to skipped cases 2024-10-16 09:35:38 -07:00
migliore aadb028758 Cleaning up script 2024-10-16 09:35:38 -07:00
migliore 6c8d61e898 Minor style changes to output 2024-10-16 09:35:38 -07:00
Jan Nikl 2e6ffd9c8e Added UMFPACK regression baseline. 2024-10-16 09:35:38 -07:00
Jan Nikl 9eed8ab2e2 Added access to the constraint FE space of Hybridization. 2024-10-16 09:35:38 -07:00
Jan Nikl e34389c3d0 Added diffusion stabilization to Neumann boundaries. 2024-10-16 09:35:38 -07:00
Jan Nikl 1111036fab Added actual conversion of the bdr potential integrators to constraints. 2024-10-16 09:35:38 -07:00
Jan Nikl c5ee4664f3 Added separate options for external bdr constraint integrators. 2024-10-16 09:35:38 -07:00
migliore 979ff1a1da Checks preconditioner before comparison 2024-10-16 09:35:38 -07:00
migliore 4d27bdc786 Minor style change to regression testing output 2024-10-16 09:35:38 -07:00
migliore 08fd2205e1 Adds output if test fails 2024-10-16 09:35:38 -07:00
migliore ed98ab68e3 Removes unused variable 2024-10-16 09:35:38 -07:00
migliore d411841736 Updates regression testing script 2024-10-16 09:35:38 -07:00
Jan Nikl 20a62e349c Improved the headers of examples. 2024-10-16 09:35:38 -07:00
Jan Nikl 8905a4032d Tidied the problem 2 code a bit. 2024-10-16 09:35:38 -07:00
Jan Nikl 42641d78b2 Fixed VectorBoundaryFluxIntegrator for 1D. 2024-10-16 09:35:38 -07:00
Jan Nikl cb190ff6ee Added support for 1D and 3D to DarcyHybridization. 2024-10-16 09:35:38 -07:00
migliore 2d405e2266 Adds newest version of regression testing. 2024-10-16 09:35:38 -07:00
migliore 4020fad0ce Removes regression tetsing python script 2024-10-16 09:35:38 -07:00
migliore 5cc1aea6a0 Removes regression testing option 2024-10-16 09:35:38 -07:00
Jan Nikl 80d837b3fa Added preconditioner info to the output. 2024-10-16 09:35:38 -07:00
migliore 785f6c6672 Updates regression testing script to check for exact L2 norm solutions 2024-10-16 09:35:38 -07:00
migliore 326ee12081 Adds regression testing script. 2024-10-16 09:35:38 -07:00
migliore 21c94c153d Adds option for output needed for regression testing 2024-10-16 09:35:38 -07:00
migliore c0132a23f2 Cleans up code style of cases 1 and 2. 2024-10-16 09:35:38 -07:00
migliore be7caa4645 Adds the steady state advection + diffusion test case. 2024-10-16 09:35:38 -07:00
Jan Nikl 4cbf10e34b Fixed boundary constraint integration. 2024-10-16 09:35:38 -07:00
Jan Nikl e136f1caa6 Added enum for problem names. 2024-10-16 09:35:38 -07:00
Jan Nikl 64b49bd466 Minor fixup of the Kovasznay timing. 2024-10-16 09:35:38 -07:00
Jan Nikl 0e5d36a452 Improved the printouts for time-dependent problems. 2024-10-16 09:35:38 -07:00
Jan Nikl 9f8acdc775 Added Kovasznay flow problem. 2024-10-16 09:35:38 -07:00
Jan Nikl c1d71e9c2b Fixed total flux coeff for non-convective cases. 2024-10-16 09:35:38 -07:00
Jan Nikl 8b3ae9507c Fixed steady problems. 2024-10-16 09:35:38 -07:00
Jan Nikl dc2a2a27a4 Added an option for the final time. 2024-10-16 09:35:38 -07:00
Jan Nikl 9e68dfea66 Added options for size of the mesh. 2024-10-16 09:35:38 -07:00
Jan Nikl 7881d22175 Added assembly extensions support to FormLinearSystem. Must be tested. 2024-10-16 09:35:38 -07:00
Jan Nikl 71ea5326c9 Added hybridization to Maxwell. Does not work properly atm. 2024-10-16 09:35:38 -07:00
Jan Nikl eab89761fb Added TangentTraceJumpIntegrator. 2024-10-16 09:35:38 -07:00
Jan Nikl 64fe802877 Added Maxwell example. 2024-10-16 09:35:38 -07:00
Jan Nikl 610e97748b Fixed time of the coefficients. 2024-10-16 09:35:38 -07:00
Jan Nikl b9d6331c7b Added various time solvers. 2024-10-16 09:35:38 -07:00
Jan Nikl a84e9e5d3c Added caching of the assembly, preconditioner and solver. 2024-10-16 09:35:38 -07:00
Jan Nikl 3214fc461c Fixed DarcyHybridization::Reset(). 2024-10-16 09:35:38 -07:00
Jan Nikl 4be7c2c6e6 Added operator for time evolution. Hybridization is broken atm. 2024-10-16 09:35:38 -07:00
Jan Nikl 4358762746 Commented out checks of forms in const getters. 2024-10-16 09:35:38 -07:00
Jan Nikl a80127daf2 Added update method to DarcyForm. 2024-10-16 09:35:38 -07:00
Jan Nikl 492ed83d6f Fixed empty bdr integ marker case. 2024-10-16 09:35:38 -07:00
Jan Nikl f992f3b3fb Added problem 4. Note time is normalized. 2024-10-16 09:35:38 -07:00
Jan Nikl 4c84b96248 Turned off iteration printouts when in time-evolving mode. 2024-10-16 09:35:38 -07:00
Jan Nikl 3d8ca23bcb Reorganized Nguyen to init solver once. 2024-10-16 09:35:38 -07:00
Jan Nikl bef3bcecb1 Fixed time to Backward Euler. 2024-10-16 09:35:38 -07:00
Jan Nikl e5a64d2047 Added time stepping. 2024-10-16 09:35:38 -07:00
Jan Nikl 45f6e19335 Added switches for output. 2024-10-16 09:35:38 -07:00
Jan Nikl b68e9ba4a4 Renamed t and q to t_h and q_h. 2024-10-16 09:35:38 -07:00
Jan Nikl 24a65da600 Cleaned hybridized rhs a bit. 2024-10-16 09:35:38 -07:00
Jan Nikl 302978dfc6 Changed the coefficients to time-dependent. 2024-10-16 09:35:38 -07:00
Jan Nikl aaf2ca6ac5 Fixed HDGConvectionUpwindedIntegrator at boundaries. 2024-10-16 09:35:38 -07:00
Jan Nikl 20cf8e5860 Added Neumann BC for the hybridized system (works for the centered scheme now). 2024-10-16 09:35:38 -07:00
Jan Nikl 5323a0f1f6 Minor clarification of the behavior of HDGConvectionCenteredIntegrator at boundaries. 2024-10-16 09:35:38 -07:00
Jan Nikl ce10c582c2 Fixed natural BC in ex5-hdg. 2024-10-16 09:35:38 -07:00
Jan Nikl 4fc4a8ed6f Added matrix tolerance based on fp precision. 2024-10-16 09:35:38 -07:00
Jan Nikl b98fefc2be Added short circruiting in bdr assembly. 2024-10-16 09:35:38 -07:00
Jan Nikl 599c1dc557 Minor change boundary assembly. 2024-10-16 09:35:38 -07:00
Jan Nikl c06096624b Removed fix of short-circruiting. 2024-10-16 09:35:38 -07:00
Jan Nikl 65d8164f16 Revert "Fixed short circruiting."
This reverts commit 5b403dad2166c2e6cb71ecec867f62e38eb904e8.
2024-10-16 09:35:38 -07:00
Jan Nikl 3f5b7de256 Fixed short circruiting. 2024-10-16 09:35:38 -07:00
Jan Nikl 07ee0cfdef Fixed DarcyHybridization after the merge. 2024-10-16 09:35:38 -07:00
Jan Nikl b690a174d3 Renamed boundary constraint integrators. 2024-10-16 09:35:38 -07:00
Jan Nikl 614fdb2e96 Minor renaming in DarcyHybridization. 2024-10-16 09:35:38 -07:00
Jan Nikl 88dc653a98 Added proper check of the boundary attributes. 2024-10-16 09:35:38 -07:00
Jan Nikl baa7f198ee Added proper integration of the bdr constraints. 2024-10-16 09:35:38 -07:00
Jan Nikl 6b58db31a1 Added access to boundary constraint integrators in DarcyHybridization. 2024-10-16 09:35:38 -07:00
Jan Nikl 0719f3e17f Minor improvement of the visualization. 2024-10-16 09:35:38 -07:00
Jan Nikl d63e038740 Fixed heat flux analytic solution at the origin. 2024-10-16 09:35:38 -07:00
Jan Nikl f03d6d2228 Enabled Dirichlet for hybridization. 2024-10-16 09:35:38 -07:00
Jan Nikl a00786ada3 Added integration of bdr constraints loaded from potential mass matrix. 2024-10-16 09:35:38 -07:00
Jan Nikl 8c425778e1 Added boundary constraint integrators. 2024-10-16 09:35:38 -07:00
Jan Nikl 3186d5ce18 Added boundary E and G. 2024-10-16 09:35:38 -07:00
Jan Nikl a5dc93a483 Concretized boundary flux constraints in hybridization. 2024-10-16 09:35:38 -07:00
Jan Nikl 1ea901e565 Moved velocity among analytic functions. 2024-10-16 09:35:38 -07:00
Jan Nikl a05c307d4a Fixed Nuemann BC for RTDG. 2024-10-16 09:35:38 -07:00
Jan Nikl 80178d397c Fixed Neumann BC for the centered scheme. 2024-10-16 09:35:38 -07:00
Jan Nikl 6eecfe7c87 Added essential Neumann BC for RTDG. 2024-10-16 09:35:38 -07:00
Jan Nikl 3ed804c8c0 Distinguished heat flux and total flux. 2024-10-16 09:35:38 -07:00
Jan Nikl ddcf36c394 Shifted problem 3 to the origin. 2024-10-16 09:35:38 -07:00
Jan Nikl b95dd89ad7 Added BCs to the third test case. 2024-10-16 09:35:38 -07:00
Jan Nikl 8e643bf56e Added face implementation of VectorBoundaryFluxLFIntegrator. 2024-10-16 09:35:38 -07:00
Jan Nikl 99da608744 Fixed names of spaces in printout. 2024-10-16 09:35:38 -07:00
Jan Nikl 4dc26f7f4c Added example 5 with HDG. 2024-10-16 09:35:38 -07:00
Jan Nikl d8769b81f2 Added automatic constraint boundary constraint integrators adding to hybridization. 2024-10-16 09:35:38 -07:00
Jan Nikl 1561bb5499 Added GetHybridization() to DarcyForm. 2024-10-16 09:35:38 -07:00
Jan Nikl 72db8d21e3 Generalized the fix of DGNormalTraceIntegrator for upwinding. 2024-10-16 09:35:38 -07:00
Jan Nikl ec6d2774fc Fixed boundary behaviour of DGNormalTraceIntegrator. 2024-10-16 09:35:38 -07:00
Jan Nikl 32eb27a30f Protected E and G constraints at boundaries. 2024-10-16 09:35:38 -07:00
Jan Nikl 9f2dfa4176 Added boundary constraint integrator support. 2024-10-16 09:35:38 -07:00
Jan Nikl 5b235eaea2 Improved documentation of DGNormalTraceIntegrator. 2024-10-16 09:32:09 -07:00
Jan Nikl 55e575fd6e Minor change in DGNormalTraceIntegrator. 2024-10-16 09:32:09 -07:00
Jan Nikl ba5026e4aa Fixed documentation of HDGDiffusionIntegrator. 2024-10-16 09:32:09 -07:00
Jan Nikl 26fccc3f6b Improved documentation of HDGConvection*Integrator. 2024-10-16 09:32:09 -07:00
Jan Nikl 102d6bb36d Fixed HDGConvectionCenteredIntegrator dependency on the parameter. 2024-10-16 09:32:09 -07:00
Jan Nikl bf8b16c9bf Improved HDGDiffusionIntegrator documentation. 2024-10-16 09:32:09 -07:00
Jan Nikl 82c6f3b480 Added BoundaryNormalFlowIntegrator. 2024-10-16 09:32:09 -07:00
Jan Nikl f3ddf79811 Updated ex5-heat for HDGDiffusionIntegrator. 2024-10-16 09:32:09 -07:00
Jan Nikl 88e9c13642 Fixed HDGDiffusionIntegrator to give more consistent results. 2024-10-16 09:32:09 -07:00
Jan Nikl e9e76d2e1d Unified HDG diffusion integrators. 2024-10-16 09:32:09 -07:00
Jan Nikl 03d27f9881 Added HDG upwinded diffusion to Nguyen. 2024-10-16 09:32:09 -07:00
Jan Nikl da16a8d4fe Added HDGDiffusionUpwindedIntegrator. 2024-10-16 09:32:09 -07:00
Jan Nikl 936cc137b0 Changed the scheme switch to a global one for both, diffusion and advection. 2024-10-16 09:32:09 -07:00
Jan Nikl 7af3cf7e1d Fixed upwinded LDG advection. 2024-10-16 09:32:09 -07:00
Jan Nikl fd6a863584 Fixed HDGConvectionCenteredIntegrator to use centered trace. 2024-10-16 09:32:09 -07:00
Jan Nikl 81caf2162c Generalized HDGConvection*Integrator to arbitrary beta. 2024-10-16 09:32:09 -07:00
Jan Nikl dedaadcc34 Minor styling. 2024-10-16 09:32:09 -07:00
Jan Nikl a9ff9de23c Added support for integral elements to the diff stab. 2024-10-16 09:32:09 -07:00
Jan Nikl cd7ad892a7 Fixed Schur complement construction. 2024-10-16 09:32:09 -07:00
Jan Nikl 8c737688e2 Added a switch for upwinded advection stabilization. 2024-10-16 09:32:09 -07:00
Jan Nikl 3ab7fc6de8 Added support for integral elements. 2024-10-16 09:32:09 -07:00
Jan Nikl e2b68ace6e Added HDGConvectionUpwindedIntegrator. 2024-10-16 09:32:09 -07:00
Jan Nikl 88f85225de Generalized HDGConvectionCenteredIntegrator to take arbitrary alpha. 2024-10-16 09:32:09 -07:00
Jan Nikl 24bcb0533b Changed DarcyForm to keep the face (HDG) integrators. 2024-10-16 09:32:09 -07:00
Jan Nikl 933e1314d9 Fixed boundary integration of HDG. 2024-10-16 09:32:09 -07:00
Jan Nikl 268b6653f4 Added support for multiple stabilization terms. 2024-10-16 09:32:09 -07:00
Jan Nikl 91b3b63d7e Added HDG assembly to SumIntegrator. 2024-10-16 09:32:09 -07:00
Jan Nikl 8379bcaf53 Replaced multiple element matrices by a single one in AssembleHDGFaceMatrix(). 2024-10-16 09:32:09 -07:00
Jan Nikl a98c1e55cd Fixed centered diffusion term. 2024-10-16 09:32:09 -07:00
Jan Nikl 47b89a2faf Fixed the centered convection integrator. 2024-10-16 09:32:09 -07:00
migliore 157ae167d5 Removes convective term in example 1, adds example 2 (placeholder), fixes bug in example 1 qfunction. 2024-10-16 09:32:09 -07:00
Jan Nikl db84a2cd4c Minor styling in DarcyForm. 2024-10-16 09:32:09 -07:00
migliore 76ed139352 Fixes make style 2024-10-16 09:32:09 -07:00
Jan Nikl 4993e078e2 Fixed test case 3 ffun. 2024-10-16 09:32:09 -07:00
Jan Nikl fe90ccf335 Added a switch for analytic solution. 2024-10-16 09:32:09 -07:00
Jan Nikl c48f48ad2a Added GLVis visualization of the analytic solution. 2024-10-16 09:32:09 -07:00
Jan Nikl 1616950165 Renamed the analytic solution. 2024-10-16 09:32:09 -07:00
Jan Nikl ee77eeff65 Added HDGConvectionCenteredIntegrator.
Does not work atm.
2024-10-16 09:32:09 -07:00
migliore d0cdf82a27 Switching g to f and f to g to follow Nguyen notation. 2024-10-16 09:32:09 -07:00
migliore 249361f246 Adds steady-state diffusion test case from example 5.1 of Nguyen paper 2024-10-16 09:32:09 -07:00
migliore b1f96a6d24 Adds ParaView format file for the analytic solutions 2024-10-16 09:32:09 -07:00
migliore a8018fe115 Adds analytical solutions to be written out in the Visit files. 2024-10-16 09:32:09 -07:00
Jan Nikl 2ee0130df8 Changed W space to a closed basis for sharper IC projection. 2024-10-16 09:32:09 -07:00
Jan Nikl cf59ba676e Added convection terms. 2024-10-16 09:32:09 -07:00
Jan Nikl 1af11887a4 Added velocity parameter. 2024-10-16 09:32:09 -07:00
Jan Nikl 807479755b Added velocity coefficient and its visualization. 2024-10-16 09:32:09 -07:00
Jan Nikl 04e5523d78 Added the definition problem 3. 2024-10-16 09:32:09 -07:00
Jan Nikl 031a81ec54 Copied ex5-heat to -nguyen for the paper tests. 2024-10-16 09:32:09 -07:00
Jan Nikl 17f5047eba Added a parameter for the diffusion stabilization term. 2024-10-16 09:32:09 -07:00
Jan Nikl 56c4084ee1 Fixed (partially) diffusion stabilization integrator. 2024-10-16 09:32:09 -07:00
Jan Nikl 913e1392e9 Fixed storing of E and G matrices. 2024-10-16 09:32:09 -07:00
Jan Nikl 1c82f7b25c Removed the sign change from Ct in block assembly. 2024-10-16 09:32:09 -07:00
Jan Nikl 5e99d4a8a2 Fixed the sign problem of element vdofs. 2024-10-16 09:32:09 -07:00
Jan Nikl be137710e7 Fixed GetCtSubMatrix(). 2024-10-16 09:32:09 -07:00
Jan Nikl 71d0d29bc4 Renamed k coefficient in ex5. 2024-10-16 09:32:09 -07:00
Jan Nikl f66e07e44a Renamed collections in ex5. 2024-10-16 09:32:09 -07:00
Jan Nikl b423597ebf Fixed NormalTraceJumpIntegrator for scalar elements. 2024-10-16 09:32:09 -07:00
Jan Nikl 138fbacf32 Added reduction and recovery. Must be tested. 2024-10-16 09:32:09 -07:00
Jan Nikl 0480a167b4 Simplified MultInv(). 2024-10-16 09:32:09 -07:00
Jan Nikl ea2c366385 Added Reset() implementation. 2024-10-16 09:32:09 -07:00
Jan Nikl edca9da426 Added assembly of G and E to H. 2024-10-16 09:32:09 -07:00
Jan Nikl 2a5c7187c4 Changed G to Gt for easier access. 2024-10-16 09:32:09 -07:00
Jan Nikl ad1451063a Added assembly of H matrix directly. 2024-10-16 09:32:08 -07:00
Jan Nikl 8222aac07a Added assembly of E and G constraints. 2024-10-16 09:32:08 -07:00
Jan Nikl 1f848ed7f1 Added other matrices to the assembly of HDG face matrices. 2024-10-16 09:32:08 -07:00
Jan Nikl 02778e13d5 Changed double to real_t in darcy form. 2024-10-16 09:32:08 -07:00
Jan Nikl 21eb909139 Added HDG face integration method ot HDGDiffusionCenteredIntegrator. 2024-10-16 09:32:08 -07:00
Jan Nikl ef4bad27f1 Implemented potential face assembly with hybridization.
Must be tested. No constraint initegration.
2024-10-16 09:32:08 -07:00
Jan Nikl a59fd7350f Made assemblies of D and B additive. 2024-10-16 09:32:08 -07:00
Jan Nikl 4c7f4be9b8 Fixed potential mass assmebly. 2024-10-16 09:32:08 -07:00
Jan Nikl c3b5c32518 Added temperature centered stabilization term. 2024-10-16 09:00:19 -07:00
Jan Nikl 9a1c148426 Added DG implementation of NormalTraceJumpIntegrator. 2024-10-16 08:57:30 -07:00
Jan Nikl 71793b57ba Removed HDG check in ConstructC(). 2024-10-16 08:57:30 -07:00
Jan Nikl 9844d04026 Changed double to real_t in ex5-heat. 2024-10-16 08:57:30 -07:00
Jan Nikl a2d4d43458 Added an option for the LDG formulation in ex5-heat. 2024-10-16 08:57:30 -07:00
Jan Nikl 7a8faf2829 Added constructor without velocity dependency for averaged trace in DGNormalTraceIntegrator. 2024-10-16 08:57:30 -07:00
Jan Nikl 25fcf09fb4 Added DGNormalTraceIntegrator. 2024-10-16 08:57:30 -07:00
Jan Nikl 045af21ffe Copyright fix. 2024-10-16 08:57:30 -07:00
Jan Nikl 1d339362c5 Cleaned ex5-heat a bit. 2024-10-16 08:57:30 -07:00
Jan Nikl b3cd2f421f Extended the heat example to non-steady asymptotic problem, i.e., definite problem.
The default zero heat capacity turns it off and returns the problem to the indefinite formulation.
2024-10-16 08:57:30 -07:00
Jan Nikl 3b837734c4 Fixed definite darcy. 2024-10-16 08:57:30 -07:00
Jan Nikl 22f8ecaf54 Simplified the filter in makefile. 2024-10-16 08:57:30 -07:00
Jan Nikl b290c096a0 Renaming of the forms and spaces. 2024-10-16 08:57:30 -07:00
Jan Nikl 69b5306378 Fixed non-block assembly. 2024-10-16 08:57:30 -07:00
Jan Nikl 7599dac401 Changed element constraint assmebly to face based. Non-block assembly does not work. 2024-10-16 08:57:30 -07:00
Jan Nikl b2abf45d65 Minor renaming of GetCt. 2024-10-16 08:57:30 -07:00
Jan Nikl b73a7efeb9 Added masks to Get*FaceTrasnformations(). 2024-10-16 08:57:30 -07:00
Jan Nikl db2c0032f6 Added an HDG check. 2024-10-16 08:57:30 -07:00
Jan Nikl bdd256d4ab Added the default config for GLVis. 2024-10-16 08:57:30 -07:00
Jan Nikl 13217605bf Minor renaming for the heat example. 2024-10-16 08:57:30 -07:00
Jan Nikl 57aa1f6ffe Added automatic mesh refinement for loaded meshes. 2024-10-16 08:57:30 -07:00
Jan Nikl 86ee15baaf Fixed assembly level init. 2024-10-16 08:57:30 -07:00
Jan Nikl 8cac2ce307 Make style. 2024-10-16 08:57:30 -07:00
Jan Nikl 197bacbcda Added parameters for setting anisotropy. 2024-10-16 08:57:30 -07:00
Jan Nikl 329b963591 Added anisotropic heat diffusion WIP. 2024-10-16 08:57:30 -07:00
Jan Nikl 5c4157607e Added assembly time measurement. 2024-10-16 08:57:30 -07:00
Jan Nikl 7e553cec50 Fixed offset in Ct assembly. 2024-10-16 08:57:30 -07:00
Jan Nikl 15b99540b7 Cleaned the Ct assembly a bit. 2024-10-16 08:57:30 -07:00
Jan Nikl cbf2059c22 Added marking of the boundary dofs. 2024-10-16 08:57:30 -07:00
Jan Nikl edea4b709c Improved the block assembly of Ct to use free dofs. 2024-10-16 08:57:30 -07:00
Jan Nikl 3e662efe4c Improved the sign storage of Ct. 2024-10-16 08:57:30 -07:00
Jan Nikl 6e95293523 Added basic implementation of block Ct assembly. 2024-10-16 08:57:30 -07:00
Jan Nikl 924105a6a9 Fixed dof counting in GetCt(). 2024-10-16 08:57:30 -07:00
Jan Nikl 04c071f630 Fixed the sign problem for the symmetrized problem, hopefully. 2024-10-16 08:57:30 -07:00
Jan Nikl f3f5668591 Fixed elimination of essential BCs. 2024-10-16 08:57:30 -07:00
Jan Nikl a8aebdbd7c Added elimination of BCs in hybridization avoiding full assembly of the form. 2024-10-16 08:57:30 -07:00
Jan Nikl 0fbf79aa19 Renamed the switch for block CT assembly. 2024-10-16 08:57:30 -07:00
Jan Nikl 3f3123e7a1 Fixed the sign problem of pressure RHS. Added a switch for symmetrization. 2024-10-16 08:57:30 -07:00
Jan Nikl de73d6fc14 Added recovery and reduction of full RHS. Must be tested. 2024-10-16 08:57:30 -07:00
Jan Nikl 46ed68f1b6 Added recovery of pressure. 2024-10-16 08:57:30 -07:00
Jan Nikl 650e2cf9cb Fixed the sign problem. 2024-10-16 08:57:30 -07:00
Jan Nikl 11eb8f0090 Added support for essential BCs. 2024-10-16 08:57:30 -07:00
Jan Nikl e2940aad55 Added second version of hybridization with full Ct matrix multiplication. 2024-10-16 08:57:30 -07:00
Jan Nikl 4d415f66e4 Fixed Ct extraction. 2024-10-16 08:57:30 -07:00
Jan Nikl a0bc56ed71 Fix of MultInv(). 2024-10-16 08:57:30 -07:00
Jan Nikl 9c0a14e8e0 Fixed return to the full solution. 2024-10-16 08:57:30 -07:00
Jan Nikl d67dbc88f7 Optimized AiBCt. 2024-10-16 08:57:30 -07:00
Jan Nikl 5f92985cb5 Initial implementation of ComputeSolution() and minor refactor. 2024-10-16 08:57:30 -07:00
Jan Nikl 5e6052c2a0 Moved loading of Ct to GetCt(). 2024-10-16 08:57:30 -07:00
Jan Nikl 8121a2f826 Moved the inverse multiplication to MultInv(). 2024-10-16 08:57:30 -07:00
Jan Nikl c6b461e5db Renamed vars in ComputeRHS. 2024-10-16 08:57:30 -07:00
Jan Nikl d80bf7c0bf make style 2024-10-16 08:57:29 -07:00
Jan Nikl 4a694f0dc7 Initial attempt to implement ReduceRHS. 2024-10-16 08:57:29 -07:00
Jan Nikl 6122274327 Added a solver for the hybridized system in ex5. 2024-10-16 08:57:29 -07:00
Jan Nikl 7d104778fc Initial attempt to construct H matrix. 2024-10-16 08:57:29 -07:00
Jan Nikl 42c9de5abe Changed storage of A matrix to full. 2024-10-16 08:57:29 -07:00
Jan Nikl 7b45c5abb4 Returned to sparse H matrix of Hybridization. 2024-10-16 08:57:29 -07:00
Jan Nikl 4948317fcf Added storage of the block matrices. 2024-10-16 08:57:29 -07:00
Jan Nikl 170d6a693d Removed some trash and make style. 2024-10-16 08:57:29 -07:00
Jan Nikl e73564b749 Added hybridization option to example 5. 2024-10-16 08:57:29 -07:00
Jan Nikl 529fa0f012 Returned to outer assembly and finished it on the side of DarcyForm. 2024-10-16 08:57:29 -07:00
Jan Nikl 3aaa597f10 Returned the copyrights back to 2023 to make check scripts happy. 2024-10-16 08:57:29 -07:00
Jan Nikl 8d3fe3cb79 Added integration of hybridized potential mass- with a dummy face matrix computation. 2024-10-16 08:57:29 -07:00
Jan Nikl 026d480439 Removed the second constraint integrator from EnableHybridization and the face integrator is used instead. 2024-10-16 08:57:29 -07:00
Jan Nikl b0d99a0d48 Made DarcyHybridization a child of Hybridization and insert it to the flux BilinearForm. 2024-10-16 08:57:29 -07:00
Jan Nikl a1f041ac4a Added mockup DarcyHybridization. 2024-10-16 08:57:29 -07:00
Jan Nikl 368355972b Removed essential potential dofs, which were not fully supported anyway. 2024-10-16 08:57:29 -07:00
Jan Nikl d62d6e483f Added dirty example usage in example 5. 2024-10-16 08:57:29 -07:00
Jan Nikl 8ab79092e9 Initial implementation of DarcyForm. 2024-10-16 08:57:29 -07:00
Jan Nikl 9e6369eb42 Changed double -> real_t. 2024-05-23 11:47:37 -07:00
Jan Nikl 064618b348 Added host memory asserts to Vector::Distance(Squared)To methods. 2024-05-23 11:37:27 -07:00
Jan Nikl 1b94ef639f Merge branch 'master' into najlkin/misc-impro 2024-05-16 13:57:14 -07:00
Jan Nikl 95d85052b5 Minor dox fix. 2024-05-16 13:47:10 -07:00
Jan Nikl dd3e5b16ab Reordered methods of LinearForm a bit. 2024-05-16 13:43:01 -07:00
Jan Nikl e6e451ed53 Improved doxygen in LinearForm. 2024-05-16 13:40:30 -07:00
Jan Nikl 494c756011 Renamed methods of LinearForm for access to face integrators. 2024-05-16 13:30:36 -07:00
Jan Nikl c6681eb2d5 Improved handling of the local LOR permutation. 2024-02-12 13:58:04 -08:00
Jan Nikl c1e1252baf Improved subtraction operator of DenseTensor. 2024-02-07 16:38:19 -08:00
Jan Nikl 21d7d7ef98 Added access to the local DOFs permutation in LOR. 2024-02-07 13:09:47 -08:00
Jan Nikl 5b97fa6769 Added access to boundary markers in LinearForm. 2024-02-07 13:09:47 -08:00
Jan Nikl cbe3a46996 Added access to the underlaying functions of the function coefficients. 2024-02-07 13:09:38 -08:00
Jan Nikl bdb1207a80 Added ParallelAssembleInternal() method to ParBilinearForm. 2024-02-07 11:35:44 -08:00
Jan Nikl 58d16e4d40 A minor fix of OptionsParser::WriteValue(). 2024-02-07 11:33:15 -08:00
Jan Nikl 2af4c734b9 Added unsigned int to OptionsParser. 2024-02-07 11:32:22 -08:00
Jan Nikl 26db002c47 Added basic arithmetic operators to DenseTensor. 2024-02-07 11:08:14 -08:00
Jan Nikl 3a9ab4ae80 Implemented projection of VectorDeltaCoefficient on GridFunction for scalar finite elements. 2024-02-07 11:06:30 -08:00
Jan Nikl 24e9aa1d4c Added the method AddSubSparseMatrix() to SparseMatrix to enable adding sparse sub-matrices. 2024-02-07 10:59:38 -08:00
Jan Nikl 6fdc330e6f Merge branch 'master' into najlkin/own-data 2024-01-31 14:16:31 -08:00
Jan Nikl c22160fa5d Added the ability to use external integrators also to MixedBilinearForm. 2024-01-26 14:35:40 -08:00
Jan Nikl 9a9f1d79c3 Added the ability to use external integrators also to LinearForm. 2024-01-26 14:35:40 -08:00
Jan Nikl aaa08d9091 Added ownership flag for weight of DeltaCoefficient. 2024-01-26 14:35:31 -08:00
Jan Nikl 2d86e73987 Added operator ownership flags to HypreSolver and HypreSmoother. 2024-01-26 14:34:46 -08:00
Jan Nikl b400c02e7b Added possible ownership of the SparseMatrix to SparseSmoother. 2024-01-26 14:33:39 -08:00
Jan Nikl 599e1f404d Added MakeDataOwner method to DenseMatrix to enable taking owenership of the external data. 2024-01-26 13:57:11 -08:00
625 changed files with 58739 additions and 40126 deletions
-154
View File
@@ -1,154 +0,0 @@
# Copyright (c) 2010-2025, 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: Sanitizer Config
description: Sets up environment variables for MFEM sanitizer workflow
inputs:
DEBUG:
description: If true, use intermediate caches to speed up the workflow
by reusing previous builds.
default: false
REPOSITORY:
description: Repository to checkout
default: mfem/mfem
BRANCH:
description: Branch to checkout
default: ubsan
CLANG_VER:
description: CLANG version to use
default: 18
# https://github.com/llvm/llvm-project/releases
LLVM_VER:
description: LLVM version to use
default: 19.1.7
# https://github.com/hypre-space/hypre/releases
HYPRE_VER:
description: HYPRE version to use
default: 2.19.0
METIS_VER:
description: METIS version to use
default: 4.0.3
CTEST:
description: CTest command to use
default: ctest -j --test-load $(nproc)
--schedule-random
--stop-on-failure --output-on-failure
--test-dir
# https://clang.llvm.org/docs/AddressSanitizer.html
ASAN_OPTIONS:
default: detect_leaks=1,
strict_init_order=1,
strict_string_checks=1,
check_initialization_order=1,
detect_stack_use_after_return=1
ASAN_CXXFLAGS:
default: -fsanitize=address
-fsanitize-address-use-after-scope
ASAN_LDFLAGS:
default: -fsanitize=address
# https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
UBSAN_OPTIONS:
default: halt_on_error=1, print_stacktrace=1
UBSAN_CXXFLAGS:
default: -fsanitize=undefined
UBSAN_LDFLAGS:
default: -fsanitize=undefined
# https://clang.llvm.org/docs/MemorySanitizer.html
MSAN_OPTIONS:
default: "poison_in_dtor=1"
MSAN_CXXFLAGS:
default: -fsanitize=memory
-fsanitize-memory-track-origins
-fsanitize-memory-use-after-dtor
MSAN_LDFLAGS:
default: -fsanitize=memory
LSAN_DIR:
description: LSAN suppression directory
default: lsan
LSAN_FILE:
description: LSAN suppression file
default: lsan.supp
NO_FLAGS:
description: If true, do not set any CXXFLAGS or LDFLAGS.
default: false
runs:
using: 'composite'
steps:
- name: Env (Inputs)
run: |
echo DEBUG=${{inputs.DEBUG}} >> $GITHUB_ENV
echo REPOSITORY=${{inputs.REPOSITORY}} >> $GITHUB_ENV
echo BRANCH=${{inputs.BRANCH}} >> $GITHUB_ENV
echo CLANG_VER=${{inputs.CLANG_VER}} >> $GITHUB_ENV
echo LLVM_VER=${{inputs.LLVM_VER}} >> $GITHUB_ENV
echo HYPRE_VER=${{inputs.HYPRE_VER}} >> $GITHUB_ENV
echo METIS_VER=${{inputs.METIS_VER}} >> $GITHUB_ENV
echo CTEST=${{inputs.CTEST}} >> $GITHUB_ENV
echo ASAN_OPTIONS=${{inputs.ASAN_OPTIONS}} >> $GITHUB_ENV
echo UBSAN_OPTIONS=${{inputs.UBSAN_OPTIONS}} >> $GITHUB_ENV
echo MSAN_OPTIONS=${{inputs.MSAN_OPTIONS}} >> $GITHUB_ENV
echo LSAN_DIR=${{inputs.LSAN_DIR}} >> $GITHUB_ENV
echo LSAN_FILE=${{inputs.LSAN_FILE}} >> $GITHUB_ENV
echo ASAN_CXXFLAGS=${{inputs.ASAN_CXXFLAGS}} >> $GITHUB_ENV
echo ASAN_LDFLAGS=${{inputs.ASAN_LDFLAGS}} >> $GITHUB_ENV
echo UBSAN_CXXFLAGS=${{inputs.UBSAN_CXXFLAGS}} >> $GITHUB_ENV
echo UBSAN_LDFLAGS=${{inputs.UBSAN_LDFLAGS}} >> $GITHUB_ENV
echo MSAN_CXXFLAGS=${{inputs.MSAN_CXXFLAGS}} >> $GITHUB_ENV
echo MSAN_LDFLAGS=${{inputs.MSAN_LDFLAGS}} >> $GITHUB_ENV
shell: bash
- name: Env (dir)
run: |
echo LLVM_DIR=${{github.workspace}}/llvm >> $GITHUB_ENV
echo HYPRE_DIR=hypre-${{inputs.HYPRE_VER}} >> $GITHUB_ENV
echo METIS_DIR=metis-${{inputs.METIS_VER}} >> $GITHUB_ENV
shell: bash
- name: Env (bis)
run: |
echo CC=clang-${{inputs.CLANG_VER}} >> $GITHUB_ENV
echo CXX=clang++-${{inputs.CLANG_VER}} >> $GITHUB_ENV
echo LLVM_INC=${{env.LLVM_DIR}}/include/c++/v1 >> $GITHUB_ENV
echo LLVM_LIB=${{env.LLVM_DIR}}/lib >> $GITHUB_ENV
echo HYPRE_TGZ=v${{inputs.HYPRE_VER}}.tar.gz >> $GITHUB_ENV
echo METIS_TGZ=metis-${{inputs.METIS_VER}}.tar.gz >> $GITHUB_ENV
LSAN_SUPPRESSIONS="${{github.workspace}}/${{inputs.LSAN_DIR}}/${{inputs.LSAN_FILE}}"
echo "LSAN_OPTIONS=suppressions=$LSAN_SUPPRESSIONS" >> $GITHUB_ENV
shell: bash
- name: Env (ter)
if: ${{ inputs.NO_FLAGS != 'true' }}
run: |
echo LLVM_CXXFLAGS=-stdlib=libc++ -I${{env.LLVM_INC}} -Isystem${{env.LLVM_INC}} >> $GITHUB_ENV
echo LLVM_LDFLAGS=-L${{env.LLVM_LIB}} -lc++abi -Wl,-rpath,${{env.LLVM_LIB}} >> $GITHUB_ENV
shell: bash
- name: Env (quater)
if: ${{ inputs.NO_FLAGS != 'true' }}
run: |
echo CXXFLAGS=${{env.LLVM_CXXFLAGS}} >> $GITHUB_ENV
echo LDFLAGS=${{env.LLVM_LDFLAGS}} >> $GITHUB_ENV
shell: bash
-91
View File
@@ -1,91 +0,0 @@
# Copyright (c) 2010-2025, 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: 'MFEM Compilation'
description: 'MFEM Compilation'
inputs:
par:
description: 'Whether to build for parallel (true/false)'
default: false
sanitizer:
description: 'Sanitizer to use (asan, msan, ubsan)'
default: asan
runs:
using: 'composite'
steps:
- uses: ./.github/actions/sanitize/config
- uses: actions/cache@v4
if: ${{env.DEBUG == 'true'}}
id: debug
with:
path: mfem/build
key: build-${{inputs.par}}-${{inputs.sanitizer}}
- uses: ./.github/actions/sanitize/setup
if: ${{steps.debug.outputs.cache-hit != 'true'}}
with:
par: ${{inputs.par}}
sanitizer: ${{inputs.sanitizer}}
- name: Build with ASAN
if: inputs.sanitizer == 'asan'
run: echo CXXFLAGS=${{env.CXXFLAGS}} ${{env.ASAN_CXXFLAGS}} >> $GITHUB_ENV
shell: bash
- name: Build with MSAN
if: inputs.sanitizer == 'msan'
run: echo CXXFLAGS=${{env.CXXFLAGS}} ${{env.MSAN_CXXFLAGS}} >> $GITHUB_ENV
shell: bash
- name: Build with UBSAN
if: inputs.sanitizer == 'ubsan'
run: echo CXXFLAGS=${{env.CXXFLAGS}} ${{env.UBSAN_CXXFLAGS}} >> $GITHUB_ENV
shell: bash
- uses: mfem/github-actions/build-mfem@v2.5
if: ${{steps.debug.outputs.cache-hit != 'true'}}
env:
CXXFLAGS: ${{env.CXXFLAGS}}
LDFLAGS: ${{env.LDFLAGS}}
with:
mpi: ${{inputs.par == 'false' && 'seq' || 'par'}}
mfem-dir: mfem
os: ${{runner.os}}
library-only: true
build-system: cmake
hypre-dir: ${{env.HYPRE_DIR}}
metis-dir: ${{env.METIS_DIR}}
config-options: >-
-GNinja
-DMPICXX=${{env.CXX}}
-DCMAKE_CXX_STANDARD=17
-DMFEM_USE_MEMALLOC=OFF
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_CXX_COMPILER=${{env.CXX}}
-DCMAKE_CXX_FLAGS_RELEASE='-g -O1 -fno-omit-frame-pointer'
- name: Delete object files
if: ${{steps.debug.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: find . -type f -name '*.o' -delete
shell: bash
- uses: actions/upload-artifact@v4
with:
name: build-${{inputs.par}}-${{inputs.sanitizer}}
path: mfem/build
if-no-files-found: error
retention-days: 1
overwrite: false
-33
View File
@@ -1,33 +0,0 @@
# Copyright (c) 2010-2025, 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: 'Install MPI'
description: 'Installs MPI and set up its environment variables'
runs:
using: 'composite'
steps:
- name: Install
run: sudo apt-get install openmpi-bin libopenmpi-dev
shell: bash
- name: Env
run: |
echo PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe >> $GITHUB_ENV
echo MPI_INC=$(mpicxx --showme:compile) >> $GITHUB_ENV
echo MPI_LIB=$(mpicxx --showme:link) >> $GITHUB_ENV
shell: bash
- name: Env (bis)
run: |
echo CXXFLAGS=${{env.CXXFLAGS}} ${{env.MPI_INC}} >> $GITHUB_ENV
echo LDFLAGS=${{env.LDFLAGS}} ${{env.MPI_LIB}} >> $GITHUB_ENV
shell: bash
@@ -1,71 +0,0 @@
# Copyright (c) 2010-2025, 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: 'Restore state'
description: 'Restore state to be able to run checks, tests'
inputs:
par:
description: 'Whether to build for parallel (true/false)'
default: false
sanitizer:
description: 'Sanitizer to use (asan, msan, ubsan)'
default: asan
cache-path:
description: 'path to what needs to be restored'
default: none
cache-skip:
description: 'Skip cache restoration'
default: false
outputs:
cache-hit:
description: 'Output from a specific step'
value: ${{steps.debug.outputs.cache-hit}}
runs:
using: 'composite'
steps:
- uses: ./.github/actions/sanitize/config
- uses: actions/cache@v4
if: ${{env.DEBUG == 'true' && inputs.cache-skip != 'true'}}
id: debug
with:
path: ${{inputs.cache-path}}
key: ${{github.job}}-${{inputs.par}}-${{inputs.sanitizer}}
- uses: ./.github/actions/sanitize/setup
if: ${{steps.debug.outputs.cache-hit != 'true'}}
with:
par: ${{inputs.par}}
sanitizer: ${{inputs.sanitizer}}
- uses: actions/download-artifact@v4
with:
name: build-${{inputs.par}}-${{inputs.sanitizer}}
path: mfem/build
- name: Ninja Patch
working-directory: mfem/build
run: |
sed -i -e 's/CXX_STATIC_LIBRARY_LINKER__mfem_Release.*/CUSTOM_COMMAND/' build.ninja
sed -i -e '/build tests\/unit\/all:/ s/tests\/unit\/[^ ]*unit_tests[^ ]*//g' build.ninja
sed -i -e '/^add_test(\[=\[\(unit_tests\|punit_tests\)\]=\]/ s/)/ "--input-file .\/list-test-names-${{matrix.tag}}" "--min-duration 1")/' tests/unit/CTestTestfile.cmake
shell: bash
- name: Copy Data
if: ${{steps.debug.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: |
ninja cmake_object_order_depends_target_unit_tests
cp -pR ../tests/unit/data tests/unit
shell: bash
-64
View File
@@ -1,64 +0,0 @@
# Copyright (c) 2010-2025, 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: 'Setup state'
description: 'Sets up the state to be able to run build & run'
inputs:
par:
description: 'Whether to build for parallel (true/false)'
default: false
sanitizer:
description: 'Sanitizer to use (asan, msan, ubsan)'
default: asan
runs:
using: 'composite'
steps:
- uses: actions/cache/restore@v4 # Cache for LLVM libcxx
with:
path: ${{env.LLVM_DIR}}
fail-on-cache-miss: true
key: build-libcxx-${{env.LLVM_VER}}-${{inputs.sanitizer}}
- uses: ./.github/actions/sanitize/mpi
if: ${{inputs.par == 'true'}}
- uses: actions/cache/restore@v4 # Cache for Hypre
if: ${{inputs.par == 'true'}}
with:
path: ${{env.HYPRE_DIR}}
fail-on-cache-miss: true
key: ${{runner.os}}-ompi-build-${{env.HYPRE_DIR}}-int32-fp64-v2.5
- uses: actions/cache/restore@v4 # Cache for Metis
if: ${{inputs.par == 'true'}}
with:
path: ${{env.METIS_DIR}}
fail-on-cache-miss: true
key: ${{runner.os}}-build-${{env.METIS_DIR}}-v2.5
- name: Hypre/Metis links
if: ${{inputs.par == 'true'}}
run: ln -s -f ${{env.HYPRE_DIR}} hypre && ln -s -f ${{env.METIS_DIR}} metis-4.0
shell: bash
- uses: actions/cache/restore@v4 # Cache for LSAN suppression file
with:
path: ${{env.LSAN_DIR}}
fail-on-cache-miss: true
key: build-lsan-suppression-file
- uses: actions/checkout@v4 # Checkout the repository
with:
path: mfem
# ref: ${{env.BRANCH}}
# repository: ${{env.REPOSITORY}}
+7 -26
View File
@@ -7,17 +7,18 @@
https://mfem.org
This directory contains the GitHub CI scripts for MFEM.
Note that some of these scripts use the shared MFEM GitHub Actions from the external mfem/github-actions repository:
<https://github.com/mfem/github-actions>
https://github.com/mfem/github-actions
For a particular action, e.g. `mfem/github-actions/build-mfem@v2.5`, the `v2.5` suffix denotes the branch in the above from which the action is taken.
For a particular action, e.g. `mfem/github-actions/build-mfem@v2.1`, the `v2.1` suffix denotes the branch in the above from which the action is taken.
The current CI workflows are:
## `repo-check.yml`
### `repo-check.yml`
Runs a number of static repository-level sanity checks.
@@ -29,39 +30,19 @@ Runs a number of static repository-level sanity checks.
- `branch-history` guards against accidental commits of large files using the `--history` option of the `config/githooks/pre-push` script.
## `mfem-analysis.yml` (`build-analysis`)
### `mfem-analysis.yml` (`build-analysis`)
Checks if the code builds and satisfies minimal requirements.
- `gitignore` builds hypre, METIS, and MFEM using `mfem/github-actions/build-hypre`, `mfem/github-actions/build-metis`, and `mfem/github-actions/build-mfem` and checks for correct `.gitignore` settings by running the `tests/scripts/gitignore` script.
## `builds-and-tests.yml`
### `builds-and-tests.yml`
Runs a matrix of builds and tests runs with different compilers, OS, mfem/hypre settings, etc. Also processes and upload Codecov reports.
Uses the following GitHub Actions from <https://github.com/mfem/github-actions>:
Uses the following GitHub Actions from https://github.com/mfem/github-actions:
- `mfem/github-actions/build-hypre`
- `mfem/github-actions/build-metis`
- `mfem/github-actions/build-mfem`
- `mfem/github-actions/upload-coverage`
## Sanitizer Workflow for MFEM Verification
This workflow validates MFEM unit tests, examples, and miniapps using sanitizer tools.
- `sanitizers.yml` orchestrates:
- Building and caching dependencies: HYPRE, METIS, LSAN suppression file, and LLVM libcxx.
- Launching fine-grained jobs for serial (ASAN, MSAN, UBSAN) and parallel (ASAN, UBSAN) sanitizers.
- `sanitize-tests.yml` is a reusable workflow accepting `par` mode (`true` for parallel) and `sanitizer` (ASAN, MSAN, or UBSAN) as inputs. It executes the following jobs:
- **Build**: Compiles the MFEM library with specified parallel and sanitizer settings.
- **Check**: Runs verification checks.
- Parallel jobs to test the following: **Examples**, **Miniapps** and **Unit tests**
The workflow leverages composite actions in `.github/actions/sanitize/`:
- `config`: Centralizes settings for the sanitizer workflow.
- `mfem`: Manages the MFEM library build process.
- `mpi`: Installs MPI and applies additional compilation flags.
- `restore`: Restores the testing environment state.
- `setup`: Builds or restores cached dependencies.
+7 -50
View File
@@ -58,7 +58,6 @@ jobs:
build-system: [make, cmake]
hypre-target: [int32]
precision: [fp64]
enzyme: [false]
exclude:
- os: ubuntu-latest
build-system: cmake
@@ -81,17 +80,15 @@ jobs:
codecov: YES
- os: ubuntu-latest
target: dbg
config-opts: "CPPFLAGS+=-Og"
config-opts: 'CPPFLAGS+=-Og'
- os: macos-latest
codecov: NO
- os: windows-latest
codecov: NO
# config-opts: '-G "Ninja Multi-Config"'
- os: windows-latest
target: opt
mpi: par
config-opts: "-DBUILD_SHARED_LIBS=ON"
# config-opts: '-DBUILD_SHARED_LIBS=ON -G "Ninja Multi-Config"'
config-opts: '-DBUILD_SHARED_LIBS=ON'
- os: ubuntu-latest
target: opt
codecov: NO
@@ -99,7 +96,7 @@ jobs:
build-system: cmake
hypre-target: int32
precision: fp64
config-opts: "-DCMAKE_INSTALL_PREFIX=../cmake-install"
config-opts: '-DCMAKE_INSTALL_PREFIX=../cmake-install'
# This option can be set to pass additional configuration options to
# the MFEM configuration command.
# config-opts: '-DCMAKE_VERBOSE_MAKEFILE=ON'
@@ -124,30 +121,18 @@ jobs:
build-system: make
hypre-target: int32
precision: fp32
- os: macos-latest
target: opt
codecov: NO
mpi: par
build-system: make
hypre-target: int32
precision: fp64
enzyme: true
config-opts: MFEM_USE_ENZYME=YES ENZYME_DIR=$(brew --prefix enzyme) LDFLAGS=-L$LLVM_PREFIX/lib/c++
name: ${{ matrix.os }}-${{ matrix.build-system }}-${{ matrix.target }}-${{ matrix.mpi }}-${{ matrix.hypre-target }}-${{ matrix.precision }}${{ matrix.enzyme && '-enzyme' || '' }}
name: ${{ matrix.os }}-${{ matrix.build-system }}-${{ matrix.target }}-${{ matrix.mpi }}-${{ matrix.hypre-target }}-${{ matrix.precision }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.enzyme && true || false }}
steps:
# Fix 'No space left on device' errors for Ubuntu builds.
- name: Run Actions Cleaner
if: matrix.os == 'ubuntu-latest'
uses: easimon/maximize-build-space@v8
with:
overprovision-lvm: "true"
remove-android: "true"
overprovision-lvm: 'true'
remove-android: 'true'
# Checkout MFEM in "mfem" subdirectory. Final path:
# /home/runner/work/mfem/mfem/mfem
@@ -159,24 +144,10 @@ jobs:
# Fetch the complete history for codecov to access commits ID
fetch-depth: 0
- name: Windows environment - PowerShell [debug]
if: matrix.os == 'windows-latest'
run: |
ls env: | fl
- name: Windows environment - Bash [debug]
if: matrix.os == 'windows-latest'
run: |
env
shell: bash
# For info on Xcode see:
# - https://github.com/actions/runner-images/issues/12541
# - https://github.com/actions/runner-images/blob/releases/macos-15-arm64/20250811/images/macos/macos-15-arm64-Readme.md#xcode
- name: Xcode version setup (MacOS)
if: matrix.os == 'macos-latest'
run: |
XCODE_PATH="/Applications/Xcode_16.4.app"
XCODE_PATH="/Applications/Xcode_15.3.app"
echo "> sudo xcode-select -s ${XCODE_PATH}"
sudo xcode-select -s ${XCODE_PATH}
echo "> g++ -v"
@@ -287,20 +258,6 @@ jobs:
run: |
vcpkg install metis-mfem --triplet=x64-windows-static --overlay-ports=${{ env.MFEM_TOP_DIR }}/config/vcpkg/ports
# It's usually fine to build the above TPLs with a different compiler.
#
- name: install Enzyme (macOS w/ Enzyme)
if: matrix.enzyme && matrix.os == 'macos-latest'
run: |
export HOMEBREW_NO_INSTALL_CLEANUP=1
brew update
brew install enzyme
ENZYME_LLVM=$(brew info enzyme | sed -n 's/^Required:.*\(llvm[^ ]*\).*/\1/p')
LLVM_PREFIX=$(brew --prefix $ENZYME_LLVM)
echo "LLVM_PREFIX=$LLVM_PREFIX" >> $GITHUB_ENV
echo "OMPI_CC=$LLVM_PREFIX/bin/clang" >> $GITHUB_ENV
echo "OMPI_CXX=$LLVM_PREFIX/bin/clang++" >> $GITHUB_ENV
# MFEM build and test
- name: build
uses: mfem/github-actions/build-mfem@v2.5
+2 -3
View File
@@ -45,15 +45,14 @@ jobs:
- name: Get MPI (Linux)
run: |
sudo apt-get install openmpi-bin libopenmpi-dev
export OMPI_MCA_rmaps_base_oversubscribe=1
sudo apt-get install mpich libmpich-dev
- name: Cache Hypre Install
id: hypre-cache
uses: actions/cache@v4
with:
path: ${{ env.HYPRE_TOP_DIR }}
key: ${{ runner.os }}-ompi-build-${{ env.HYPRE_TOP_DIR }}-v2.5
key: ${{ runner.os }}-build-${{ env.HYPRE_TOP_DIR }}-v2.5
- name: Get Hypre
if: steps.hypre-cache.outputs.cache-hit != 'true'
+69
View File
@@ -0,0 +1,69 @@
# Copyright (c) 2010-2025, 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: "Sanitizer"
permissions:
actions: write
on:
push:
branches:
- master
- next
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Serial:
runs-on: ubuntu-24.04
steps:
- name: MFEM Checkout
uses: actions/checkout@v4
with:
path: mfem
- name: MFEM Build
uses: mfem/github-actions/build-mfem@v2.5
with:
os: ${{ runner.os }}
target: opt
mpi: seq
hypre-dir: unused-hypre-dir
metis-dir: unused-metis-dir
mfem-dir: mfem
build-system: make
library-only: false
config-options:
CXX="clang++-18"
CXXFLAGS="-g -O1 -std=c++11
-fsanitize=address
-fno-omit-frame-pointer
-fsanitize-address-use-after-scope"
- name: MFEM Info
working-directory: mfem
run: make info
- name: MFEM Sanitize
working-directory: mfem
run:
ASAN_OPTIONS="detect_leaks=1,
strict_init_order=1,
strict_string_checks=1,
check_initialization_order=1,
detect_stack_use_after_return=1"
make test
@@ -1,39 +0,0 @@
# Copyright (c) 2010-2025, 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: build-hypre
on:
workflow_call:
jobs:
build-hypre:
runs-on: ubuntu-latest
name: 2.19.0
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/config
- name: Cache
id: cache
uses: actions/cache@v4
with:
path: ${{env.HYPRE_DIR}}
key: ${{runner.os}}-ompi-build-${{env.HYPRE_DIR}}-int32-fp64-v2.5
- name: Setup
if: steps.cache.outputs.cache-hit != 'true'
uses: ./.github/actions/sanitize/mpi
- name: Build
if: steps.cache.outputs.cache-hit != 'true'
uses: mfem/github-actions/build-hypre@v2.5
with:
archive: ${{env.HYPRE_TGZ}}
dir: ${{env.HYPRE_DIR}}
target: int32
precision: fp64
build-system: make
@@ -1,76 +0,0 @@
# Copyright (c) 2010-2025, 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: build-libcxx
on:
workflow_call:
jobs:
build-llvm-libcxx:
runs-on: ubuntu-latest
strategy:
matrix:
sanitizer: [asan, msan, ubsan]
include:
- sanitizer: asan
llvm_use_sanitizer: "Address"
- sanitizer: msan
llvm_use_sanitizer: "MemoryWithOrigins"
- sanitizer: ubsan
llvm_use_sanitizer: "Undefined"
name: ${{matrix.sanitizer}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/config
with:
NO_FLAGS: true
- name: Cache
id: cache
uses: actions/cache@v4
with:
path: ${{env.LLVM_DIR}}
key: build-libcxx-${{env.LLVM_VER}}-${{matrix.sanitizer}}
- name: Clone
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: >
git clone --filter=blob:none --depth=1
--branch llvmorg-${{env.LLVM_VER}}
--no-checkout https://github.com/llvm/llvm-project.git llvm-project
- name: Checkout
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
working-directory: llvm-project
run: |
git sparse-checkout set --cone
git checkout llvmorg-${{env.LLVM_VER}}
git sparse-checkout set cmake llvm/cmake runtimes libcxx libcxxabi
- name: Mkdir
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: mkdir ${{env.LLVM_DIR}}
- name: CMake
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
working-directory: ${{env.LLVM_DIR}}
run: >
VERBOSE=1
cmake -GNinja ../llvm-project/runtimes/
-DCMAKE_C_COMPILER=${{env.CC}}
-DCMAKE_CXX_COMPILER=${{env.CXX}}
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_INSTALL_PREFIX=/usr
-DLLVM_USE_SANITIZER=${{matrix.llvm_use_sanitizer}}
-DLLVM_BUILD_32_BITS=OFF
-DLIBCXXABI_USE_LLVM_UNWINDER=OFF
-DLLVM_INCLUDE_TESTS=OFF
-DLIBCXX_INCLUDE_TESTS=OFF
-DLIBCXX_INCLUDE_BENCHMARKS=OFF
-DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi'
- name: Build
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
working-directory: ${{env.LLVM_DIR}}
run: cmake --build . -- cxx cxxabi
-38
View File
@@ -1,38 +0,0 @@
# Copyright (c) 2010-2025, 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: build-file-lsan
on:
workflow_call:
jobs:
build-file-lsan:
runs-on: ubuntu-latest
name: lsan.supp
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/config
- name: Cache
id: cache
uses: actions/cache@v4
with:
path: ${{env.LSAN_DIR}}
key: build-lsan-suppression-file
- name: Setup
if: steps.cache.outputs.cache-hit != 'true'
run: |
mkdir -p ${{env.LSAN_DIR}}
cat << EOF > ${{env.LSAN_DIR}}/${{env.LSAN_FILE}}
leak:libevent_core-2.1.so
leak:ompi_mpi_finalize
leak:ompi_mpi_init
leak:PMPI_Init
leak:strdup
EOF
@@ -1,36 +0,0 @@
# Copyright (c) 2010-2025, 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: build-metis
on:
workflow_call:
jobs:
build-metis:
runs-on: ubuntu-latest
name: 4.0.3
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/config
- name: Cache
id: cache
uses: actions/cache@v4
with:
path: ${{env.METIS_DIR}}
key: ${{runner.os}}-build-${{env.METIS_DIR}}-v2.5
- name: Setup
if: steps.cache.outputs.cache-hit != 'true'
uses: ./.github/actions/sanitize/mpi
- name: Build
if: steps.cache.outputs.cache-hit != 'true'
uses: mfem/github-actions/build-metis@v2.5
with:
archive: ${{env.METIS_TGZ}}
dir: ${{env.METIS_DIR}}
-197
View File
@@ -1,197 +0,0 @@
# Copyright (c) 2010-2025, 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: Sanitize
on:
workflow_call:
inputs:
par:
description: 'Whether to build for parallel (true/false)'
required: false
default: false
type: boolean
sanitizer:
description: 'Sanitizer to use (asan, msan, ubsan)'
required: true
default: asan
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/mfem
with:
par: ${{inputs.par}}
sanitizer: ${{inputs.sanitizer}}
check:
needs: [build]
runs-on: ubuntu-latest
env:
ex: ${{inputs.par && 'ex1p' || 'ex1'}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/restore
id: restore
with:
par: ${{inputs.par}}
sanitizer: ${{inputs.sanitizer}}
cache-path: mfem/build/examples/${{env.ex}}
- name: MFEM Check
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: ninja -v check
examples:
needs: [check]
runs-on: ubuntu-latest
env:
exclude: ${{inputs.par && '-E "_ser"' || ''}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/restore
id: restore
with:
par: ${{inputs.par}}
sanitizer: ${{inputs.sanitizer}}
cache-path: mfem/build/examples/ex1
- name: Build Examples
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: ninja -v examples
- name: Test Examples
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: |
${{env.CTEST}} examples ${{env.exclude}} --show-only
${{env.CTEST}} examples ${{env.exclude}}
miniapps:
needs: [check]
runs-on: ubuntu-latest
env:
exclude: ${{inputs.par && '-E "_ser"' || ''}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/restore
id: restore
with:
par: ${{inputs.par}}
sanitizer: ${{inputs.sanitizer}}
cache-path: mfem/build/miniapps/meshing/minimal-surface
- name: Build Miniapps
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: ninja -v miniapps
- name: Test Miniapps
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: |
${{env.CTEST}} miniapps ${{env.exclude}} --show-only
${{env.CTEST}} miniapps ${{env.exclude}}
tests-miniapps:
needs: [check]
runs-on: ubuntu-latest
env:
run: ${{inputs.par && '-R "_cpu_np"' || ''}}
exclude: ${{inputs.par && '"unit_tests|debug"' || '"^unit_tests$|debug"'}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/restore
id: restore
with:
par: ${{inputs.par}}
sanitizer: ${{inputs.sanitizer}}
cache-path: mfem/build/tests/unit/sedov_tests_cpu
- name: Build Tests Unit Miniapps
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: ninja -v tests/unit/all
- name: Run Tests Unit Miniapps
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: |
${{env.CTEST}} tests/unit -E ${{env.exclude}} ${{env.run}} --show-only
${{env.CTEST}} tests/unit -E ${{env.exclude}} ${{env.run}}
tests-unit-build:
needs: [check]
runs-on: ubuntu-latest
env:
unit_tests: ${{inputs.par && 'punit_tests' || 'unit_tests'}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/restore
id: restore
with:
par: ${{inputs.par}}
sanitizer: ${{inputs.sanitizer}}
cache-path: mfem/build/tests/unit/${{env.unit_tests}}
- name: Build Unit Tests
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: ninja -v ${{env.unit_tests}}
- name: Delete object files
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build/tests/unit
run: find . -type f -name '*.o' -delete
- uses: actions/upload-artifact@v4
with:
name: tests-${{inputs.par}}-${{inputs.sanitizer}}
path: mfem/build/tests/unit/${{env.unit_tests}}
if-no-files-found: error
retention-days: 1
overwrite: false
tests-unit-run:
needs: [tests-unit-build]
runs-on: ubuntu-latest
strategy:
matrix:
tag: [0, 1, 2, 3]
name: tests-unit-run-${{matrix.tag}}
env:
unit_tests: ${{inputs.par && 'punit_tests' || 'unit_tests'}}
np: ${{inputs.par && '_np=2' || ''}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/sanitize/restore
id: restore
with:
par: ${{inputs.par}}
sanitizer: ${{inputs.sanitizer}}
cache-path: mfem/build/tests/unit/${{env.unit_tests}}
- uses: actions/download-artifact@v4
if: ${{steps.restore.outputs.cache-hit != 'true'}}
with:
name: tests-${{inputs.par}}-${{inputs.sanitizer}}
path: mfem/build/tests/unit
- name: Split Unit Tests
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build/tests/unit
run: |
chmod 755 ${{env.unit_tests}}
./${{env.unit_tests}} --list-test-names-only | tail -n +2 > list-test-names
shuf list-test-names -o list-test-names
split --verbose -n l/4 -d -a 1 list-test-names list-test-names-
- name: Cat Unit Tests ${{matrix.tag}}
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build/tests/unit
run: cat list-test-names-${{matrix.tag}}
- name: Run Unit Tests ${{matrix.tag}}
if: ${{steps.restore.outputs.cache-hit != 'true'}}
working-directory: mfem/build
run: |
${{env.CTEST}} tests/unit -R "${{env.unit_tests}}${{env.np}}" --show-only
${{env.CTEST}} tests/unit -R "${{env.unit_tests}}${{env.np}}"
-73
View File
@@ -1,73 +0,0 @@
# Copyright (c) 2010-2025, 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: Sanitizers
permissions:
actions: write
on:
push:
branches: ["master", "next"]
pull_request:
workflow_dispatch:
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
# Build steps for dependencies
build-hypre:
uses: ./.github/workflows/sanitize-build-hypre.yml
build-metis:
uses: ./.github/workflows/sanitize-build-metis.yml
build-lsan:
uses: ./.github/workflows/sanitize-build-lsan.yml
build-libcxx:
uses: ./.github/workflows/sanitize-build-libcxx.yml
# Serial sanitizers: asan, msan, ubsan
seq-asan:
needs: [build-libcxx]
uses: ./.github/workflows/sanitize-tests.yml
with:
sanitizer: asan
seq-msan:
needs: [build-libcxx]
uses: ./.github/workflows/sanitize-tests.yml
with:
sanitizer: msan
seq-ubsan:
needs: [build-libcxx]
uses: ./.github/workflows/sanitize-tests.yml
with:
sanitizer: ubsan
# Parallel sanitizers: asan, ubsan
par-asan:
needs: [build-libcxx, build-hypre, build-metis]
uses: ./.github/workflows/sanitize-tests.yml
with:
par: true
sanitizer: asan
par-ubsan:
needs: [build-libcxx, build-hypre, build-metis]
uses: ./.github/workflows/sanitize-tests.yml
with:
par: true
sanitizer: ubsan
-44
View File
@@ -29,47 +29,3 @@ jobs:
operations-per-run: 500
exempt-issue-labels: "bug,WIP,ready-for-review,in-review,in-next"
exempt-pr-labels: "bug,WIP,ready-for-review,in-review,in-next"
# Stale action for PRs with "in-review" label.
stale-in-review-pr:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
actions: write
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: ':warning: This PR has been automatically marked as stale because it has not had any activity in the last 150 days. *If no activity occurs in the next 30 days, it will be automatically closed.* Thank you for your contributions.'
only-pr-labels: "in-review"
days-before-pr-stale: 150
days-before-pr-close: 30
days-before-issue-stale: -1
days-before-issue-close: -1
stale-pr-label: 'stale'
operations-per-run: 500
# Stale action for PRs with "WIP" label.
stale-wip-pr:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
actions: write
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: ':warning: This PR has been automatically marked as stale because it has not had any activity in the last 300 days. *If no activity occurs in the next 30 days, it will be automatically closed.* Thank you for your contributions.'
only-pr-labels: "WIP"
days-before-pr-stale: 300
days-before-pr-close: 30
days-before-issue-stale: -1
days-before-issue-close: -1
stale-pr-label: 'stale'
operations-per-run: 500
+19 -23
View File
@@ -54,6 +54,15 @@ doc/warnings.log
# Example and miniapp binaries and outputs
examples/ex[0-9]
examples/ex5-max
examples/ex5-hdg
examples/ex5p-hdg
examples/ex5-heat
examples/ex5-nguyen
examples/ex5p-nguyen
examples/ex5-plasma
examples/ex5-aniso
examples/ex5-scatter
examples/ex[0-9]p
examples/ex1[04-9]
examples/ex1[0-9]p
@@ -67,7 +76,7 @@ examples/ex4[0-9]p
examples/refined.mesh
examples/displaced.mesh
examples/mesh.*
examples/ex5.mesh
examples/ex5*.mesh
examples/Example5*
examples/ParaView
examples/Example9*
@@ -77,6 +86,8 @@ examples/sphere_refined.*
examples/sol.*
examples/sol_u.*
examples/sol_p.*
examples/sol_q.*
examples/sol_t.*
examples/sol_r.*
examples/sol_i.*
examples/ex6p-checkpoint.*
@@ -90,7 +101,7 @@ examples/velocity.*
examples/elastic_energy.*
examples/mode_*
examples/mode_deriv_*
examples/ex5-p-*.bp
examples/ex5*-p-*.bp
examples/ex9-p-*.bp
examples/ex12-p-*.bp
examples/ex16-p-*.bp
@@ -201,20 +212,14 @@ examples/superlu/sol.*
miniapps/adjoint/cvsRoberts_ASAi_dns
miniapps/adjoint/adjoint_advection_diffusion
miniapps/dfem/dfem-minimal-surface
miniapps/dfem/dfem-minimal-surface-output
miniapps/electromagnetics/volta
miniapps/electromagnetics/tesla
miniapps/electromagnetics/maxwell
miniapps/electromagnetics/joule
miniapps/electromagnetics/lorentz
miniapps/electromagnetics/Volta-AMR*
miniapps/electromagnetics/Tesla-AMR*
miniapps/electromagnetics/Maxwell-Parallel*
miniapps/electromagnetics/Joule_[0-9]*
miniapps/electromagnetics/Lorentz_[0-9]*
miniapps/electromagnetics/Lorentz.dat
miniapps/electromagnetics/Joule_*
miniapps/gslib/field-diff
miniapps/gslib/field-interp
@@ -235,7 +240,6 @@ miniapps/meshing/fit-node-position
miniapps/meshing/trimmer
miniapps/meshing/reflector
miniapps/meshing/ref321
miniapps/meshing/mesh-bounding-boxes
miniapps/meshing/mesh-optimizer
miniapps/meshing/pmesh-optimizer
miniapps/meshing/pmesh-fitting
@@ -266,13 +270,11 @@ miniapps/meshing/mesh.*
miniapps/meshing/order.*
miniapps/meshing/sol.*
miniapps/meshing/refined.mesh
miniapps/meshing/bounding-box*
miniapps/meshing/jacobian-determinant*
miniapps/mtop/parheat
miniapps/mtop/ParHeat/*
miniapps/mtop/ParHeat*
miniapps/mtop/seqheat
miniapps/mtop/SeqHeat/*
miniapps/mtop/SeqHeat*
miniapps/autodiff/paradiff
miniapps/autodiff/seqadiff
@@ -280,7 +282,7 @@ miniapps/autodiff/seqtest
miniapps/autodiff/par_example
miniapps/autodiff/seq_example
miniapps/autodiff/seq_test
miniapps/autodiff/Example/*
miniapps/autodiff/Exampl*
miniapps/navier/navier_mms
miniapps/navier/navier_kovasznay
@@ -303,7 +305,6 @@ miniapps/nurbs/nurbs_solenoidal
miniapps/nurbs/nurbs_printfunc
miniapps/nurbs/nurbs_patch_ex1
miniapps/nurbs/nurbs_curveint
miniapps/nurbs/nurbs_surface
miniapps/nurbs/refined.mesh
miniapps/nurbs/mesh.*
miniapps/nurbs/sol_?.gf
@@ -322,7 +323,6 @@ miniapps/nurbs/nurbs_naca_cmesh
miniapps/nurbs/naca-cmesh.mesh
miniapps/nurbs/glvis_naca-cmesh.mesh
miniapps/nurbs/Naca_cmesh
miniapps/nurbs/*-Surface.mesh
miniapps/performance/ex1
miniapps/performance/ex1p
@@ -344,7 +344,6 @@ miniapps/shifted/lsf_integral
miniapps/tools/display-basis
miniapps/tools/load-dc
miniapps/tools/convert-dc
miniapps/tools/gridfunction-bounds
miniapps/tools/lor-transfer
miniapps/tools/plor-transfer
miniapps/tools/get-values
@@ -411,15 +410,12 @@ miniapps/spde/ParaView
miniapps/tribol/contact-patch-test
miniapps/diag-smoothers/abs-l1-jacobi
miniapps/diag-smoothers/mg-abs-l1-jacobi
# Unit test binary and outputs
tests/unit/output_meshes
tests/unit/unit_tests
tests/unit/punit_tests
tests/unit/gpu_unit_tests
tests/unit/pgpu_unit_tests
tests/unit/cunit_tests
tests/unit/pcunit_tests
tests/unit/sedov_tests_*
tests/unit/psedov_tests_*
tests/unit/tmop_pa_tests_*
+5 -5
View File
@@ -22,7 +22,7 @@ include:
# the "needs" keyword and express the DAG of jobs for more efficiency.
# - We use setup and setup_baseline phases to download content outside of mfem
# directory.
# - Allocate/Release is where Dane resource are allocated/released once for all.
# - Allocate/Release is where ruby resource 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
@@ -53,7 +53,7 @@ variables:
AUTOTEST_COMMIT: "YES"
# Trigger subpipelines:
dane-build-and-test:
ruby-build-and-test:
stage: sub-pipelines
variables:
# Explicitly pass down values that we want to be able to set when triggering
@@ -61,10 +61,10 @@ dane-build-and-test:
AUTOTEST: "${AUTOTEST}"
AUTOTEST_COMMIT: "${AUTOTEST_COMMIT}"
trigger:
include: .gitlab/dane-build-and-test.yml
include: .gitlab/ruby-build-and-test.yml
strategy: depend
dane-baseline:
ruby-baseline:
stage: sub-pipelines
variables:
# Explicitly pass down values that we want to be able to set when triggering
@@ -73,7 +73,7 @@ dane-baseline:
AUTOTEST: "${AUTOTEST}"
AUTOTEST_COMMIT: "${AUTOTEST_COMMIT}"
trigger:
include: .gitlab/dane-baseline.yml
include: .gitlab/ruby-baseline.yml
strategy: depend
lassen-build-and-test:
+3 -3
View File
@@ -24,7 +24,7 @@ and `test type`.
Machines typically include:
* Dane: Intel Sapphire Rapids
* Ruby: 2nd Gen Intel Xeon (Cascade Lake)
* Lassen: Power9 + Nvidia GPU
* Corona: AMD GPU
@@ -76,13 +76,13 @@ with a spack spec of MFEM, within the limits permitted by the MFEM spack
package.
In any build-and-test sub-pipeline a job basically consists in defining the
spack spec to use. Adding a job on Dane for example resumes to:
spack spec to use. Adding a job on ruby for example resumes to:
```yaml
<job_name>:
variables:
SPEC: "<spack_spec>"
extends: .build_and_test_on_dane
extends: .build_and_test_on_ruby
```
The remaining and non trivial work is to make sure this spec is working. To
+1 -1
View File
@@ -24,7 +24,7 @@ variables:
# TODO: add a clean-up mechanism
BUILD_ROOT: ${USER_CI_TOP_DIR}/${CI_PROJECT_NAME}-${MACHINE_NAME}-pipeline-${CI_PIPELINE_ID}
# On LLNL's Dane, there is only one allocation shared among jobs in order to
# On LLNL's ruby, there is only one allocation shared among jobs in order to
# save time and resource. This allocation has to be uniquely named so that we
# are sure to retrieve it.
ALLOC_NAME: ${CI_PROJECT_NAME}_ci_${CI_PIPELINE_ID}
@@ -9,17 +9,17 @@
# terms of the BSD-3 license. We welcome feedback and contributions, see file
# CONTRIBUTING.md for details.
# GitLab pipelines configurations for the Dane machine at LLNL
# GitLab pipelines configurations for the Ruby machine at LLNL
variables:
MACHINE_NAME: dane
MACHINE_NAME: ruby
.on_dane:
.on_ruby:
tags:
- shell
- dane
- ruby
rules:
# Don't run dane jobs if...
- if: '$CI_COMMIT_BRANCH =~ /_qnone/ || $ON_DANE == "OFF"'
# Don't run ruby jobs if...
- if: '$CI_COMMIT_BRANCH =~ /_qnone/ || $ON_RUBY == "OFF"'
when: never
# Don't run autotest update if...
- if: '$CI_JOB_NAME =~ /report/ && $AUTOTEST != "YES"'
@@ -40,17 +40,16 @@ variables:
- when: on_success
# Spack helped builds
# Generic dane build job, extending build script
.build_and_test_on_dane:
extends: [.on_dane]
# Generic ruby build job, extending build script
.build_and_test_on_ruby:
extends: [.on_ruby]
stage: build_and_test
script:
# THREADS is used by 'tests/gitlab/build_and_test', run below
# Dane has 224 threads/node and we run 7 separate jobs: 224=7*32
- export THREADS=28
- export THREADS=16
- echo ${ALLOC_NAME}
- export JOBID=$(squeue -h --name=${ALLOC_NAME} --format=%A)
- echo ${JOBID}
- echo ${MFEM_DATA_DIR}
- echo ${SPEC}
- srun $( [[ -n "${JOBID}" ]] && echo "--jobid=${JOBID}" ) --reservation=ci -t 60 -N 1 tests/gitlab/build_and_test --spec "${SPEC}" --data-dir "${MFEM_DATA_DIR}" --data
- srun $( [[ -n "${JOBID}" ]] && echo "--jobid=${JOBID}" ) --reservation=ci -t 45 -N 1 tests/gitlab/build_and_test --spec "${SPEC}" --data-dir "${MFEM_DATA_DIR}" --data
+1 -1
View File
@@ -18,7 +18,7 @@
setup_baseline:
tags:
- shell
- dane
- ruby
stage: setup
variables:
GIT_STRATEGY: none
+1 -1
View File
@@ -16,7 +16,7 @@
setup:
tags:
- shell
- dane
- ruby
stage: setup
variables:
GIT_STRATEGY: none
@@ -19,8 +19,8 @@ stages:
- cleanup
- baseline_publish
baselinecheck_mfem_intel_dane:
extends: [.on_dane]
baselinecheck_mfem_intel_ruby:
extends: [.on_ruby]
stage: baseline_check
variables:
# TPLS_DIR is used in .gitlab/scripts/baseline to provide the tpls location
@@ -31,8 +31,8 @@ baselinecheck_mfem_intel_dane:
script:
- echo ${BUILD_ROOT}
- echo ${TPLS_DIR}
# Used by the tests in MFEM/tests, dane has 224 threads/node:
- export MFEM_TEST_NP=192
# Used by the tests in MFEM/tests:
- export MFEM_TEST_NP=48
# The next script uses the following environment variables:
# * BASELINE_TEST, SYS_TYPE, CI_PROJECT_DIR, ARTIFACTS_DIR,
# * BUILD_ROOT, TPLS_DIR, MACHINE_NAME
@@ -44,7 +44,7 @@ baselinecheck_mfem_intel_dane:
allow_failure: true
cleanup:
extends: .on_dane
extends: .on_ruby
stage: cleanup
variables:
GIT_STRATEGY: none
@@ -53,7 +53,7 @@ cleanup:
- rm -rf "${BUILD_ROOT}" || true
report_baseline:
extends: [.on_dane]
extends: [.on_ruby]
stage: baseline_report
script:
- echo ${MACHINE_NAME}
@@ -113,8 +113,8 @@ report_baseline:
exit $err
) 9> autotest.lock
baselinepublish_mfem_dane:
extends: [.on_dane]
baselinepublish_mfem_ruby:
extends: [.on_ruby]
stage: baseline_publish
rules:
# - if: '$CI_COMMIT_BRANCH == "master" || $REBASELINE == "YES"'
@@ -129,5 +129,5 @@ baselinepublish_mfem_dane:
include:
- local: .gitlab/configs/common.yml
- local: .gitlab/configs/dane-config.yml
- local: .gitlab/configs/ruby-config.yml
- local: .gitlab/configs/setup-baseline.yml
@@ -19,54 +19,54 @@ stages:
allocate_resource:
variables:
GIT_STRATEGY: none
extends: .on_dane
extends: .on_ruby
stage: allocate_resource
script:
- echo ${ALLOC_NAME}
- salloc --exclusive --nodes=1 --reservation=ci --time=60 --no-shell --job-name=${ALLOC_NAME}
timeout: 6h
# GitLab jobs for the Dane machine at LLNL
# GitLab jobs for the Ruby machine at LLNL
debug_ser_gcc_10:
variables:
SPEC: "%gcc@10.3.1 +debug~mpi"
extends: .build_and_test_on_dane
extends: .build_and_test_on_ruby
debug_par_gcc_10:
variables:
SPEC: "%gcc@10.3.1 +debug+mpi"
extends: .build_and_test_on_dane
extends: .build_and_test_on_ruby
opt_ser_gcc_10:
variables:
SPEC: "%gcc@10.3.1 ~mpi"
extends: .build_and_test_on_dane
extends: .build_and_test_on_ruby
opt_par_gcc_10:
variables:
SPEC: "%gcc@10.3.1"
extends: .build_and_test_on_dane
extends: .build_and_test_on_ruby
opt_par_gcc_10_sundials:
variables:
SPEC: "%gcc@10.3.1 +sundials"
extends: .build_and_test_on_dane
extends: .build_and_test_on_ruby
opt_par_gcc_10_petsc:
variables:
SPEC: "%gcc@10.3.1 +petsc ^petsc+mumps~superlu-dist"
extends: .build_and_test_on_dane
extends: .build_and_test_on_ruby
opt_par_gcc_10_pumi:
variables:
SPEC: "%gcc@10.3.1 +pumi"
extends: .build_and_test_on_dane
extends: .build_and_test_on_ruby
# Release
release_resource:
variables:
GIT_STRATEGY: none
extends: .on_dane
extends: .on_ruby
stage: release_resource_and_report
script:
- echo ${ALLOC_NAME}
@@ -78,17 +78,17 @@ release_resource:
report_job_success:
stage: release_resource_and_report
extends:
- .on_dane
- .on_ruby
- .report_job_success
report_job_failure:
stage: release_resource_and_report
extends:
- .on_dane
- .on_ruby
- .report_job_failure
include:
- local: .gitlab/configs/common.yml
- local: .gitlab/configs/dane-config.yml
- local: .gitlab/configs/ruby-config.yml
- local: .gitlab/configs/setup-build-and-test.yml
- local: .gitlab/configs/report-build-and-test.yml
+2 -2
View File
@@ -14,7 +14,7 @@
# locals
glob_err=${BASELINE_TEST}.err
base=${BASELINE_TEST}-${SYS_TYPE}
if [[ "${MACHINE_NAME}" == "dane" ]]; then
if [[ "${MACHINE_NAME}" == "ruby" ]]; then
base="${BASELINE_TEST}-${MACHINE_NAME}"
fi
base_diff=${base}.diff
@@ -31,7 +31,7 @@ cd tests
mkdir _${BASELINE_TEST} && cd _${BASELINE_TEST}
# run
if [[ "${MACHINE_NAME}" == "dane" ]]; then
if [[ "${MACHINE_NAME}" == "ruby" ]]; then
salloc --nodes=1 --exclusive --reservation=ci ../runtest ../../mfem "${BASELINE_TEST} ${TPLS_DIR}"
elif [[ ${MACHINE_NAME} == "corona" ]]; then
salloc --nodes=1 -t 60 -p pbatch ../runtest ../../mfem "${BASELINE_TEST} ${TPLS_DIR}"
+2 -2
View File
@@ -11,7 +11,7 @@
# terms of the BSD-3 license. We welcome feedback and contributions, see file
# CONTRIBUTING.md for details.
# There will be collision between corona and dane baselines.
# There will be collision between corona and ruby baselines.
# Once the corresponding files have been generated, we can switch to machine
# specific ref.
ARTIFACT_PATH=${CI_PROJECT_DIR}/${ARTIFACTS_DIR}/baseline-${SYS_TYPE}
@@ -21,7 +21,7 @@ PATCH_FILE=${ARTIFACT_PATH}.patch
FULL_FILE=${ARTIFACT_PATH}.out
DIFF_FILE=${ARTIFACT_PATH}.diff
# There will be collision between corona and dane baselines.
# There will be collision between corona and ruby baselines.
# Once the corresponding files have been generated, we can switch to machine
# specific ref.
SAVED_NAME=baseline-${SYS_TYPE}.saved
-118
View File
@@ -8,124 +8,6 @@
https://mfem.org
Version 4.8.1 (development)
===========================
Starting with this version, MFEM requires a C++17 compiler.
Discretization improvements
---------------------------
- Introduced dFEM: a new MFEM capability for Automatic Differentiation (AD) of
nonlinear finite element operators, based on Enzyme or dual numbers AD at
quadrature points. These features are part of the new mfem::future namespace
and some of the API can change in the future. See the new dFEM minimal surface
miniapp in the miniapps/dfem/ directory for illustration of dFEM's use.
- Using Enzyme for AD in MFEM is tested with clang v19 and requires clang/LLVM
built with plugin support. See INSTALL for more details.
- In the ParMoonolith integration, added support for variational resampling of
H1 vector fields.
- Added support for boundary integration to the hyperbolic framework. In this
regard, new classes `BdrHyperbolicDirichletIntegrator` and
`BoundaryHyperbolicFlowIntegrator` have been introduced for implementation
of weak Dirichlet boundary conditions with a general flux or for the linear
case respectively.
- Added method to compute piecewise linear bounds on high-order functions on
tensor-product elements.
- Parallel anisotropic refinement of hexahedral meshes is now supported,
provided that neighboring hexahedra are not refined in conflicting directions.
A new ParMesh method is added to check for such conflicts, before refinement.
Meshing improvements
--------------------
- Introduced NC-patch NURBS meshes, which are conforming element-wise but allow
for nonconforming patch topology. This new mesh format supports element
spacing formulas for refinement, as well as local refinement factors for a
subset of knot vectors.
- Added support for higher order meshes in Mesh::MakeSimplicial and
ParMesh::MakeSimplicial.
- Added a new miniapp for interpolating a surface grid of points in 3D using a
smooth NURBS surface, that can then be sampled at arbitrary resolution while
staying close to the original geometry. See miniapps/nurbs/nurbs_surface.
GPU computing
-------------
- The function Vector::SetSubVector(const Array<int> &, const real_t) now
executes on device if either the vector or the array have the device flag
set. This is most often used for setting constant essential boundary
conditions. A new function Vector::SetSubVectorHost has been added in cases
where host execution is always needed (e.g. when the DOFs array is small).
- Introduced MFEM_FOREACH_THREAD_DIRECT, which directly maps loop tasks to GPU
threads, assigning one task per thread.
- Implemented a GPU-accelerated matrix-free AMR derefinement `GridFunction`
update operator. This supports mixed geometry meshes and variable order
spaces, and is the default derefinement operator constructed by
`FiniteElementSpace::Update` and `ParFiniteElementSpace::Update`.
The operator requires `FiniteElementSpace::Nonconforming() == true`.
- Added new method: GridFunction::GetGradients, with GPU support, for computing
the gradients of a GridFunction on all elements.
- Added GPU support in GradientGridFunctionCoefficient and
InnerProductCoefficient by implementing their Project methods.
New and updated examples and miniapps
-------------------------------------
- Added miniapps to demonstrate an implementation of the absolute-value
L(1)-Jacobi preconditioners in partially assembled operators. This includes
Multigrid wrapper to demonstrate the effectiveness of these Jacobi-type
operators as smoothers.
These miniapps can be found in `miniapps/diag-smoothers`.
- Added a new miniapp (meshing/mesh-bounding-boxes) that computes the bounding
boxes for each element of a given mesh, and the bounds on the determinant of
the Jacobian of the transformation.
- Added a new miniapp (tools/gridfunction-bounds) to compute piecewise linear
bounds on a given high-order grid function.
- Added a new miniapp (electromagnetics/lorentz) which computes the trajectory
of a charged particle, subject to Lorentz forces, in electrostatic and/or
magnetostatic fields as computed by the volta or tesla miniapps.
API changes:
-----------
- mfem::internal::tensor and mfem::internal::dual have been moved to
mfem::future::tensor and mfem::future::dual.
- API addition: in class `Operator`, added virtual functions: `AbsMult`, and
`AbsMultTranspose`; in class `Vector`, added `Abs` and `Pow`.
Miscellaneous
-------------
- Added the "gpu", "raja-gpu", and "ceed-gpu" backend aliases/shortcuts which
automatically select between CUDA or HIP.
- The CUDA-specific names used by some of the unit tests like 'cunit_tests' and
'pcunit_tests' were replaced by names using 'gpu' instead of 'c' (short for
CUDA) or 'cuda'. These tests automatically run the CUDA/HIP tests based on the
MFEM build configuration.
- Added the option to enable GPU-aware MPI in MFEM using the environment
variable 'MFEM_GPU_AWARE_MPI' set to any value. Setting this environment
variable is an alternative to calling 'Device::SetGPUAwareMPI(true)'.
- Added parallel Address Sanitizer, serial and parallel Undefined Behavior
Sanitizer and serial Memory Sanitizer GitHub actions tests on Ubuntu.
- FindPointsGSLIB has a new constructor that accepts the mesh object and
internally calls the Setup() method so that the user does not have to.
The FreeData() method has also been moved to the destructor so the user does
not need to manually free-up the memory if the destructor is called before
MPI_Finalize().
Version 4.8, released on Apr 9, 2025
====================================
+19 -59
View File
@@ -18,8 +18,8 @@ message(STATUS "CMake version: ${CMAKE_VERSION}")
set(USER_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/config/user.cmake" CACHE PATH
"Path to optional user configuration file.")
# Require C++17 and disable compiler-specific extensions
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use.")
# Require C++11 and disable compiler-specific extensions
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use.")
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL
"Force the use of the chosen C++ standard.")
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Enable C++ standard extensions.")
@@ -59,7 +59,7 @@ project(mfem NONE)
# Current version of MFEM, see also `makefile`.
# mfem_VERSION = (string)
# MFEM_VERSION = (int) [automatically derived from mfem_VERSION]
set(${PROJECT_NAME}_VERSION 4.8.1)
set(${PROJECT_NAME}_VERSION 4.8.0)
# Prohibit in-source build
if (${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR})
@@ -133,6 +133,7 @@ if (MFEM_USE_CUDA)
if (NOT CMAKE_CUDA_HOST_COMPILER)
set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER})
endif()
set(CUDA_FLAGS "--expt-extended-lambda")
if (CMAKE_VERSION VERSION_LESS 3.18.0)
set(CUDA_FLAGS "-arch=${CUDA_ARCH} ${CUDA_FLAGS}")
elseif (NOT CMAKE_CUDA_ARCHITECTURES)
@@ -147,20 +148,6 @@ if (MFEM_USE_CUDA)
endif()
message(STATUS "Using CUDA architecture: ${CUDA_ARCH}")
enable_language(CUDA)
if (CMAKE_VERSION VERSION_LESS 3.18.0)
# backup try to detect if this is clang or nvcc
if(CMAKE_CUDA_COMPILER MATCHES "nvcc$")
# nvcc
set(MFEM_CUDA_COMPILER_IS_NVCC ON)
set(CUDA_FLAGS "${CUDA_FLAGS} --expt-extended-lambda --expt-relaxed-constexpr")
endif()
else()
if (CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA")
# nvcc
set(MFEM_CUDA_COMPILER_IS_NVCC ON)
set(CUDA_FLAGS "${CUDA_FLAGS} --expt-extended-lambda --expt-relaxed-constexpr")
endif()
endif()
set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING
"CUDA standard to use.")
set(CMAKE_CUDA_STANDARD_REQUIRED ON CACHE BOOL
@@ -269,20 +256,11 @@ if (MFEM_USE_OPENMP OR MFEM_USE_LEGACY_OPENMP)
if (OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
if (MFEM_USE_CUDA)
if(MFEM_CUDA_COMPILER_IS_NVCC)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=${OpenMP_CXX_FLAGS}")
else()
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=${OpenMP_CXX_FLAGS}")
endif()
endif()
endif()
# Umpire (must be included before hypre, so hypre can use it if needed)
if (MFEM_USE_UMPIRE)
find_package(UMPIRE REQUIRED)
endif()
# MPI -> hypre; PETSc (optional)
if (MFEM_USE_MPI)
find_package(MPI REQUIRED)
@@ -410,11 +388,6 @@ if (MFEM_USE_GSLIB)
find_package(GSLIB REQUIRED)
endif()
# HDF5
if (MFEM_USE_HDF5)
find_package(HDF5 REQUIRED)
endif()
# NetCDF
if (MFEM_USE_NETCDF)
find_package(NetCDF REQUIRED)
@@ -500,13 +473,14 @@ endif()
# RAJA
if (MFEM_USE_RAJA)
# RAJA uses FindCUDA, which needs CMP0146=OLD in CMake >= 3.27
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.27.0)
cmake_policy(SET CMP0146 OLD)
endif()
find_package(RAJA REQUIRED)
endif()
# UMPIRE
if (MFEM_USE_UMPIRE)
find_package(UMPIRE REQUIRED)
endif()
# GOOGLE-BENCHMARK
if (MFEM_USE_BENCHMARK)
find_package(Benchmark REQUIRED)
@@ -553,10 +527,9 @@ if (MFEM_USE_TRIBOL)
endif()
endif()
# Enzyme
if (MFEM_USE_ENZYME)
find_package(Enzyme REQUIRED HINTS ${ENZYME_DIR})
message(STATUS "Enzyme found in ${ENZYME_DIR}.")
set(ENZYME_INCLUDE_DIRS ${ENZYME_DIR}/include)
find_package(ENZYME REQUIRED)
endif()
# MFEM_TIMER_TYPE
@@ -596,29 +569,22 @@ find_package(Threads REQUIRED)
# integers, the METIS header (with 32-bit indices, as used by mfem) needs to
# be before SuiteSparse.
set(MFEM_TPLS OPENMP HYPRE LAPACK BLAS SuperLUDist STRUMPACK METIS SuiteSparse
SUNDIALS PETSC SLEPC MUMPS AXOM FMS CONDUIT Ginkgo GNUTLS GSLIB HDF5
SUNDIALS PETSC SLEPC MUMPS AXOM FMS CONDUIT Ginkgo GNUTLS GSLIB
NETCDF MPFR PUMI HIOP POSIXCLOCKS MFEMBacktrace ZLIB OCCA CEED RAJA UMPIRE
ADIOS2 MKL_CPARDISO MKL_PARDISO AMGX MAGMA CUSPARSE CUBLAS CALIPER CODIPACK
BENCHMARK PARELAG TRIBOL MPI_CXX HIP HIPBLAS HIPSPARSE MOONOLITH BLITZ
ALGOIM ENZYME CUDA::cudart)
ALGOIM ENZYME)
# Add all created targets and *_FOUND libraries in the variables TPL_TARGETS and
# TPL_LIBRARIES, respectively.
set(TPL_TARGETS)
# Add all *_FOUND libraries in the variable TPL_LIBRARIES.
set(TPL_LIBRARIES "")
set(TPL_INCLUDE_DIRS "")
foreach(TPL IN LISTS MFEM_TPLS)
if (${TPL}_FOUND OR TARGET ${TPL})
if (${TPL}_FOUND)
message(STATUS "MFEM: using package ${TPL}")
if (TARGET ${TPL})
list(APPEND TPL_TARGETS ${TPL})
else()
list(APPEND TPL_LIBRARIES ${${TPL}_LIBRARIES})
list(APPEND TPL_INCLUDE_DIRS ${${TPL}_INCLUDE_DIRS})
endif()
list(APPEND TPL_LIBRARIES ${${TPL}_LIBRARIES})
list(APPEND TPL_INCLUDE_DIRS ${${TPL}_INCLUDE_DIRS})
endif()
endforeach(TPL)
list(REVERSE TPL_LIBRARIES)
list(REMOVE_DUPLICATES TPL_LIBRARIES)
list(REVERSE TPL_LIBRARIES)
@@ -691,10 +657,7 @@ set(MFEM_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
# Declaring the library
mfem_add_library(mfem ${SOURCES} ${HEADERS} ${MASTER_HEADERS})
# message(STATUS "TPL_LIBRARIES = ${TPL_LIBRARIES}")
target_link_libraries(mfem PUBLIC ${TPL_LIBRARIES} ${TPL_TARGETS})
if (TPL_TARGETS)
add_dependencies(mfem ${TPL_TARGETS})
endif()
target_link_libraries(mfem PUBLIC ${TPL_LIBRARIES})
if (MINGW)
target_link_libraries(mfem PRIVATE ws2_32)
endif()
@@ -718,9 +681,6 @@ if (MFEM_USE_MPI)
target_link_libraries(mfem PUBLIC ${MPI_CXX_LINK_FLAGS})
endif()
endif()
if (MFEM_USE_ENZYME)
target_link_libraries(mfem PUBLIC ClangEnzymeFlags)
endif()
set_target_properties(mfem PROPERTIES VERSION "${mfem_VERSION}")
set_target_properties(mfem PROPERTIES SOVERSION "${mfem_VERSION}")
+1 -5
View File
@@ -120,7 +120,6 @@ The MFEM source code has the following structure:
| └── superlu
├── fem
│ ├── ceed
│ ├── dfem
│ ├── eltrans
│ ├── fe
│ ├── gslib
@@ -139,7 +138,6 @@ The MFEM source code has the following structure:
│ ├── adjoint
│ ├── autodiff
│ ├── common
│ ├── dfem
│ ├── dpg
│ ├── electromagnetics
│ ├── gslib
@@ -551,8 +549,6 @@ Before a PR can be merged, it should satisfy the following:
- [ ] Add a short description of the example in the "Extensive Examples" section of `features.md`.
- [ ] New miniapps:
- [ ] All sample runs at the top of the miniapp source file work.
- [ ] Add to internal testing repo, if sample runs should be included in nightly tests [internally](#tests-at-llnl).
- [ ] Exclude long sample runs from automated testing, with `* ` (one space) before the command.
- [ ] Update top-level `makefile` and `makefile` in corresponding miniapp directory.
- [ ] Add the miniapp binary and any files generated by it to the top-level `.gitignore` file.
- [ ] Update CMake build system:
@@ -747,7 +743,7 @@ and debug build is performed with a simple run of `ex1` to verify the executable
- We mirror the `master` and `next` branches internally (to `gh-master` and
`gh-next`) and run longer nightly tests via cron. On the weekends, a more
extensive test is run which extracts and executes all the different sample
runs from each example and most miniapps.
runs from each example.
- We also mirror PRs on the LLNL GitLab instance. PR mirroring can only be
triggered by _LLNL developers_, but test status is publicly available. Only
+9 -104
View File
@@ -121,11 +121,6 @@ Parallel build:
make -j 4
(For METIS 5, see https://mfem.org/building/#parallel-build-using-metis-5)
Parallel build with fetching of hypre and METIS:
mkdir <mfem-buil-dir> ; cd <mfem-build-dir>
cmake <mfem-source-dir> -DMFEM_USE_MPI=YES -DFETCH_TPLS=YES
make -j 4
CUDA build:
(this build requires CMake 3.17 or newer)
mkdir <mfem-build-dir> ; cd <mfem-build-dir>
@@ -268,7 +263,7 @@ See the configuration file config/defaults.mk for the default settings.
Compilers:
CXX - C++ compiler, serial build
MPICXX - MPI C++ compiler, parallel build
CUDA_CXX - The CUDA compiler, 'nvcc' or 'clang++'
CUDA_CXX - The CUDA compiler, 'nvcc'
Compiler options:
OPTIM_FLAGS - Options for optimized build
@@ -428,10 +423,6 @@ MFEM_USE_GNUTLS = YES/NO
When MFEM_USE_GNUTLS is enabled, the additional build options, GNUTLS_*, are
also used, see below.
MFEM_USE_HDF5 = YES/NO
The HDF5 library is used for input and output of HDF5 files, for example
Cubit mesh files or VTKHDF files for ParaView.
MFEM_USE_NETCDF = YES/NO
NetCDF is the library that is used by the SNL Cubit mesh generator to create
Genesis mesh files. This option enables a reader for these files, which
@@ -613,12 +604,11 @@ MFEM_USE_TRIBOL = YES/NO
MFEM_USE_ENZYME = YES/NO
Enables automatic differentiation support through the LLVM plugin Enzyme.
This requires the compiler to be set to clang (>=14.0.0). We also advise the
use of the link time optimization (LTO) plugin, so functions defined over
multiple files (compilation units) can be differentiated automatically. This
requires to also use LLVM/LLD for linking. The recommended options are in
config/defaults.mk. For more detailed instructions, see the section "Specific
options for Enzyme" below.
This requires the compiler to be set to clang (>=14.0.0). We also advise to
use the link time optimization (LTO) plugin, to enable functions that you
define over multiple files (compilation units) and want to be differentiated
automatically, to work. This requires to also use LLVM/LLD for linking.
Recommended options are in config/defaults.mk.
MFEM_BUILD_TAG = (any value)
An optional tag to characterize the build. Exported to config/config.mk.
@@ -668,7 +658,6 @@ The specific libraries and their options are:
- OpenMP (optional), usually part of compiler, used when either MFEM_USE_OPENMP
or MFEM_USE_LEGACY_OPENMP is set to YES.
Options: OPENMP_OPT, OPENMP_LIB.
Versions: OpenMP >= 3.1 when MFEM_USE_OPENMP=YES.
- High-resolution POSIX clocks: when using MFEM_TIMER_TYPE = 2, it may be
necessary to link with a system library (e.g. librt.so).
@@ -744,9 +733,6 @@ The specific libraries and their options are:
Options: GNUTLS_OPT, GNUTLS_LIB.
Versions: GnuTLS >= 2.12.0, older versions may work too.
- HDF5 (optional), used when MFEM_USE_HDF5 = YES, required for reading and
writing files in VTKHDF format.
- NetCDF (optional), used when MFEM_USE_NETCDF = YES, required for reading Cubit
mesh files. Also requires installation of HDF5 and ZLIB, as explained at the
NetCDF web site. Note that we use the plain vanilla "C" version of NetCDF, you
@@ -842,13 +828,12 @@ 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, CUDA_DIR (when CUDA_CXX=clang++).
Options: CUDA_CXX, CUDA_ARCH, CUDA_OPT, CUDA_LIB.
Versions: CUDA >= 10.1.168.
- HIP (optional), used when MFEM_USE_HIP = YES.
URL: https://rocmdocs.amd.com
Options: HIP_CXX, HIP_ARCH, HIP_OPT, HIP_LIB.
Versions: ROCm >= 5.6.1.
- OCCA (optional), used when MFEM_USE_OCCA = YES.
URL: https://libocca.org
@@ -859,7 +844,7 @@ The specific libraries and their options are:
URL: https://github.com/CEED/libCEED
https://ceed.exascaleproject.org/libceed
Options: CEED_DIR, CEED_OPT, CEED_LIB.
Versions: libCEED >= 0.12.0.
Versions: libCEED >= 0.12.
- RAJA (optional), used when MFEM_USE_RAJA = YES.
Beginning with MFEM v4.5.1, only RAJA v2022.10.3+ is supported.
@@ -919,7 +904,7 @@ The specific libraries and their options are:
- Enzyme, used when MFEM_USE_ENZYME = YES. Requires LLVM/Clang >= 14.0.0.
URL: https://github.com/EnzymeAD/Enzyme
Options: ENZYME_DIR, ENZYME_OPT, ENZYME_LIB.
Versions: Enzyme >= v0.0.176.
Versions: Enzyme >= v0.0.33.
Building with CMake
@@ -1053,7 +1038,6 @@ MFEM_USE_STRUMPACK
MFEM_USE_GINKGO
MFEM_USE_AMGX
MFEM_USE_GNUTLS
MFEM_USE_HDF5
MFEM_USE_NETCDF
MFEM_USE_MPFR
MFEM_USE_ZLIB
@@ -1081,9 +1065,6 @@ The following options are CMake specific:
MFEM_ENABLE_TESTING - Enable the ctest framework for testing.
MFEM_ENABLE_EXAMPLES - Build all of the examples by default.
MFEM_ENABLE_MINIAPPS - Build all of the miniapps by default.
FETCH_TPLS - Enable fetching of all supported third-party libraries.
HYPRE_FETCH - Enable fetching of hypre.
METIS_FETCH - Enable fetching of metis.
External libraries (CMake):
---------------------------
@@ -1145,12 +1126,6 @@ The following built-in CMake packages are also used:
set the <LIBNAME>_LIBRARIES option directly; the configuration option
<LIBNAME>_DIR is not supported.
The MFEM CMake build system also provides fetching (automated building) for the
packages/libraries listed below. Note that when fetching is enabled, any related
auto-detection functionality is disabled.
- HYPRE
- METIS
Building without GNU make or CMake
==================================
@@ -1207,73 +1182,3 @@ the older HIP C++ library build/linkage. To ensure proper build and linkage
check that `CMAKE_CXX_COMPILER` and `CMAKE_HIP_COMPILER` are set to the same
compiler. This is especially important when using an MPI compiler (for example
crayCC) where some linker flags may get dropped if these two are not identical.
Specific options for Enzyme
===========================
To work properly, MFEM and Enzyme need to use the same LLVM/Clang configuration.
For example, on macOS this can be done by using Homebrew: first install Enzyme,
which in turn installs LLVM as a dependency (as of May 2025, this is LLVM 19):
brew install enzyme
In order to ensure the correct compiler choice for the MFEM makefile build, set
CXX = $(shell brew --prefix llvm@19)/bin/clang++
in the user.mk file (adapted from config/defaults.mk, see the section "Building
with GNU make" above). With MPI, it is convenient to set
MPICXX = OMPI_CXX=$(CXX) mpicxx
for OpenMPI and
MPICXX = MPICH_CXX=$(CXX) mpicxx
for MPICH.
Additionally, the Enzyme directory needs to be set in user.mk as follows:
ENZYME_DIR = $(shell brew --prefix enzyme)
Specifically, a full build on a Mac can be tested by adding the following
user.mk file in the config/ directory
MFEM_USE_ENZYME = YES
ENZYME_DIR = $(shell brew --prefix enzyme)
LLVM_DIR = $(shell brew --prefix llvm@19)
CXX = $(LLVM_DIR)/bin/clang++
MFEM_USE_MPI = YES
MPICXX = OMPI_CXX=$(CXX) mpicxx
and running
make config
make -j
cd miniapps/dfem
make
./dfem-minimal-surface
On Linux systems, for example Ubuntu 24.04, use the package manager to install
the Enzyme dependencies
sudo apt install libclang-dev libzstd-dev llvm-dev clang
and then clone and build Enzyme
cd $HOME
git clone https://github.com/EnzymeAD/Enzyme.git
cd Enzyme/enzyme && mkdir build && cd build
CC=clang CXX=clang++ cmake .. -DLLVM_DIR=/usr/lib/llvm-18/lib/cmake -DCMAKE_INSTALL_PREFIX=$HOME/Enzyme/enzyme/build
make -j
make install
From here, one can proceed in the same way using the following user.mk settings
MFEM_USE_ENZYME = YES
ENZYME_DIR = $(HOME)/Enzyme/enzyme/build
CXX = clang++
MFEM_USE_MPI = YES
MPICXX = OMPI_CXX=$(CXX) mpicxx
On other Linux systems the LLVM packages may have different names, for example
on RHEL9, one needs to "sudo yum install llvm-devel libzstd clang-devel".
-26
View File
@@ -41,7 +41,6 @@ set(MFEM_USE_MAGMA @MFEM_USE_MAGMA@)
set(MFEM_USE_HIOP @MFEM_USE_HIOP@)
set(MFEM_USE_GNUTLS @MFEM_USE_GNUTLS@)
set(MFEM_USE_GSLIB @MFEM_USE_GSLIB@)
set(MFEM_USE_HDF5 @MFEM_USE_HDF5@)
set(MFEM_USE_NETCDF @MFEM_USE_NETCDF@)
set(MFEM_USE_PETSC @MFEM_USE_PETSC@)
set(MFEM_USE_SLEPC @MFEM_USE_SLEPC@)
@@ -84,31 +83,6 @@ set_and_check(MFEM_LIBRARY_DIR "@PACKAGE_LIB_INSTALL_DIR@")
check_required_components(MFEM)
include(CMakeFindDependencyMacro)
if (MFEM_USE_CUDA)
# required for projects linking to MFEM+CUDA, even if they don't use CUDA directly
find_dependency(CUDAToolkit)
endif (MFEM_USE_CUDA)
if (MFEM_USE_HIP)
# hip/rocm uses the modern MFEM way of linking to targets, need to find dependencies
find_dependency(HIP)
find_dependency(HIPBLAS)
find_dependency(HIPSPARSE)
if (MFEM_USE_MPI)
# assume HYPRE uses HIP
# alternatively could check HYPRE_USING_HIP
find_dependency(rocsparse)
find_dependency(rocrand)
find_dependency(rocsolver)
endif (MFEM_USE_MPI)
endif (MFEM_USE_HIP)
if (MFEM_USE_RAJA)
find_dependency(RAJA)
endif()
if (NOT TARGET mfem)
include(${CMAKE_CURRENT_LIST_DIR}/MFEMTargets.cmake)
endif (NOT TARGET mfem)
-3
View File
@@ -132,9 +132,6 @@
// Enable Conduit support.
#cmakedefine MFEM_USE_CONDUIT
// Enable functionality based on the HDF5 library (reading VTKHDF files).
#cmakedefine MFEM_USE_HDF5
// Enable functionality based on the NetCDF library (reading CUBIT files).
#cmakedefine MFEM_USE_NETCDF
+27
View File
@@ -0,0 +1,27 @@
# Copyright (c) 2010-2025, 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.
message(STATUS "Looking for ENZYME ...")
message(STATUS " in ENZYME_DIR = ${ENZYME_DIR}")
# Make sure the directory and version combination works. Do nothing otherwise.
if(EXISTS "${ENZYME_DIR}/ClangEnzyme-${ENZYME_VERSION}.so")
message(STATUS "Found ENZYME: ${ENZYME_DIR}/ClangEnzyme-${ENZYME_VERSION}.so")
# Set ENZYME_FOUND
set(ENZYME_FOUND TRUE CACHE BOOL "ENZYME was found." FORCE)
# Set CXX flags to accommodate the Enzyme Clang plugin
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -load -Xclang ${ENZYME_DIR}/ClangEnzyme-${ENZYME_VERSION}.so -mllvm -enzyme-loose-types=1")
set(MFEM_USE_ENZYME YES)
else()
endif()
+4 -99
View File
@@ -9,25 +9,21 @@
# terms of the BSD-3 license. We welcome feedback and contributions, see file
# CONTRIBUTING.md for details.
# Defines the following variables if fetching of TPLs is disabled (default):
# Defines the following variables:
# - HYPRE_FOUND
# - HYPRE_LIBRARIES
# - HYPRE_INCLUDE_DIRS
# - HYPRE_VERSION
# - HYPRE_USING_CUDA (internal)
# - HYPRE_USING_HIP (internal)
# otherwise, the following are defined:
# - HYPRE (imported library target)
# - HYPRE_VERSION (cache variable)
if (HYPRE_FOUND OR TARGET HYPRE)
if (HYPRE_FOUND)
if (HYPRE_USING_CUDA)
find_package(CUDAToolkit REQUIRED)
endif()
if (HYPRE_USING_HIP)
find_package(rocsparse REQUIRED)
find_package(rocrand REQUIRED)
find_package(rocsolver REQUIRED)
endif()
if (HYPRE_LIBRARIES AND HYPRE_INCLUDE_DIRS AND HYPRE_VERSION)
find_package_handle_standard_args(HYPRE
@@ -37,95 +33,6 @@ if (HYPRE_FOUND OR TARGET HYPRE)
endif()
endif()
if (HYPRE_FETCH OR FETCH_TPLS)
# Collect all HYPRE_ENABLE variables and pass them to hypre, assuming they are BOOL.
set(HYPRE_CMAKE_OPTIONS "")
get_cmake_property(all_vars VARIABLES)
foreach(var ${all_vars})
if(var MATCHES "^HYPRE_ENABLE")
list(APPEND HYPRE_CMAKE_OPTIONS "-D${var}:BOOL=${${var}}")
endif()
endforeach()
set(HYPRE_FETCH_VERSION 2.33.0)
set(HYPRE_FETCH_TAG "v${HYPRE_FETCH_VERSION}" CACHE STRING "Tag, branch, or commit for HYPRE")
add_library(HYPRE STATIC IMPORTED)
# set options and associated dependencies
list(APPEND HYPRE_CMAKE_OPTIONS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE})
if (MFEM_USE_CUDA)
list(APPEND HYPRE_CMAKE_OPTIONS -DHYPRE_ENABLE_CUDA:BOOL=ON -DCMAKE_CUDA_ARCHITECTURES:STRING=${CMAKE_CUDA_ARCHITECTURES})
find_package(CUDAToolkit REQUIRED)
target_link_libraries(HYPRE INTERFACE CUDA::cusparse CUDA::curand CUDA::cublas)
elseif (MFEM_USE_HIP)
list(APPEND HYPRE_CMAKE_OPTIONS -DHYPRE_ENABLE_HIP:BOOL=ON)
find_package(rocsparse REQUIRED)
find_package(rocrand REQUIRED)
target_link_libraries(HYPRE INTERFACE rocsparse rocrand)
endif()
if (MFEM_USE_CUDA OR MFEM_USE_HIP)
if (MFEM_USE_UMPIRE)
if (EXISTS ${umpire_DIR})
list(APPEND HYPRE_CMAKE_OPTIONS -DHYPRE_ENABLE_UMPIRE:BOOL=ON -Dumpire_DIR:PATH=${umpire_DIR})
else()
message(FATAL_ERROR "MFEM_USE_UMPIRE=ON, however umpire_DIR isn't visible to HYPRE")
endif()
else()
list(APPEND HYPRE_CMAKE_OPTIONS -DHYPRE_ENABLE_UMPIRE:BOOL=OFF)
message(WARNING
"================================================================================
Umpire is disabled while building HYPRE with GPU support.
This is not recommended for performance reasons!
Consider enabling Umpire with -DMFEM_USE_UMPIRE=ON and providing -DUMPIRE_DIR.
================================================================================")
endif()
endif()
if (MFEM_USE_SINGLE)
list(APPEND HYPRE_CMAKE_OPTIONS -DHYPRE_ENABLE_SINGLE:BOOL=ON)
endif()
# define external project and create future include directory so it is present
# to pass CMake checks at end of MFEM configuration step
message(STATUS "Will fetch HYPRE ${HYPRE_FETCH_TAG} to be built with ${HYPRE_CMAKE_OPTIONS}")
set(HYPRE_INSTALL ${CMAKE_BINARY_DIR}/fetch/hypre)
include(ExternalProject)
ExternalProject_Add(hypre
GIT_REPOSITORY https://github.com/hypre-space/hypre.git
GIT_TAG ${HYPRE_FETCH_TAG}
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
UPDATE_DISCONNECTED TRUE
SOURCE_SUBDIR src
PREFIX ${HYPRE_INSTALL}
BUILD_COMMAND ${CMAKE_COMMAND} --build . -- -j${CMAKE_BUILD_PARALLEL_LEVEL}
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${HYPRE_INSTALL} -DCMAKE_INSTALL_LIBDIR:PATH=lib ${HYPRE_CMAKE_OPTIONS})
file(MAKE_DIRECTORY ${HYPRE_INSTALL}/include)
# set imported library target properties
add_dependencies(HYPRE hypre)
set_target_properties(HYPRE PROPERTIES
IMPORTED_LOCATION ${HYPRE_INSTALL}/lib/libHYPRE.a
INTERFACE_INCLUDE_DIRECTORIES ${HYPRE_INSTALL}/include)
# convert HYPRE version to integer
if (HYPRE_FETCH_TAG MATCHES "^v?([0-9]+)\\.([0-9]+)\\.([0-9]+)$")
# Exact release tag X.Y.Z
string(REGEX MATCHALL "[0-9]+" HYPRE_SPLIT_VERSION "${HYPRE_FETCH_TAG}")
elseif (HYPRE_FETCH_VERSION MATCHES "([0-9]+)\\.([0-9]+)(\\.([0-9]+))?")
string(REGEX MATCHALL "[0-9]+" HYPRE_SPLIT_VERSION "${HYPRE_FETCH_VERSION}")
else (NOT DEFINED HYPRE_VERSION)
message(FATAL_ERROR "Unable to find HYPRE release version. Please provide it via -DHYPRE_VERSION")
endif()
if (HYPRE_SPLIT_VERSION AND NOT DEFINED HYPRE_VERSION)
list(GET HYPRE_SPLIT_VERSION 0 HYPRE_MAJOR_VERSION)
list(GET HYPRE_SPLIT_VERSION 1 HYPRE_MINOR_VERSION)
if (HYPRE_SPLIT_VERSION GREATER 2)
list(GET HYPRE_SPLIT_VERSION 2 HYPRE_PATCH_VERSION)
else()
set(HYPRE_PATCH_VERSION 0)
endif()
math(EXPR HYPRE_VERSION "10000*${HYPRE_MAJOR_VERSION} + 100*${HYPRE_MINOR_VERSION} + ${HYPRE_PATCH_VERSION}")
set(HYPRE_VERSION ${HYPRE_VERSION} CACHE STRING "HYPRE version." FORCE)
endif()
return()
endif()
include(MfemCmakeUtilities)
mfem_find_package(HYPRE HYPRE HYPRE_DIR "include" "HYPRE.h" "lib" "HYPRE"
"Paths to headers required by HYPRE." "Libraries required by HYPRE."
@@ -179,9 +86,8 @@ if (HYPRE_FOUND AND HYPRE_USING_CUDA)
mfem_culib_set_libraries(CUSPARSE cusparse)
mfem_culib_set_libraries(CURAND curand)
mfem_culib_set_libraries(CUBLAS cublas)
mfem_culib_set_libraries(CUSOLVER cusolver)
list(APPEND HYPRE_LIBRARIES ${CUSPARSE_LIBRARIES} ${CURAND_LIBRARIES}
${CUBLAS_LIBRARIES} ${CUSOLVER_LIBRARIES})
${CUBLAS_LIBRARIES})
set(HYPRE_LIBRARIES ${HYPRE_LIBRARIES} CACHE STRING
"HYPRE libraries + dependencies." FORCE)
message(STATUS "Updated HYPRE_LIBRARIES: ${HYPRE_LIBRARIES}")
@@ -190,8 +96,7 @@ endif()
if (HYPRE_FOUND AND HYPRE_USING_HIP)
find_package(rocsparse REQUIRED)
find_package(rocrand REQUIRED)
find_package(rocsolver REQUIRED)
list(APPEND HYPRE_LIBRARIES ${rocsparse_LIBRARIES} ${rocrand_LIBRARIES} roc::rocsolver roc::rocblas)
list(APPEND HYPRE_LIBRARIES ${rocsparse_LIBRARIES} ${rocrand_LIBRARIES})
set(HYPRE_LIBRARIES ${HYPRE_LIBRARIES} CACHE STRING
"HYPRE libraries + dependencies." FORCE)
message(STATUS "Updated HYPRE_LIBRARIES: ${HYPRE_LIBRARIES}")
+1 -30
View File
@@ -9,39 +9,10 @@
# terms of the BSD-3 license. We welcome feedback and contributions, see file
# CONTRIBUTING.md for details.
# Defines the following variables if fetching of TPLs is disabled (default):
# Defines the following variables:
# - METIS_FOUND
# - METIS_LIBRARIES
# - METIS_INCLUDE_DIRS
# - METIS_VERSION_5
# otherwise, the following are defined:
# - METIS (imported library target)
# - METIS_VERSION_5 (cache variable)
if (METIS_FETCH OR FETCH_TPLS)
set(METIS_FETCH_VERSION 4.0.3)
add_library(METIS STATIC IMPORTED)
# define external project
message(STATUS "Will fetch METIS ${METIS_FETCH_VERSION} to be built with default options")
set(PREFIX ${CMAKE_BINARY_DIR}/fetch/metis)
include(ExternalProject)
ExternalProject_Add(metis
GIT_REPOSITORY https://github.com/mfem/tpls
GIT_TAG b60352fbe9675d374b00828055e55be4584c7995 # tag from 1/16/25
GIT_SHALLOW TRUE
UPDATE_DISCONNECTED TRUE
PREFIX ${PREFIX}
CONFIGURE_COMMAND tar -xzf ../metis/metis-${METIS_FETCH_VERSION}-mac.tgz --strip=1
BUILD_COMMAND $(MAKE) COPTIONS=-Wno-incompatible-pointer-types
INSTALL_COMMAND mkdir -p ${PREFIX}/lib && cp libmetis.a ${PREFIX}/lib/)
# set imported library target properties
add_dependencies(METIS metis)
set_target_properties(METIS PROPERTIES
IMPORTED_LOCATION ${PREFIX}/lib/libmetis.a)
# set cache variables that would otherwise be set after mfem_find_package call
set(METIS_VERSION_5 FALSE CACHE BOOL "Is METIS version 5?")
return()
endif()
include(MfemCmakeUtilities)
mfem_find_package(METIS METIS METIS_DIR "include;Lib" "metis.h"
+5 -10
View File
@@ -125,9 +125,7 @@ macro(add_mfem_miniapp MFEM_EXE_NAME)
if (MFEM_USE_CUDA)
set_source_files_properties(${MAIN_LIST} ${EXTRA_SOURCES_LIST}
PROPERTIES LANGUAGE CUDA)
if (MFEM_CUDA_COMPILER_IS_NVCC)
list(TRANSFORM EXTRA_OPTIONS_LIST PREPEND "-Xcompiler=")
endif()
list(TRANSFORM EXTRA_OPTIONS_LIST PREPEND "-Xcompiler=")
endif()
# Actually add the executable
@@ -718,7 +716,7 @@ function(mfem_get_target_options Target CompileOptsVar LinkOptsVar)
get_target_property(IsImported ${tgt} IMPORTED)
# message(STATUS "${tgt}[IMPORTED]: ${IsImported}")
# Generally, the possible target types are: STATIC_LIBRARY, MODULE_LIBRARY,
# SHARED_LIBRARY, INTERFACE_LIBRARY, UNKNOWN_LIBRARY, EXECUTABLE.
# SHARED_LIBRARY, INTERFACE_LIBRARY, EXECUTABLE.
get_target_property(type ${tgt} TYPE)
# message(STATUS "${tgt}[TYPE]: ${type}")
unset(ImportConfig)
@@ -766,7 +764,7 @@ function(mfem_get_target_options Target CompileOptsVar LinkOptsVar)
else()
message(STATUS " *** Warning: [${tgt}] LOCATION not defined!")
endif()
elseif ("${type}" STREQUAL "SHARED_LIBRARY" OR "${type}" STREQUAL "UNKNOWN_LIBRARY")
elseif ("${type}" STREQUAL "SHARED_LIBRARY")
get_target_property(Location ${tgt} LOCATION)
if (Location)
get_filename_component(Dir ${Location} DIRECTORY)
@@ -879,8 +877,7 @@ function(mfem_export_mk_files)
MFEM_USE_OCCA MFEM_USE_CEED MFEM_USE_CALIPER MFEM_USE_UMPIRE MFEM_USE_SIMD
MFEM_USE_ADIOS2 MFEM_USE_MKL_CPARDISO MFEM_USE_MKL_PARDISO
MFEM_USE_ADFORWARD MFEM_USE_CODIPACK MFEM_USE_BENCHMARK MFEM_USE_PARELAG
MFEM_USE_TRIBOL MFEM_USE_MOONOLITH MFEM_USE_ALGOIM MFEM_USE_ENZYME
MFEM_USE_HDF5)
MFEM_USE_TRIBOL MFEM_USE_MOONOLITH MFEM_USE_ALGOIM MFEM_USE_ENZYME)
foreach(var ${CONFIG_MK_BOOL_VARS})
if (${var})
set(${var} YES)
@@ -932,14 +929,12 @@ function(mfem_export_mk_files)
endif()
set(MFEM_BUILD_TAG "${CMAKE_SYSTEM}")
set(MFEM_PREFIX "${CMAKE_INSTALL_PREFIX}")
# For the next 4 variables, these are the values for the build-tree version of
# For the next 4 variable, these are the values for the build-tree version of
# 'config.mk'
set(MFEM_INC_DIR "${PROJECT_BINARY_DIR}")
set(MFEM_LIB_DIR "${PROJECT_BINARY_DIR}")
set(MFEM_TEST_MK "${PROJECT_SOURCE_DIR}/config/test.mk")
set(MFEM_CONFIG_EXTRA "MFEM_BUILD_DIR ?= ${PROJECT_BINARY_DIR}")
# TODO: CUDA/HIP support:
set(MFEM_XLINKER "${CMAKE_CXX_LINKER_WRAPPER_FLAG}")
set(MFEM_MPIEXEC ${MPIEXEC})
if (NOT MFEM_MPIEXEC)
set(MFEM_MPIEXEC "mpirun")
@@ -93,17 +93,17 @@ macro (RESOLVE_LIBRARIES LIBS LINK_LINE)
set (_directory_list ${_directory_list} ${libpath})
set (token ${libname})
endif (token MATCHES "^/")
set (_lib "NOTFOUND")
set (_lib "NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
find_library (_lib ${token} HINTS ${_directory_list} ${_root})
if (_lib)
string (REPLACE "//" "/" _lib ${_lib})
string (REPLACE "//" "/" _lib ${_lib})
list (APPEND _libs_found ${_lib})
else (_lib)
message (STATUS "Unable to find library ${token}")
endif (_lib)
unset(_lib CACHE)
endif (token MATCHES "-L([^\" ]+|\"[^\"]+\")")
endforeach (token)
set (_lib "NOTFOUND" CACHE INTERNAL "Scratch variable" FORCE)
# only the LAST occurrence of each library is required since there should be no circular dependencies
if (_libs_found)
list (REVERSE _libs_found)
+1 -4
View File
@@ -23,14 +23,11 @@
#include "_config.hpp"
#endif
#include <cstdint>
#include <climits>
namespace mfem
{
#if (defined(MFEM_USE_CUDA) && defined(__CUDACC__)) || \
(defined(MFEM_USE_HIP) && defined(__HIP__))
(defined(MFEM_USE_HIP) && defined(__HIPCC__))
#define MFEM_HOST_DEVICE __host__ __device__
#else
#define MFEM_HOST_DEVICE
-3
View File
@@ -132,9 +132,6 @@
// Enable Conduit support.
// #define MFEM_USE_CONDUIT
// Enable functionality based on the HDF5 library
// #define MFEM_USE_HDF5
// Enable functionality based on the NetCDF library (reading CUBIT files).
// #define MFEM_USE_NETCDF
+1 -3
View File
@@ -40,7 +40,6 @@ MFEM_USE_GINKGO = @MFEM_USE_GINKGO@
MFEM_USE_AMGX = @MFEM_USE_AMGX@
MFEM_USE_MAGMA = @MFEM_USE_MAGMA@
MFEM_USE_GNUTLS = @MFEM_USE_GNUTLS@
MFEM_USE_HDF5 = @MFEM_USE_HDF5@
MFEM_USE_NETCDF = @MFEM_USE_NETCDF@
MFEM_USE_PETSC = @MFEM_USE_PETSC@
MFEM_USE_SLEPC = @MFEM_USE_SLEPC@
@@ -88,7 +87,6 @@ MFEM_BUILD_TAG = @MFEM_BUILD_TAG@
MFEM_PREFIX = @MFEM_PREFIX@
MFEM_INC_DIR = @MFEM_INC_DIR@
MFEM_LIB_DIR = @MFEM_LIB_DIR@
MFEM_XLINKER = @MFEM_XLINKER@
# Location of test.mk
MFEM_TEST_MK = @MFEM_TEST_MK@
@@ -99,7 +97,7 @@ MFEM_MPIEXEC_NP = @MFEM_MPIEXEC_NP@
MFEM_MPI_NP = @MFEM_MPI_NP@
# The NVCC compiler cannot link with -x=cu
MFEM_LINK_FLAGS := $(filter-out -x=cu -xcuda -xhip, $(MFEM_FLAGS))
MFEM_LINK_FLAGS := $(filter-out -x=cu -xhip, $(MFEM_FLAGS))
# Optional extra configuration
@MFEM_CONFIG_EXTRA@
-9
View File
@@ -43,7 +43,6 @@ option(MFEM_USE_AMGX "Enable AmgX usage" OFF)
option(MFEM_USE_MAGMA "Enable MAGMA usage" OFF)
option(MFEM_USE_GNUTLS "Enable GNUTLS usage" OFF)
option(MFEM_USE_GSLIB "Enable GSLIB usage" OFF)
option(MFEM_USE_HDF5 "Enable HDF5 usage" OFF)
option(MFEM_USE_NETCDF "Enable NETCDF usage" OFF)
option(MFEM_USE_PETSC "Enable PETSc support." OFF)
option(MFEM_USE_SLEPC "Enable SLEPc support." OFF)
@@ -89,12 +88,6 @@ option(MFEM_ENABLE_EXAMPLES "Build all of the examples" OFF)
option(MFEM_ENABLE_MINIAPPS "Build all of the miniapps" OFF)
option(MFEM_ENABLE_BENCHMARKS "Build all of the benchmarks" OFF)
# Allow a user to specify fetching of certain third-party libraries instead of
# searching for existing installations.
option(FETCH_TPLS "Enable fetching of all supported third-party libraries" OFF)
option(HYPRE_FETCH "Enable fetching of hypre" OFF)
option(METIS_FETCH "Enable fetching of METIS" OFF)
# Setting CXX/MPICXX on the command line or in user.cmake will overwrite the
# autodetected C++ compiler.
# set(CXX g++)
@@ -274,8 +267,6 @@ set(TRIBOL_DIR "${MFEM_DIR}/../tribol" CACHE PATH "Path to Tribol")
set(Tribol_REQUIRED_PACKAGES "Axom/core/mint/slam/slic" CACHE STRING
"Additional packages required by Tribol")
set(ENZYME_DIR "${MFEM_DIR}/../enzyme" CACHE PATH "Path to Enzyme")
set(BLAS_INCLUDE_DIRS "" CACHE STRING "Path to BLAS headers.")
set(BLAS_LIBRARIES "" CACHE STRING "The BLAS library.")
set(LAPACK_INCLUDE_DIRS "" CACHE STRING "Path to LAPACK headers.")
+30 -41
View File
@@ -24,7 +24,7 @@ EGREP_BIN = $(shell command -v egrep 2> /dev/null)
CXX = g++
MPICXX = mpicxx
BASE_FLAGS = -std=c++17
BASE_FLAGS = -std=c++11
OPTIM_FLAGS = -O3 $(BASE_FLAGS)
DEBUG_FLAGS = -g $(XCOMPILER)-Wall $(BASE_FLAGS)
@@ -43,23 +43,12 @@ SHARED = NO
# CUDA configuration options
#
# If you set MFEM_USE_ENZYME=YES, must use CUDA_CXX=clang++
# If you set MFEM_USE_ENZYME=YES, CUDA_CXX has to be configured to use cuda with
# clang as its host compiler.
CUDA_CXX = nvcc
CUDA_ARCH = sm_60
# Base CUDA install directory, only needed if building with clang+cuda:
# The default setting is:
# 1. If CUDA_HOME is defined and non-empty, use that.
# 2. If nvcc is in the path, use the directory two levels up from that.
# 3. Use /usr/local/cuda
CUDA_DIR = $(or $(CUDA_HOME),$(patsubst %/,%,$(dir \
$(patsubst %/,%,$(dir $(shell command -v nvcc))))),/usr/local/cuda)
# flags for clang+cuda
CLANG_CUDA_FLAGS = -xcuda --cuda-path=$(CUDA_DIR) --cuda-gpu-arch=$(CUDA_ARCH)
# flags for nvcc
NVCC_FLAGS = -x=cu --expt-extended-lambda --expt-relaxed-constexpr \
-arch=$(CUDA_ARCH) -isystem "$(CUDA_DIR)/include"
# Prefixes for passing flags to the host compiler and linker when using
# CUDA_CXX=nvcc
CUDA_FLAGS = -x=cu --expt-extended-lambda -arch=$(CUDA_ARCH)
# Prefixes for passing flags to the host compiler and linker when using CUDA_CXX
CUDA_XCOMPILER = -Xcompiler=
CUDA_XLINKER = -Xlinker=
@@ -156,7 +145,6 @@ MFEM_USE_GINKGO = NO
MFEM_USE_AMGX = NO
MFEM_USE_MAGMA = NO
MFEM_USE_GNUTLS = NO
MFEM_USE_HDF5 = NO
MFEM_USE_NETCDF = NO
MFEM_USE_PETSC = NO
MFEM_USE_SLEPC = NO
@@ -238,7 +226,7 @@ HYPRE_OPT = -I$(HYPRE_DIR)/include
HYPRE_LIB = -L$(HYPRE_DIR)/lib -lHYPRE
ifeq (YES,$(MFEM_USE_CUDA))
# This is only necessary when hypre is built with cuda:
HYPRE_LIB += -lcusolver -lcusparse -lcurand -lcublas
HYPRE_LIB += -lcusparse -lcurand -lcublas
endif
ifeq (YES,$(MFEM_USE_HIP))
# This is only necessary when hypre is built with hip:
@@ -253,7 +241,7 @@ ifeq ($(MFEM_USE_SUPERLU)$(MFEM_USE_STRUMPACK)$(MFEM_USE_MUMPS),NONONO)
METIS_OPT =
METIS_LIB = -L$(METIS_DIR) -lmetis
else
METIS_DIR = @MFEM_DIR@/../metis-5.1.0
METIS_DIR = @MFEM_DIR@/../metis-5.0
METIS_OPT = -I$(METIS_DIR)/include
METIS_LIB = -L$(METIS_DIR)/lib -lmetis
endif
@@ -413,14 +401,9 @@ MAGMA_LIB = -L$(MAGMA_DIR)/lib -l:libmagma.a -lcublas -lcusparse $(LAPACK_LIB)
GNUTLS_OPT =
GNUTLS_LIB = -lgnutls
# HDF5 library configuration
HDF5_DIR = $(HOME)/local
HDF5_OPT = -I$(HDF5_DIR)/include
HDF5_LIB = $(XLINKER)-rpath,$(HDF5_DIR)/lib -L$(HDF5_DIR)/lib -lhdf5_hl -lhdf5 \
$(ZLIB_LIB)
# NetCDF library configuration
NETCDF_DIR = $(HOME)/local
HDF5_DIR = $(HOME)/local
NETCDF_OPT = -I$(NETCDF_DIR)/include -I$(HDF5_DIR)/include $(ZLIB_OPT)
NETCDF_LIB = $(XLINKER)-rpath,$(NETCDF_DIR)/lib -L$(NETCDF_DIR)/lib\
$(XLINKER)-rpath,$(HDF5_DIR)/lib -L$(HDF5_DIR)/lib\
@@ -522,9 +505,6 @@ GSLIB_LIB = -L$(GSLIB_DIR)/lib -lgs
# CUDA library configuration
CUDA_OPT =
CUDA_LIB = -lcusparse -lcublas
CLANG_CUDA_LIB = -L$(CUDA_DIR)/lib64 -L$(CUDA_DIR)/lib \
$(XLINKER)-rpath,$(CUDA_DIR)/lib64,-rpath,$(CUDA_DIR)/lib \
-lcudart -ldl -lrt -pthread
# HIP library configuration
HIP_OPT =
@@ -624,20 +604,29 @@ TRIBOL_LIB = -L$(TRIBOL_DIR)/lib -ltribol -lredecomp -L$(AXOM_DIR)/lib -laxom_mi
-laxom_slam -laxom_slic -laxom_core
# Enzyme configuration
ENZYME_DIR = @MFEM_DIR@/../enzyme
ENZYME_PLUGIN = $(abspath $(wildcard $(subst \
@MFEM_DIR@,$(MFEM_DIR),$(ENZYME_DIR))/lib/ClangEnzyme-*.$(SO_EXT)))
ifeq ($(MAKECMDGOALS)-$(MFEM_USE_ENZYME),config-YES)
ifeq ($(ENZYME_PLUGIN),)
$(error Unable to find the Enzyme pluging! Please set ENZYME_DIR)
endif
ifneq ($(words $(ENZYME_PLUGIN)),1)
$(error Multiple versions of the Enzyme pluging found! \
Please set ENZYME_PLUGIN directly)
endif
# If you want to enable automatic differentiation at compile time, use the
# options below, adapted to your configuration. To be more flexible, we
# recommend using the Enzyme plugin during link time optimization. One option is
# to add your options to the global compiler/linker flags like
#
# BASE_FLAGS += -flto
# CXX_XLINKER += -fuse-ld=lld -Wl,--lto-legacy-pass-manager\
# -Wl,-mllvm=-load=$(ENZYME_DIR)/LLDEnzyme-$(ENZYME_VERSION).so -Wl,
#
ENZYME_DIR ?= @MFEM_DIR@/../enzyme
ENZYME_VERSION ?= 14
ENZYME_OPT = -fno-experimental-new-pass-manager -Xclang -load -Xclang $(ENZYME_DIR)/ClangEnzyme-$(ENZYME_VERSION).so
ENZYME_LIB = ""
# Google Benchmark, SUNDIALS >= 6.4.0, STRUMPACK, RAJA, UMPIRE, and Tribol require C++14:
ifneq ($(filter YES,$(MFEM_USE_BENCHMARK) $(MFEM_USE_SUNDIALS) $(MFEM_USE_STRUMPACK) $(MFEM_USE_RAJA) $(MFEM_USE_UMPIRE) $(MFEM_USE_TRIBOL)),)
BASE_FLAGS = -std=c++14
endif
# Ginkgo requires C++17:
ifeq ($(MFEM_USE_GINKGO),YES)
BASE_FLAGS = -std=c++17
endif
ENZYME_OPT = -fplugin=$(ENZYME_PLUGIN)
ENZYME_LIB =
# If YES, enable some informational messages
VERBOSE = NO
+1 -1
View File
@@ -115,7 +115,7 @@ vertices
nodes
FiniteElementSpace
FiniteElementCollection: H1_3D_P2
FiniteElementCollection: Quadratic
VDim: 3
Ordering: 0
+1 -1
View File
@@ -56,7 +56,7 @@ vertices
nodes
FiniteElementSpace
FiniteElementCollection: H1_3D_P2
FiniteElementCollection: Quadratic
VDim: 3
Ordering: 0
-593
View File
@@ -1,593 +0,0 @@
MFEM mesh v1.0
# Created by: Pointwise
# MFEM Geometry Types:
#
# POINT = 0
# SEGMENT = 1
# TRIANGLE = 2
# SQUARE = 3
# TETRAHEDRON = 4
# CUBE = 5
# PRISM = 6
dimension
2
elements
160
1 3 1 164 163 0
1 3 164 165 162 163
1 3 2 166 164 1
1 3 166 132 165 164
1 3 3 167 166 2
1 3 167 131 132 166
1 3 4 168 167 3
1 3 168 130 131 167
1 3 5 169 168 4
1 3 169 129 130 168
1 3 6 170 169 5
1 3 170 128 129 169
1 3 171 172 170 6
1 3 172 127 128 170
1 3 124 125 172 171
1 3 125 126 127 172
1 3 162 165 173 161
1 3 165 132 133 173
1 3 161 173 174 160
1 3 173 133 134 174
1 3 160 174 175 159
1 3 174 134 135 175
1 3 6 7 176 171
1 3 7 8 177 176
1 3 171 176 123 124
1 3 176 177 122 123
1 3 159 175 178 158
1 3 175 135 136 178
1 3 158 178 179 157
1 3 178 136 137 179
1 3 157 179 180 156
1 3 179 137 138 180
1 3 122 177 181 121
1 3 177 8 182 181
1 3 8 9 183 182
1 3 9 10 184 183
1 3 10 11 185 184
1 3 11 12 186 185
1 3 12 13 187 186
1 3 13 14 15 187
1 3 121 181 119 120
1 3 181 182 118 119
1 3 182 183 117 118
1 3 183 184 188 117
1 3 184 185 109 188
1 3 185 186 108 109
1 3 186 187 189 108
1 3 187 15 16 189
1 3 109 110 190 188
1 3 110 111 191 190
1 3 111 112 113 191
1 3 188 190 116 117
1 3 190 191 115 116
1 3 191 113 114 115
1 3 189 192 107 108
1 3 192 193 106 107
1 3 193 194 105 106
1 3 194 195 104 105
1 3 195 196 103 104
1 3 16 17 192 189
1 3 17 18 193 192
1 3 18 19 194 193
1 3 19 20 195 194
1 3 20 21 196 195
1 3 97 98 197 96
1 3 98 99 198 197
1 3 99 100 199 198
1 3 100 101 200 199
1 3 101 102 201 200
1 3 102 103 202 201
1 3 103 196 203 202
1 3 196 21 22 203
1 3 96 197 204 95
1 3 197 198 39 204
1 3 198 199 38 39
1 3 199 200 205 38
1 3 200 201 32 205
1 3 201 202 31 32
1 3 202 203 206 31
1 3 203 22 23 206
1 3 32 33 207 205
1 3 33 34 35 207
1 3 205 207 37 38
1 3 207 35 36 37
1 3 39 40 208 204
1 3 40 41 209 208
1 3 41 42 210 209
1 3 42 43 211 210
1 3 43 44 212 211
1 3 204 208 94 95
1 3 208 209 93 94
1 3 209 210 92 93
1 3 210 211 91 92
1 3 211 212 90 91
1 3 90 212 213 89
1 3 212 44 214 213
1 3 44 45 215 214
1 3 45 46 216 215
1 3 46 47 217 216
1 3 47 48 218 217
1 3 48 49 219 218
1 3 49 50 51 219
1 3 89 213 87 88
1 3 213 214 86 87
1 3 214 215 85 86
1 3 215 216 84 85
1 3 216 217 83 84
1 3 217 218 82 83
1 3 218 219 220 82
1 3 219 51 52 220
1 3 53 221 220 52
1 3 221 81 82 220
1 3 54 222 221 53
1 3 222 80 81 221
1 3 55 223 222 54
1 3 223 79 80 222
1 3 26 27 224 25
1 3 27 28 29 224
1 3 25 224 225 24
1 3 224 29 30 225
1 3 24 225 206 23
1 3 225 30 31 206
1 3 154 155 226 153
1 3 155 156 180 226
1 3 153 226 227 152
1 3 226 180 138 227
1 3 152 227 228 151
1 3 227 138 139 228
1 3 151 228 229 150
1 3 228 139 140 229
1 3 150 229 230 149
1 3 229 140 141 230
1 3 149 230 231 148
1 3 230 141 142 231
1 3 148 231 232 147
1 3 231 142 143 232
1 3 147 232 145 146
1 3 232 143 144 145
1 3 56 233 223 55
1 3 233 78 79 223
1 3 57 234 233 56
1 3 234 77 78 233
1 3 58 235 234 57
1 3 235 76 77 234
1 3 61 236 59 60
1 3 236 235 58 59
1 3 62 237 236 61
1 3 237 76 235 236
1 3 63 238 237 62
1 3 238 75 76 237
1 3 64 239 238 63
1 3 239 74 75 238
1 3 65 240 239 64
1 3 240 73 74 239
1 3 66 241 240 65
1 3 241 72 73 240
1 3 67 242 241 66
1 3 242 71 72 241
1 3 68 69 242 67
1 3 69 70 71 242
boundary
164
3 1 0 1
3 1 1 2
3 1 2 3
3 1 3 4
3 1 4 5
3 1 5 6
3 1 6 7
3 1 7 8
3 1 8 9
3 1 9 10
3 1 10 11
3 1 11 12
3 1 12 13
3 1 13 14
3 1 16 17
3 1 17 18
3 1 18 19
3 1 19 20
3 1 20 21
3 1 21 22
3 1 22 23
3 1 23 24
3 1 24 25
3 1 25 26
3 1 26 27
3 1 27 28
3 1 28 29
3 1 29 30
3 1 30 31
3 1 31 32
3 1 32 33
3 1 33 34
3 1 34 35
3 1 35 36
3 1 36 37
3 1 37 38
3 1 38 39
3 1 39 40
3 1 40 41
3 1 41 42
3 1 42 43
3 1 43 44
3 1 49 50
3 1 48 49
3 1 47 48
3 1 46 47
3 1 45 46
3 1 44 45
3 1 52 53
3 1 53 54
3 1 54 55
3 1 57 58
3 1 56 57
3 1 55 56
3 1 60 61
3 1 61 62
3 1 62 63
3 1 63 64
3 1 64 65
3 1 65 66
3 1 66 67
3 1 67 68
3 1 75 76
3 1 74 75
3 1 73 74
3 1 72 73
3 1 71 72
3 1 70 71
3 1 76 77
3 1 77 78
3 1 78 79
3 1 81 82
3 1 80 81
3 1 79 80
3 1 82 83
3 1 83 84
3 1 84 85
3 1 85 86
3 1 86 87
3 1 87 88
3 1 94 95
3 1 93 94
3 1 92 93
3 1 91 92
3 1 90 91
3 1 96 97
3 1 95 96
3 1 97 98
3 1 98 99
3 1 99 100
3 1 100 101
3 1 101 102
3 1 102 103
3 1 107 108
3 1 106 107
3 1 105 106
3 1 104 105
3 1 103 104
3 1 108 109
3 1 109 110
3 1 110 111
3 1 111 112
3 1 112 113
3 1 113 114
3 1 114 115
3 1 115 116
3 1 116 117
3 1 119 120
3 1 118 119
3 1 117 118
3 1 131 132
3 1 130 131
3 1 129 130
3 1 128 129
3 1 127 128
3 1 126 127
3 1 132 133
3 1 133 134
3 1 134 135
3 1 137 138
3 1 136 137
3 1 135 136
3 1 138 139
3 1 139 140
3 1 140 141
3 1 141 142
3 1 142 143
3 1 143 144
3 1 147 148
3 1 146 147
3 1 153 154
3 1 152 153
3 1 151 152
3 1 150 151
3 1 149 150
3 1 148 149
3 1 156 157
3 1 157 158
3 1 158 159
3 1 161 162
3 1 160 161
3 1 159 160
2 1 69 70
2 1 68 69
3 1 88 89
3 1 89 90
3 1 121 122
3 1 120 121
3 1 123 124
3 1 122 123
3 1 125 126
3 1 124 125
1 1 144 145
1 1 145 146
3 1 15 16
3 1 14 15
3 1 50 51
3 1 51 52
3 1 59 60
3 1 58 59
3 1 154 155
3 1 155 156
3 1 163 0
3 1 162 163
vertices
243
2
4 4
4 3.5
4 3
4 2.5
4 2
4 1.5
4 1
4.5 1
5 1
5 1.5
5 2
5 2.5
5 3
5 3.5
5 4
5.500 4
6 4
6.500 4
7 4
7.5 4
8 4
8.5 4
9 4
9.5 4
10 4
10.5 4
11 4
11 3.5
11 3
10.5 3
10 3
9.5 3
9.5 2.5
10 2.5
10.5 2.5
10.5 2
10.5 1.5
10 1.5
9.5 1.5
9.5 1
10 1
10.5 1
11 1
11.5 1
12 1
12 1.5
12 2
12 2.5
12 3
12 3.5
12 4
12.5 4
13 4
13.333 3.75
13.666 3.5
14.000 3.25
14.333 3.5
14.666 3.75
15.000 4
15.500 4
16.000 4
16.000 3.5
16.000 3
16.000 2.5
16.000 2
16.000 1.5
16.000 1
16.000 0.5
16.000 0
15.500 0
15.000 0
15.000 0.5000000000000002
15.000 1
15.000 1.5
15.000 2
15.000 2.5
15.000 3
14.666 2.75
14.333 2.5
14.000 2.25
13.666 2.5
13.333 2.75
13 3
13 2.5
13 2
13 1.5
13 1
13 0.500
13 0
12.5 0
12 0
11.5 0
11 0
10.5 0
10 0
9.5 0
9 0
8.5 0
8.5 0.5
8.5 1
8.5 1.5
8.5 2
8.5 2.5
8.5 3
8 3
7.5 3
7 3
6.500 3
6 3
6 2.5
6.5 2.5
7 2.5
7.5 2.5
7.5 2
7.5 1.5
7.000 1.5
6.5 1.5
6 1.5
6 1
6 0.5
6 0
5.5 0
5 0
4.5 0
4 0
3.5 0
3 0
3 0.500
3 1
3 1.5
3 2
3 2.5
3 3
2.666 2.75
2.333 2.5
2.000 2.25
1.666 2.5
1.333 2.75
1.000 3
1.000 2.5
1.000 2
1.000 1.5
1.000 1
1.000 0.5000
1.000 0
0.5000 0
0.0000 0
0.0000 0.5
0.0000 1
0.0000 1.5
0.0000 2
0.0000 2.5
0.0000 3
0.0000 3.5
0.0000 4
0.5000 4
1.000 4
1.333 3.75
1.666 3.5
2.000 3.25
2.333 3.5
2.666 3.75
3 4
3.5 4
3.5 3.5
3 3.5
3.5 3
3.5 2.5
3.5 2
3.5 1.5
3.5 1
4 0.5
3.5 0.5
2.666 3.25
2.333 3
2.000 2.75
4.5 0.5
5 0.5
1.666 3
1.333 3.25
1.000 3.5
5.5 0.5
5.500 1
5.500 1.5
5.500 2
5.500 2.5
5.500 3
5.500 3.5
6 2
6 3.5
6.5 2
7 2
6.5 3.5
7 3.5
7.5 3.5
8 3.5
8.5 3.5
9 0.5
9 1
9 1.5
9 2
9 2.5
9 3
9 3.5
9.5 0.5
9.5 2
9.5 3.5
10 2
10 0.5
10.5 0.5
11 0.5
11.5 0.5
12 0.5
12.5 0.500
12.5 1
12.5 1.5
12.5 2
12.5 2.5
12.5 3
12.5 3.5
13 3.5
13.333 3.250
13.666 3
14.000 2.75
10.5 3.5
10 3.5
0.500 3.5
0.500 3
0.500 2.5
0.500 2
0.500 1.5
0.500 1
0.500 0.5
14.333 3
14.666 3.25
15.000 3.5
15.500 3.5
15.500 3
15.500 2.5
15.500 2
15.500 1.5
15.500 1
15.500 0.5
-342
View File
@@ -1,342 +0,0 @@
MFEM NURBS NC-patch mesh v1.0
dimension
3
elements
13
0 1 5 0 8 10 11 9 4 6 7 5
0 1 5 0 18 8 24 32 30 23 36 38
0 1 5 0 0 18 32 14 12 30 38 29
0 1 5 0 32 24 10 20 38 36 26 35
0 1 5 0 14 32 20 2 29 38 35 16
0 1 5 0 30 23 36 38 31 22 37 39
0 1 5 0 12 30 38 29 13 31 39 28
0 1 5 0 38 36 26 35 39 37 27 34
0 1 5 0 29 38 35 16 28 39 34 17
0 1 5 0 31 22 37 39 19 9 25 33
0 1 5 0 13 31 39 28 1 19 33 15
0 1 5 0 39 37 27 34 33 25 11 21
0 1 5 0 28 39 34 17 15 33 21 3
boundary
31
9999 3 8 10 6 4
9999 3 10 11 7 6
9999 3 11 9 5 7
9999 3 9 8 4 5
9999 3 4 6 7 5
9999 3 32 24 8 18
9999 3 18 8 23 30
9999 3 14 32 18 0
9999 3 0 18 30 12
9999 3 14 0 12 29
9999 3 20 10 24 32
9999 3 10 20 35 26
9999 3 2 20 32 14
9999 3 20 2 16 35
9999 3 2 14 29 16
9999 3 30 23 22 31
9999 3 12 30 31 13
9999 3 29 12 13 28
9999 3 26 35 34 27
9999 3 35 16 17 34
9999 3 16 29 28 17
9999 3 31 22 9 19
9999 3 19 9 25 33
9999 3 13 31 19 1
9999 3 28 13 1 15
9999 3 1 19 33 15
9999 3 27 34 21 11
9999 3 33 25 11 21
9999 3 34 17 3 21
9999 3 17 28 15 3
9999 3 15 33 21 3
vertex_to_knotspan
8
23 0 1 8 10 11 9
22 0 2 8 10 11 9
24 1 0 8 10 11 9
36 1 1 8 10 11 9
37 1 2 8 10 11 9
25 1 3 8 10 11 9
26 2 1 8 10 11 9
27 2 2 8 10 11 9
coordinates
40
3
0 0 0
0 1 0
4 0 0
4 1 0
0 0 4
0 1 4
4 0 4
4 1 4
0 0 2
0 1 2
4 0 2
4 1 2
0 0.333333333333333 0
0 0.666666666666667 0
2 0 0
2 1 0
4 0.333333333333334 0
4 0.666666666666667 0
0 0 1
0 1 1
4 0 1
4 1 1
0 0.666666666666667 2
0 0.333333333333333 2
2 0 2
2 1 2
4 0.333333333333333 2
4 0.666666666666667 2
2 0.666666666666667 0
2 0.333333333333333 0
0 0.333333333333333 1
0 0.666666666666667 1
1.81325211007895 0 1
1.81325211007895 1 1
4 0.666666666666667 1
4 0.333333333333333 1
2 0.333333333333333 2
2 0.666666666666667 2
1.81325211007895 0.333333333333333 1
1.81325211007895 0.666666666666667 1
edges
87
0 8 10
1 10 11
0 9 11
1 8 9
0 4 6
1 6 7
0 5 7
1 4 5
2 4 8
2 6 10
2 7 11
2 5 9
9 18 8
7 8 24
9 32 24
7 18 32
9 30 23
7 23 36
9 38 36
7 30 38
3 18 30
3 8 23
3 24 36
3 32 38
8 0 18
8 14 32
7 0 14
8 12 30
8 29 38
7 12 29
3 0 12
3 14 29
6 24 10
9 20 10
6 32 20
6 36 26
9 35 26
6 38 35
3 10 26
3 20 35
8 2 20
6 14 2
8 16 35
6 29 16
3 2 16
9 31 22
7 22 37
9 39 37
7 31 39
4 30 31
4 23 22
4 36 37
4 38 39
8 13 31
8 28 39
7 13 28
4 12 13
4 29 28
6 37 27
9 34 27
6 39 34
4 26 27
4 35 34
8 17 34
6 28 17
4 16 17
9 19 9
7 9 25
9 33 25
7 19 33
5 31 19
5 22 9
5 37 25
5 39 33
8 1 19
8 15 33
7 1 15
5 13 1
5 28 15
6 25 11
9 21 11
6 33 21
5 27 11
5 34 21
8 3 21
6 15 3
5 17 3
knotvectors
10
1 3 0 0 0.5 1 1
1 4 0 0 0.333333333333333 0.666666666666667 1 1
1 3 0 0 0.5 1 1
1 2 0 0 1 1
1 2 0 0 1 1
1 2 0 0 1 1
1 2 0 0 1 1
1 2 0 0 1 1
1 2 0 0 1 1
1 2 0 0 1 1
spacing
0
weights
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
FiniteElementSpace
FiniteElementCollection: NURBS1
VDim: 3
Ordering: 1
0 0 0
0 1 0
4 0 0
4 1 0
0 0 4
0 1 4
4 0 4
4 1 4
0 0 2
0 1 2
4 0 2
4 1 2
0 0.333333333333333 0
0 0.666666666666667 0
2 0 0
2 1 0
4 0.333333333333334 0
4 0.666666666666667 0
0 0 1
0 1 1
4 0 1
4 1 1
0 0.666666666666667 2
0 0.333333333333333 2
2 0 2
2 1 2
4 0.333333333333333 2
4 0.666666666666667 2
2 0.666666666666667 0
2 0.333333333333333 0
0 0.333333333333333 1
0 0.666666666666667 1
1.81325211007895 0 1
1.81325211007895 1 1
4 0.666666666666667 1
4 0.333333333333333 1
2 0.333333333333333 2
2 0.666666666666667 2
1.81325211007895 0.333333333333333 1
1.81325211007895 0.666666666666667 1
2 0 4
4 0.333333333333333 4
4 0.666666666666667 4
2 1 4
0 0.333333333333333 4
0 0.666666666666667 4
0 0 3
4 0 3
4 1 3
0 1 3
2 0 3
4 0.333333333333333 3
4 0.666666666666667 3
2 1 3
0 0.666666666666667 3
0 0.333333333333333 3
2 0.333333333333333 4
2 0.666666666666667 4
2 0.333333333333333 3
2 0.666666666666667 3
-96
View File
@@ -1,96 +0,0 @@
MFEM NURBS NC-patch mesh v1.0
dimension
2
# rank attr geom ref_type nodes/children
elements
3
0 1 3 0 0 4 5 1
0 1 3 0 6 7 4 2
0 1 3 0 6 3 5 7
# attr geom nodes
boundary
7
1 1 0 4
1 1 5 1
1 1 1 0
1 1 2 6
1 1 6 3
1 1 4 2
1 1 5 3
vertex_to_knotspan
1
7 1 4 5
# top-level node coordinates
coordinates
8
2
0 0
0 1
2 0
2 1
1 0
1 1
2 0.5
1 0.5
edges
11
0 0 4
1 4 5
0 1 5
1 0 1
2 6 7
4 7 4
2 2 4
4 6 2
3 6 3
2 3 5
3 7 5
knotvectors
5
1 3 0 0 0.5 1 1
1 3 0 0 0.5 1 1
1 2 0 0 1 1
1 2 0 0 1 1
1 2 0 0 1 1
spacing
0
weights
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
FiniteElementSpace
FiniteElementCollection: NURBS1
VDim: 2
Ordering: 1
0 0
0 1
2 0
2 1
1 0
1 1
2 0.5
1 0.5
0.5 0
0.5 1
0 0.5
0.5 0.5
mfem_mesh_end
+1 -1
View File
@@ -227,7 +227,7 @@ vertices
nodes
FiniteElementSpace
FiniteElementCollection: H1_2D_P2
FiniteElementCollection: Quadratic
VDim: 2
Ordering: 0
+1 -1
View File
@@ -65,7 +65,7 @@ vertices
nodes
FiniteElementSpace
FiniteElementCollection: H1_2D_P2
FiniteElementCollection: Quadratic
VDim: 2
Ordering: 0
+2 -3
View File
@@ -48,7 +48,7 @@ PROJECT_NAME = MFEM
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v4.8.1
PROJECT_NUMBER = v4.8.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -951,7 +951,6 @@ INPUT = @MFEM_SOURCE_DIR@/doc/CodeDocumentation.dox \
@MFEM_SOURCE_DIR@/fem/ceed/integrators/nlconvection \
@MFEM_SOURCE_DIR@/fem/ceed/interface \
@MFEM_SOURCE_DIR@/fem/ceed/solvers \
@MFEM_SOURCE_DIR@/fem/dfem \
@MFEM_SOURCE_DIR@/fem/eltrans \
@MFEM_SOURCE_DIR@/fem/fe \
@MFEM_SOURCE_DIR@/fem/gslib \
@@ -960,6 +959,7 @@ INPUT = @MFEM_SOURCE_DIR@/doc/CodeDocumentation.dox \
@MFEM_SOURCE_DIR@/fem/moonolith \
@MFEM_SOURCE_DIR@/fem/qinterp \
@MFEM_SOURCE_DIR@/fem/tmop \
@MFEM_SOURCE_DIR@/fem/darcy \
@MFEM_SOURCE_DIR@/examples \
@MFEM_SOURCE_DIR@/examples/amgx \
@MFEM_SOURCE_DIR@/examples/caliper \
@@ -973,7 +973,6 @@ INPUT = @MFEM_SOURCE_DIR@/doc/CodeDocumentation.dox \
@MFEM_SOURCE_DIR@/miniapps/adjoint \
@MFEM_SOURCE_DIR@/miniapps/autodiff \
@MFEM_SOURCE_DIR@/miniapps/common \
@MFEM_SOURCE_DIR@/miniapps/dfem \
@MFEM_SOURCE_DIR@/miniapps/dpg \
@MFEM_SOURCE_DIR@/miniapps/dpg/util \
@MFEM_SOURCE_DIR@/miniapps/electromagnetics \
-1
View File
@@ -202,7 +202,6 @@ namespace mfem {
* - <a class="el" href="tesla_8cpp_source.html">Tesla</a>: simple magnetostatics simulation code
* - <a class="el" href="maxwell_8cpp_source.html">Maxwell</a>: simple transient full-wave electromagnetics simulation code
* - <a class="el" href="joule_8cpp_source.html">Joule</a>: transient magnetics and Joule heating miniapp
* - <a class="el" href="lorentz_8cpp_source.html">Lorentz</a>: simple particle tracking code based on the Lorentz force
* - <a class="el" href="classmfem_1_1navier_1_1NavierSolver.html">Navier</a>: solve the transient incompressible Navier-Stokes equations
* - <a class="el" href="mobius-strip_8cpp_source.html">Mobius Strip</a>: generate various Mobius strip-like meshes
* - <a class="el" href="klein-bottle_8cpp_source.html">Klein Bottle</a>: generate three types of Klein bottle surfaces
-9
View File
@@ -205,15 +205,6 @@ if (MFEM_ENABLE_TESTING)
$<TARGET_FILE:ex25p> "-no-vis" "--mumps-solver"
${MPIEXEC_POSTFLAGS})
endif()
# Parallel libCEED example
if (MFEM_USE_CEED AND MFEM_USE_MPI)
add_test(NAME ex1p_ceed_np=${MFEM_MPI_NP}
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP}
${MPIEXEC_PREFLAGS}
$<TARGET_FILE:ex1p> "-no-vis" "-d ceed-cpu" "-pa" "-a"
${MPIEXEC_POSTFLAGS})
endif()
endif()
# Include the examples/amgx directory if AmgX is enabled
+794
View File
@@ -0,0 +1,794 @@
// Copyright (c) 2010-2024, 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.
#include "coupledop.hpp"
namespace mfem
{
CoupledOperator::CoupledOperator(const Array<int> &bdr_u_is_ess,
const Array<int> &bdr_E_is_ess, Coefficient *sigma_,
const Array<LinearForm*> &lfs_, const Array<Coefficient*> &coeffs_,
FiniteElementSpace *u_space_, FiniteElementSpace *n_space_,
FiniteElementSpace *E_space_, FiniteElementSpace *B_space_,
FiniteElementSpace *tr_space_, real_t td)
: TimeDependentOperator(0, IMPLICIT), sigma(sigma_), lfs(lfs_),
coeffs(coeffs_), u_space(u_space_), n_space(n_space_),
E_space(E_space_), B_space(B_space_), tr_space(tr_space_)
{
offsets = ConstructOffsets(u_space, n_space, E_space, B_space, tr_space);
width = height = offsets.Last();
//plasma
const int dim = u_space->GetMesh()->Dimension();
const bool fec_disc = (u_space->FEColl()->GetContType() ==
FiniteElementCollection::DISCONTINUOUS);
const bool fec_vec = (u_space->FEColl()->GetRangeType(dim) ==
FiniteElement::VECTOR);
const bool dg = (fec_disc && !fec_vec);
const bool brt = (fec_disc && fec_vec);
if (!dg)
{
u_space->GetEssentialTrueDofs(bdr_u_is_ess, ess_u_tdofs_list);
}
darcy = new DarcyForm(u_space, n_space);
Mu = darcy->GetFluxMassForm();
Mn = darcy->GetPotentialMassForm();
Du = darcy->GetFluxDivForm();
idtcoeff = new FunctionCoefficient([&](const Vector &) { return idt; });
dtcoeff = new FunctionCoefficient([&](const Vector &) { return 1./idt; });
if (dg)
{
Mu->AddDomainIntegrator(new VectorMassIntegrator(*idtcoeff));
}
else
{
Mu->AddDomainIntegrator(new VectorFEMassIntegrator(idtcoeff));
}
if (dg)
{
Du->AddDomainIntegrator(new VectorDivergenceIntegrator());
Du->AddInteriorFaceIntegrator(new TransposeIntegrator(
new DGNormalTraceIntegrator(-1.)));
Du->AddBdrFaceIntegrator(new TransposeIntegrator(new DGNormalTraceIntegrator(
-1.)), const_cast<Array<int>&>(bdr_u_is_ess));
}
else
{
Du->AddDomainIntegrator(new VectorFEDivergenceIntegrator());
if (brt)
{
Du->AddInteriorFaceIntegrator(new TransposeIntegrator(
new DGNormalTraceIntegrator(-1.)));
Du->AddBdrFaceIntegrator(new TransposeIntegrator(new DGNormalTraceIntegrator(
-1.)), const_cast<Array<int>&>(bdr_u_is_ess));
}
}
if (dg && td > 0.)
{
Mn->AddInteriorFaceIntegrator(new HDGDiffusionIntegrator(*dtcoeff, td));
Mn->AddBdrFaceIntegrator(new HDGDiffusionIntegrator(*dtcoeff, td),
const_cast<Array<int>&>(bdr_u_is_ess));
}
Mn->AddDomainIntegrator(new MassIntegrator(*idtcoeff));
if (tr_space)
{
darcy->EnableHybridization(tr_space,
new NormalTraceJumpIntegrator(),
ess_u_tdofs_list);
}
//Maxwell
E_space->GetEssentialTrueDofs(bdr_E_is_ess, ess_E_tdofs_list);
ME = new BilinearForm(E_space);
ME->AddDomainIntegrator(new VectorFEMassIntegrator());
CE = new MixedBilinearForm(E_space, B_space);
CE->AddDomainIntegrator(new MixedCurlIntegrator());
CdE = new DiscreteLinearOperator(E_space, B_space);
CdE->AddDomainInterpolator(new CurlInterpolator());
ME->Assemble();
ME->Finalize();
CE->Assemble();
CE->Finalize();
CdE->Assemble();
CdE->Finalize();
}
CoupledOperator::~CoupledOperator()
{
delete ME;
delete CE;
delete CdE;
delete darcy;
delete idtcoeff;
delete dtcoeff;
}
Array<int> CoupledOperator::ConstructOffsets(const FiniteElementSpace *u_space,
const FiniteElementSpace *n_space, const FiniteElementSpace *E_space,
const FiniteElementSpace *B_space, const FiniteElementSpace *trace_space)
{
Array<int> offsets((trace_space)?(6):(5));
int i = 0;
offsets[i++] = 0;
offsets[i++] = u_space->GetVSize();
offsets[i++] = n_space->GetVSize();
if (trace_space)
{
offsets[i++] = trace_space->GetVSize();
}
offsets[i++] = E_space->GetVSize();
offsets[i++] = B_space->GetVSize();
offsets.PartialSum();
return offsets;
}
void CoupledOperator::ImplicitSolve(const double dt, const Vector &x, Vector &y)
{
const bool time_track = false;
BlockVector bx(const_cast<Vector&>(x), offsets);
BlockVector by(y, offsets);
int i = 0;
const Vector &un = bx.GetBlock(i++);
const Vector &nn = bx.GetBlock(i++);
if (tr_space) { i++; }
const Vector &En = bx.GetBlock(i++);
const Vector &Bn = bx.GetBlock(i++);
i = 2;
//Vector &u = by.GetBlock(i++);
//Vector &n = by.GetBlock(i++);
if (tr_space) { i++; }
Vector &E = by.GetBlock(i++);
Vector &B = by.GetBlock(i++);
//offsets
Array<int> X_offsets(3);
X_offsets[0] = 0;
if (tr_space)
{
X_offsets[1] = tr_space->GetVSize();
}
else
{
X_offsets[1] = darcy->Width();
}
X_offsets[2] = E_space->GetVSize();
X_offsets.PartialSum();
//solution & rhs vectors
BlockVector X(X_offsets), RHS(X_offsets);
BlockDiagonalPreconditioner bprec(X_offsets);
bprec.owns_blocks = true;
//plasma
LinearForm *g = lfs[0];
LinearForm *f = lfs[1];
LinearForm *h = lfs[2];
//set time
for (Coefficient *coeff : coeffs)
{
coeff->SetTime(t);
}
//assemble rhs
StopWatch chrono;
if (time_track)
{
chrono.Clear();
chrono.Start();
}
g->Assemble();
f->Assemble();
if (h) { h->Assemble(); }
//check if the operator has to be reassembled
bool reassemble = (idt != 1./dt);
if (reassemble)
{
idt = 1./dt;
//reset the operator
darcy->Update();
//assemble the system
darcy->Assemble();
if (Mu && tr_space)
{
Mu->Update();
Mu->Assemble();
//Mq0->Finalize();
}
if (Mn && tr_space)
{
Mn->Update();
Mn->Assemble();
//Mt0->Finalize();
}
}
if (Mu)
{
GridFunction u_h;
u_h.MakeRef(darcy->FluxFESpace(), const_cast<Vector&>(un), 0);
Mu->AddMult(u_h, *g, +1.);
}
if (Mn)
{
GridFunction p_h;
p_h.MakeRef(darcy->PotentialFESpace(), const_cast<Vector&>(nn), 0);
Mn->AddMult(p_h, *f, -1.);
}
//form the reduced system
OperatorHandle op_pl;
BlockVector darcy_x(const_cast<Vector&>(x), darcy->GetOffsets());
BlockVector darcy_rhs(g->GetData(), darcy->GetOffsets());
BlockVector X_pl;
BlockVector RHS_pl;
Array<int> tr_offsets(2);
if (tr_space)
{
tr_offsets[0] = 0;
tr_offsets[1] = tr_space->GetVSize();
X_pl.Update(X, tr_offsets);
RHS_pl.Update(RHS, tr_offsets);
if (h)
{
RHS_pl.Vector::operator=(*h);
}
else
{
RHS_pl = 0.;
}
darcy->FormLinearSystem(ess_u_tdofs_list, darcy_x, darcy_rhs,
op_pl, X_pl, RHS_pl);
}
else
{
X_pl.Update(X, darcy->GetOffsets());
RHS_pl.Update(RHS, darcy->GetOffsets());
X_pl = darcy_x;
RHS_pl = darcy_rhs;
BlockVector darcy_x_tmp(X_pl, darcy->GetOffsets());
BlockVector darcy_rhs_tmp(RHS_pl, darcy->GetOffsets());
darcy->FormLinearSystem(ess_u_tdofs_list, darcy_x_tmp, darcy_rhs_tmp,
op_pl, X_pl, RHS_pl);
}
if (time_track)
{
chrono.Stop();
std::cout << "Assembly took " << chrono.RealTime() << "s.\n";
}
if (tr_space)
{
bprec.SetDiagonalBlock(0, new DSmoother(*op_pl.As<SparseMatrix>()));
}
else
{
BlockDiagonalPreconditioner *darcy_prec = new BlockDiagonalPreconditioner(
darcy->GetOffsets());
darcy_prec->owns_blocks = true;;
darcy_prec->SetDiagonalBlock(0, new GSSmoother(Mu->SpMat()));
darcy_prec->SetDiagonalBlock(1, new DSmoother(Mn->SpMat()));
bprec.SetDiagonalBlock(0, darcy_prec);
}
//Maxwell
TransposeOperator Ct(CE);
ProductOperator CtCd(&Ct, CdE, false, false);
SumOperator MECtCd(ME, 1., &CtCd, dt*dt, false, false);
Vector &X_max = X.GetBlock(1);
X_max = En;
Vector &RHS_max = RHS.GetBlock(1);
ME->Mult(En, RHS_max);
//MECtCd.Mult(En, rhs);
CE->AddMultTranspose(Bn, RHS_max, dt);
//CtCd.AddMult(En, rhs, +dt*dt/2.);
//ME - dt*c2/2*Ct(Bn-dt*CE) = MEn + dt*c2/2CtBn
//(M + dt2*c2/2*Ct*C)E = MEn + dt*c2*CtBn
//ME - dt*c2*Ct(Bn-dt/2*CE-dt/2*CEn) = MEn
//(M + dt2*c2/2*Ct*C)E = MEn + dt*c2CtBn - dt2*c2/2*CtCEn
//-1/dt B - CE = 0
//ME->EliminateVDofsInRHS(ess_tdof_list, En, rhs);
ConstrainedOperator op_max(&MECtCd, ess_E_tdofs_list);
//op_max.EliminateRHS(En, RHS_max);
bprec.SetDiagonalBlock(1, new DSmoother(ME->SpMat()));
//coupling
/*const Mesh *mesh = n_space->GetMesh();
const int NE = mesh->GetNE();
for (int el = 0; el < NE; el++)
{
}*/
ReducedOperator bop(sigma, darcy, E_space, *op_pl.Ptr(), op_max);
if (tr_space)
{
Array<int> ess_tr_tdofs_list;//dummy
bop.SetEssentialTDOFs(ess_tr_tdofs_list, ess_E_tdofs_list);
bop.SetDarcyRHS(darcy_rhs);
}
else
{
bop.SetEssentialTDOFs(ess_u_tdofs_list, ess_E_tdofs_list);
}
bop.EliminateRHS(X, RHS);
//solve
GMRESSolver solver;
solver.SetMaxIter(1000);
solver.SetAbsTol(0.);
solver.SetRelTol(1e-6);
solver.SetOperator(bop);
solver.SetPreconditioner(bprec);
solver.SetPrintLevel(0);
NewtonSolver newton;
newton.SetMaxIter(1000);
newton.SetAbsTol(0.);
newton.SetRelTol(1e-5);
newton.SetOperator(bop);
newton.SetSolver(solver);
newton.SetPrintLevel(1);
if (time_track)
{
chrono.Clear();
chrono.Start();
}
newton.Mult(RHS, X);
if (time_track)
{
chrono.Stop();
}
if (newton.GetConverged())
{
std::cout << " converged in " << newton.GetNumIterations()
<< " iterations with a residual norm of " << newton.GetFinalNorm()
<< ".\n";
}
else
{
std::cout << " did not converge in " << newton.GetNumIterations()
<< " iterations. Residual norm is " << newton.GetFinalNorm()
<< ".\n";
}
if (time_track) { std::cout << "Solver took " << chrono.RealTime() << "s.\n"; }
//recover solution
BlockVector darcy_y(y, darcy->GetOffsets());
darcy_y = darcy_x;
if (tr_space)
{
darcy->RecoverFEMSolution(X_pl, darcy_rhs, darcy_y);
Vector &darcy_tr = by.GetBlock(2);
darcy_tr = X_pl;
darcy_tr -= bx.GetBlock(2);
darcy_tr *= idt;
}
else
{
darcy->RecoverFEMSolution(X_pl, RHS_pl, X_pl);
darcy_y = X_pl;
}
darcy_y -= darcy_x;
darcy_y *= idt;
E = X_max;
E -= En;
E *= idt;
CdE->Mult(En, B);
//CdE->AddMult(E, B);
//B *= -1./2.;
B.Neg();
}
CoupledOperator::ReducedOperator::ReducedOperator(Coefficient *sigma_,
DarcyForm *darcy_, FiniteElementSpace *fes_E_, Operator &pl, Operator &max)
: sigma(sigma_), darcy(darcy_), fes_E(fes_E_)
{
offsets.SetSize(3);
offsets[0] = 0;
offsets[1] = pl.Width();
offsets[2] = max.Width();
offsets.PartialSum();
width = height = offsets.Last();
if (darcy->GetHybridization())
{
offsets_x = offsets;
}
else
{
offsets_x.SetSize(4);
offsets_x[0] = 0;
offsets_x[1] = darcy->FluxFESpace()->GetVSize();
offsets_x[2] = darcy->PotentialFESpace()->GetVSize();
offsets_x[3] = fes_E->GetVSize();
offsets_x.PartialSum();
}
BlockOperator *bop = new BlockOperator(offsets);
bop->SetDiagonalBlock(0, &pl);
bop->SetDiagonalBlock(1, &max);
op.Reset(bop);
}
CoupledOperator::ReducedOperator::~ReducedOperator()
{
}
void CoupledOperator::ReducedOperator::SetEssentialTDOFs(
const Array<int> &u_tdofs_list, const Array<int> &E_tdofs_list)
{
ess_tdofs_list.DeleteAll();
ess_tdofs_list.Append(u_tdofs_list);
ess_tdofs_list.Append(E_tdofs_list);
const int size = ess_tdofs_list.Size();
for (int i = 0; i < E_tdofs_list.Size(); i++)
{
int &tdof = ess_tdofs_list[size - 1 - i];
if (tdof >= 0)
{
tdof += offsets[1];
}
else
{
tdof -= offsets[1];
}
}
}
void CoupledOperator::ReducedOperator::EliminateRHS(const Vector &x,
Vector &b) const
{
if (ess_tdofs_list.Size() <= 0) { return; }
Vector w(x.Size()), z(b.Size());
w = 0.;
for (int tdof : ess_tdofs_list)
{
w(tdof) = x(tdof);
}
MultUnconstrained(w, z);
b -= z;
for (int tdof : ess_tdofs_list)
{
b(tdof) = x(tdof);
}
}
void CoupledOperator::ReducedOperator::Mult(const Vector &x, Vector &y) const
{
Vector z(x.Size());
z = x;
for (int tdof : ess_tdofs_list)
{
z(tdof) = 0.;
}
MultUnconstrained(z, y);
for (int tdof : ess_tdofs_list)
{
y(tdof) = x(tdof);
}
}
void CoupledOperator::ReducedOperator::MultUnconstrained(const Vector &x,
Vector &y) const
{
op->Mult(x, y);
const bool hybr = darcy->GetHybridization() != NULL;
BlockVector bx(const_cast<Vector&>(x), offsets_x);
BlockVector by(const_cast<Vector&>(y), offsets_x);
BlockVector darcy_x;
if (hybr)
{
darcy_x.Update(darcy->GetOffsets());
darcy->GetHybridization()->ComputeSolution(*darcy_rhs, x, darcy_x);
darcy_rhs->Vector::operator=(darcy_rhs_lin);
}
const Vector &xn = ((hybr)?(darcy_x):(bx)).GetBlock(1);
const Vector &xE = bx.GetBlock((hybr)?(1):(2));
Vector &yu = ((hybr)?(*darcy_rhs):(by)).GetBlock(0);
Vector &yE = by.GetBlock((hybr)?(1):(2));
Mesh *mesh = fes_E->GetMesh();
FiniteElementSpace *fes_u = darcy->FluxFESpace();
FiniteElementSpace *fes_n = darcy->PotentialFESpace();
Array<int> vdofs_u, dofs_n, vdofs_E;
DenseMatrix vshape_u, vshape_E;
Vector shape_u, shape_E, shape_n, n_z, E_z, E, bu_z, bE_z;
for (int z = 0; z < mesh->GetNE(); z++)
{
ElementTransformation *Tr = mesh->GetElementTransformation(z);
const FiniteElement *fe_u = fes_u->GetFE(z);
const FiniteElement *fe_n = fes_n->GetFE(z);
const FiniteElement *fe_E = fes_E->GetFE(z);
const int sdim = Tr->GetSpaceDim();
const int ndof_u = fe_u->GetDof();
const int ndof_n = fe_n->GetDof();
fes_u->GetElementVDofs(z, vdofs_u);
fes_n->GetElementDofs(z, dofs_n);
fes_E->GetElementVDofs(z, vdofs_E);
if (fe_u->GetRangeType() == FiniteElement::VECTOR)
{
vshape_u.SetSize(vdofs_u.Size(), sdim);
}
shape_u.SetSize(ndof_u);
shape_n.SetSize(ndof_n);
vshape_E.SetSize(vdofs_E.Size(), sdim);
shape_E.SetSize(vdofs_E.Size());
E.SetSize(sdim);
bu_z.SetSize(vdofs_u.Size());
bE_z.SetSize(vdofs_E.Size());
bu_z = 0.;
bE_z = 0.;
xn.GetSubVector(dofs_n, n_z);
xE.GetSubVector(vdofs_E, E_z);
const int order = std::max(fe_E->GetOrder(), fe_n->GetOrder()) * 2 + 1;
const IntegrationRule &ir = IntRules.Get(fe_n->GetGeomType(), order);
for (int q = 0; q < ir.GetNPoints(); q++)
{
const IntegrationPoint &ip = ir.IntPoint(q);
Tr->SetIntPoint(&ip);
fe_n->CalcShape(ip, shape_n);
const real_t n = n_z * shape_n;
fe_E->CalcVShape(*Tr, vshape_E);
vshape_E.MultTranspose(E_z, E);
real_t w = n * Tr->Weight();
if (sigma) { w *= sigma->Eval(*Tr, ip); }
if (fe_u->GetRangeType() == FiniteElement::VECTOR)
{
fe_u->CalcVShape(*Tr, vshape_u);
vshape_u.Mult(E, shape_u);
bu_z.Add(w, shape_u);
}
else
{
fe_u->CalcShape(ip, shape_u);
for (int d = 0; d < sdim; d++)
for (int i = 0; i < ndof_u; i++)
{
bu_z(i+d*ndof_u) += w * E(d) * shape_u(i);
}
}
vshape_E.Mult(E, shape_E);
bE_z.Add(w, shape_E);
}
if (hybr) { bu_z.Neg(); }
yu.AddElementVector(vdofs_u, bu_z);
yE.AddElementVector(vdofs_E, bE_z);
}
if (hybr)
{
BlockVector darcy_Xrhs(darcy->GetOffsets());
add(darcy_rhs_lin, -1., *darcy_rhs, darcy_Xrhs);
darcy->GetHybridization()->ReduceRHS(darcy_Xrhs, by.GetBlock(0));
}
}
Operator &CoupledOperator::ReducedOperator::GetGradient(const Vector &x) const
{
if (darcy->GetHybridization())
{
//TODO: coupling terms
return const_cast<Operator&>(*op);
}
grad.Clear();
FiniteElementSpace *fes_u = darcy->FluxFESpace();
FiniteElementSpace *fes_n = darcy->PotentialFESpace();
SparseMatrix *BEE, *BEu, *BnE, *Bnu;
BEE = new SparseMatrix(fes_E->GetVSize());
BEu = new SparseMatrix(fes_u->GetVSize(), fes_E->GetVSize());
BnE = new SparseMatrix(fes_E->GetVSize(), fes_n->GetVSize());
Bnu = new SparseMatrix(fes_u->GetVSize(), fes_n->GetVSize());
BlockVector bx(const_cast<Vector&>(x), offsets_x);
Mesh *mesh = fes_E->GetMesh();
Array<int> vdofs_u, dofs_n, vdofs_E;
DenseMatrix vshape_u, vshape_E;
DenseMatrix BEE_z, BEu_z, BnE_z, Bnu_z;
Vector shape_u, shape_E, shape_n, n_z, E_z, E;
for (int z = 0; z < mesh->GetNE(); z++)
{
ElementTransformation *Tr = mesh->GetElementTransformation(z);
const FiniteElement *fe_u = fes_u->GetFE(z);
const FiniteElement *fe_n = fes_n->GetFE(z);
const FiniteElement *fe_E = fes_E->GetFE(z);
const int sdim = Tr->GetSpaceDim();
const int ndof_u = fe_u->GetDof();
const int ndof_n = fe_n->GetDof();
fes_u->GetElementVDofs(z, vdofs_u);
fes_n->GetElementDofs(z, dofs_n);
fes_E->GetElementVDofs(z, vdofs_E);
if (fe_u->GetRangeType() == FiniteElement::VECTOR)
{
vshape_u.SetSize(vdofs_u.Size(), sdim);
}
shape_u.SetSize(ndof_u);
shape_n.SetSize(ndof_n);
vshape_E.SetSize(vdofs_E.Size(), sdim);
shape_E.SetSize(vdofs_E.Size());
E.SetSize(sdim);
BEE_z.SetSize(vdofs_E.Size());
BEu_z.SetSize(vdofs_u.Size(), vdofs_E.Size());
BnE_z.SetSize(vdofs_E.Size(), dofs_n.Size());
Bnu_z.SetSize(vdofs_u.Size(), dofs_n.Size());
BEE_z = 0.;
BEu_z = 0.;
BnE_z = 0.;
Bnu_z = 0.;
bx.GetBlock(1).GetSubVector(dofs_n, n_z);
bx.GetBlock(2).GetSubVector(vdofs_E, E_z);
const int order = std::max(fe_E->GetOrder(), fe_n->GetOrder()) * 2 + 1;
const IntegrationRule &ir = IntRules.Get(fe_n->GetGeomType(), order);
for (int q = 0; q < ir.GetNPoints(); q++)
{
const IntegrationPoint &ip = ir.IntPoint(q);
Tr->SetIntPoint(&ip);
fe_n->CalcShape(ip, shape_n);
const real_t n = n_z * shape_n;
fe_E->CalcVShape(*Tr, vshape_E);
vshape_E.MultTranspose(E_z, E);
real_t w = Tr->Weight();
if (sigma) { w *= sigma->Eval(*Tr, ip); }
if (fe_u->GetRangeType() == FiniteElement::VECTOR)
{
fe_u->CalcVShape(*Tr, vshape_u);
vshape_u.Mult(E, shape_u);
AddMult_a_VWt(w, shape_u, shape_n, Bnu_z);
AddMult_a_ABt(w * n, vshape_u, vshape_E, BEu_z);
}
else
{
fe_u->CalcShape(ip, shape_u);
for (int d = 0; d < sdim; d++)
for (int i = 0; i < ndof_u; i++)
{
for (int j = 0; j < ndof_n; j++)
{
Bnu_z(i+d*ndof_u, j) += w * E(d) * shape_u(i) * shape_n(j);
}
for (int j = 0; j < vdofs_E.Size(); j++)
{
BEu_z(i+d*ndof_u, j) += w * n * shape_u(i) * vshape_E(j, d);
}
}
}
vshape_E.Mult(E, shape_E);
AddMult_a_AAt(w * n, vshape_E, BEE_z);
AddMult_a_VWt(w, shape_E, shape_n, BnE_z);
}
BEE->AddSubMatrix(vdofs_E, vdofs_E, BEE_z);
BEu->AddSubMatrix(vdofs_u, vdofs_E, BEu_z);
BnE->AddSubMatrix(vdofs_E, dofs_n, BnE_z);
Bnu->AddSubMatrix(vdofs_u, dofs_n, Bnu_z);
}
BEE->Finalize();
BEu->Finalize();
BnE->Finalize();
Bnu->Finalize();
BlockOperator *bcouple = new BlockOperator(offsets_x);
bcouple->owns_blocks = true;
bcouple->SetBlock(2, 2, BEE);
bcouple->SetBlock(0, 2, BEu);
bcouple->SetBlock(2, 1, BnE);
bcouple->SetBlock(0, 1, Bnu);
grad.Reset(new SumOperator(op.Ptr(), 1., bcouple, 1., false, true));
if (ess_tdofs_list.Size() > 0)
{
grad.SetOperatorOwner(false);
grad.Reset(new ConstrainedOperator(grad.Ptr(), ess_tdofs_list));
}
return *grad;
}
}
+79
View File
@@ -0,0 +1,79 @@
// Copyright (c) 2010-2024, 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.
#ifndef MFEM_COUPLEDOP
#define MFEM_COUPLEDOP
#include "mfem.hpp"
namespace mfem
{
class CoupledOperator : public TimeDependentOperator
{
Array<int> ess_u_tdofs_list, ess_E_tdofs_list;
Coefficient *sigma;
const Array<LinearForm*> &lfs;
const Array<Coefficient*> &coeffs;
FiniteElementSpace *u_space, *n_space, *E_space, *B_space, *tr_space;
Array<int> offsets;
BilinearForm *ME{}, *Mu{}, *Mn{};
MixedBilinearForm *CE{}, *Du{};
DiscreteLinearOperator *CdE{};
DarcyForm *darcy{};
real_t idt{};
Coefficient *idtcoeff{}, *dtcoeff{};
class ReducedOperator : public Operator
{
Array<int> offsets, offsets_x;
Coefficient *sigma;
DarcyForm *darcy;
BlockVector *darcy_rhs{};
Vector darcy_rhs_lin;
FiniteElementSpace *fes_E;
OperatorHandle op;
Array<int> ess_tdofs_list;
mutable OperatorHandle grad;
public:
ReducedOperator(Coefficient *sigma, DarcyForm *darcy, FiniteElementSpace *fes_E,
Operator &pl, Operator &max);
~ReducedOperator();
void SetEssentialTDOFs(const Array<int> &u_tdofs_list,
const Array<int> &E_tdofs_list);
void SetDarcyRHS(BlockVector &rhs) { darcy_rhs = &rhs; darcy_rhs_lin = rhs; }
void EliminateRHS(const Vector &x, Vector &b) const;
void Mult(const Vector &x, Vector &y) const override;
void MultUnconstrained(const Vector &x, Vector &y) const;
Operator& GetGradient(const Vector &x) const override;
};
public:
CoupledOperator(const Array<int> &bdr_u_ess, const Array<int> &bdr_E_is_ess,
Coefficient *sigma,
const Array<LinearForm*> &lfs, const Array<Coefficient*> &coeffs,
FiniteElementSpace *u_space, FiniteElementSpace *n_space,
FiniteElementSpace *E_space, FiniteElementSpace *B_space,
FiniteElementSpace *tr_space = NULL, real_t td = 0.5);
~CoupledOperator();
static Array<int> ConstructOffsets(
const FiniteElementSpace *u_space, const FiniteElementSpace *n_space,
const FiniteElementSpace *E_space, const FiniteElementSpace *B_space,
const FiniteElementSpace *tr_space = NULL);
void ImplicitSolve(const double dt, const Vector &x, Vector &y) override;
};
}
#endif
+1260
View File
File diff suppressed because it is too large Load Diff
+226
View File
@@ -0,0 +1,226 @@
// Copyright (c) 2010-2024, 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.
#ifndef MFEM_DARCYOP
#define MFEM_DARCYOP
#include "mfem.hpp"
#include "../general/socketstream.hpp"
namespace mfem
{
class DarcyOperator : public TimeDependentOperator
{
public:
enum class SolverType
{
Default = 0,
LBFGS,
LBB,
Newton,
KINSol,
};
private:
Array<int> offsets;
const Array<int> &ess_flux_tdofs_list;
DarcyForm *darcy;
LinearForm *g, *f, *h;
#ifdef MFEM_USE_MPI
ParDarcyForm *pdarcy {};
ParLinearForm *pg{}, *pf{}, *ph{};
#endif
const Array<Coefficient*> &coeffs;
SolverType solver_type;
bool btime_u, btime_p;
real_t rtol{1e-6}, atol{1e-10};
int max_iters{1000};
FiniteElementSpace *trace_space{};
real_t idt{};
std::unique_ptr<Coefficient> idtcoeff;
std::unique_ptr<BilinearForm> Mt0, Mq0;
std::string lsolver_str;
std::unique_ptr<Solver> prec, lin_prec;
std::string prec_str, lin_prec_str;
std::unique_ptr<IterativeSolver> solver;
std::string solver_str;
std::unique_ptr<IterativeSolverMonitor> monitor;
int monitor_step{-1};
mutable BlockVector x, rhs;
class SchurPreconditioner : public Solver
{
const DarcyForm *darcy;
#ifdef MFEM_USE_MPI
const ParDarcyForm *pdarcy {};
#endif
const Operator *op {};
bool nonlinear;
const char *prec_str;
mutable std::unique_ptr<BlockDiagonalPreconditioner> darcyPrec;
mutable std::unique_ptr<SparseMatrix> S;
#ifdef MFEM_USE_MPI
mutable std::unique_ptr<HypreParMatrix> hS;
#endif
mutable bool reconstruct {};
void Construct(const Vector &x) const;
#ifdef MFEM_USE_MPI
void ConstructPar(const Vector &x) const;
#endif
public:
SchurPreconditioner(const DarcyForm *darcy, bool nonlinear = false);
#ifdef MFEM_USE_MPI
SchurPreconditioner(const ParDarcyForm *darcy, bool nonlinear = false);
#endif
const char *GetString() const { return prec_str; }
void SetOperator(const Operator &op_) override
{ op = &op_; reconstruct = true; }
void Mult(const Vector &x, Vector &y) const override;
};
public:
class SolutionController : public IterativeSolverController
{
public:
enum class Type
{
Native,
Flux,
Potential
};
protected:
DarcyForm &darcy;
BlockVector &x;
const BlockVector &rhs;
Type type;
real_t rtol;
int it_prev{};
Vector sol_prev;
bool CheckSolution(const Vector &x, const Vector &y) const;
virtual void ReduceValues(real_t diff[], int num) const { }
public:
SolutionController(DarcyForm &darcy, BlockVector &x, const BlockVector &rhs,
Type type, real_t rtol);
void MonitorSolution(int it, real_t norm, const Vector &x,
bool final) override;
bool RequiresUpdatedSolution() const override { return true; }
};
#ifdef MFEM_USE_MPI
class ParSolutionController : public SolutionController
{
protected:
ParDarcyForm &pdarcy;
void ReduceValues(real_t diff[], int num) const override;
public:
ParSolutionController(ParDarcyForm &pdarcy, BlockVector &x,
const BlockVector &rhs, Type type, real_t rtol);
void MonitorSolution(int it, real_t norm, const Vector &x,
bool final) override;
};
#endif //MFEM_USE_MPI
private:
SolutionController::Type sol_type{SolutionController::Type::Native};
class IterativeGLVis : public IterativeSolverMonitor
{
protected:
DarcyForm &darcy;
BlockVector &x;
const BlockVector &rhs;
int step;
bool save_files;
socketstream q_sock, t_sock;
virtual void StreamPreamble(socketstream &ss) { }
virtual std::string FormFilename(const char *base, int it,
const char *suff = "gf");
public:
IterativeGLVis(DarcyForm &darcy, BlockVector &x, const BlockVector &rhs,
int step = 0, bool save_files = false);
void MonitorSolution(int it, real_t norm, const Vector &x,
bool final) override;
bool RequiresUpdatedSolution() const override { return true; }
};
#ifdef MFEM_USE_MPI
class ParIterativeGLVis : public IterativeGLVis
{
ParDarcyForm &pdarcy;
void StreamPreamble(socketstream &ss) override;
std::string FormFilename(const char *base, int it,
const char *suff = "gf") override;
public:
ParIterativeGLVis(ParDarcyForm &pdarcy_, BlockVector &x, const BlockVector &rhs,
int step = 0, bool save_files = false)
: IterativeGLVis(pdarcy_, x, rhs, step), pdarcy(pdarcy_) { }
};
#endif //MFEM_USE_MPI
void SetupNonlinearSolver(real_t rtol, real_t atol, int iters);
void SetupLinearSolver(real_t rtol, real_t atol, int iters);
public:
DarcyOperator(const Array<int> &ess_flux_tdofs_list, DarcyForm *darcy,
LinearForm *g, LinearForm *f, LinearForm *h, const Array<Coefficient*> &coeffs,
SolverType stype = SolverType::LBFGS, bool bflux_u = true,
bool btime_p = true);
#ifdef MFEM_USE_MPI
DarcyOperator(const Array<int> &ess_flux_tdofs_list, ParDarcyForm *darcy,
ParLinearForm *g, ParLinearForm *f, ParLinearForm *h,
const Array<Coefficient*> &coeffs,
SolverType stype = SolverType::LBFGS, bool bflux_u = true,
bool btime_p = true);
#endif
~DarcyOperator();
void SetTolerance(real_t rtol_, real_t atol_ = 0.) { rtol = rtol_; atol = atol_; }
void SetMaxIters(int iters_) { max_iters = iters_; }
void EnableSolutionController(SolutionController::Type type) { sol_type = type; }
void EnableIterationsVisualization(int vis_step = 0) { monitor_step = vis_step; }
static Array<int> ConstructOffsets(const DarcyForm &darcy);
inline const Array<int>& GetOffsets() const { return offsets; }
void ImplicitSolve(const real_t dt, const Vector &x, Vector &k) override;
};
void RandomizeMesh(Mesh &mesh, real_t dr);
}
#endif
-1
View File
@@ -27,7 +27,6 @@
// ex1 -m ../data/fichera-amr.mesh
// ex1 -m ../data/mobius-strip.mesh
// ex1 -m ../data/mobius-strip.mesh -o -1 -sc
// ex1 -m ../data/nc3-nurbs.mesh -o -1
//
// Device sample runs:
// ex1 -pa -d cuda
File diff suppressed because it is too large Load Diff
+605
View File
@@ -0,0 +1,605 @@
// MFEM Example 5
//
// Compile with: make ex5
//
// Sample runs: ex5 -m ../data/square-disc.mesh
// ex5 -m ../data/star.mesh
// ex5 -m ../data/star.mesh -pa
// ex5 -m ../data/beam-tet.mesh
// ex5 -m ../data/beam-hex.mesh
// ex5 -m ../data/beam-hex.mesh -pa
// ex5 -m ../data/escher.mesh
// ex5 -m ../data/fichera.mesh
//
// Device sample runs:
// ex5 -m ../data/star.mesh -pa -d cuda
// ex5 -m ../data/star.mesh -pa -d raja-cuda
// ex5 -m ../data/star.mesh -pa -d raja-omp
// ex5 -m ../data/beam-hex.mesh -pa -d cuda
//
// Description: This example code solves a simple 2D/3D mixed Darcy problem
// corresponding to the saddle point system
//
// k*u + grad p = f
// - div u = g
//
// with natural boundary condition -p = <given pressure>.
// Here, we use a given exact solution (u,p) and compute the
// corresponding r.h.s. (f,g). We discretize with Raviart-Thomas
// finite elements (velocity u) and piecewise discontinuous
// polynomials (pressure p). Alternatively, the piecewise discontinuous
// polynomials are used for both quantities.
//
// The example demonstrates the use of the DarcyForm class, as
// well as hybridization of mixed systems and the collective saving
// of several grid functions in VisIt (visit.llnl.gov) and ParaView
// (paraview.org) formats.
//
// We recommend viewing examples 1-4 before viewing this example.
#include "mfem.hpp"
#include <fstream>
#include <iostream>
#include <algorithm>
using namespace std;
using namespace mfem;
// Define the analytical solution and forcing terms / boundary conditions
void uFun_ex(const Vector & x, Vector & u);
real_t pFun_ex(const Vector & x);
void fFun(const Vector & x, Vector & f);
real_t gFun(const Vector & x);
real_t f_natural(const Vector & x);
int main(int argc, char *argv[])
{
StopWatch chrono;
// 1. Parse command-line options.
const char *mesh_file = "";
int nx = 0;
int ny = 0;
int order = 1;
bool dg = false;
bool brt = false;
real_t td = 0.5;
bool hybridization = false;
bool reduction = false;
bool pa = false;
const char *device_config = "cpu";
bool visualization = 1;
OptionsParser args(argc, argv);
args.AddOption(&mesh_file, "-m", "--mesh",
"Mesh file to use.");
args.AddOption(&nx, "-nx", "--ncells-x",
"Number of cells in x.");
args.AddOption(&ny, "-ny", "--ncells-y",
"Number of cells in y.");
args.AddOption(&order, "-o", "--order",
"Finite element order (polynomial degree).");
args.AddOption(&dg, "-dg", "--discontinuous", "-no-dg",
"--no-discontinuous", "Enable DG elements for fluxes.");
args.AddOption(&brt, "-brt", "--broken-RT", "-no-brt",
"--no-broken-RT", "Enable broken RT elements for fluxes.");
args.AddOption(&td, "-td", "--stab_diff",
"Diffusion stabilization factor (1/2=default)");
args.AddOption(&hybridization, "-hb", "--hybridization", "-no-hb",
"--no-hybridization", "Enable hybridization.");
args.AddOption(&reduction, "-rd", "--reduction", "-no-rd",
"--no-reduction", "Enable reduction of DG flux.");
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.Parse();
if (!args.Good())
{
args.PrintUsage(cout);
return 1;
}
args.PrintOptions(cout);
// 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();
// 3. Read the mesh from the given mesh file. We can handle triangular,
// quadrilateral, tetrahedral, hexahedral, surface and volume meshes with
// the same code.
if (ny <= 0)
{
ny = nx;
}
Mesh *mesh = NULL;
if (strlen(mesh_file) > 0)
{
mesh = new Mesh(mesh_file, 1, 1);
}
else
{
mesh = new Mesh(Mesh::MakeCartesian2D(nx, ny, Element::QUADRILATERAL));
}
int dim = mesh->Dimension();
// 4. Refine the mesh to increase the resolution. In this example we do
// 'ref_levels' of uniform refinement. We choose 'ref_levels' to be the
// largest number that gives a final mesh with no more than 10,000
// elements.
if (strlen(mesh_file) > 0)
{
int ref_levels =
(int)floor(log(10000./mesh->GetNE())/log(2.)/dim);
for (int l = 0; l < ref_levels; l++)
{
mesh->UniformRefinement();
}
}
// 5. Define a finite element space on the mesh. Here we use the
// Raviart-Thomas finite elements of the specified order.
FiniteElementCollection *R_coll, *R_coll_dg = NULL;
if (dg)
{
// In the case of LDG formulation, we chose a closed basis as it
// is customary for HDG to match trace DOFs, but an open basis can
// be used instead.
R_coll = new L2_FECollection(order, dim, BasisType::GaussLobatto);
}
else if (brt)
{
R_coll = new BrokenRT_FECollection(order, dim);
R_coll_dg = new L2_FECollection(order+1, dim);
}
else
{
R_coll = new RT_FECollection(order, dim);
}
FiniteElementCollection *W_coll = new L2_FECollection(order, dim);
FiniteElementSpace *R_space = new FiniteElementSpace(mesh, R_coll,
(dg)?(dim):(1));
FiniteElementSpace *R_space_dg = (R_coll_dg)?(new FiniteElementSpace(
mesh, R_coll_dg, dim)):(NULL);
FiniteElementSpace *W_space = new FiniteElementSpace(mesh, W_coll);
DarcyForm *darcy = new DarcyForm(R_space, W_space);
// 6. Define the BlockStructure of the problem, i.e. define the array of
// offsets for each variable. The last component of the Array is the sum
// of the dimensions of each block.
const Array<int> &block_offsets = darcy->GetOffsets();
std::cout << "***********************************************************\n";
std::cout << "dim(R) = " << block_offsets[1] - block_offsets[0] << "\n";
std::cout << "dim(W) = " << block_offsets[2] - block_offsets[1] << "\n";
std::cout << "dim(R+W) = " << block_offsets.Last() << "\n";
std::cout << "***********************************************************\n";
// 7. Define the coefficients, analytical solution, and rhs of the PDE.
const double k = 1.0;
ConstantCoefficient kcoeff(k); //acoustic resistance
RatioCoefficient ikcoeff(1., kcoeff); //inverse acoustic resistance
VectorFunctionCoefficient fcoeff(dim, fFun); //velocity rhs
FunctionCoefficient fnatcoeff(f_natural); //boundary velocity rhs
FunctionCoefficient gcoeff(gFun); //pressure rhs
VectorFunctionCoefficient ucoeff(dim, uFun_ex); //velocity
FunctionCoefficient pcoeff(pFun_ex); //pressure
// 8. Allocate memory (x, rhs) for the analytical solution and the right hand
// side. Define the GridFunction u,p for the finite element solution and
// linear forms fform and gform for the right hand side. The data
// allocated by x and rhs are passed as a reference to the grid functions
// (u,p) and the linear forms (fform, gform).
MemoryType mt = device.GetMemoryType();
BlockVector x(block_offsets, mt), rhs(block_offsets, mt);
LinearForm *fform(new LinearForm);
fform->Update(R_space, rhs.GetBlock(0), 0);
if (dg)
{
fform->AddDomainIntegrator(new VectorDomainLFIntegrator(fcoeff));
fform->AddBdrFaceIntegrator(new VectorBoundaryFluxLFIntegrator(fnatcoeff));
}
else
{
fform->AddDomainIntegrator(new VectorFEDomainLFIntegrator(fcoeff));
if (brt)
{
fform->AddBdrFaceIntegrator(new VectorFEBoundaryFluxLFIntegrator(fnatcoeff));
}
else
{
fform->AddBoundaryIntegrator(new VectorFEBoundaryFluxLFIntegrator(fnatcoeff));
}
}
fform->Assemble();
fform->SyncAliasMemory(rhs);
LinearForm *gform(new LinearForm);
gform->Update(W_space, rhs.GetBlock(1), 0);
gform->AddDomainIntegrator(new DomainLFIntegrator(gcoeff));
gform->Assemble();
gform->SyncAliasMemory(rhs);
// 9. Assemble the finite element matrices for the Darcy operator
//
// D = [ M B^T ]
// [ B 0 ]
// where:
//
// M = \int_\Omega k u_h \cdot v_h d\Omega u_h, v_h \in R_h
// B = -\int_\Omega \div u_h q_h d\Omega u_h \in R_h, q_h \in W_h
BilinearForm *mVarf = darcy->GetFluxMassForm();
MixedBilinearForm *bVarf = darcy->GetFluxDivForm();
BilinearForm *mtVarf = (dg)?(darcy->GetPotentialMassForm()):(NULL);
if (dg)
{
mVarf->AddDomainIntegrator(new VectorMassIntegrator(kcoeff));
bVarf->AddDomainIntegrator(new VectorDivergenceIntegrator());
bVarf->AddInteriorFaceIntegrator(new TransposeIntegrator(
new DGNormalTraceIntegrator(-1.)));
mtVarf->AddInteriorFaceIntegrator(new HDGDiffusionIntegrator(ikcoeff, td));
}
else
{
mVarf->AddDomainIntegrator(new VectorFEMassIntegrator(kcoeff));
bVarf->AddDomainIntegrator(new VectorFEDivergenceIntegrator);
if (brt)
{
bVarf->AddInteriorFaceIntegrator(new TransposeIntegrator(
new DGNormalTraceIntegrator(-1.)));
}
}
//set hybridization / assembly level
Array<int> ess_flux_tdofs_list;
FiniteElementCollection *trace_coll = NULL;
FiniteElementSpace *trace_space = NULL;
chrono.Clear();
chrono.Start();
if (hybridization)
{
trace_coll = new DG_Interface_FECollection(order, dim);
trace_space = new FiniteElementSpace(mesh, trace_coll);
darcy->EnableHybridization(trace_space,
new NormalTraceJumpIntegrator(),
ess_flux_tdofs_list);
}
else if (reduction && (dg || brt))
{
darcy->EnableFluxReduction();
}
if (pa) { darcy->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
darcy->Assemble();
OperatorHandle pDarcyOp;
Vector X, B;
x = 0.;
darcy->FormLinearSystem(ess_flux_tdofs_list, x, rhs,
pDarcyOp, X, B);
chrono.Stop();
std::cout << "Assembly took " << chrono.RealTime() << "s.\n";
int maxIter(1000);
real_t rtol(1.e-6);
real_t atol(1.e-10);
if (hybridization || (reduction && (dg || brt)))
{
// 10. Construct the preconditioner
GSSmoother prec(*pDarcyOp.As<SparseMatrix>());
// 11. Solve the linear system with GMRES.
// Check the norm of the unpreconditioned residual.
chrono.Clear();
chrono.Start();
GMRESSolver solver;
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetOperator(*pDarcyOp);
solver.SetPreconditioner(prec);
solver.SetPrintLevel(1);
solver.Mult(B, X);
darcy->RecoverFEMSolution(X, rhs, x);
chrono.Stop();
if (solver.GetConverged())
{
std::cout << "GMRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
}
else
{
std::cout << "GMRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
}
std::cout << "GMRES solver took " << chrono.RealTime() << "s.\n";
}
else
{
// 10. Construct the operators for preconditioner
//
// P = [ diag(M) 0 ]
// [ 0 B diag(M)^-1 B^T ]
//
// Here we use Symmetric Gauss-Seidel to approximate the inverse of the
// pressure Schur Complement
SparseMatrix *MinvBt = NULL;
Vector Md(mVarf->Height());
BlockDiagonalPreconditioner darcyPrec(block_offsets);
Solver *invM, *invS;
SparseMatrix *S = NULL;
if (pa)
{
mVarf->AssembleDiagonal(Md);
auto Md_host = Md.HostRead();
Vector invMd(mVarf->Height());
for (int i=0; i<mVarf->Height(); ++i)
{
invMd(i) = 1.0 / Md_host[i];
}
Vector BMBt_diag(bVarf->Height());
bVarf->AssembleDiagonal_ADAt(invMd, BMBt_diag);
Array<int> ess_tdof_list; // empty
invM = new OperatorJacobiSmoother(Md, ess_tdof_list);
invS = new OperatorJacobiSmoother(BMBt_diag, ess_tdof_list);
}
else
{
SparseMatrix &M(mVarf->SpMat());
M.GetDiag(Md);
Md.HostReadWrite();
SparseMatrix &B(bVarf->SpMat());
MinvBt = Transpose(B);
for (int i = 0; i < Md.Size(); i++)
{
MinvBt->ScaleRow(i, 1./Md(i));
}
S = Mult(B, *MinvBt);
if (mtVarf)
{
SparseMatrix &Mtm(mtVarf->SpMat());
SparseMatrix *Snew = Add(Mtm, *S);
delete S;
S = Snew;
}
invM = new DSmoother(M);
#ifndef MFEM_USE_SUITESPARSE
invS = new GSSmoother(*S);
#else
invS = new UMFPackSolver(*S);
#endif
}
invM->iterative_mode = false;
invS->iterative_mode = false;
darcyPrec.SetDiagonalBlock(0, invM);
darcyPrec.SetDiagonalBlock(1, invS);
// 11. Solve the linear system with MINRES.
// Check the norm of the unpreconditioned residual.
chrono.Clear();
chrono.Start();
MINRESSolver solver;
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetOperator(*pDarcyOp);
solver.SetPreconditioner(darcyPrec);
solver.SetPrintLevel(1);
solver.Mult(B, X);
darcy->RecoverFEMSolution(X, rhs, x);
if (device.IsEnabled()) { x.HostRead(); }
chrono.Stop();
if (solver.GetConverged())
{
std::cout << "MINRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
}
else
{
std::cout << "MINRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
}
std::cout << "MINRES solver took " << chrono.RealTime() << "s.\n";
delete invM;
delete invS;
delete S;
delete MinvBt;
}
// 12. Create the grid functions u and p. Compute the L2 error norms.
GridFunction u, p;
if (R_space_dg)
{
GridFunction u_broken(R_space, x.GetBlock(0), 0);
VectorGridFunctionCoefficient coeff(&u_broken);
u.SetSpace(R_space_dg);
u.ProjectCoefficient(coeff);
}
else
{
u.MakeRef(R_space, x.GetBlock(0), 0);
}
p.MakeRef(W_space, x.GetBlock(1), 0);
int order_quad = max(2, 2*order+1);
const IntegrationRule *irs[Geometry::NumGeom];
for (int i=0; i < Geometry::NumGeom; ++i)
{
irs[i] = &(IntRules.Get(i, order_quad));
}
real_t err_u = u.ComputeL2Error(ucoeff, irs);
real_t norm_u = ComputeLpNorm(2., ucoeff, *mesh, irs);
real_t err_p = p.ComputeL2Error(pcoeff, irs);
real_t norm_p = ComputeLpNorm(2., pcoeff, *mesh, irs);
std::cout << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n";
std::cout << "|| p_h - p_ex || / || p_ex || = " << err_p / norm_p << "\n";
// 13. Save the mesh and the solution. This output can be viewed later using
// GLVis: "glvis -m ex5.mesh -g sol_u.gf" or "glvis -m ex5.mesh -g
// sol_p.gf".
{
ofstream mesh_ofs("ex5.mesh");
mesh_ofs.precision(8);
mesh->Print(mesh_ofs);
ofstream u_ofs("sol_u.gf");
u_ofs.precision(8);
u.Save(u_ofs);
ofstream p_ofs("sol_p.gf");
p_ofs.precision(8);
p.Save(p_ofs);
}
// 14. Save data in the VisIt format
VisItDataCollection visit_dc("Example5", mesh);
visit_dc.RegisterField("velocity", &u);
visit_dc.RegisterField("pressure", &p);
visit_dc.Save();
// 15. Save data in the ParaView format
ParaViewDataCollection paraview_dc("Example5", mesh);
paraview_dc.SetPrefixPath("ParaView");
paraview_dc.SetLevelsOfDetail(order);
paraview_dc.SetCycle(0);
paraview_dc.SetDataFormat(VTKFormat::BINARY);
paraview_dc.SetHighOrderOutput(true);
paraview_dc.SetTime(0.0); // set the time
paraview_dc.RegisterField("velocity",&u);
paraview_dc.RegisterField("pressure",&p);
paraview_dc.Save();
// 16. Send the solution by socket to a GLVis server.
if (visualization)
{
char vishost[] = "localhost";
int visport = 19916;
socketstream u_sock(vishost, visport);
u_sock.precision(8);
u_sock << "solution\n" << *mesh << u << "window_title 'Velocity'" << endl;
u_sock << "keys Rljvvvvvmmc" << endl;
socketstream p_sock(vishost, visport);
p_sock.precision(8);
p_sock << "solution\n" << *mesh << p << "window_title 'Pressure'" << endl;
p_sock << "keys Rljmmc" << endl;
}
// 17. Free the used memory.
delete fform;
delete gform;
delete darcy;
delete W_space;
delete R_space;
delete R_space_dg;
delete trace_space;
delete W_coll;
delete R_coll;
delete R_coll_dg;
delete trace_coll;
delete mesh;
return 0;
}
void uFun_ex(const Vector & x, Vector & u)
{
real_t xi(x(0));
real_t yi(x(1));
real_t zi(0.0);
if (x.Size() == 3)
{
zi = x(2);
}
u(0) = - exp(xi)*sin(yi)*cos(zi);
u(1) = - exp(xi)*cos(yi)*cos(zi);
if (x.Size() == 3)
{
u(2) = exp(xi)*sin(yi)*sin(zi);
}
}
// Change if needed
real_t pFun_ex(const Vector & x)
{
real_t xi(x(0));
real_t yi(x(1));
real_t zi(0.0);
if (x.Size() == 3)
{
zi = x(2);
}
return exp(xi)*sin(yi)*cos(zi);
}
void fFun(const Vector & x, Vector & f)
{
f = 0.0;
}
real_t gFun(const Vector & x)
{
if (x.Size() == 3)
{
return -pFun_ex(x);
}
else
{
return 0;
}
}
real_t f_natural(const Vector & x)
{
return (-pFun_ex(x));
}
+634
View File
@@ -0,0 +1,634 @@
// MFEM Example 5
//
// Compile with: make ex5
//
// Sample runs: ex5 -m ../data/square-disc.mesh
// ex5 -m ../data/star.mesh
// ex5 -m ../data/star.mesh -pa
// ex5 -m ../data/beam-tet.mesh
// ex5 -m ../data/beam-hex.mesh
// ex5 -m ../data/beam-hex.mesh -pa
// ex5 -m ../data/escher.mesh
// ex5 -m ../data/fichera.mesh
//
// Device sample runs:
// ex5 -m ../data/star.mesh -pa -d cuda
// ex5 -m ../data/star.mesh -pa -d raja-cuda
// ex5 -m ../data/star.mesh -pa -d raja-omp
// ex5 -m ../data/beam-hex.mesh -pa -d cuda
//
// Description: This example code solves a simple 2D/3D asymptotic heat diffusion
// problem in the mixed formulation corresponding to the system
//
// k^-1.q + grad T = f
// div q + a*T = -g
//
// with natural boundary condition q.n = 0, where n is the outer
// normal. The tensor k represents the heat conductivity, where its
// symmetric and antisymmetric parts can be adjusted. The scalar a
// is then the heat capacity, which can be zero, changing the problem
// to steady-state, indefinite, saddle-point. The r.h.s. is f = 0 and
// g = -a * <initial temperature> for the definite problem and
// g = -<initial temperature> for the indefinite one. As a reference,
// we use the exact solution (q,T) for the asymptote a -> infinity.
// We discretize with Raviart-Thomas finite elements (heat flux q)
// and piecewise discontinuous polynomials (temperature T). Alternatively,
// the piecewise discontinuous polynomials are used for both quantities.
//
// The example demonstrates the use of the DarcyForm class, as
// well as hybridization of mixed systems and the collective saving
// of several grid functions in VisIt (visit.llnl.gov) and ParaView
// (paraview.org) formats.
//
// We recommend viewing examples 1-4 before viewing this example.
#include "mfem.hpp"
#include <fstream>
#include <iostream>
#include <algorithm>
using namespace std;
using namespace mfem;
// Define the analytical solution and forcing terms / boundary conditions
typedef std::function<real_t(const Vector &, real_t t)> TDFunc;
typedef std::function<void(const Vector &, Vector &)> VecFunc;
typedef std::function<void(const Vector &, DenseMatrix &)> MatFunc;
TDFunc GetTFun(real_t t_0, real_t a, const MatFunc &kFun);
VecFunc GetQFun(real_t t_0, real_t a, const MatFunc &kFun);
MatFunc GetKFun(real_t k, real_t ks, real_t ka);
int main(int argc, char *argv[])
{
StopWatch chrono;
// 1. Parse command-line options.
const char *mesh_file = "";
int nx = 0;
int ny = 0;
int order = 1;
bool dg = false;
real_t ks = 1.;
real_t ka = 0.;
real_t a = 0.;
real_t td = 0.5;
bool hybridization = false;
bool pa = false;
const char *device_config = "cpu";
bool visualization = 1;
OptionsParser args(argc, argv);
args.AddOption(&mesh_file, "-m", "--mesh",
"Mesh file to use.");
args.AddOption(&nx, "-nx", "--ncells-x",
"Number of cells in x.");
args.AddOption(&ny, "-ny", "--ncells-y",
"Number of cells in y.");
args.AddOption(&order, "-o", "--order",
"Finite element order (polynomial degree).");
args.AddOption(&dg, "-dg", "--discontinuous", "-no-dg",
"--no-discontinuous", "Enable DG elements for fluxes.");
args.AddOption(&ks, "-ks", "--kappa_sym",
"Symmetric anisotropy of the heat conductivity tensor");
args.AddOption(&ka, "-ka", "--kappa_anti",
"Antisymmetric anisotropy of the heat conductivity tensor");
args.AddOption(&a, "-a", "--heat_capacity",
"Heat capacity coefficient (0=indefinite problem)");
args.AddOption(&td, "-td", "--stab_diff",
"Diffusion stabilization factor (1/2=default)");
args.AddOption(&hybridization, "-hb", "--hybridization", "-no-hb",
"--no-hybridization", "Enable hybridization.");
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.Parse();
if (!args.Good())
{
args.PrintUsage(cout);
return 1;
}
args.PrintOptions(cout);
// 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();
// 3. Read the mesh from the given mesh file. We can handle triangular,
// quadrilateral, tetrahedral, hexahedral, surface and volume meshes with
// the same code.
if (ny <= 0)
{
ny = nx;
}
Mesh *mesh = NULL;
if (strlen(mesh_file) > 0)
{
mesh = new Mesh(mesh_file, 1, 1);
}
else
{
mesh = new Mesh(Mesh::MakeCartesian2D(nx, ny, Element::QUADRILATERAL));
}
int dim = mesh->Dimension();
// 4. Refine the mesh to increase the resolution. In this example we do
// 'ref_levels' of uniform refinement. We choose 'ref_levels' to be the
// largest number that gives a final mesh with no more than 10,000
// elements.
if (strlen(mesh_file) > 0)
{
int ref_levels =
(int)floor(log(10000./mesh->GetNE())/log(2.)/dim);
for (int l = 0; l < ref_levels; l++)
{
mesh->UniformRefinement();
}
}
// 5. Define a finite element space on the mesh. Here we use the
// Raviart-Thomas finite elements of the specified order.
FiniteElementCollection *V_coll;
if (dg)
{
// In the case of LDG formulation, we chose a closed basis as it
// is customary for HDG to match trace DOFs, but an open basis can
// be used instead.
V_coll = new L2_FECollection(order, dim, BasisType::GaussLobatto);
}
else
{
V_coll = new RT_FECollection(order, dim);
}
FiniteElementCollection *W_coll = new L2_FECollection(order, dim);
FiniteElementSpace *V_space = new FiniteElementSpace(mesh, V_coll,
(dg)?(dim):(1));
FiniteElementSpace *W_space = new FiniteElementSpace(mesh, W_coll);
DarcyForm *darcy = new DarcyForm(V_space, W_space);
// 6. Define the BlockStructure of the problem, i.e. define the array of
// offsets for each variable. The last component of the Array is the sum
// of the dimensions of each block.
const Array<int> &block_offsets = darcy->GetOffsets();
std::cout << "***********************************************************\n";
std::cout << "dim(R) = " << block_offsets[1] - block_offsets[0] << "\n";
std::cout << "dim(W) = " << block_offsets[2] - block_offsets[1] << "\n";
std::cout << "dim(R+W) = " << block_offsets.Last() << "\n";
std::cout << "***********************************************************\n";
// 7. Define the coefficients, analytical solution, and rhs of the PDE.
const real_t t_0 = 1.; //base temperature
const real_t k = 1.; //base heat conductivity
ConstantCoefficient acoeff(a); //heat capacity
auto kFun = GetKFun(k, ks, ka);
MatrixFunctionCoefficient kcoeff(dim, kFun); //tensor conductivity
InverseMatrixCoefficient ikcoeff(kcoeff); //inverse tensor conductivity
auto tFun = GetTFun(t_0, a, kFun);
FunctionCoefficient tcoeff(tFun); //temperature
SumCoefficient gcoeff(0, tcoeff, 1., //boundary heat flux rhs
-((a>0.)?(a):(1.)));//<-- due to symmetrization, the sign is opposite
auto qFun = GetQFun(t_0, a, kFun);
VectorFunctionCoefficient qcoeff(dim, qFun); //heat flux
// 8. Allocate memory (x, rhs) for the analytical solution and the right hand
// side. Define the GridFunction q,t for the finite element solution and
// linear forms fform and gform for the right hand side. The data
// allocated by x and rhs are passed as a reference to the grid functions
// (q,t) and the linear forms (fform, gform).
MemoryType mt = device.GetMemoryType();
BlockVector x(block_offsets, mt), rhs(block_offsets, mt);
LinearForm *fform(new LinearForm);
fform->Update(V_space, rhs.GetBlock(0), 0);
fform->Assemble();
fform->SyncAliasMemory(rhs);
LinearForm *gform(new LinearForm);
gform->Update(W_space, rhs.GetBlock(1), 0);
gform->AddDomainIntegrator(new DomainLFIntegrator(gcoeff));
/*Vector v ({-1., 0.});
VectorConstantCoefficient vc(v);
ConstantCoefficient one;
gform->AddBdrFaceIntegrator(new BoundaryFlowIntegrator(one, vc, 1.));*/
gform->Assemble();
gform->SyncAliasMemory(rhs);
// 9. Assemble the finite element matrices for the Darcy operator
//
// D = [ M B^T ]
// [ B 0 ]
// where:
//
// M = \int_\Omega k u_h \cdot v_h d\Omega q_h, v_h \in V_h
// B = -\int_\Omega \div u_h q_h d\Omega q_h \in V_h, w_h \in W_h
BilinearForm *Mq = darcy->GetFluxMassForm();
MixedBilinearForm *B = darcy->GetFluxDivForm();
BilinearForm *Mt = (a > 0. || dg)?(darcy->GetPotentialMassForm()):(NULL);
if (dg)
{
Mq->AddDomainIntegrator(new VectorMassIntegrator(ikcoeff));
B->AddDomainIntegrator(new VectorDivergenceIntegrator());
B->AddInteriorFaceIntegrator(new TransposeIntegrator(
new DGNormalTraceIntegrator(-1.)));
if (td > 0.)
{
Mt->AddInteriorFaceIntegrator(new HDGDiffusionIntegrator(kcoeff, td));
}
}
else
{
Mq->AddDomainIntegrator(new VectorFEMassIntegrator(ikcoeff));
B->AddDomainIntegrator(new VectorFEDivergenceIntegrator());
}
if (Mt)
{
Mt->AddDomainIntegrator(new MassIntegrator(acoeff));
}
//set hybridization / assembly level
Array<int> ess_flux_tdofs_list;
/*Array<int> bdr_is_ess(mesh->bdr_attributes.Max());
bdr_is_ess = 0;
bdr_is_ess[3] = -1;
V_space->GetEssentialTrueDofs(bdr_is_ess, ess_flux_tdofs_list);*/
FiniteElementCollection *trace_coll = NULL;
FiniteElementSpace *trace_space = NULL;
chrono.Clear();
chrono.Start();
if (hybridization)
{
trace_coll = new DG_Interface_FECollection(order, dim);
trace_space = new FiniteElementSpace(mesh, trace_coll);
darcy->EnableHybridization(trace_space,
new NormalTraceJumpIntegrator(),
ess_flux_tdofs_list);
}
if (pa) { darcy->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
darcy->Assemble();
OperatorHandle pDarcyOp;
Vector X, RHS;
//x = 1./ny;
darcy->FormLinearSystem(ess_flux_tdofs_list, x, rhs,
pDarcyOp, X, RHS);
chrono.Stop();
std::cout << "Assembly took " << chrono.RealTime() << "s.\n";
int maxIter(1000);
real_t rtol(1.e-6);
real_t atol(1.e-10);
if (hybridization)
{
// 10. Construct the preconditioner
GSSmoother prec(*pDarcyOp.As<SparseMatrix>());
// 11. Solve the linear system with GMRES.
// Check the norm of the unpreconditioned residual.
chrono.Clear();
chrono.Start();
GMRESSolver solver;
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetOperator(*pDarcyOp);
solver.SetPreconditioner(prec);
solver.SetPrintLevel(1);
solver.Mult(RHS, X);
darcy->RecoverFEMSolution(X, rhs, x);
chrono.Stop();
if (solver.GetConverged())
{
std::cout << "GMRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
}
else
{
std::cout << "GMRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
}
std::cout << "GMRES solver took " << chrono.RealTime() << "s.\n";
}
else
{
// 10. Construct the operators for preconditioner
//
// P = [ diag(M) 0 ]
// [ 0 B diag(M)^-1 B^T ]
//
// Here we use Symmetric Gauss-Seidel to approximate the inverse of the
// temperature Schur Complement
SparseMatrix *MinvBt = NULL;
Vector Md(Mq->Height());
BlockDiagonalPreconditioner darcyPrec(block_offsets);
Solver *invM, *invS;
SparseMatrix *S = NULL;
if (pa)
{
Mq->AssembleDiagonal(Md);
auto Md_host = Md.HostRead();
Vector invMd(Mq->Height());
for (int i=0; i<Mq->Height(); ++i)
{
invMd(i) = 1.0 / Md_host[i];
}
Vector BMBt_diag(B->Height());
B->AssembleDiagonal_ADAt(invMd, BMBt_diag);
Array<int> ess_tdof_list; // empty
invM = new OperatorJacobiSmoother(Md, ess_tdof_list);
invS = new OperatorJacobiSmoother(BMBt_diag, ess_tdof_list);
}
else
{
SparseMatrix &Mqm(Mq->SpMat());
Mqm.GetDiag(Md);
Md.HostReadWrite();
SparseMatrix &Bm(B->SpMat());
MinvBt = Transpose(Bm);
for (int i = 0; i < Md.Size(); i++)
{
MinvBt->ScaleRow(i, 1./Md(i));
}
S = Mult(Bm, *MinvBt);
if (Mt)
{
SparseMatrix &Mtm(Mt->SpMat());
SparseMatrix *Snew = Add(Mtm, *S);
delete S;
S = Snew;
}
invM = new DSmoother(Mqm);
#ifndef MFEM_USE_SUITESPARSE
invS = new GSSmoother(*S);
#else
invS = new UMFPackSolver(*S);
#endif
}
invM->iterative_mode = false;
invS->iterative_mode = false;
darcyPrec.SetDiagonalBlock(0, invM);
darcyPrec.SetDiagonalBlock(1, invS);
// 11. Solve the linear system with MINRES.
// Check the norm of the unpreconditioned residual.
chrono.Clear();
chrono.Start();
MINRESSolver solver;
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetOperator(*pDarcyOp);
solver.SetPreconditioner(darcyPrec);
solver.SetPrintLevel(1);
solver.Mult(RHS, X);
darcy->RecoverFEMSolution(X, rhs, x);
if (device.IsEnabled()) { x.HostRead(); }
chrono.Stop();
if (solver.GetConverged())
{
std::cout << "MINRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
}
else
{
std::cout << "MINRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
}
std::cout << "MINRES solver took " << chrono.RealTime() << "s.\n";
delete invM;
delete invS;
delete S;
//delete Bt;
delete MinvBt;
}
// 12. Create the grid functions q and t. Compute the L2 error norms.
GridFunction q, t;
q.MakeRef(V_space, x.GetBlock(0), 0);
t.MakeRef(W_space, x.GetBlock(1), 0);
int order_quad = max(2, 2*order+1);
const IntegrationRule *irs[Geometry::NumGeom];
for (int i=0; i < Geometry::NumGeom; ++i)
{
irs[i] = &(IntRules.Get(i, order_quad));
}
qcoeff.SetTime(1.);
tcoeff.SetTime(1.);
real_t err_q = q.ComputeL2Error(qcoeff, irs);
real_t norm_q = ComputeLpNorm(2., qcoeff, *mesh, irs);
real_t err_t = t.ComputeL2Error(tcoeff, irs);
real_t norm_t = ComputeLpNorm(2., tcoeff, *mesh, irs);
std::cout << "|| q_h - q_ex || / || q_ex || = " << err_q / norm_q << "\n";
std::cout << "|| t_h - t_ex || / || t_ex || = " << err_t / norm_t << "\n";
// 13. Save the mesh and the solution. This output can be viewed later using
// GLVis: "glvis -m ex5.mesh -g sol_q.gf" or "glvis -m ex5.mesh -g
// sol_t.gf".
{
ofstream mesh_ofs("ex5.mesh");
mesh_ofs.precision(8);
mesh->Print(mesh_ofs);
ofstream q_ofs("sol_q.gf");
q_ofs.precision(8);
q.Save(q_ofs);
ofstream t_ofs("sol_t.gf");
t_ofs.precision(8);
t.Save(t_ofs);
}
// 14. Save data in the VisIt format
VisItDataCollection visit_dc("Example5", mesh);
visit_dc.RegisterField("heat flux", &q);
visit_dc.RegisterField("temperature", &t);
visit_dc.Save();
// 15. Save data in the ParaView format
ParaViewDataCollection paraview_dc("Example5", mesh);
paraview_dc.SetPrefixPath("ParaView");
paraview_dc.SetLevelsOfDetail(order);
paraview_dc.SetCycle(0);
paraview_dc.SetDataFormat(VTKFormat::BINARY);
paraview_dc.SetHighOrderOutput(true);
paraview_dc.SetTime(0.0); // set the time
paraview_dc.RegisterField("heat flux",&q);
paraview_dc.RegisterField("temperature",&t);
paraview_dc.Save();
// 16. Send the solution by socket to a GLVis server.
if (visualization)
{
char vishost[] = "localhost";
int visport = 19916;
socketstream q_sock(vishost, visport);
q_sock.precision(8);
q_sock << "solution\n" << *mesh << q << "window_title 'Heat flux'" << endl;
q_sock << "keys Rljvvvvvmmc" << endl;
socketstream t_sock(vishost, visport);
t_sock.precision(8);
t_sock << "solution\n" << *mesh << t << "window_title 'Temperature'" << endl;
t_sock << "keys Rljmmc" << endl;
}
// 17. Free the used memory.
delete fform;
delete gform;
//delete Mq;
//delete B;
delete darcy;
delete W_space;
delete V_space;
delete trace_space;
delete W_coll;
delete V_coll;
delete trace_coll;
delete mesh;
return 0;
}
TDFunc GetTFun(real_t t_0, real_t a, const MatFunc &kFun)
{
return [=](const Vector &x, real_t t) -> real_t
{
const int ndim = x.Size();
real_t t0 = t_0 * sin(M_PI*x(0)) * sin(M_PI*x(1));
if (ndim > 2)
{
t0 *= sin(M_PI*x(2));
}
if (a <= 0.) { return t0; }
Vector ddT((ndim<=2)?(2):(4));
ddT(0) = -t_0 * M_PI*M_PI * sin(M_PI*x(0)) * sin(M_PI*x(1));//xx,yy
ddT(1) = +t_0 * M_PI*M_PI * cos(M_PI*x(0)) * cos(M_PI*x(1));//xy
if (ndim > 2)
{
ddT(0) *= sin(M_PI*x(2));//xx,yy,zz
ddT(1) *= sin(M_PI*x(2));//xy
ddT(2) = +t_0 * M_PI*M_PI * cos(M_PI*x(0)) * sin(M_PI*x(1)) * cos(M_PI*x(
2));//xz
ddT(3) = +t_0 * M_PI*M_PI * sin(M_PI*x(0)) * cos(M_PI*x(1)) * cos(M_PI*x(
2));//yz
}
DenseMatrix kappa;
kFun(x, kappa);
real_t div = -(kappa(0,0) + kappa(1,1)) * ddT(0) - (kappa(0,1) + kappa(1,0)) * ddT(1);
if (ndim > 2)
{
div += -kappa(2,2) * ddT(0) - (kappa(0,2) + kappa(2,0)) * ddT(2) - (kappa(1,
2) + kappa(2,1)) * ddT(3);
}
return t0 - div / a * t;
};
}
VecFunc GetQFun(real_t t_0, real_t a, const MatFunc &kFun)
{
return [=](const Vector &x, Vector &v)
{
const int vdim = x.Size();
v.SetSize(vdim);
Vector gT(vdim);
gT = 0.;
gT(0) = t_0 * M_PI * cos(M_PI*x(0)) * sin(M_PI*x(1));
gT(1) = t_0 * M_PI * sin(M_PI*x(0)) * cos(M_PI*x(1));
if (vdim > 2)
{
gT(0) *= sin(M_PI*x(2));
gT(1) *= sin(M_PI*x(2));
gT(2) = t_0 * M_PI * sin(M_PI*x(0)) * sin(M_PI*x(1)) * cos(M_PI*x(2));
}
DenseMatrix kappa;
kFun(x, kappa);
if (vdim <= 2)
{
v(0) = -kappa(0,0) * gT(0) -kappa(0,1) * gT(1);
v(1) = -kappa(1,0) * gT(0) -kappa(1,1) * gT(1);
}
else
{
kappa.Mult(gT, v);
v.Neg();
}
};
}
MatFunc GetKFun(real_t k, real_t ks, real_t ka)
{
return [=](const Vector &x, DenseMatrix &kappa)
{
const int ndim = x.Size();
kappa.Diag(k, ndim);
kappa(0,0) *= ks;
kappa(0,1) = +ka * k;
kappa(1,0) = -ka * k;
if (ndim > 2)
{
kappa(0,2) = +ka * k;
kappa(2,0) = -ka * k;
}
};
}
+543
View File
@@ -0,0 +1,543 @@
// MFEM Example 5
//
// Compile with: make ex5
//
// Sample runs: ex5 -m ../data/square-disc.mesh
// ex5 -m ../data/star.mesh
// ex5 -m ../data/star.mesh -pa
// ex5 -m ../data/beam-tet.mesh
// ex5 -m ../data/beam-hex.mesh
// ex5 -m ../data/beam-hex.mesh -pa
// ex5 -m ../data/escher.mesh
// ex5 -m ../data/fichera.mesh
//
// Device sample runs:
// ex5 -m ../data/star.mesh -pa -d cuda
// ex5 -m ../data/star.mesh -pa -d raja-cuda
// ex5 -m ../data/star.mesh -pa -d raja-omp
// ex5 -m ../data/beam-hex.mesh -pa -d cuda
//
// Description: This example code solves a simple 2D mixed electromagnetic
// diffusion problem corresponding to the mixed system
//
// sigma E - curl B = f
// curl E + B = g
//
// with essential boundary condition E x n = <given tangential field>.
// Here, we use a given exact solution (E,B) and compute the
// corresponding r.h.s. (f,g). We discretize with Nedelec
// finite elements (electric field E) and piecewise discontinuous
// integral polynomials (magnetic field B).
//
// The example demonstrates the use of the DarcyForm class, as
// well as the collective saving of several grid functions in
// VisIt (visit.llnl.gov) and ParaView (paraview.org) formats.
//
// We recommend viewing examples 1-4 before viewing this example.
#include "mfem.hpp"
#include <fstream>
#include <iostream>
#include <algorithm>
using namespace std;
using namespace mfem;
// Define the analytical solution and forcing terms / boundary conditions
void EFun_ex(const Vector & x, Vector & E);
real_t BFun_ex(const Vector & x);
void fFun(const Vector & x, Vector & f);
real_t gFun(const Vector & x);
real_t freq = 1.0, kappa;
int main(int argc, char *argv[])
{
StopWatch chrono;
// 1. Parse command-line options.
const char *mesh_file = "";
int nx = 0;
int ny = 0;
int order = 1;
bool hybridization = false;
bool pa = false;
const char *device_config = "cpu";
bool visualization = 1;
OptionsParser args(argc, argv);
args.AddOption(&mesh_file, "-m", "--mesh",
"Mesh file to use.");
args.AddOption(&nx, "-nx", "--ncells-x",
"Number of cells in x.");
args.AddOption(&ny, "-ny", "--ncells-y",
"Number of cells in y.");
args.AddOption(&order, "-o", "--order",
"Finite element order (polynomial degree).");
args.AddOption(&freq, "-f", "--frequency", "Set the frequency for the exact"
" solution.");
args.AddOption(&hybridization, "-hb", "--hybridization", "-no-hb",
"--no-hybridization", "Enable hybridization.");
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.Parse();
if (!args.Good())
{
args.PrintUsage(cout);
return 1;
}
args.PrintOptions(cout);
kappa = freq * M_PI;
// 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();
// 3. Read the mesh from the given mesh file. We can handle triangular,
// quadrilateral, tetrahedral, hexahedral, surface and volume meshes with
// the same code.
if (ny <= 0)
{
ny = nx;
}
Mesh *mesh = NULL;
if (strlen(mesh_file) > 0)
{
mesh = new Mesh(mesh_file, 1, 1);
}
else
{
mesh = new Mesh(Mesh::MakeCartesian2D(nx, ny, Element::QUADRILATERAL));
}
int dim = mesh->Dimension();
// 4. Refine the mesh to increase the resolution. In this example we do
// 'ref_levels' of uniform refinement. We choose 'ref_levels' to be the
// largest number that gives a final mesh with no more than 10,000
// elements.
if (strlen(mesh_file) > 0)
{
int ref_levels =
(int)floor(log(10000./mesh->GetNE())/log(2.)/dim);
for (int l = 0; l < ref_levels; l++)
{
mesh->UniformRefinement();
}
}
// 5. Define a finite element space on the mesh. Here we use the
// Raviart-Thomas finite elements of the specified order.
FiniteElementCollection *R_coll(new ND_FECollection(order+1, dim));
FiniteElementCollection *W_coll(new L2_FECollection(order, dim, 0,
FiniteElement::INTEGRAL));
FiniteElementSpace *R_space = new FiniteElementSpace(mesh, R_coll);
FiniteElementSpace *W_space = new FiniteElementSpace(mesh, W_coll);
DarcyForm *darcy = new DarcyForm(R_space, W_space);
// 6. Define the BlockStructure of the problem, i.e. define the array of
// offsets for each variable. The last component of the Array is the sum
// of the dimensions of each block.
const Array<int> &block_offsets = darcy->GetOffsets();
std::cout << "***********************************************************\n";
std::cout << "dim(R) = " << block_offsets[1] - block_offsets[0] << "\n";
std::cout << "dim(W) = " << block_offsets[2] - block_offsets[1] << "\n";
std::cout << "dim(R+W) = " << block_offsets.Last() << "\n";
std::cout << "***********************************************************\n";
// 7. Define the coefficients, analytical solution, and rhs of the PDE.
ConstantCoefficient muinvsqrt(1.0);
ConstantCoefficient sigma(1.0);
VectorFunctionCoefficient fcoeff(dim, fFun);
FunctionCoefficient gcoeff(gFun);
VectorFunctionCoefficient Ecoeff(dim, EFun_ex);
FunctionCoefficient Bcoeff(BFun_ex);
// 8. Allocate memory (x, rhs) for the analytical solution and the right hand
// side. Define the GridFunction E,B for the finite element solution and
// linear forms fform and gform for the right hand side. The data
// allocated by x and rhs are passed as a reference to the grid functions
// (E,B) and the linear forms (fform, gform).
MemoryType mt = device.GetMemoryType();
BlockVector x(block_offsets, mt), rhs(block_offsets, mt);
LinearForm *fform(new LinearForm);
fform->Update(R_space, rhs.GetBlock(0), 0);
fform->AddDomainIntegrator(new VectorFEDomainLFIntegrator(fcoeff));
fform->Assemble();
fform->SyncAliasMemory(rhs);
LinearForm *gform(new LinearForm);
gform->Update(W_space, rhs.GetBlock(1), 0);
gform->AddDomainIntegrator(new DomainLFIntegrator(gcoeff));
gform->Assemble();
gform->SyncAliasMemory(rhs);
// 9. Assemble the finite element matrices for the Darcy operator
//
// D = [ M C^T ]
// [ C 0 ]
// where:
//
// M = \int_\Omega \sigma E_h \cdot v_h d\Omega E_h, v_h \in R_h
// C = \int_\Omega \curl E_h q_h d\Omega E_h \in R_h, q_h \in W_h
//BilinearForm *mEVarf(new BilinearForm(R_space));
//MixedBilinearForm *cVarf(new MixedBilinearForm(R_space, W_space));
BilinearForm *mEVarf = darcy->GetFluxMassForm();
MixedBilinearForm *cVarf = darcy->GetFluxDivForm();
BilinearForm *mBVarf = darcy->GetPotentialMassForm();
//if (pa) { mEVarf->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
mEVarf->AddDomainIntegrator(new VectorFEMassIntegrator(sigma));
//mEVarf->Assemble();
//if (!pa) { mEVarf->Finalize(); }
//if (pa) { cVarf->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
cVarf->AddDomainIntegrator(new MixedScalarCurlIntegrator(muinvsqrt));
//cVarf->Assemble();
//if (!pa) { cVarf->Finalize(); }
mBVarf->AddDomainIntegrator(new MassIntegrator());
//set essential boundary condition
GridFunction E, B;
E.MakeRef(R_space, x.GetBlock(0), 0);
B.MakeRef(W_space, x.GetBlock(1), 0);
Array<int> ess_flux_tdofs_list;
if (mesh->bdr_attributes.Size())
{
Array<int> ess_bdr(mesh->bdr_attributes.Max());
ess_bdr = 1;
R_space->GetEssentialTrueDofs(ess_bdr, ess_flux_tdofs_list);
E.ProjectBdrCoefficientTangent(Ecoeff, ess_bdr);
}
//set hybridization / assembly level
FiniteElementCollection *trace_coll = NULL;
FiniteElementSpace *trace_space = NULL;
chrono.Clear();
chrono.Start();
if (hybridization)
{
trace_coll = new ND_Trace_FECollection(order+1, dim);
trace_space = new FiniteElementSpace(mesh, trace_coll);
darcy->EnableHybridization(trace_space,
new TangentTraceJumpIntegrator(),
ess_flux_tdofs_list);
}
if (pa) { darcy->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
darcy->Assemble();
//if (!pa) { darcy->Finalize(); }
OperatorHandle pDarcyOp;
Vector X, RHS;
//darcy->FormSystemMatrix(ess_flux_tdofs_list, pDarcyOp);
darcy->FormLinearSystem(ess_flux_tdofs_list, x, rhs,
pDarcyOp, X, RHS);
chrono.Stop();
std::cout << "Assembly took " << chrono.RealTime() << "s.\n";
int maxIter(1000);
real_t rtol(1.e-6);
real_t atol(1.e-10);
if (hybridization)
{
// 10. Construct the preconditioner
GSSmoother prec(*pDarcyOp.As<SparseMatrix>());
// 11. Solve the linear system with GMRES.
// Check the norm of the unpreconditioned residual.
chrono.Clear();
chrono.Start();
GMRESSolver solver;
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetOperator(*pDarcyOp);
solver.SetPreconditioner(prec);
solver.SetPrintLevel(1);
solver.Mult(RHS, X);
darcy->RecoverFEMSolution(X, rhs, x);
chrono.Stop();
if (solver.GetConverged())
{
std::cout << "GMRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
}
else
{
std::cout << "GMRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
}
std::cout << "GMRES solver took " << chrono.RealTime() << "s.\n";
}
else
{
// 10. Construct the operators for preconditioner
//
// P = [ diag(M) 0 ]
// [ 0 C diag(M)^-1 C^T ]
//
// Here we use Symmetric Gauss-Seidel to approximate the inverse of the
// magnetic field Schur Complement
SparseMatrix *MinvBt = NULL;
Vector Md(mEVarf->Height());
BlockDiagonalPreconditioner darcyPrec(block_offsets);
Solver *invM, *invS;
SparseMatrix *S = NULL;
if (pa)
{
mEVarf->AssembleDiagonal(Md);
auto Md_host = Md.HostRead();
Vector invMd(mEVarf->Height());
for (int i=0; i<mEVarf->Height(); ++i)
{
invMd(i) = 1.0 / Md_host[i];
}
Vector BMBt_diag(cVarf->Height());
cVarf->AssembleDiagonal_ADAt(invMd, BMBt_diag);
Array<int> ess_tdof_list; // empty
invM = new OperatorJacobiSmoother(Md, ess_tdof_list);
invS = new OperatorJacobiSmoother(BMBt_diag, ess_tdof_list);
}
else
{
SparseMatrix &M(mEVarf->SpMat());
M.GetDiag(Md);
Md.HostReadWrite();
SparseMatrix &C(cVarf->SpMat());
MinvBt = Transpose(C);
for (int i = 0; i < Md.Size(); i++)
{
MinvBt->ScaleRow(i, 1./Md(i));
}
S = Mult(C, *MinvBt);
if (mBVarf)
{
SparseMatrix &Mtm(mBVarf->SpMat());
SparseMatrix *Snew = Add(Mtm, *S);
delete S;
S = Snew;
}
invM = new DSmoother(M);
#ifndef MFEM_USE_SUITESPARSE
invS = new GSSmoother(*S);
#else
invS = new UMFPackSolver(*S);
#endif
}
invM->iterative_mode = false;
invS->iterative_mode = false;
darcyPrec.SetDiagonalBlock(0, invM);
darcyPrec.SetDiagonalBlock(1, invS);
// 11. Solve the linear system with MINRES.
// Check the norm of the unpreconditioned residual.
chrono.Clear();
chrono.Start();
FGMRESSolver solver;
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetOperator(*pDarcyOp);
solver.SetPreconditioner(darcyPrec);
solver.SetPrintLevel(1);
solver.Mult(RHS, X);
darcy->RecoverFEMSolution(X, rhs, x);
if (device.IsEnabled()) { x.HostRead(); }
chrono.Stop();
if (solver.GetConverged())
{
std::cout << "GMRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
}
else
{
std::cout << "GMRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
}
std::cout << "MINRES solver took " << chrono.RealTime() << "s.\n";
delete invM;
delete invS;
delete S;
//delete Bt;
delete MinvBt;
}
// 12. Create the grid functions E and B. Compute the L2 error norms.
int order_quad = max(2, 2*order+1);
const IntegrationRule *irs[Geometry::NumGeom];
for (int i=0; i < Geometry::NumGeom; ++i)
{
irs[i] = &(IntRules.Get(i, order_quad));
}
real_t err_E = E.ComputeL2Error(Ecoeff, irs);
real_t norm_E = ComputeLpNorm(2., Ecoeff, *mesh, irs);
real_t err_B = B.ComputeL2Error(Bcoeff, irs);
real_t norm_B = ComputeLpNorm(2., Bcoeff, *mesh, irs);
std::cout << "|| E_h - E_ex || / || E_ex || = " << err_E / norm_E << "\n";
std::cout << "|| B_h - B_ex || / || B_ex || = " << err_B / norm_B << "\n";
// 13. Save the mesh and the solution. This output can be viewed later using
// GLVis: "glvis -m ex5.mesh -g sol_u.gf" or "glvis -m ex5.mesh -g
// sol_p.gf".
{
ofstream mesh_ofs("ex5.mesh");
mesh_ofs.precision(8);
mesh->Print(mesh_ofs);
ofstream E_ofs("sol_E.gf");
E_ofs.precision(8);
E.Save(E_ofs);
ofstream B_ofs("sol_B.gf");
B_ofs.precision(8);
B.Save(B_ofs);
}
// 14. Save data in the VisIt format
VisItDataCollection visit_dc("Example5", mesh);
visit_dc.RegisterField("electric field", &E);
visit_dc.RegisterField("magnetic field", &B);
visit_dc.Save();
// 15. Save data in the ParaView format
ParaViewDataCollection paraview_dc("Example5", mesh);
paraview_dc.SetPrefixPath("ParaView");
paraview_dc.SetLevelsOfDetail(order);
paraview_dc.SetCycle(0);
paraview_dc.SetDataFormat(VTKFormat::BINARY);
paraview_dc.SetHighOrderOutput(true);
paraview_dc.SetTime(0.0); // set the time
paraview_dc.RegisterField("electric field",&E);
paraview_dc.RegisterField("magnetic field",&B);
paraview_dc.Save();
// 16. Send the solution by socket to a GLVis server.
if (visualization)
{
char vishost[] = "localhost";
int visport = 19916;
socketstream E_sock(vishost, visport);
E_sock.precision(8);
E_sock << "solution\n" << *mesh << E << "window_title 'Electric field'" << endl;
E_sock << "keys Rljvvvvvmmc" << endl;
socketstream B_sock(vishost, visport);
B_sock.precision(8);
B_sock << "solution\n" << *mesh << B << "window_title 'Magnetic field'" << endl;
B_sock << "keys Rljmmc" << endl;
}
// 17. Free the used memory.
delete fform;
delete gform;
//delete mEVarf;
//delete cVarf;
delete darcy;
delete W_space;
delete R_space;
delete trace_space;
delete W_coll;
delete R_coll;
delete trace_coll;
delete mesh;
return 0;
}
void EFun_ex(const Vector & x, Vector & E)
{
const int dim = x.Size();
if (dim == 3)
{
E(0) = sin(kappa * x(1));
E(1) = sin(kappa * x(2));
E(2) = sin(kappa * x(0));
}
else
{
E(0) = sin(kappa * x(1));
E(1) = sin(kappa * x(0));
if (x.Size() == 3) { E(2) = 0.0; }
}
}
real_t BFun_ex(const Vector & x)
{
return kappa * (-cos(kappa * x(0)) + cos(kappa * x(1)));
}
void fFun(const Vector & x, Vector & f)
{
const int dim = x.Size();
if (dim == 3)
{
f(0) = (1. + kappa * kappa) * sin(kappa * x(1));
f(1) = (1. + kappa * kappa) * sin(kappa * x(2));
f(2) = (1. + kappa * kappa) * sin(kappa * x(0));
}
else
{
f(0) = (1. + kappa * kappa) * sin(kappa * x(1));
f(1) = (1. + kappa * kappa) * sin(kappa * x(0));
if (x.Size() == 3) { f(2) = 0.0; }
}
}
real_t gFun(const Vector & x)
{
return 0.;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+938
View File
@@ -0,0 +1,938 @@
// MFEM Example 5
//
// Compile with: make ex5
//
// Sample runs: ex5 -m ../data/square-disc.mesh
// ex5 -m ../data/star.mesh
// ex5 -m ../data/star.mesh -pa
// ex5 -m ../data/beam-tet.mesh
// ex5 -m ../data/beam-hex.mesh
// ex5 -m ../data/beam-hex.mesh -pa
// ex5 -m ../data/escher.mesh
// ex5 -m ../data/fichera.mesh
//
// Device sample runs:
// ex5 -m ../data/star.mesh -pa -d cuda
// ex5 -m ../data/star.mesh -pa -d raja-cuda
// ex5 -m ../data/star.mesh -pa -d raja-omp
// ex5 -m ../data/beam-hex.mesh -pa -d cuda
//
// Description: This example code solves a simple 2D coupled Maxwell + compression
// wave interaction problem in the mixed formulation corresponding to
// the system
//
// du/dt + grad n = sigma0 * n * E
// div u + dn/dt = 0
// dE/dt - curl B = -sigma0 * n * E
// dB/dt + curl E = 0
//
// with natural boundary condition n = <given density> and/or
// essential (RT) / natural (DG) boundary condition u.n = <given
// velocity>. Similarly, essential boundary condition Exnxn =
// <given electric field> can be set or natural boundary condition
// for the magnetic field. Multiple problems are offered:
// 1) material wave - compression wave in medium (left u b.c.)
// 2) Maxwell - electromagnetic wave (left E b.c.)
// 3) excitation - electromagnetic wave exciting the medium (left
// E b.c.)
// 4) scaterring - interaction of electromagnetic and compression
// Gaussian beams (bottom u and left E b.c.)
// The waves are harmonic in time with the given frequency. We
// discretize the problem with normally continuous or broken
// Raviart-Thomas, or piecewise discontinuous finite elements the
// velocity u; piecewise discontinuous polynomials the density n;
// tangentially continuous Nedelec the electric field; and
// piecewise discountinuous polynomials the magnetic field B.
//
// The example demonstrates the use of the DarcyForm class, as
// well as hybridization of mixed systems and the collective saving
// of several grid functions in VisIt (visit.llnl.gov) and ParaView
// (paraview.org) formats.
//
// We recommend viewing examples 1-4 before viewing this example.
#include "mfem.hpp"
#include "coupledop.hpp"
#include <fstream>
#include <iostream>
#include <algorithm>
using namespace std;
using namespace mfem;
// Define the analytical solution and forcing terms / boundary conditions
typedef std::function<real_t(const Vector &, real_t)> TFunc;
typedef std::function<void(const Vector &, Vector &)> VecFunc;
typedef std::function<void(const Vector &, real_t, Vector &)> VecTFunc;
typedef std::function<real_t(real_t f, const Vector &x)> KFunc;
enum Problem
{
MaterialWave = 1,
Maxwell,
Excitation,
Scattering,
};
constexpr real_t epsilon = numeric_limits<real_t>::epsilon();
TFunc GetSigFun(Problem prob, real_t f, real_t s0);
TFunc GetNFun(Problem prob, real_t t_0, real_t k, real_t c);
VecTFunc GetUFun(Problem prob, real_t f, real_t a0);
VecTFunc GetEFun(Problem prob, real_t f);
TFunc GetFFun(Problem prob, real_t t_0, real_t k, real_t c);
int main(int argc, char *argv[])
{
StopWatch chrono;
// 1. Parse command-line options.
const char *mesh_file = "";
int nx = 0;
int ny = 0;
real_t sx = 1.;
real_t sy = 1.;
int order = 1;
bool dg = false;
bool brt = false;
int iproblem = Problem::MaterialWave;
real_t tf = 1.;
int nt = 0;
int ode = 1;
real_t k = 1.;
real_t c = 1.;
real_t freq = 1.;
real_t s0 = 1.;
real_t a0 = 1e-3;
real_t td = 0.5;
bool bc_neumann = false;
//bool reduction = false;
bool hybridization = false;
/*bool nonlinear = false;
bool nonlinear_conv = false;
bool nonlinear_diff = false;
int hdg_scheme = 1;
int solver_type = (int)DarcyOperator::SolverType::Default;
bool pa = false;*/
const char *device_config = "cpu";
bool mfem = false;
bool visit = false;
bool paraview = false;
bool visualization = true;
bool analytic = false;
OptionsParser args(argc, argv);
args.AddOption(&mesh_file, "-m", "--mesh",
"Mesh file to use.");
args.AddOption(&nx, "-nx", "--ncells-x",
"Number of cells in x.");
args.AddOption(&ny, "-ny", "--ncells-y",
"Number of cells in y.");
args.AddOption(&sx, "-sx", "--size-x",
"Size along x axis.");
args.AddOption(&sy, "-sy", "--size-y",
"Size along y axis.");
args.AddOption(&order, "-o", "--order",
"Finite element order (polynomial degree).");
args.AddOption(&dg, "-dg", "--discontinuous", "-no-dg",
"--no-discontinuous", "Enable DG elements for fluxes.");
args.AddOption(&brt, "-brt", "--broken-RT", "-no-brt",
"--no-broken-RT", "Enable broken RT elements for fluxes.");
args.AddOption(&iproblem, "-p", "--problem",
"Problem to solve:\n\t\t"
"1=dumping\n\t\t"
"2=Maxwell\n\t\t");
args.AddOption(&tf, "-tf", "--time-final",
"Final time.");
args.AddOption(&nt, "-nt", "--ntimesteps",
"Number of time steps.");
args.AddOption(&ode, "-ode", "--ode-solver",
"ODE time solver (1=Bacward Euler, 2=RK23L, 3=RK23A, 4=RK34).");
args.AddOption(&k, "-k", "--kappa",
"Heat conductivity");
args.AddOption(&c, "-c", "--velocity",
"Convection velocity");
args.AddOption(&freq, "-f", "--frequency",
"Harmonic frequency");
args.AddOption(&s0, "-s0", "--sigma0",
"Coupling factor");
args.AddOption(&a0, "-a0", "--amplitude0",
"Amplitude factor");
args.AddOption(&td, "-td", "--stab_diff",
"Diffusion stabilization factor (1/2=default)");
args.AddOption(&bc_neumann, "-bcn", "--bc-neumann", "-no-bcn",
"--no-bc-neumann", "Enable Neumann outflow boundary condition.");
//args.AddOption(&reduction, "-rd", "--reduction", "-no-rd",
// "--no-reduction", "Enable reduction.");
args.AddOption(&hybridization, "-hb", "--hybridization", "-no-hb",
"--no-hybridization", "Enable hybridization.");
/*args.AddOption(&nonlinear, "-nl", "--nonlinear", "-no-nl",
"--no-nonlinear", "Enable non-linear regime.");
args.AddOption(&nonlinear_conv, "-nlc", "--nonlinear-convection", "-no-nlc",
"--no-nonlinear-convection", "Enable non-linear convection regime.");
args.AddOption(&nonlinear_diff, "-nld", "--nonlinear-diffusion", "-no-nld",
"--no-nonlinear-diffusion", "Enable non-linear diffusion regime.");
args.AddOption(&hdg_scheme, "-hdg", "--hdg_scheme",
"HDG scheme (1=HDG-I, 2=HDG-II, 3=Rusanov, 4=Godunov).");
args.AddOption(&solver_type, "-nls", "--nonlinear-solver",
"Nonlinear solver type (1=LBFGS, 2=LBB, 3=Newton, 4=KINSol).");
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(&mfem, "-mfem", "--mfem", "-no-mfem",
"--no-mfem",
"Enable or disable MFEM output.");
args.AddOption(&visit, "-visit", "--visit", "-no-visit",
"--no-visit",
"Enable or disable Visit output.");
args.AddOption(&paraview, "-paraview", "--paraview", "-no-paraview",
"--no-paraview",
"Enable or disable ParaView output.");
args.AddOption(&visualization, "-vis", "--visualization", "-no-vis",
"--no-visualization",
"Enable or disable GLVis visualization.");
args.AddOption(&analytic, "-anal", "--analytic", "-no-anal",
"--no-analytic",
"Enable or disable analytic solution.");
args.Parse();
if (!args.Good())
{
args.PrintUsage(cout);
return 1;
}
args.PrintOptions(cout);
// Set the problem options
Problem problem = (Problem)iproblem;
bool btime = false;
switch (problem)
{
case Problem::MaterialWave:
case Problem::Maxwell:
case Problem::Excitation:
case Problem::Scattering:
btime = true;
break;
default:
cerr << "Unknown problem" << endl;
return 1;
}
/*if (bnldiff && reduction)
{
cerr << "Reduction is not possible with non-linear diffusion" << endl;
return 1;
}
if (!bconv && !bnlconv && upwinded)
{
cerr << "Upwinded scheme cannot work without advection" << endl;
return 1;
}
if (bnlconv && !nonlinear)
{
cerr << "Nonlinear convection can only work in the nonlinear regime" << endl;
return 1;
}*/
if (btime && nt <= 0)
{
cerr << "You must specify the number of time steps for time evolving problems"
<< 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();
// 3. Read the mesh from the given mesh file. We can handle triangular,
// quadrilateral, tetrahedral, hexahedral, surface and volume meshes with
// the same code.
if (ny <= 0)
{
ny = nx;
}
Mesh *mesh = NULL;
if (strlen(mesh_file) > 0)
{
mesh = new Mesh(mesh_file, 1, 1);
}
else
{
mesh = new Mesh(Mesh::MakeCartesian2D(nx, ny, Element::QUADRILATERAL, false,
sx, sy));
}
int dim = mesh->Dimension();
// Mark boundary conditions
Array<int> bdr_u_is_dirichlet(mesh->bdr_attributes.Max());
Array<int> bdr_u_is_neumann(bdr_u_is_dirichlet.Size());
Array<int> bdr_E_is_neumann(bdr_u_is_dirichlet.Size());
bdr_u_is_dirichlet = 0;
bdr_u_is_neumann = 0;
bdr_E_is_neumann = 0;
switch (problem)
{
case Problem::MaterialWave:
bdr_u_is_neumann[3] = -1;//inflow
if (bc_neumann)
{
bdr_u_is_neumann[0] = -1;//outflow
bdr_u_is_neumann[2] = -1;//outflow
}
break;
case Problem::Maxwell:
case Problem::Excitation:
bdr_u_is_dirichlet = -1;
bdr_u_is_neumann[3] = -1;
bdr_E_is_neumann[3] = -1;//inflow
if (bc_neumann)
{
bdr_E_is_neumann[0] = -1;//outflow
bdr_E_is_neumann[2] = -1;//outflow
}
break;
case Problem::Scattering:
bdr_u_is_dirichlet = -1;
bdr_u_is_neumann[0] = -1;//inflow
bdr_E_is_neumann[3] = -1;//inflow
if (bc_neumann)
{
bdr_u_is_neumann[1] = -1;//outflow
bdr_u_is_neumann[3] = -1;//outflow
bdr_E_is_neumann[0] = -1;//outflow
bdr_E_is_neumann[2] = -1;//outflow
}
break;
}
// 4. Refine the mesh to increase the resolution. In this example we do
// 'ref_levels' of uniform refinement. We choose 'ref_levels' to be the
// largest number that gives a final mesh with no more than 10,000
// elements.
if (strlen(mesh_file) > 0)
{
int ref_levels =
(int)floor(log(10000./mesh->GetNE())/log(2.)/dim);
for (int l = 0; l < ref_levels; l++)
{
mesh->UniformRefinement();
}
}
// 5. Define a finite element space on the mesh. Here we use the
// Raviart-Thomas finite elements of the specified order.
FiniteElementCollection *V_coll, *V_coll_dg = NULL;
if (dg)
{
// In the case of LDG formulation, we chose a closed basis as it
// is customary for HDG to match trace DOFs, but an open basis can
// be used instead.
V_coll = new L2_FECollection(order, dim, BasisType::GaussLobatto);
}
else if (brt)
{
V_coll = new BrokenRT_FECollection(order, dim);
V_coll_dg = new L2_FECollection(order+1, dim);
}
else
{
V_coll = new RT_FECollection(order, dim);
}
FiniteElementCollection *W_coll = new L2_FECollection(order, dim,
BasisType::GaussLobatto);
FiniteElementCollection *E_coll = new ND_FECollection(order, dim);
FiniteElementCollection *B_coll = new L2_FECollection(order, dim, 0,
FiniteElement::INTEGRAL);
FiniteElementSpace *V_space = new FiniteElementSpace(mesh, V_coll,
(dg)?(dim):(1));
FiniteElementSpace *V_space_dg = (V_coll_dg)?(new FiniteElementSpace(
mesh, V_coll_dg, dim)):(NULL);
FiniteElementSpace *W_space = new FiniteElementSpace(mesh, W_coll);
FiniteElementSpace *E_space = new FiniteElementSpace(mesh, E_coll);
FiniteElementSpace *B_space = new FiniteElementSpace(mesh, B_coll);
FiniteElementCollection *trace_coll = NULL;
FiniteElementSpace *trace_space = NULL;
if (hybridization)
{
trace_coll = new DG_Interface_FECollection(order, dim);
trace_space = new FiniteElementSpace(mesh, trace_coll);
}
// 6. Define the coefficients, analytical solution, and rhs of the PDE.
const real_t t_0 = 1.; //base density
ConstantCoefficient kcoeff(k); //conductivity
ConstantCoefficient ikcoeff(1./k); //inverse conductivity
auto sigFun = GetSigFun(problem, freq, s0);
FunctionCoefficient sigcoeff(sigFun); //coupling
auto nFun = GetNFun(problem, t_0, k, c);
FunctionCoefficient ncoeff(nFun); //density
SumCoefficient gcoeff(0., ncoeff, 1., -1.); //boundary velocity rhs
ProductCoefficient ghcoeff(0.5, gcoeff);
auto fFun = GetFFun(problem, t_0, k, c);
FunctionCoefficient fcoeff(fFun); //density rhs
auto uFun = GetUFun(problem, freq, a0);
VectorFunctionCoefficient ucoeff(dim, uFun); //velocity
ConstantCoefficient one;
auto Efun = GetEFun(problem, freq);
VectorFunctionCoefficient Ecoeff(dim, Efun); //electric field
// 7. Assemble the finite element matrices for the Darcy operator
//
// D = [ M B^T ]
// [ B 0 ]
// where:
//
// M = \int_\Omega k u_h \cdot v_h d\Omega u_h, v_h \in V_h
// B = -\int_\Omega \div u_h u_h d\Omega u_h \in V_h, w_h \in W_h
// 8. Define the BlockStructure of the problem, i.e. define the array of
// offsets for each variable. The last component of the Array is the sum
// of the dimensions of each block.
const Array<int> block_offsets(CoupledOperator::ConstructOffsets(V_space,
W_space, E_space, B_space, trace_space));
std::cout << "***********************************************************\n";
std::cout << "dim(V) = " << block_offsets[1] - block_offsets[0] << "\n";
std::cout << "dim(W) = " << block_offsets[2] - block_offsets[1] << "\n";
if (hybridization)
{
std::cout << "dim(M) = " << block_offsets[3] - block_offsets[2] << "\n";
std::cout << "dim(E) = " << block_offsets[4] - block_offsets[3] << "\n";
std::cout << "dim(B) = " << block_offsets[5] - block_offsets[4] << "\n";
std::cout << "dim(V+W+M+E+B) = " << block_offsets.Last() << "\n";
}
else
{
std::cout << "dim(E) = " << block_offsets[3] - block_offsets[2] << "\n";
std::cout << "dim(B) = " << block_offsets[4] - block_offsets[3] << "\n";
std::cout << "dim(V+W+E+B) = " << block_offsets.Last() << "\n";
}
std::cout << "***********************************************************\n";
// 9. Allocate memory (x, rhs) for the analytical solution and the right hand
// side. Define the GridFunction q,t for the finite element solution and
// linear forms fform and gform for the right hand side. The data
// allocated by x and rhs are passed as a reference to the grid functions
// (q,t) and the linear forms (fform, gform).
MemoryType mt = device.GetMemoryType();
BlockVector x(block_offsets, mt), rhs(block_offsets, mt);
x = 0.;
GridFunction u_h, n_h, tr_h, E_h, B_h;
int i = 0;
u_h.MakeRef(V_space, x.GetBlock(i++), 0);
n_h.MakeRef(W_space, x.GetBlock(i++), 0);
if (trace_space)
{
tr_h.MakeRef(trace_space, x.GetBlock(i++), 0);
}
E_h.MakeRef(E_space, x.GetBlock(i++), 0);
B_h.MakeRef(B_space, x.GetBlock(i++), 0);
if (btime)
{
n_h.ProjectCoefficient(ncoeff); //initial condition
}
if (!dg && !brt)
{
u_h.ProjectBdrCoefficientNormal(ucoeff,
bdr_u_is_neumann); //essential Neumann BC
}
LinearForm *gform(new LinearForm);
gform->Update(V_space, rhs.GetBlock(0), 0);
if (dg)
{
gform->AddBdrFaceIntegrator(new VectorBoundaryFluxLFIntegrator(gcoeff),
bdr_u_is_dirichlet);
if (!hybridization)
{
gform->AddBdrFaceIntegrator(new VectorBoundaryFluxLFIntegrator(
gcoeff, 0.5), bdr_u_is_neumann);
}
}
else
{
if (brt)
{
gform->AddBdrFaceIntegrator(new VectorFEBoundaryFluxLFIntegrator(gcoeff),
bdr_u_is_dirichlet);
if (!hybridization)
{
gform->AddBdrFaceIntegrator(new VectorFEBoundaryFluxLFIntegrator(
ghcoeff), bdr_u_is_neumann);
}
}
else
{
gform->AddBoundaryIntegrator(new VectorFEBoundaryFluxLFIntegrator(gcoeff),
bdr_u_is_dirichlet);
}
}
LinearForm *fform(new LinearForm);
fform->Update(W_space, rhs.GetBlock(1), 0);
fform->AddDomainIntegrator(new DomainLFIntegrator(fcoeff));
//Neumann
if (!hybridization && (dg || brt))
{
fform->AddBdrFaceIntegrator(new BoundaryFlowIntegrator(one, ucoeff, +1., 0.),
bdr_u_is_neumann);
}
//prepare (reduced) solution and rhs vectors
LinearForm *hform = NULL;
//Neumann BC for the hybridized system
if (hybridization)
{
hform = new LinearForm();
hform->Update(trace_space, rhs.GetBlock(2), 0);
//note that Neumann BC must be applied only for the velocity
//and not the total flux for stability reasons
hform->AddBoundaryIntegrator(new BoundaryNormalLFIntegrator(ucoeff, 2),
bdr_u_is_neumann);
}
//construct the operator
Array<LinearForm*> lfs({gform, fform, hform, (LinearForm*)NULL, (LinearForm*)NULL});
Array<Coefficient*> coeffs({(Coefficient*)&gcoeff,
(Coefficient*)&fcoeff,
(Coefficient*)&ucoeff});
CoupledOperator op(bdr_u_is_neumann, bdr_E_is_neumann, &sigcoeff, lfs, coeffs,
V_space, W_space, E_space, B_space, trace_space, td);
//construct the time solver
ODESolver *ode_solver;
switch (ode)
{
case 1: ode_solver = new BackwardEulerSolver(); break;
case 2: ode_solver = new SDIRK23Solver(2); break;
case 3: ode_solver = new SDIRK23Solver(); break;
case 4: ode_solver = new SDIRK34Solver(); break;
default:
MFEM_ABORT("Unknown solver");
return 1;
}
ode_solver->Init(op);
//iterate in time
if (!btime) { nt = 1; }
const real_t dt = tf / nt; //time step
for (int ti = 0; ti < nt; ti++)
{
//set current time
real_t t = tf * ti / nt;
if (!dg && !brt)
{
ucoeff.SetTime(t);
u_h.ProjectBdrCoefficientNormal(ucoeff,
bdr_u_is_neumann); //essential Neumann BC
}
Ecoeff.SetTime(t);
E_h.ProjectBdrCoefficientTangent(Ecoeff, bdr_E_is_neumann);
//perform time step
real_t dt_ = dt;//<---ignore time step changes
ode_solver->Step(x, t, dt_);
// 12. Compute the L2 error norms.
int order_quad = max(2, 2*order+1);
const IntegrationRule *irs[Geometry::NumGeom];
for (int i=0; i < Geometry::NumGeom; ++i)
{
irs[i] = &(IntRules.Get(i, order_quad));
}
real_t err_u = u_h.ComputeL2Error(ucoeff, irs);
real_t norm_u = ComputeLpNorm(2., ucoeff, *mesh, irs);
real_t err_n = n_h.ComputeL2Error(ncoeff, irs);
real_t norm_n = ComputeLpNorm(2., ncoeff, *mesh, irs);
if (btime)
{
cout << "iter:\t" << ti
<< "\ttime:\t" << t
<< "\tq_err:\t" << err_u / norm_u
<< "\tt_err:\t" << err_n / norm_n
<< endl;
}
else
{
cout << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n";
cout << "|| n_h - n_ex || / || n_ex || = " << err_n / norm_n << "\n";
}
// Project the broken space
GridFunction u_v;
if (V_space_dg)
{
VectorGridFunctionCoefficient coeff(&u_h);
u_v.SetSpace(V_space_dg);
u_v.ProjectCoefficient(coeff);
}
else
{
u_v.MakeRef(V_space, u_h, 0);
}
// Project the analytic solution
static GridFunction u_a, n_a, c_gf;
u_a.SetSpace(V_space);
u_a.ProjectCoefficient(ucoeff);
n_a.SetSpace(W_space);
n_a.ProjectCoefficient(ncoeff);
// 13. Save the mesh and the solution. This output can be viewed later using
// GLVis: "glvis -m ex5.mesh -g sol_q.gf" or "glvis -m ex5.mesh -g
// sol_t.gf".
if (mfem)
{
stringstream ss;
ss.str("");
ss << "mesh";
if (btime) { ss << "_" << ti; }
ss << ".mesh";
ofstream mesh_ofs(ss.str());
mesh_ofs.precision(8);
mesh->Print(mesh_ofs);
ss.str("");
ss << "sol_u";
if (btime) { ss << "_" << ti; }
ss << ".gf";
ofstream u_ofs(ss.str());
u_ofs.precision(8);
u_v.Save(u_ofs);
ss.str("");
ss << "sol_n";
if (btime) { ss << "_" << ti; }
ss << ".gf";
ofstream n_ofs(ss.str());
n_ofs.precision(8);
n_h.Save(n_ofs);
ss.str("");
ss << "sol_E";
if (btime) { ss << "_" << ti; }
ss << ".gf";
ofstream E_ofs(ss.str());
E_ofs.precision(8);
E_h.Save(E_ofs);
ss.str("");
ss << "sol_B";
if (btime) { ss << "_" << ti; }
ss << ".gf";
ofstream B_ofs(ss.str());
B_ofs.precision(8);
B_h.Save(B_ofs);
}
// 14. Save data in the VisIt format
if (visit)
{
static VisItDataCollection visit_dc("Example5", mesh);
if (ti == 0)
{
visit_dc.RegisterField("velocity", &u_h);
visit_dc.RegisterField("density", &n_h);
if (analytic)
{
visit_dc.RegisterField("velocity analytic", &u_a);
visit_dc.RegisterField("density analytic", &n_a);
}
}
visit_dc.SetCycle(ti);
visit_dc.SetTime(t); // set the time
visit_dc.Save();
}
// 15. Save data in the ParaView format
if (paraview)
{
static ParaViewDataCollection paraview_dc("Example5", mesh);
if (ti == 0)
{
paraview_dc.SetPrefixPath("ParaView");
paraview_dc.SetLevelsOfDetail(order);
paraview_dc.SetDataFormat(VTKFormat::BINARY);
paraview_dc.SetHighOrderOutput(true);
paraview_dc.RegisterField("velocity",&u_h);
paraview_dc.RegisterField("density",&n_h);
if (analytic)
{
paraview_dc.RegisterField("velocity analytic", &u_a);
paraview_dc.RegisterField("density analytic", &n_a);
}
}
paraview_dc.SetCycle(ti);
paraview_dc.SetTime(t); // set the time
paraview_dc.Save();
}
// 16. Send the solution by socket to a GLVis server.
if (visualization)
{
const char vishost[] = "localhost";
const int visport = 19916;
static socketstream u_sock(vishost, visport);
u_sock.precision(8);
u_sock << "solution\n" << *mesh << u_v << endl;
if (ti == 0)
{
u_sock << "window_title 'Velocity'" << endl;
u_sock << "keys Rljvvvvvmmc" << endl;
}
static socketstream n_sock(vishost, visport);
n_sock.precision(8);
n_sock << "solution\n" << *mesh << n_h << endl;
if (ti == 0)
{
n_sock << "window_title 'Density'" << endl;
n_sock << "keys Rljmmc" << endl;
}
static socketstream E_sock(vishost, visport);
E_sock.precision(8);
E_sock << "solution\n" << *mesh << E_h << endl;
if (ti == 0)
{
E_sock << "window_title 'Electric field'" << endl;
E_sock << "keys Rljvvvvvmmc" << endl;
}
static socketstream B_sock(vishost, visport);
B_sock.precision(8);
B_sock << "solution\n" << *mesh << B_h << endl;
if (ti == 0)
{
B_sock << "window_title 'Magnetic field'" << endl;
B_sock << "keys Rljmmc" << endl;
}
if (analytic)
{
static socketstream qa_sock(vishost, visport);
qa_sock.precision(8);
qa_sock << "solution\n" << *mesh << u_a << endl;
if (ti == 0)
{
qa_sock << "window_title 'Velocity analytic'" << endl;
qa_sock << "keys Rljvvvvvmmc" << endl;
}
static socketstream ta_sock(vishost, visport);
ta_sock.precision(8);
ta_sock << "solution\n" << *mesh << n_a << endl;
if (ti == 0)
{
ta_sock << "window_title 'Density analytic'" << endl;
ta_sock << "keys Rljmmc" << endl;
}
}
}
}
// 17. Free the used memory.
delete ode_solver;
delete fform;
delete gform;
delete hform;
delete W_space;
delete V_space;
delete V_space_dg;
delete E_space;
delete B_space;
delete trace_space;
delete W_coll;
delete V_coll;
delete V_coll_dg;
delete E_coll;
delete B_coll;
delete trace_coll;
delete mesh;
return 0;
}
TFunc GetSigFun(Problem prob, real_t f, real_t s0)
{
switch (prob)
{
case Problem::MaterialWave:
case Problem::Maxwell:
return [=](const Vector &x, real_t) -> real_t
{
return 0.;
};
case Problem::Excitation:
case Problem::Scattering:
return [=](const Vector &x, real_t) -> real_t
{
constexpr real_t x0 = 0.5;
constexpr real_t y0 = 0.5;
constexpr real_t w = 0.5;
const real_t r = hypot(x(0) - x0, x(1) - y0) / w;
return exp(-r*r) * s0;
};
}
return TFunc();
}
TFunc GetNFun(Problem prob, real_t t_0, real_t k, real_t c)
{
switch (prob)
{
case Problem::MaterialWave:
case Problem::Maxwell:
case Problem::Scattering:
return [=](const Vector &x, real_t) -> real_t
{
return 0.;
};
case Problem::Excitation:
return [=](const Vector &x, real_t) -> real_t
{
return 1.;
};
}
return TFunc();
}
VecTFunc GetUFun(Problem prob, real_t f, real_t a0)
{
switch (prob)
{
case Problem::MaterialWave:
return [=](const Vector &x, real_t t, Vector &v)
{
const int vdim = x.Size();
v.SetSize(vdim);
v = 0.;
constexpr real_t w = 0.25;
constexpr real_t y0 = 0.5;
const real_t dy = (x(1) - y0) / w;
v(0) = exp(-dy*dy) * sin(M_PI * f * t) * cos(M_PI * x(0));
};
case Problem::Maxwell:
case Problem::Excitation:
return [=](const Vector &x, real_t t, Vector &v)
{
const int vdim = x.Size();
v.SetSize(vdim);
v = 0.;
};
case Problem::Scattering:
return [=](const Vector &x, real_t t, Vector &v)
{
const int vdim = x.Size();
v.SetSize(vdim);
v = 0.;
constexpr real_t w = 0.15;
constexpr real_t r0 = 0.5;
const real_t r = x(0) - r0;
const real_t rw = r / w;
constexpr real_t zR = 0.5;
constexpr real_t z0 = 0.5;
const real_t dz = x(1) - z0;
const real_t R = dz / (dz*dz + zR*zR);
v(1) = exp(-rw*rw) * sin(M_PI * (f * t - r*r / R)) * cos(M_PI * x(1)) * a0;
};
}
return VecTFunc();
}
VecTFunc GetEFun(Problem prob, real_t f)
{
switch (prob)
{
case Problem::MaterialWave:
case Problem::Maxwell:
case Problem::Excitation:
return [=](const Vector &x, real_t t, Vector &v)
{
const int vdim = x.Size();
v.SetSize(vdim);
v = 0.;
constexpr real_t w = 0.25;
constexpr real_t y0 = 0.5;
const real_t dy = (x(1) - y0) / w;
v(1) = exp(-dy*dy) * sin(M_PI * f * t) * cos(M_PI * x(0));
};
case Problem::Scattering:
return [=](const Vector &x, real_t t, Vector &v)
{
const int vdim = x.Size();
v.SetSize(vdim);
v = 0.;
constexpr real_t w = 0.15;
const real_t r = x(1) - 0.5;
const real_t rw = r / w;
constexpr real_t zR = 0.5;
constexpr real_t z0 = 0.5;
const real_t dz = x(0) - z0;
const real_t R = dz / (dz*dz + zR*zR);
v(1) = exp(-rw*rw) * sin(M_PI * (f * t - r*r / R)) * cos(M_PI * x(0));
};
}
return VecTFunc();
}
TFunc GetFFun(Problem prob, real_t t_0, real_t k, real_t c)
{
switch (prob)
{
case Problem::MaterialWave:
case Problem::Maxwell:
case Problem::Excitation:
case Problem::Scattering:
return [=](const Vector &x, real_t) -> real_t
{
return 0.;
};
}
return TFunc();
}
+238 -119
View File
@@ -29,9 +29,10 @@
// finite elements (velocity u) and piecewise discontinuous
// polynomials (pressure p).
//
// 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.
// The example demonstrates the use of the DarcyForm class, as
// well as hybridization of mixed systems and the collective saving
// of several grid functions in VisIt (visit.llnl.gov) and ParaView
// (paraview.org) formats.
//
// We recommend viewing examples 1-4 before viewing this example.
@@ -55,8 +56,11 @@ int main(int argc, char *argv[])
StopWatch chrono;
// 1. Parse command-line options.
const char *mesh_file = "../data/star.mesh";
const char *mesh_file = "";
int nx = 0;
int ny = 0;
int order = 1;
bool hybridization = false;
bool pa = false;
const char *device_config = "cpu";
bool visualization = 1;
@@ -64,8 +68,14 @@ int main(int argc, char *argv[])
OptionsParser args(argc, argv);
args.AddOption(&mesh_file, "-m", "--mesh",
"Mesh file to use.");
args.AddOption(&nx, "-nx", "--ncells-x",
"Number of cells in x.");
args.AddOption(&ny, "-ny", "--ncells-y",
"Number of cells in y.");
args.AddOption(&order, "-o", "--order",
"Finite element order (polynomial degree).");
args.AddOption(&hybridization, "-hb", "--hybridization", "-no-hb",
"--no-hybridization", "Enable hybridization.");
args.AddOption(&pa, "-pa", "--partial-assembly", "-no-pa",
"--no-partial-assembly", "Enable Partial Assembly.");
args.AddOption(&device_config, "-d", "--device",
@@ -89,13 +99,28 @@ int main(int argc, char *argv[])
// 3. Read the mesh from the given mesh file. We can handle triangular,
// quadrilateral, tetrahedral, hexahedral, surface and volume meshes with
// the same code.
Mesh *mesh = new Mesh(mesh_file, 1, 1);
if (ny <= 0)
{
ny = nx;
}
Mesh *mesh = NULL;
if (strlen(mesh_file) > 0)
{
mesh = new Mesh(mesh_file, 1, 1);
}
else
{
mesh = new Mesh(Mesh::MakeCartesian2D(nx, ny, Element::QUADRILATERAL));
}
int dim = mesh->Dimension();
// 4. Refine the mesh to increase the resolution. In this example we do
// 'ref_levels' of uniform refinement. We choose 'ref_levels' to be the
// largest number that gives a final mesh with no more than 10,000
// elements.
if (strlen(mesh_file) > 0)
{
int ref_levels =
(int)floor(log(10000./mesh->GetNE())/log(2.)/dim);
@@ -107,20 +132,23 @@ int main(int argc, char *argv[])
// 5. Define a finite element space on the mesh. Here we use the
// Raviart-Thomas finite elements of the specified order.
FiniteElementCollection *hdiv_coll(new RT_FECollection(order, dim));
FiniteElementCollection *l2_coll(new L2_FECollection(order, dim));
FiniteElementCollection *R_coll(new RT_FECollection(order, dim));
FiniteElementCollection *W_coll(new L2_FECollection(order, dim));
FiniteElementSpace *R_space = new FiniteElementSpace(mesh, hdiv_coll);
FiniteElementSpace *W_space = new FiniteElementSpace(mesh, l2_coll);
FiniteElementSpace *R_space = new FiniteElementSpace(mesh, R_coll);
FiniteElementSpace *W_space = new FiniteElementSpace(mesh, W_coll);
DarcyForm *darcy = new DarcyForm(R_space, W_space, false);
// 6. Define the BlockStructure of the problem, i.e. define the array of
// offsets for each variable. The last component of the Array is the sum
// of the dimensions of each block.
Array<int> block_offsets(3); // number of variables + 1
const Array<int> &block_offsets = darcy->GetOffsets();
/*(3); // number of variables + 1
block_offsets[0] = 0;
block_offsets[1] = R_space->GetVSize();
block_offsets[2] = W_space->GetVSize();
block_offsets.PartialSum();
block_offsets.PartialSum();*/
std::cout << "***********************************************************\n";
std::cout << "dim(R) = " << block_offsets[1] - block_offsets[0] << "\n";
@@ -129,7 +157,8 @@ int main(int argc, char *argv[])
std::cout << "***********************************************************\n";
// 7. Define the coefficients, analytical solution, and rhs of the PDE.
ConstantCoefficient k(1.0);
const double k = 1.0;
ConstantCoefficient kcoeff(k);
VectorFunctionCoefficient fcoeff(dim, fFun);
FunctionCoefficient fnatcoeff(f_natural);
@@ -167,24 +196,55 @@ int main(int argc, char *argv[])
//
// M = \int_\Omega k u_h \cdot v_h d\Omega u_h, v_h \in R_h
// B = -\int_\Omega \div u_h q_h d\Omega u_h \in R_h, q_h \in W_h
BilinearForm *mVarf(new BilinearForm(R_space));
MixedBilinearForm *bVarf(new MixedBilinearForm(R_space, W_space));
//BilinearForm *mVarf(new BilinearForm(R_space));
//MixedBilinearForm *bVarf(new MixedBilinearForm(R_space, W_space));
BilinearForm *mVarf = darcy->GetFluxMassForm();
MixedBilinearForm *bVarf = darcy->GetFluxDivForm();
if (pa) { mVarf->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
mVarf->AddDomainIntegrator(new VectorFEMassIntegrator(k));
mVarf->Assemble();
if (!pa) { mVarf->Finalize(); }
//if (pa) { mVarf->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
mVarf->AddDomainIntegrator(new VectorFEMassIntegrator(kcoeff));
//mVarf->Assemble();
//if (!pa) { mVarf->Finalize(); }
if (pa) { bVarf->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
bVarf->AddDomainIntegrator(new VectorFEDivergenceIntegrator);
bVarf->Assemble();
if (!pa) { bVarf->Finalize(); }
//if (pa) { bVarf->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
ConstantCoefficient cdiv(-1.);
bVarf->AddDomainIntegrator(new VectorFEDivergenceIntegrator(cdiv));
//bVarf->Assemble();
//if (!pa) { bVarf->Finalize(); }
BlockOperator darcyOp(block_offsets);
//set hybridization / assembly level
TransposeOperator *Bt = NULL;
Array<int> ess_flux_tdofs_list;
/*Array<int> bdr_is_ess(mesh->bdr_attributes.Max());
bdr_is_ess = 0;
bdr_is_ess[3] = -1;
R_space->GetEssentialTrueDofs(bdr_is_ess, ess_flux_tdofs_list);*/
if (pa)
FiniteElementCollection *trace_coll = NULL;
FiniteElementSpace *trace_space = NULL;
chrono.Clear();
chrono.Start();
if (hybridization)
{
trace_coll = new DG_Interface_FECollection(order, dim);
trace_space = new FiniteElementSpace(mesh, trace_coll);
darcy->EnableHybridization(trace_space,
new NormalTraceJumpIntegrator(),
ess_flux_tdofs_list);
}
if (pa) { darcy->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
darcy->Assemble();
//if (!pa) { darcy->Finalize(); }
//BlockOperator darcyOp(block_offsets);
//TransposeOperator *Bt = NULL;
/*if (pa)
{
Bt = new TransposeOperator(bVarf);
@@ -202,104 +262,163 @@ int main(int argc, char *argv[])
darcyOp.SetBlock(0,0, &M);
darcyOp.SetBlock(0,1, Bt);
darcyOp.SetBlock(1,0, &B);
}
}*/
// 10. Construct the operators for preconditioner
//
// P = [ diag(M) 0 ]
// [ 0 B diag(M)^-1 B^T ]
//
// Here we use Symmetric Gauss-Seidel to approximate the inverse of the
// pressure Schur Complement
SparseMatrix *MinvBt = NULL;
Vector Md(mVarf->Height());
OperatorHandle pDarcyOp;
Vector X, B;
x = 0.;
//darcy->FormSystemMatrix(ess_flux_tdofs_list, pDarcyOp);
darcy->FormLinearSystem(ess_flux_tdofs_list, x, rhs,
pDarcyOp, X, B);
BlockDiagonalPreconditioner darcyPrec(block_offsets);
Solver *invM, *invS;
SparseMatrix *S = NULL;
chrono.Stop();
std::cout << "Assembly took " << chrono.RealTime() << "s.\n";
if (pa)
{
mVarf->AssembleDiagonal(Md);
auto Md_host = Md.HostRead();
Vector invMd(mVarf->Height());
for (int i=0; i<mVarf->Height(); ++i)
{
invMd(i) = 1.0 / Md_host[i];
}
Vector BMBt_diag(bVarf->Height());
bVarf->AssembleDiagonal_ADAt(invMd, BMBt_diag);
Array<int> ess_tdof_list; // empty
invM = new OperatorJacobiSmoother(Md, ess_tdof_list);
invS = new OperatorJacobiSmoother(BMBt_diag, ess_tdof_list);
}
else
{
SparseMatrix &M(mVarf->SpMat());
M.GetDiag(Md);
Md.HostReadWrite();
SparseMatrix &B(bVarf->SpMat());
MinvBt = Transpose(B);
for (int i = 0; i < Md.Size(); i++)
{
MinvBt->ScaleRow(i, 1./Md(i));
}
S = Mult(B, *MinvBt);
invM = new DSmoother(M);
#ifndef MFEM_USE_SUITESPARSE
invS = new GSSmoother(*S);
#else
invS = new UMFPackSolver(*S);
#endif
}
invM->iterative_mode = false;
invS->iterative_mode = false;
darcyPrec.SetDiagonalBlock(0, invM);
darcyPrec.SetDiagonalBlock(1, invS);
// 11. Solve the linear system with MINRES.
// Check the norm of the unpreconditioned residual.
int maxIter(1000);
real_t rtol(1.e-6);
real_t atol(1.e-10);
chrono.Clear();
chrono.Start();
MINRESSolver solver;
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetOperator(darcyOp);
solver.SetPreconditioner(darcyPrec);
solver.SetPrintLevel(1);
x = 0.0;
solver.Mult(rhs, x);
if (device.IsEnabled()) { x.HostRead(); }
chrono.Stop();
if (solver.GetConverged())
if (hybridization)
{
std::cout << "MINRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
// 10. Construct the preconditioner
GSSmoother prec(*pDarcyOp.As<SparseMatrix>());
// 11. Solve the linear system with GMRES.
// Check the norm of the unpreconditioned residual.
chrono.Clear();
chrono.Start();
GMRESSolver solver;
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetOperator(*pDarcyOp);
solver.SetPreconditioner(prec);
solver.SetPrintLevel(1);
solver.Mult(B, X);
darcy->RecoverFEMSolution(X, rhs, x);
chrono.Stop();
if (solver.GetConverged())
{
std::cout << "GMRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
}
else
{
std::cout << "GMRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
}
std::cout << "GMRES solver took " << chrono.RealTime() << "s.\n";
}
else
{
std::cout << "MINRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
// 10. Construct the operators for preconditioner
//
// P = [ diag(M) 0 ]
// [ 0 B diag(M)^-1 B^T ]
//
// Here we use Symmetric Gauss-Seidel to approximate the inverse of the
// pressure Schur Complement
SparseMatrix *MinvBt = NULL;
Vector Md(mVarf->Height());
BlockDiagonalPreconditioner darcyPrec(block_offsets);
Solver *invM, *invS;
SparseMatrix *S = NULL;
if (pa)
{
mVarf->AssembleDiagonal(Md);
auto Md_host = Md.HostRead();
Vector invMd(mVarf->Height());
for (int i=0; i<mVarf->Height(); ++i)
{
invMd(i) = 1.0 / Md_host[i];
}
Vector BMBt_diag(bVarf->Height());
bVarf->AssembleDiagonal_ADAt(invMd, BMBt_diag);
Array<int> ess_tdof_list; // empty
invM = new OperatorJacobiSmoother(Md, ess_tdof_list);
invS = new OperatorJacobiSmoother(BMBt_diag, ess_tdof_list);
}
else
{
SparseMatrix &M(mVarf->SpMat());
M.GetDiag(Md);
Md.HostReadWrite();
SparseMatrix &B(bVarf->SpMat());
MinvBt = Transpose(B);
for (int i = 0; i < Md.Size(); i++)
{
MinvBt->ScaleRow(i, 1./Md(i));
}
S = Mult(B, *MinvBt);
invM = new DSmoother(M);
#ifndef MFEM_USE_SUITESPARSE
invS = new GSSmoother(*S);
#else
invS = new UMFPackSolver(*S);
#endif
}
invM->iterative_mode = false;
invS->iterative_mode = false;
darcyPrec.SetDiagonalBlock(0, invM);
darcyPrec.SetDiagonalBlock(1, invS);
// 11. Solve the linear system with MINRES.
// Check the norm of the unpreconditioned residual.
chrono.Clear();
chrono.Start();
MINRESSolver solver;
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetOperator(*pDarcyOp);
solver.SetPreconditioner(darcyPrec);
solver.SetPrintLevel(1);
solver.Mult(B, X);
darcy->RecoverFEMSolution(X, rhs, x);
if (device.IsEnabled()) { x.HostRead(); }
chrono.Stop();
if (solver.GetConverged())
{
std::cout << "MINRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
}
else
{
std::cout << "MINRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
}
std::cout << "MINRES solver took " << chrono.RealTime() << "s.\n";
delete invM;
delete invS;
delete S;
//delete Bt;
delete MinvBt;
}
std::cout << "MINRES solver took " << chrono.RealTime() << "s.\n";
// 12. Create the grid functions u and p. Compute the L2 error norms.
GridFunction u, p;
@@ -364,25 +483,25 @@ int main(int argc, char *argv[])
socketstream u_sock(vishost, visport);
u_sock.precision(8);
u_sock << "solution\n" << *mesh << u << "window_title 'Velocity'" << endl;
u_sock << "keys Rljvvvvvmmc" << endl;
socketstream p_sock(vishost, visport);
p_sock.precision(8);
p_sock << "solution\n" << *mesh << p << "window_title 'Pressure'" << endl;
p_sock << "keys Rljmmc" << endl;
}
// 17. Free the used memory.
delete fform;
delete gform;
delete invM;
delete invS;
delete S;
delete Bt;
delete MinvBt;
delete mVarf;
delete bVarf;
//delete mVarf;
//delete bVarf;
delete darcy;
delete W_space;
delete R_space;
delete l2_coll;
delete hdiv_coll;
delete trace_space;
delete W_coll;
delete R_coll;
delete trace_coll;
delete mesh;
return 0;
+655
View File
@@ -0,0 +1,655 @@
// MFEM Example 5
//
// Compile with: make ex5
//
// Sample runs: ex5 -m ../data/square-disc.mesh
// ex5 -m ../data/star.mesh
// ex5 -m ../data/star.mesh -pa
// ex5 -m ../data/beam-tet.mesh
// ex5 -m ../data/beam-hex.mesh
// ex5 -m ../data/beam-hex.mesh -pa
// ex5 -m ../data/escher.mesh
// ex5 -m ../data/fichera.mesh
//
// Device sample runs:
// ex5 -m ../data/star.mesh -pa -d cuda
// ex5 -m ../data/star.mesh -pa -d raja-cuda
// ex5 -m ../data/star.mesh -pa -d raja-omp
// ex5 -m ../data/beam-hex.mesh -pa -d cuda
//
// Description: This example code solves a simple 2D/3D mixed Darcy problem
// corresponding to the saddle point system
//
// k*u + grad p = f
// - div u = g
//
// with natural boundary condition -p = <given pressure>.
// Here, we use a given exact solution (u,p) and compute the
// corresponding r.h.s. (f,g). We discretize with Raviart-Thomas
// finite elements (velocity u) and piecewise discontinuous
// polynomials (pressure p). Alternatively, the piecewise discontinuous
// polynomials are used for both quantities.
//
// The example demonstrates the use of the DarcyForm class, as
// well as hybridization of mixed systems and the collective saving
// of several grid functions in VisIt (visit.llnl.gov) and ParaView
// (paraview.org) formats.
//
// We recommend viewing examples 1-4 before viewing this example.
#include "mfem.hpp"
#include <fstream>
#include <iostream>
#include <algorithm>
using namespace std;
using namespace mfem;
// Define the analytical solution and forcing terms / boundary conditions
void uFun_ex(const Vector & x, Vector & u);
real_t pFun_ex(const Vector & x);
void fFun(const Vector & x, Vector & f);
real_t gFun(const Vector & x);
real_t f_natural(const Vector & x);
int main(int argc, char *argv[])
{
StopWatch chrono;
// 1. Initialize MPI and HYPRE.
Mpi::Init(argc, argv);
int num_procs = Mpi::WorldSize();
int myid = Mpi::WorldRank();
Hypre::Init();
bool verbose = (myid == 0);
// 2. Parse command-line options.
const char *mesh_file = "";
int nx = 0;
int ny = 0;
int ref_levels = -1;
int order = 1;
bool dg = false;
real_t td = 0.5;
bool hybridization = false;
bool reduction = false;
bool pa = false;
const char *device_config = "cpu";
bool visualization = 1;
bool par_format = false;
OptionsParser args(argc, argv);
args.AddOption(&mesh_file, "-m", "--mesh",
"Mesh file to use.");
args.AddOption(&ref_levels, "-r", "--refine",
"Number of times to refine the mesh uniformly.");
args.AddOption(&nx, "-nx", "--ncells-x",
"Number of cells in x.");
args.AddOption(&ny, "-ny", "--ncells-y",
"Number of cells in y.");
args.AddOption(&order, "-o", "--order",
"Finite element order (polynomial degree).");
args.AddOption(&dg, "-dg", "--discontinuous", "-no-dg",
"--no-discontinuous", "Enable DG elements for fluxes.");
args.AddOption(&td, "-td", "--stab_diff",
"Diffusion stabilization factor (1/2=default)");
args.AddOption(&hybridization, "-hb", "--hybridization", "-no-hb",
"--no-hybridization", "Enable hybridization.");
args.AddOption(&reduction, "-rd", "--reduction", "-no-rd",
"--no-reduction", "Enable reduction of DG flux.");
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(&par_format, "-pf", "--parallel-format", "-sf",
"--serial-format",
"Format to use when saving the results for VisIt.");
args.Parse();
if (!args.Good())
{
if (verbose)
{
args.PrintUsage(cout);
}
return 1;
}
if (verbose)
{
args.PrintOptions(cout);
}
// 3. 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);
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.
if (ny <= 0)
{
ny = nx;
}
Mesh *mesh = NULL;
if (strlen(mesh_file) > 0)
{
mesh = new Mesh(mesh_file, 1, 1);
}
else
{
mesh = new Mesh(Mesh::MakeCartesian2D(nx, ny, Element::QUADRILATERAL));
}
int dim = mesh->Dimension();
// 5. Refine the serial mesh on all processors to increase the resolution. In
// this example we do 'ref_levels' of uniform refinement. We choose
// 'ref_levels' to be the largest number that gives a final mesh with no
// more than 10,000 elements, unless the user specifies it as input.
if (strlen(mesh_file) > 0)
{
if (ref_levels == -1)
{
ref_levels = (int)floor(log(10000./mesh->GetNE())/log(2.)/dim);
}
for (int l = 0; l < ref_levels; l++)
{
mesh->UniformRefinement();
}
}
// 6. Define a parallel mesh by a partitioning of the serial mesh. Refine
// this mesh further in parallel to increase the resolution. Once the
// parallel mesh is defined, the serial mesh can be deleted.
ParMesh *pmesh = new ParMesh(MPI_COMM_WORLD, *mesh);
delete mesh;
/*{
int par_ref_levels = 2;
for (int l = 0; l < par_ref_levels; l++)
{
pmesh->UniformRefinement();
}
}*/
// 7. Define a finite element space on the mesh. Here we use the
// Raviart-Thomas finite elements of the specified order.
FiniteElementCollection *R_coll;
if (dg)
{
// In the case of LDG formulation, we chose a closed basis as it
// is customary for HDG to match trace DOFs, but an open basis can
// be used instead.
R_coll = new L2_FECollection(order, dim, BasisType::GaussLobatto);
}
else
{
R_coll = new RT_FECollection(order, dim);
}
FiniteElementCollection *W_coll = new L2_FECollection(order, dim);
ParFiniteElementSpace *R_space = new ParFiniteElementSpace(pmesh, R_coll,
(dg)?(dim):(1));
ParFiniteElementSpace *W_space = new ParFiniteElementSpace(pmesh, W_coll);
ParDarcyForm *darcy = new ParDarcyForm(R_space, W_space);
HYPRE_BigInt dimR = R_space->GlobalTrueVSize();
HYPRE_BigInt dimW = W_space->GlobalTrueVSize();
if (verbose)
{
std::cout << "***********************************************************\n";
std::cout << "dim(R) = " << dimR << "\n";
std::cout << "dim(W) = " << dimW << "\n";
std::cout << "dim(R+W) = " << dimR + dimR << "\n";
std::cout << "***********************************************************\n";
}
// 8. Define the two BlockStructure of the problem. block_offsets is used
// for Vector based on dof (like ParGridFunction or ParLinearForm),
// block_trueOffstes is used for Vector based on trueDof (HypreParVector
// for the rhs and solution of the linear system). The offsets computed
// here are local to the processor.
const Array<int> &block_offsets = darcy->GetOffsets();
const Array<int> &block_trueOffsets = darcy->GetTrueOffsets();
// 9. Define the coefficients, analytical solution, and rhs of the PDE.
const double k = 1.0;
ConstantCoefficient kcoeff(k); //acoustic resistance
RatioCoefficient ikcoeff(1., kcoeff); //inverse acoustic resistance
VectorFunctionCoefficient fcoeff(dim, fFun); //velocity rhs
FunctionCoefficient fnatcoeff(f_natural); //boundary velocity rhs
FunctionCoefficient gcoeff(gFun); //pressure rhs
VectorFunctionCoefficient ucoeff(dim, uFun_ex); //velocity
FunctionCoefficient pcoeff(pFun_ex); //pressure
// 10. Define the parallel grid function and parallel linear forms, solution
// vector and rhs.
MemoryType mt = device.GetMemoryType();
BlockVector x(block_offsets, mt), rhs(block_offsets, mt);
ParLinearForm *fform(new ParLinearForm);
fform->Update(R_space, rhs.GetBlock(0), 0);
if (dg)
{
fform->AddDomainIntegrator(new VectorDomainLFIntegrator(fcoeff));
fform->AddBdrFaceIntegrator(new VectorBoundaryFluxLFIntegrator(fnatcoeff));
}
else
{
fform->AddDomainIntegrator(new VectorFEDomainLFIntegrator(fcoeff));
fform->AddBoundaryIntegrator(new VectorFEBoundaryFluxLFIntegrator(fnatcoeff));
}
fform->Assemble();
fform->SyncAliasMemory(rhs);
ParLinearForm *gform(new ParLinearForm);
gform->Update(W_space, rhs.GetBlock(1), 0);
gform->AddDomainIntegrator(new DomainLFIntegrator(gcoeff));
gform->Assemble();
gform->SyncAliasMemory(rhs);
// 11. Assemble the finite element matrices for the Darcy operator
//
// D = [ M B^T ]
// [ B 0 ]
// where:
//
// M = \int_\Omega k u_h \cdot v_h d\Omega u_h, v_h \in R_h
// B = -\int_\Omega \div u_h q_h d\Omega u_h \in R_h, q_h \in W_h
ParBilinearForm *mVarf = darcy->GetParFluxMassForm();
ParMixedBilinearForm *bVarf = darcy->GetParFluxDivForm();
ParBilinearForm *mtVarf = (dg)?(darcy->GetParPotentialMassForm()):(NULL);
if (dg)
{
mVarf->AddDomainIntegrator(new VectorMassIntegrator(kcoeff));
bVarf->AddDomainIntegrator(new VectorDivergenceIntegrator());
bVarf->AddInteriorFaceIntegrator(new TransposeIntegrator(
new DGNormalTraceIntegrator(-1.)));
mtVarf->AddInteriorFaceIntegrator(new HDGDiffusionIntegrator(ikcoeff, td));
}
else
{
mVarf->AddDomainIntegrator(new VectorFEMassIntegrator(kcoeff));
bVarf->AddDomainIntegrator(new VectorFEDivergenceIntegrator);
}
//set hybridization / assembly level
Array<int> ess_flux_tdofs_list;
FiniteElementCollection *trace_coll = NULL;
ParFiniteElementSpace *trace_space = NULL;
chrono.Clear();
chrono.Start();
if (hybridization)
{
trace_coll = new DG_Interface_FECollection(order, dim);
trace_space = new ParFiniteElementSpace(pmesh, trace_coll);
darcy->EnableHybridization(trace_space,
new NormalTraceJumpIntegrator(),
ess_flux_tdofs_list);
}
else if (reduction && dg)
{
darcy->EnableFluxReduction();
}
if (pa) { darcy->SetAssemblyLevel(AssemblyLevel::PARTIAL); }
darcy->Assemble();
OperatorHandle pDarcyOp;
Vector X, B;
x = 0.;
darcy->FormLinearSystem(ess_flux_tdofs_list, x, rhs,
pDarcyOp, X, B);
chrono.Stop();
if (verbose)
{
std::cout << "Assembly took " << chrono.RealTime() << "s.\n";
}
int maxIter(1000);
real_t rtol(1.e-6);
real_t atol(1.e-10);
if (hybridization || (reduction && dg))
{
// 12. Construct the preconditioner
HypreBoomerAMG prec;
// 13. Solve the linear system with GMRES.
// Check the norm of the unpreconditioned residual.
chrono.Clear();
chrono.Start();
GMRESSolver solver(MPI_COMM_WORLD);
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetPreconditioner(prec);
solver.SetOperator(*pDarcyOp);
solver.SetPrintLevel(verbose);
solver.Mult(B, X);
darcy->RecoverFEMSolution(X, rhs, x);
chrono.Stop();
if (verbose)
{
if (solver.GetConverged())
{
std::cout << "GMRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
}
else
{
std::cout << "GMRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
}
std::cout << "GMRES solver took " << chrono.RealTime() << "s.\n";
}
}
else
{
// 12. Construct the operators for preconditioner
//
// P = [ diag(M) 0 ]
// [ 0 B diag(M)^-1 B^T ]
//
// Here we use Symmetric Gauss-Seidel to approximate the inverse of the
// pressure Schur Complement
HypreParMatrix *MinvBt = NULL;
HypreParVector *Md = NULL;
HypreParMatrix *S = NULL;
Solver *invM, *invS;
if (pa)
{
Vector Md(R_space->GetTrueVSize());
mVarf->AssembleDiagonal(Md);
auto Md_host = Md.HostRead();
Vector invMd(Md.Size());
for (int i=0; i<Md.Size(); ++i)
{
invMd(i) = 1.0 / Md_host[i];
}
Vector BMBt_diag(W_space->GetTrueVSize());
bVarf->AssembleDiagonal_ADAt(invMd, BMBt_diag);
Array<int> ess_tdof_list; // empty
invM = new OperatorJacobiSmoother(Md, ess_tdof_list);
invS = new OperatorJacobiSmoother(BMBt_diag, ess_tdof_list);
}
else
{
HypreParMatrix &M = *mVarf->ParallelAssembleInternal();
Md = new HypreParVector(MPI_COMM_WORLD, M.GetGlobalNumRows(),
M.GetRowStarts());
M.GetDiag(*Md);
HypreParMatrix &B = *bVarf->ParallelAssembleInternal();
MinvBt = B.Transpose();
MinvBt->InvScaleRows(*Md);
S = ParMult(&B, MinvBt);
if (mtVarf)
{
HypreParMatrix &Mt = *mtVarf->ParallelAssembleInternal();
HypreParMatrix *Snew = ParAdd(&Mt, S);
delete S;
S = Snew;
}
invM = new HypreDiagScale(M);
invS = new HypreBoomerAMG(*S);
}
invM->iterative_mode = false;
invS->iterative_mode = false;
BlockDiagonalPreconditioner darcyPrec(block_trueOffsets);
darcyPrec.SetDiagonalBlock(0, invM);
darcyPrec.SetDiagonalBlock(1, invS);
// 13. Solve the linear system with MINRES.
// Check the norm of the unpreconditioned residual.
chrono.Clear();
chrono.Start();
MINRESSolver solver(MPI_COMM_WORLD);
solver.SetAbsTol(atol);
solver.SetRelTol(rtol);
solver.SetMaxIter(maxIter);
solver.SetOperator(*pDarcyOp);
solver.SetPreconditioner(darcyPrec);
solver.SetPrintLevel(verbose);
solver.Mult(B, X);
darcy->RecoverFEMSolution(X, rhs, x);
if (device.IsEnabled()) { x.HostRead(); }
chrono.Stop();
if (verbose)
{
if (solver.GetConverged())
{
std::cout << "MINRES converged in " << solver.GetNumIterations()
<< " iterations with a residual norm of "
<< solver.GetFinalNorm() << ".\n";
}
else
{
std::cout << "MINRES did not converge in " << solver.GetNumIterations()
<< " iterations. Residual norm is " << solver.GetFinalNorm()
<< ".\n";
}
std::cout << "MINRES solver took " << chrono.RealTime() << "s.\n";
}
delete invM;
delete invS;
delete S;
delete Md;
delete MinvBt;
}
// 14. Extract the parallel grid function corresponding to the finite element
// approximation X. This is the local solution on each processor. Compute
// L2 error norms.
ParGridFunction u, p;
u.MakeRef(R_space, x.GetBlock(0), 0);
p.MakeRef(W_space, x.GetBlock(1), 0);
int order_quad = max(2, 2*order+1);
const IntegrationRule *irs[Geometry::NumGeom];
for (int i=0; i < Geometry::NumGeom; ++i)
{
irs[i] = &(IntRules.Get(i, order_quad));
}
real_t err_u = u.ComputeL2Error(ucoeff, irs);
real_t norm_u = ComputeGlobalLpNorm(2., ucoeff, *pmesh, irs);
real_t err_p = p.ComputeL2Error(pcoeff, irs);
real_t norm_p = ComputeGlobalLpNorm(2., pcoeff, *pmesh, irs);
if (verbose)
{
std::cout << "|| u_h - u_ex || / || u_ex || = " << err_u / norm_u << "\n";
std::cout << "|| p_h - p_ex || / || p_ex || = " << err_p / norm_p << "\n";
}
// 15. Save the refined mesh and the solution in parallel. This output can be
// viewed later using GLVis: "glvis -np <np> -m mesh -g sol_*".
{
ostringstream mesh_name, u_name, p_name;
mesh_name << "mesh." << setfill('0') << setw(6) << myid;
u_name << "sol_u." << setfill('0') << setw(6) << myid;
p_name << "sol_p." << setfill('0') << setw(6) << myid;
ofstream mesh_ofs(mesh_name.str().c_str());
mesh_ofs.precision(8);
pmesh->Print(mesh_ofs);
ofstream u_ofs(u_name.str().c_str());
u_ofs.precision(8);
u.Save(u_ofs);
ofstream p_ofs(p_name.str().c_str());
p_ofs.precision(8);
p.Save(p_ofs);
}
// 16. Save data in the VisIt format
VisItDataCollection visit_dc("Example5-Parallel", pmesh);
visit_dc.RegisterField("velocity", &u);
visit_dc.RegisterField("pressure", &p);
visit_dc.SetFormat(!par_format ?
DataCollection::SERIAL_FORMAT :
DataCollection::PARALLEL_FORMAT);
visit_dc.Save();
// 17. Save data in the ParaView format
ParaViewDataCollection paraview_dc("Example5P", pmesh);
paraview_dc.SetPrefixPath("ParaView");
paraview_dc.SetLevelsOfDetail(order);
paraview_dc.SetDataFormat(VTKFormat::BINARY);
paraview_dc.SetHighOrderOutput(true);
paraview_dc.SetCycle(0);
paraview_dc.SetTime(0.0); // set the time
paraview_dc.RegisterField("velocity",&u);
paraview_dc.RegisterField("pressure",&p);
paraview_dc.Save();
// 18. Optionally output a BP (binary pack) file using ADIOS2. This can be
// visualized with the ParaView VTX reader.
#ifdef MFEM_USE_ADIOS2
if (adios2)
{
std::string postfix(mesh_file);
postfix.erase(0, std::string("../data/").size() );
postfix += "_o" + std::to_string(order);
const std::string collection_name = "ex5-p_" + postfix + ".bp";
ADIOS2DataCollection adios2_dc(MPI_COMM_WORLD, collection_name, pmesh);
adios2_dc.SetLevelsOfDetail(1);
adios2_dc.SetCycle(1);
adios2_dc.SetTime(0.0);
adios2_dc.RegisterField("velocity",&u);
adios2_dc.RegisterField("pressure",&p);
adios2_dc.Save();
}
#endif
// 19. Send the solution by socket to a GLVis server.
if (visualization)
{
char vishost[] = "localhost";
int visport = 19916;
socketstream u_sock(vishost, visport);
u_sock << "parallel " << num_procs << " " << myid << "\n";
u_sock.precision(8);
u_sock << "solution\n" << *pmesh << u << "window_title 'Velocity'"
<< endl;
u_sock << "keys Rljvvvvvmmc" << endl;
// Make sure all ranks have sent their 'u' solution before initiating
// another set of GLVis connections (one from each rank):
MPI_Barrier(pmesh->GetComm());
socketstream p_sock(vishost, visport);
p_sock << "parallel " << num_procs << " " << myid << "\n";
p_sock.precision(8);
p_sock << "solution\n" << *pmesh << p << "window_title 'Pressure'"
<< endl;
p_sock << "keys Rljmmc" << endl;
}
// 20. Free the used memory.
delete fform;
delete gform;
delete darcy;
delete W_space;
delete R_space;
delete trace_space;
delete W_coll;
delete R_coll;
delete trace_coll;
delete pmesh;
return 0;
}
void uFun_ex(const Vector & x, Vector & u)
{
real_t xi(x(0));
real_t yi(x(1));
real_t zi(0.0);
if (x.Size() == 3)
{
zi = x(2);
}
u(0) = - exp(xi)*sin(yi)*cos(zi);
u(1) = - exp(xi)*cos(yi)*cos(zi);
if (x.Size() == 3)
{
u(2) = exp(xi)*sin(yi)*sin(zi);
}
}
// Change if needed
real_t pFun_ex(const Vector & x)
{
real_t xi(x(0));
real_t yi(x(1));
real_t zi(0.0);
if (x.Size() == 3)
{
zi = x(2);
}
return exp(xi)*sin(yi)*cos(zi);
}
void fFun(const Vector & x, Vector & f)
{
f = 0.0;
}
real_t gFun(const Vector & x)
{
if (x.Size() == 3)
{
return -pFun_ex(x);
}
else
{
return 0;
}
}
real_t f_natural(const Vector & x)
{
return (-pFun_ex(x));
}
File diff suppressed because it is too large Load Diff
+13 -10
View File
@@ -20,10 +20,10 @@ CONFIG_MK = $(or $(wildcard $(MFEM_BUILD_DIR)/config/config.mk),\
MFEM_LIB_FILE = mfem_is_not_built
-include $(CONFIG_MK)
SEQ_EXAMPLES = ex0 ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 ex14 ex15 ex16 \
SEQ_EXAMPLES = ex0 ex1 ex2 ex3 ex4 ex5 ex5-max ex5-hdg ex5-heat ex6 ex7 ex8 ex9 ex10 ex14 ex15 ex16 \
ex17 ex18 ex19 ex20 ex21 ex22 ex23 ex24 ex25 ex26 ex27 ex28 ex29 ex30 \
ex31 ex33 ex34 ex36 ex37 ex38 ex39 ex40
PAR_EXAMPLES = ex0p ex1p ex2p ex3p ex4p ex5p ex6p ex7p ex8p ex9p ex10p ex11p \
PAR_EXAMPLES = ex0p ex1p ex2p ex3p ex4p ex5p ex5p-hdg ex6p ex7p ex8p ex9p ex10p ex11p \
ex12p ex13p ex14p ex15p ex16p ex17p ex18p ex19p ex20p ex21p ex22p ex24p \
ex25p ex26p ex27p ex28p ex29p ex30p ex31p ex32p ex33p ex34p ex35p ex36p \
ex37p ex39p ex40p
@@ -80,10 +80,14 @@ SUBDIRS_TPRINT = $(addsuffix /test-print,$(SUBDIRS))
# Remove built-in rule
%: %.cpp
%.o: %.cpp
# Replace the default implicit rule for *.cpp files
%: $(SRC)%.cpp $(MFEM_LIB_FILE) $(CONFIG_MK)
$(MFEM_CXX) $(MFEM_FLAGS) $< -o $@ $(MFEM_LIBS)
%.o: $(SRC)%.cpp $(MFEM_LIB_FILE) $(CONFIG_MK)
$(MFEM_CXX) $(MFEM_FLAGS) $< -c -o $@ $(MFEM_LIBS)
%: $(SRC)%.o $(MFEM_LIB_FILE) $(CONFIG_MK)
$(MFEM_CXX) $(MFEM_FLAGS) $(filter %.o, $^) -o $@ $(MFEM_LIBS)
all: $(EXAMPLES) $(SUBDIRS_ALL)
@@ -94,6 +98,11 @@ $(SUBDIRS_TPRINT):
@$(MAKE) -C $(@D) $(@F)
# Additional dependencies
ex5-nguyen: darcyop.o
ex5p-nguyen: darcyop.o
ex5-plasma: darcyop.o
ex5-aniso: darcyop.o
ex5-scatter: coupledop.o
ex18: $(SRC)ex18.hpp
ex33: $(SRC)ex33.hpp
ex37: $(SRC)ex37.hpp
@@ -173,12 +182,6 @@ ex11p-test-cpardiso: ex11p
@$(call mfem-test,$<, $(RUN_MPI), MKL_CPARDISO example,--cpardiso)
test-par-YES: ex11p-test-cpardiso
endif
ifeq ($(MFEM_USE_CEED),YES)
ex1p-test-ceed: ex1p
@$(call mfem-test,$<, $(RUN_MPI),\
Parallel libCEED example,-d ceed-cpu -pa -a)
test-par-YES: ex1p-test-ceed
endif
# Testing: "test" target and mfem-test* variables are defined in config/test.mk
+2 -8
View File
@@ -16,16 +16,10 @@
// multi-physics applications.
//
// This particular example is only for serial runtimes.
// For non-conforming meshes please have a look at example
// "ex2p.cpp".
#include "example_utils.hpp"
#include "mfem.hpp"
#ifndef MFEM_USE_MOONOLITH
#error This example requires that MFEM is built with MFEM_USE_MOONOLITH=YES
#endif
using namespace mfem;
using namespace std;
@@ -221,8 +215,8 @@ int main(int argc, char *argv[])
mfem::out << "l2 error: src: " << src_err << ", dest: " << dest_err
<< std::endl;
plot(*src_mesh, src_fun, "source", 0);
plot(*dest_mesh, dest_fun, "destination", 1);
plot(*src_mesh, src_fun, "source");
plot(*dest_mesh, dest_fun, "destination");
}
}
else
+16 -54
View File
@@ -8,23 +8,18 @@
// mpirun -np 4 ex1p -s ../../data/inline-hex.mesh -d ../../data/inline-tet.mesh
//
// Description: This example code demonstrates the use of MFEM for transferring
// discrete fields from one conforming finite element mesh to another. The
// discrete fields from one finite element mesh to another. The
// meshes can be of arbitrary shape and completely unrelated with
// each other. This feature can be used for implementing immersed
// domain methods for fluid-structure interaction or general
// multi-physics applications.
//
// This particular example is for parallel runtimes. Vector FE is
// an experimental feature in parallel. For non-conforming meshes
// please have a look at example "ex2p.cpp".
// an experimental feature in parallel.
#include "example_utils.hpp"
#include "mfem.hpp"
#ifndef MFEM_USE_MOONOLITH
#error This example requires that MFEM is built with MFEM_USE_MOONOLITH=YES
#endif
using namespace mfem;
using namespace std;
@@ -55,8 +50,6 @@ int main(int argc, char *argv[])
int dest_fe_order = 1;
bool visualization = true;
bool use_vector_fe = false;
bool use_h1 = true;
bool use_vector_space = false;
bool verbose = false;
bool assemble_mass_and_coupling_together = true;
@@ -79,28 +72,14 @@ int main(int argc, char *argv[])
args.AddOption(&verbose, "-verb", "--verbose", "--no-verb", "--no-verbose",
"Enable/Disable verbose output");
args.AddOption(&use_vector_fe, "-vfe", "--use_vector_fe", "-no-vfe",
"--no-vector_fe",
"Use RT|ND vector finite elements (Experimental)");
args.AddOption(&use_vector_space, "-vfs", "--use_vector_space", "-no-vfs",
"--no-vector_space",
"Use Lagrange vector finite elements (Experimental)");
args.AddOption(&use_h1, "-h1", "--use-h1", "-nh1", "--no-h1",
"Use H1 collection");
"--no-vector_fe", "Use vector finite elements (Experimental)");
args.AddOption(&assemble_mass_and_coupling_together, "-act",
"--assemble_mass_and_coupling_together", "-no-act",
"--no-assemble_mass_and_coupling_together",
"Assemble mass and coupling operators together (better for "
"non-affine elements)");
"Assemble mass and coupling operators together (better for non-affine elements)");
args.Parse();
check_options(args);
if (use_vector_fe && use_vector_space)
{
mfem::err <<
"WARNING: use_vector_fe and use_vector_space options"
"are both true, ignoring use_vector_fe\n";
}
shared_ptr<Mesh> src_mesh, dest_mesh;
ifstream imesh;
@@ -190,30 +169,17 @@ int main(int argc, char *argv[])
}
else
{
if (use_h1)
{
src_fe_coll =
make_shared<H1_FECollection>(source_fe_order, src_mesh->Dimension());
dest_fe_coll =
make_shared<H1_FECollection>(dest_fe_order, dest_mesh->Dimension());
}
else
{
src_fe_coll =
make_shared<L2_FECollection>(source_fe_order, src_mesh->Dimension());
dest_fe_coll =
make_shared<L2_FECollection>(dest_fe_order, dest_mesh->Dimension());
}
src_fe_coll =
make_shared<L2_FECollection>(source_fe_order, src_mesh->Dimension());
dest_fe_coll =
make_shared<L2_FECollection>(dest_fe_order, dest_mesh->Dimension());
}
auto src_fe = make_shared<ParFiniteElementSpace>(
p_src_mesh.get(), src_fe_coll.get(),
use_vector_space ? src_mesh->Dimension() : 1);
auto src_fe =
make_shared<ParFiniteElementSpace>(p_src_mesh.get(), src_fe_coll.get());
auto dest_fe = make_shared<ParFiniteElementSpace>(
p_dest_mesh.get(), dest_fe_coll.get(),
use_vector_space ? dest_mesh->Dimension() : 1);
auto dest_fe =
make_shared<ParFiniteElementSpace>(p_dest_mesh.get(), dest_fe_coll.get());
ParGridFunction src_fun(src_fe.get());
@@ -223,7 +189,7 @@ int main(int argc, char *argv[])
// To be used with vector fe
VectorFunctionCoefficient vector_coeff(dim, &vector_fun);
if (use_vector_fe || use_vector_space)
if (use_vector_fe)
{
src_fun.ProjectCoefficient(vector_coeff);
src_fun.Update();
@@ -243,11 +209,7 @@ int main(int argc, char *argv[])
assemble_mass_and_coupling_together);
assembler.SetVerbose(verbose);
if (use_vector_space)
{
assembler.AddMortarIntegrator(make_shared<LagrangeVectorL2MortarIntegrator>());
}
else if (use_vector_fe)
if (use_vector_fe)
{
assembler.AddMortarIntegrator(make_shared<VectorL2MortarIntegrator>());
}
@@ -281,8 +243,8 @@ int main(int argc, char *argv[])
<< std::endl;
}
plot(*p_src_mesh, src_fun, "source", 0);
plot(*p_dest_mesh, dest_fun, "destination", 1);
plot(*p_src_mesh, src_fun, "source");
plot(*p_dest_mesh, dest_fun, "destination");
}
}
else
+2 -6
View File
@@ -20,10 +20,6 @@
#include "example_utils.hpp"
#include "mfem.hpp"
#ifndef MFEM_USE_MOONOLITH
#error This example requires that MFEM is built with MFEM_USE_MOONOLITH=YES
#endif
using namespace mfem;
using namespace std;
@@ -190,8 +186,8 @@ int main(int argc, char *argv[])
<< std::endl;
}
plot(*p_src_mesh, src_fun, "source", 0);
plot(*p_dest_mesh, dest_fun, "destination", 1);
plot(*p_src_mesh, src_fun, "source");
plot(*p_dest_mesh, dest_fun, "destination");
}
}
else
+1 -15
View File
@@ -84,8 +84,7 @@ void vector_fun(const mfem::Vector &x, mfem::Vector &f)
f = n;
}
inline void plot(mfem::Mesh &mesh, mfem::GridFunction &x, std::string title,
const int plot_number = 0)
inline void plot(mfem::Mesh &mesh, mfem::GridFunction &x, std::string title)
{
using namespace std;
using namespace mfem;
@@ -104,18 +103,5 @@ inline void plot(mfem::Mesh &mesh, mfem::GridFunction &x, std::string title,
sol_sock.precision(8);
sol_sock << "solution\n" << mesh << x
<< "window_title '"<< title << "'\n" << flush;
sol_sock << "window_geometry ";
sol_sock << (plot_number * 600) << " " << 0 << " " << 600 << " " << 600 <<
"\n";
if (mesh.Dimension() == 2)
{
sol_sock << "keys jRmclA\n";
}
else
{
sol_sock << "keys rmclAa\n";
}
sol_sock << flush;
}
+117
View File
@@ -0,0 +1,117 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 0
--size-x 1
--size-y 1
--order 2
--discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--hybridization
--nonlinear
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.00966076s.
***********************************************************
dim(V) = 1800
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3360
***********************************************************
Assembly took 0.0169918s.
Preconditioner took 4.6463e-05s.
LBFGS iteration 0 : ||r|| = 1.46578
LBFGS iteration 1 : ||r|| = 2.01258, ||r||/||r_0|| = 1.37304
LBFGS iteration 2 : ||r|| = 2.41053, ||r||/||r_0|| = 1.64454
LBFGS iteration 3 : ||r|| = 4.48418, ||r||/||r_0|| = 3.05924
LBFGS iteration 4 : ||r|| = 2.44484, ||r||/||r_0|| = 1.66794
LBFGS iteration 5 : ||r|| = 0.996497, ||r||/||r_0|| = 0.679841
LBFGS iteration 6 : ||r|| = 0.913284, ||r||/||r_0|| = 0.62307
LBFGS iteration 7 : ||r|| = 1.03122, ||r||/||r_0|| = 0.703531
LBFGS iteration 8 : ||r|| = 2.21746, ||r||/||r_0|| = 1.51282
LBFGS iteration 9 : ||r|| = 0.769563, ||r||/||r_0|| = 0.525019
LBFGS iteration 10 : ||r|| = 0.607547, ||r||/||r_0|| = 0.414487
LBFGS iteration 11 : ||r|| = 0.759198, ||r||/||r_0|| = 0.517948
LBFGS iteration 12 : ||r|| = 1.45778, ||r||/||r_0|| = 0.994541
LBFGS iteration 13 : ||r|| = 0.563251, ||r||/||r_0|| = 0.384267
LBFGS iteration 14 : ||r|| = 0.428853, ||r||/||r_0|| = 0.292576
LBFGS iteration 15 : ||r|| = 0.441501, ||r||/||r_0|| = 0.301206
LBFGS iteration 16 : ||r|| = 1.38991, ||r||/||r_0|| = 0.948236
LBFGS iteration 17 : ||r|| = 0.272828, ||r||/||r_0|| = 0.186132
LBFGS iteration 18 : ||r|| = 0.165047, ||r||/||r_0|| = 0.1126
LBFGS iteration 19 : ||r|| = 0.151715, ||r||/||r_0|| = 0.103504
LBFGS iteration 20 : ||r|| = 0.331738, ||r||/||r_0|| = 0.226322
LBFGS iteration 21 : ||r|| = 0.106159, ||r||/||r_0|| = 0.0724251
LBFGS iteration 22 : ||r|| = 0.0594514, ||r||/||r_0|| = 0.0405595
LBFGS iteration 23 : ||r|| = 0.0596277, ||r||/||r_0|| = 0.0406798
LBFGS iteration 24 : ||r|| = 0.171595, ||r||/||r_0|| = 0.117067
LBFGS iteration 25 : ||r|| = 0.0533591, ||r||/||r_0|| = 0.0364032
LBFGS iteration 26 : ||r|| = 0.0273665, ||r||/||r_0|| = 0.0186703
LBFGS iteration 27 : ||r|| = 0.0191679, ||r||/||r_0|| = 0.013077
LBFGS iteration 28 : ||r|| = 0.0555099, ||r||/||r_0|| = 0.0378705
LBFGS iteration 29 : ||r|| = 0.0141599, ||r||/||r_0|| = 0.00966033
LBFGS iteration 30 : ||r|| = 0.0077165, ||r||/||r_0|| = 0.00526443
LBFGS iteration 31 : ||r|| = 0.00710641, ||r||/||r_0|| = 0.00484821
LBFGS iteration 32 : ||r|| = 0.00727829, ||r||/||r_0|| = 0.00496547
LBFGS iteration 33 : ||r|| = 0.0154916, ||r||/||r_0|| = 0.0105689
LBFGS iteration 34 : ||r|| = 0.00322952, ||r||/||r_0|| = 0.00220328
LBFGS iteration 35 : ||r|| = 0.00266012, ||r||/||r_0|| = 0.00181482
LBFGS iteration 36 : ||r|| = 0.0029587, ||r||/||r_0|| = 0.00201852
LBFGS iteration 37 : ||r|| = 0.00287213, ||r||/||r_0|| = 0.00195945
LBFGS iteration 38 : ||r|| = 0.00598566, ||r||/||r_0|| = 0.0040836
LBFGS iteration 39 : ||r|| = 0.000777973, ||r||/||r_0|| = 0.000530757
LBFGS iteration 40 : ||r|| = 0.000622731, ||r||/||r_0|| = 0.000424846
LBFGS iteration 41 : ||r|| = 0.00101354, ||r||/||r_0|| = 0.00069147
LBFGS iteration 42 : ||r|| = 0.000778935, ||r||/||r_0|| = 0.000531413
LBFGS iteration 43 : ||r|| = 0.000322145, ||r||/||r_0|| = 0.000219777
LBFGS iteration 44 : ||r|| = 0.000233689, ||r||/||r_0|| = 0.000159429
LBFGS iteration 45 : ||r|| = 0.000266598, ||r||/||r_0|| = 0.000181881
LBFGS iteration 46 : ||r|| = 0.000378973, ||r||/||r_0|| = 0.000258547
LBFGS iteration 47 : ||r|| = 0.000330508, ||r||/||r_0|| = 0.000225483
LBFGS iteration 48 : ||r|| = 0.000147423, ||r||/||r_0|| = 0.000100576
LBFGS iteration 49 : ||r|| = 0.000150309, ||r||/||r_0|| = 0.000102545
LBFGS iteration 50 : ||r|| = 0.000206405, ||r||/||r_0|| = 0.000140816
LBFGS iteration 51 : ||r|| = 0.000214436, ||r||/||r_0|| = 0.000146295
LBFGS iteration 52 : ||r|| = 0.000140579, ||r||/||r_0|| = 9.59076e-05
LBFGS iteration 53 : ||r|| = 0.000143331, ||r||/||r_0|| = 9.77847e-05
LBFGS iteration 54 : ||r|| = 0.000184619, ||r||/||r_0|| = 0.000125952
LBFGS iteration 55 : ||r|| = 8.66031e-05, ||r||/||r_0|| = 5.90832e-05
LBFGS iteration 56 : ||r|| = 7.3517e-05, ||r||/||r_0|| = 5.01555e-05
LBFGS iteration 57 : ||r|| = 8.2379e-05, ||r||/||r_0|| = 5.62014e-05
LBFGS iteration 58 : ||r|| = 0.000205661, ||r||/||r_0|| = 0.000140308
LBFGS iteration 59 : ||r|| = 6.82689e-05, ||r||/||r_0|| = 4.65751e-05
LBFGS iteration 60 : ||r|| = 4.65785e-05, ||r||/||r_0|| = 3.17773e-05
LBFGS iteration 61 : ||r|| = 5.19221e-05, ||r||/||r_0|| = 3.54229e-05
LBFGS iteration 62 : ||r|| = 0.000121276, ||r||/||r_0|| = 8.27379e-05
LBFGS iteration 63 : ||r|| = 5.40902e-05, ||r||/||r_0|| = 3.69019e-05
LBFGS iteration 64 : ||r|| = 3.67227e-05, ||r||/||r_0|| = 2.50533e-05
LBFGS iteration 65 : ||r|| = 4.11639e-05, ||r||/||r_0|| = 2.80833e-05
LBFGS iteration 66 : ||r|| = 3.78694e-05, ||r||/||r_0|| = 2.58357e-05
LBFGS iteration 67 : ||r|| = 0.000192235, ||r||/||r_0|| = 0.000131148
LBFGS iteration 68 : ||r|| = 1.88491e-05, ||r||/||r_0|| = 1.28594e-05
LBFGS iteration 69 : ||r|| = 1.37588e-05, ||r||/||r_0|| = 9.38668e-06
LBFGS iteration 70 : ||r|| = 8.26133e-06, ||r||/||r_0|| = 5.63613e-06
LBFGS iteration 71 : ||r|| = 1.65205e-05, ||r||/||r_0|| = 1.12708e-05
LBFGS iteration 72 : ||r|| = 3.0717e-06, ||r||/||r_0|| = 2.09561e-06
LBFGS iteration 73 : ||r|| = 1.85004e-06, ||r||/||r_0|| = 1.26215e-06
LBFGS iteration 74 : ||r|| = 1.77343e-06, ||r||/||r_0|| = 1.20989e-06
LBFGS iteration 75 : ||r|| = 2.89294e-06, ||r||/||r_0|| = 1.97365e-06
LBFGS iteration 76 : ||r|| = 1.11005e-06, ||r||/||r_0|| = 7.57313e-07
LBFGS/Newton+GMRES converged in 76 iterations with a residual norm of 1.11005e-06.
solver took 3.89622s.
|| q_h - q_ex || / || q_ex || = 0.000247123
|| t_h - t_ex || / || t_ex || = 0.000241696
@@ -0,0 +1,49 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--discontinuous
--no-broken-RT
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-reduction
--hybridization
--nonlinear
--no-nonlinear-convection
--no-nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 3
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.014452s.
***********************************************************
dim(V) = 1800
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3360
***********************************************************
Assembly took 0.00999689s.
Preconditioner took 2.2244e-05s.
Newton iteration 0 : ||r|| = 1.46578
Newton iteration 1 : ||r|| = 6.21893e-08, ||r||/||r_0|| = 4.24274e-08
Newton+GMRES+GS/Newton+GMRES converged in 1 iterations with a residual norm of 6.21893e-08.
solver took 0.306186s.
|| q_h - q_ex || / || q_ex || = 0.000247131
|| t_h - t_ex || / || t_ex || = 0.000241709
@@ -0,0 +1,124 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--discontinuous
--no-broken-RT
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-reduction
--hybridization
--nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 0
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.030215s.
***********************************************************
dim(V) = 1800
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3360
***********************************************************
Assembly took 0.00968131s.
Preconditioner took 6.1074e-05s.
LBFGS iteration 0 : ||r|| = 1.46578
LBFGS iteration 1 : ||r|| = 2.01258, ||r||/||r_0|| = 1.37304
LBFGS iteration 2 : ||r|| = 2.41053, ||r||/||r_0|| = 1.64454
LBFGS iteration 3 : ||r|| = 4.48418, ||r||/||r_0|| = 3.05924
LBFGS iteration 4 : ||r|| = 2.44484, ||r||/||r_0|| = 1.66794
LBFGS iteration 5 : ||r|| = 0.996497, ||r||/||r_0|| = 0.679841
LBFGS iteration 6 : ||r|| = 0.913284, ||r||/||r_0|| = 0.62307
LBFGS iteration 7 : ||r|| = 1.03122, ||r||/||r_0|| = 0.703531
LBFGS iteration 8 : ||r|| = 2.21745, ||r||/||r_0|| = 1.51281
LBFGS iteration 9 : ||r|| = 0.769554, ||r||/||r_0|| = 0.525013
LBFGS iteration 10 : ||r|| = 0.607543, ||r||/||r_0|| = 0.414484
LBFGS iteration 11 : ||r|| = 0.759138, ||r||/||r_0|| = 0.517907
LBFGS iteration 12 : ||r|| = 1.4581, ||r||/||r_0|| = 0.994757
LBFGS iteration 13 : ||r|| = 0.563222, ||r||/||r_0|| = 0.384247
LBFGS iteration 14 : ||r|| = 0.428817, ||r||/||r_0|| = 0.292552
LBFGS iteration 15 : ||r|| = 0.44147, ||r||/||r_0|| = 0.301185
LBFGS iteration 16 : ||r|| = 1.39, ||r||/||r_0|| = 0.9483
LBFGS iteration 17 : ||r|| = 0.272891, ||r||/||r_0|| = 0.186175
LBFGS iteration 18 : ||r|| = 0.165054, ||r||/||r_0|| = 0.112605
LBFGS iteration 19 : ||r|| = 0.151718, ||r||/||r_0|| = 0.103506
LBFGS iteration 20 : ||r|| = 0.331585, ||r||/||r_0|| = 0.226217
LBFGS iteration 21 : ||r|| = 0.106143, ||r||/||r_0|| = 0.0724142
LBFGS iteration 22 : ||r|| = 0.0594506, ||r||/||r_0|| = 0.040559
LBFGS iteration 23 : ||r|| = 0.0596312, ||r||/||r_0|| = 0.0406822
LBFGS iteration 24 : ||r|| = 0.171728, ||r||/||r_0|| = 0.117158
LBFGS iteration 25 : ||r|| = 0.0533533, ||r||/||r_0|| = 0.0363992
LBFGS iteration 26 : ||r|| = 0.0273829, ||r||/||r_0|| = 0.0186814
LBFGS iteration 27 : ||r|| = 0.0191745, ||r||/||r_0|| = 0.0130814
LBFGS iteration 28 : ||r|| = 0.0553769, ||r||/||r_0|| = 0.0377798
LBFGS iteration 29 : ||r|| = 0.0141317, ||r||/||r_0|| = 0.00964105
LBFGS iteration 30 : ||r|| = 0.00770544, ||r||/||r_0|| = 0.00525689
LBFGS iteration 31 : ||r|| = 0.00709767, ||r||/||r_0|| = 0.00484225
LBFGS iteration 32 : ||r|| = 0.00732886, ||r||/||r_0|| = 0.00499997
LBFGS iteration 33 : ||r|| = 0.0153653, ||r||/||r_0|| = 0.0104827
LBFGS iteration 34 : ||r|| = 0.00322618, ||r||/||r_0|| = 0.002201
LBFGS iteration 35 : ||r|| = 0.00265732, ||r||/||r_0|| = 0.0018129
LBFGS iteration 36 : ||r|| = 0.00296415, ||r||/||r_0|| = 0.00202224
LBFGS iteration 37 : ||r|| = 0.00285425, ||r||/||r_0|| = 0.00194726
LBFGS iteration 38 : ||r|| = 0.00619247, ||r||/||r_0|| = 0.00422469
LBFGS iteration 39 : ||r|| = 0.000777538, ||r||/||r_0|| = 0.00053046
LBFGS iteration 40 : ||r|| = 0.000623058, ||r||/||r_0|| = 0.000425069
LBFGS iteration 41 : ||r|| = 0.00101854, ||r||/||r_0|| = 0.000694876
LBFGS iteration 42 : ||r|| = 0.000787498, ||r||/||r_0|| = 0.000537255
LBFGS iteration 43 : ||r|| = 0.000321394, ||r||/||r_0|| = 0.000219265
LBFGS iteration 44 : ||r|| = 0.000233725, ||r||/||r_0|| = 0.000159455
LBFGS iteration 45 : ||r|| = 0.000266519, ||r||/||r_0|| = 0.000181828
LBFGS iteration 46 : ||r|| = 0.000373324, ||r||/||r_0|| = 0.000254693
LBFGS iteration 47 : ||r|| = 0.000342686, ||r||/||r_0|| = 0.000233791
LBFGS iteration 48 : ||r|| = 0.00014717, ||r||/||r_0|| = 0.000100404
LBFGS iteration 49 : ||r|| = 0.000149241, ||r||/||r_0|| = 0.000101817
LBFGS iteration 50 : ||r|| = 0.000200512, ||r||/||r_0|| = 0.000136795
LBFGS iteration 51 : ||r|| = 0.000247279, ||r||/||r_0|| = 0.000168701
LBFGS iteration 52 : ||r|| = 0.000138893, ||r||/||r_0|| = 9.47569e-05
LBFGS iteration 53 : ||r|| = 0.000129112, ||r||/||r_0|| = 8.80841e-05
LBFGS iteration 54 : ||r|| = 0.000175704, ||r||/||r_0|| = 0.000119871
LBFGS iteration 55 : ||r|| = 7.87371e-05, ||r||/||r_0|| = 5.37169e-05
LBFGS iteration 56 : ||r|| = 7.30606e-05, ||r||/||r_0|| = 4.98442e-05
LBFGS iteration 57 : ||r|| = 9.5593e-05, ||r||/||r_0|| = 6.52164e-05
LBFGS iteration 58 : ||r|| = 0.000134289, ||r||/||r_0|| = 9.16163e-05
LBFGS iteration 59 : ||r|| = 6.66397e-05, ||r||/||r_0|| = 4.54636e-05
LBFGS iteration 60 : ||r|| = 5.38465e-05, ||r||/||r_0|| = 3.67357e-05
LBFGS iteration 61 : ||r|| = 5.8085e-05, ||r||/||r_0|| = 3.96274e-05
LBFGS iteration 62 : ||r|| = 8.23697e-05, ||r||/||r_0|| = 5.61951e-05
LBFGS iteration 63 : ||r|| = 4.59471e-05, ||r||/||r_0|| = 3.13465e-05
LBFGS iteration 64 : ||r|| = 4.2169e-05, ||r||/||r_0|| = 2.8769e-05
LBFGS iteration 65 : ||r|| = 4.36386e-05, ||r||/||r_0|| = 2.97715e-05
LBFGS iteration 66 : ||r|| = 0.000102276, ||r||/||r_0|| = 6.97757e-05
LBFGS iteration 67 : ||r|| = 2.55284e-05, ||r||/||r_0|| = 1.74162e-05
LBFGS iteration 68 : ||r|| = 1.74439e-05, ||r||/||r_0|| = 1.19008e-05
LBFGS iteration 69 : ||r|| = 1.55022e-05, ||r||/||r_0|| = 1.05761e-05
LBFGS iteration 70 : ||r|| = 2.78517e-05, ||r||/||r_0|| = 1.90012e-05
LBFGS iteration 71 : ||r|| = 8.23786e-06, ||r||/||r_0|| = 5.62012e-06
LBFGS iteration 72 : ||r|| = 3.15803e-06, ||r||/||r_0|| = 2.1545e-06
LBFGS iteration 73 : ||r|| = 2.32222e-06, ||r||/||r_0|| = 1.58429e-06
LBFGS iteration 74 : ||r|| = 2.23543e-06, ||r||/||r_0|| = 1.52508e-06
LBFGS iteration 75 : ||r|| = 6.48079e-06, ||r||/||r_0|| = 4.42139e-06
LBFGS iteration 76 : ||r|| = 1.24673e-06, ||r||/||r_0|| = 8.50556e-07
LBFGS/Newton+GMRES converged in 76 iterations with a residual norm of 1.24673e-06.
solver took 6.42006s.
|| q_h - q_ex || / || q_ex || = 0.000247126
|| t_h - t_ex || / || t_ex || = 0.0002417
@@ -0,0 +1,49 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--discontinuous
--no-broken-RT
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-reduction
--hybridization
--nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 3
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.00849795s.
***********************************************************
dim(V) = 1800
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3360
***********************************************************
Assembly took 0.0105149s.
Preconditioner took 2.9135e-05s.
Newton iteration 0 : ||r|| = 1.46578
Newton iteration 1 : ||r|| = 6.21638e-08, ||r||/||r_0|| = 4.241e-08
Newton+GMRES+GS/Newton+GMRES converged in 1 iterations with a residual norm of 6.21638e-08.
solver took 0.353555s.
|| q_h - q_ex || / || q_ex || = 0.000247131
|| t_h - t_ex || / || t_ex || = 0.000241709
+124
View File
@@ -0,0 +1,124 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--discontinuous
--no-broken-RT
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-reduction
--hybridization
--no-nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 0
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.0070498s.
***********************************************************
dim(V) = 1800
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3360
***********************************************************
Assembly took 0.0383239s.
Preconditioner took 5.6454e-05s.
LBFGS iteration 0 : ||r|| = 1.46578
LBFGS iteration 1 : ||r|| = 2.01258, ||r||/||r_0|| = 1.37304
LBFGS iteration 2 : ||r|| = 2.41053, ||r||/||r_0|| = 1.64454
LBFGS iteration 3 : ||r|| = 4.48418, ||r||/||r_0|| = 3.05924
LBFGS iteration 4 : ||r|| = 2.44484, ||r||/||r_0|| = 1.66794
LBFGS iteration 5 : ||r|| = 0.996497, ||r||/||r_0|| = 0.679841
LBFGS iteration 6 : ||r|| = 0.913284, ||r||/||r_0|| = 0.62307
LBFGS iteration 7 : ||r|| = 1.03122, ||r||/||r_0|| = 0.703531
LBFGS iteration 8 : ||r|| = 2.21745, ||r||/||r_0|| = 1.51281
LBFGS iteration 9 : ||r|| = 0.769554, ||r||/||r_0|| = 0.525013
LBFGS iteration 10 : ||r|| = 0.607543, ||r||/||r_0|| = 0.414484
LBFGS iteration 11 : ||r|| = 0.759138, ||r||/||r_0|| = 0.517907
LBFGS iteration 12 : ||r|| = 1.4581, ||r||/||r_0|| = 0.994757
LBFGS iteration 13 : ||r|| = 0.563222, ||r||/||r_0|| = 0.384247
LBFGS iteration 14 : ||r|| = 0.428817, ||r||/||r_0|| = 0.292552
LBFGS iteration 15 : ||r|| = 0.44147, ||r||/||r_0|| = 0.301185
LBFGS iteration 16 : ||r|| = 1.39, ||r||/||r_0|| = 0.9483
LBFGS iteration 17 : ||r|| = 0.272891, ||r||/||r_0|| = 0.186175
LBFGS iteration 18 : ||r|| = 0.165054, ||r||/||r_0|| = 0.112605
LBFGS iteration 19 : ||r|| = 0.151718, ||r||/||r_0|| = 0.103506
LBFGS iteration 20 : ||r|| = 0.331585, ||r||/||r_0|| = 0.226217
LBFGS iteration 21 : ||r|| = 0.106143, ||r||/||r_0|| = 0.0724142
LBFGS iteration 22 : ||r|| = 0.0594506, ||r||/||r_0|| = 0.040559
LBFGS iteration 23 : ||r|| = 0.0596312, ||r||/||r_0|| = 0.0406822
LBFGS iteration 24 : ||r|| = 0.171728, ||r||/||r_0|| = 0.117158
LBFGS iteration 25 : ||r|| = 0.0533533, ||r||/||r_0|| = 0.0363992
LBFGS iteration 26 : ||r|| = 0.0273829, ||r||/||r_0|| = 0.0186814
LBFGS iteration 27 : ||r|| = 0.0191745, ||r||/||r_0|| = 0.0130814
LBFGS iteration 28 : ||r|| = 0.0553769, ||r||/||r_0|| = 0.0377798
LBFGS iteration 29 : ||r|| = 0.0141317, ||r||/||r_0|| = 0.00964106
LBFGS iteration 30 : ||r|| = 0.00770544, ||r||/||r_0|| = 0.00525689
LBFGS iteration 31 : ||r|| = 0.00709767, ||r||/||r_0|| = 0.00484225
LBFGS iteration 32 : ||r|| = 0.00732886, ||r||/||r_0|| = 0.00499997
LBFGS iteration 33 : ||r|| = 0.0153653, ||r||/||r_0|| = 0.0104827
LBFGS iteration 34 : ||r|| = 0.00322618, ||r||/||r_0|| = 0.002201
LBFGS iteration 35 : ||r|| = 0.00265732, ||r||/||r_0|| = 0.00181291
LBFGS iteration 36 : ||r|| = 0.00296415, ||r||/||r_0|| = 0.00202224
LBFGS iteration 37 : ||r|| = 0.00285425, ||r||/||r_0|| = 0.00194726
LBFGS iteration 38 : ||r|| = 0.00619246, ||r||/||r_0|| = 0.00422468
LBFGS iteration 39 : ||r|| = 0.000777538, ||r||/||r_0|| = 0.00053046
LBFGS iteration 40 : ||r|| = 0.000623058, ||r||/||r_0|| = 0.000425069
LBFGS iteration 41 : ||r|| = 0.00101854, ||r||/||r_0|| = 0.000694876
LBFGS iteration 42 : ||r|| = 0.000787498, ||r||/||r_0|| = 0.000537255
LBFGS iteration 43 : ||r|| = 0.000321394, ||r||/||r_0|| = 0.000219265
LBFGS iteration 44 : ||r|| = 0.000233725, ||r||/||r_0|| = 0.000159455
LBFGS iteration 45 : ||r|| = 0.000266519, ||r||/||r_0|| = 0.000181828
LBFGS iteration 46 : ||r|| = 0.000373324, ||r||/||r_0|| = 0.000254693
LBFGS iteration 47 : ||r|| = 0.000342685, ||r||/||r_0|| = 0.00023379
LBFGS iteration 48 : ||r|| = 0.000147171, ||r||/||r_0|| = 0.000100404
LBFGS iteration 49 : ||r|| = 0.000149241, ||r||/||r_0|| = 0.000101817
LBFGS iteration 50 : ||r|| = 0.000200512, ||r||/||r_0|| = 0.000136796
LBFGS iteration 51 : ||r|| = 0.000247277, ||r||/||r_0|| = 0.0001687
LBFGS iteration 52 : ||r|| = 0.000138893, ||r||/||r_0|| = 9.4757e-05
LBFGS iteration 53 : ||r|| = 0.000129112, ||r||/||r_0|| = 8.80844e-05
LBFGS iteration 54 : ||r|| = 0.000175709, ||r||/||r_0|| = 0.000119874
LBFGS iteration 55 : ||r|| = 7.87381e-05, ||r||/||r_0|| = 5.37175e-05
LBFGS iteration 56 : ||r|| = 7.30614e-05, ||r||/||r_0|| = 4.98447e-05
LBFGS iteration 57 : ||r|| = 9.55919e-05, ||r||/||r_0|| = 6.52157e-05
LBFGS iteration 58 : ||r|| = 0.000134287, ||r||/||r_0|| = 9.16148e-05
LBFGS iteration 59 : ||r|| = 6.66417e-05, ||r||/||r_0|| = 4.5465e-05
LBFGS iteration 60 : ||r|| = 5.38494e-05, ||r||/||r_0|| = 3.67377e-05
LBFGS iteration 61 : ||r|| = 5.80937e-05, ||r||/||r_0|| = 3.96333e-05
LBFGS iteration 62 : ||r|| = 8.22887e-05, ||r||/||r_0|| = 5.61399e-05
LBFGS iteration 63 : ||r|| = 4.59653e-05, ||r||/||r_0|| = 3.1359e-05
LBFGS iteration 64 : ||r|| = 4.21774e-05, ||r||/||r_0|| = 2.87747e-05
LBFGS iteration 65 : ||r|| = 4.36417e-05, ||r||/||r_0|| = 2.97737e-05
LBFGS iteration 66 : ||r|| = 0.000102056, ||r||/||r_0|| = 6.96257e-05
LBFGS iteration 67 : ||r|| = 2.55212e-05, ||r||/||r_0|| = 1.74114e-05
LBFGS iteration 68 : ||r|| = 1.74447e-05, ||r||/||r_0|| = 1.19013e-05
LBFGS iteration 69 : ||r|| = 1.55053e-05, ||r||/||r_0|| = 1.05782e-05
LBFGS iteration 70 : ||r|| = 2.81845e-05, ||r||/||r_0|| = 1.92283e-05
LBFGS iteration 71 : ||r|| = 8.05057e-06, ||r||/||r_0|| = 5.49234e-06
LBFGS iteration 72 : ||r|| = 3.16352e-06, ||r||/||r_0|| = 2.15825e-06
LBFGS iteration 73 : ||r|| = 2.31988e-06, ||r||/||r_0|| = 1.58269e-06
LBFGS iteration 74 : ||r|| = 2.24328e-06, ||r||/||r_0|| = 1.53043e-06
LBFGS iteration 75 : ||r|| = 6.49278e-06, ||r||/||r_0|| = 4.42957e-06
LBFGS iteration 76 : ||r|| = 1.24208e-06, ||r||/||r_0|| = 8.47383e-07
LBFGS/Newton+GMRES converged in 76 iterations with a residual norm of 1.24208e-06.
solver took 3.23983s.
|| q_h - q_ex || / || q_ex || = 0.000247126
|| t_h - t_ex || / || t_ex || = 0.0002417
@@ -0,0 +1,49 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--discontinuous
--no-broken-RT
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-reduction
--hybridization
--no-nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 3
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.00826646s.
***********************************************************
dim(V) = 1800
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3360
***********************************************************
Assembly took 0.055207s.
Preconditioner took 4.3616e-05s.
Newton iteration 0 : ||r|| = 1.46578
Newton iteration 1 : ||r|| = 6.23817e-08, ||r||/||r_0|| = 4.25587e-08
Newton+GMRES+GS/Newton+GMRES converged in 1 iterations with a residual norm of 6.23817e-08.
solver took 0.338429s.
|| q_h - q_ex || / || q_ex || = 0.000247131
|| t_h - t_ex || / || t_ex || = 0.000241709
+169
View File
@@ -0,0 +1,169 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--no-discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-reduction
--hybridization
--nonlinear
--no-nonlinear-convection
--no-nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 0
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.0174704s.
***********************************************************
dim(V) = 1860
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3420
***********************************************************
Assembly took 0.0193046s.
Preconditioner took 6.1853e-05s.
LBFGS iteration 0 : ||r|| = 1.60422
LBFGS iteration 1 : ||r|| = 4.04305, ||r||/||r_0|| = 2.52026
LBFGS iteration 2 : ||r|| = 2.27103, ||r||/||r_0|| = 1.41566
LBFGS iteration 3 : ||r|| = 2.86497, ||r||/||r_0|| = 1.7859
LBFGS iteration 4 : ||r|| = 8.10595, ||r||/||r_0|| = 5.0529
LBFGS iteration 5 : ||r|| = 8.73464, ||r||/||r_0|| = 5.4448
LBFGS iteration 6 : ||r|| = 1.87803, ||r||/||r_0|| = 1.17069
LBFGS iteration 7 : ||r|| = 1.07044, ||r||/||r_0|| = 0.667268
LBFGS iteration 8 : ||r|| = 1.19802, ||r||/||r_0|| = 0.746794
LBFGS iteration 9 : ||r|| = 2.05643, ||r||/||r_0|| = 1.28189
LBFGS iteration 10 : ||r|| = 1.71473, ||r||/||r_0|| = 1.06889
LBFGS iteration 11 : ||r|| = 1.80177, ||r||/||r_0|| = 1.12315
LBFGS iteration 12 : ||r|| = 2.94979, ||r||/||r_0|| = 1.83878
LBFGS iteration 13 : ||r|| = 0.788424, ||r||/||r_0|| = 0.49147
LBFGS iteration 14 : ||r|| = 0.688495, ||r||/||r_0|| = 0.429178
LBFGS iteration 15 : ||r|| = 1.15113, ||r||/||r_0|| = 0.717567
LBFGS iteration 16 : ||r|| = 1.20461, ||r||/||r_0|| = 0.750902
LBFGS iteration 17 : ||r|| = 4.95942, ||r||/||r_0|| = 3.09149
LBFGS iteration 18 : ||r|| = 0.596949, ||r||/||r_0|| = 0.372113
LBFGS iteration 19 : ||r|| = 0.467761, ||r||/||r_0|| = 0.291582
LBFGS iteration 20 : ||r|| = 0.71786, ||r||/||r_0|| = 0.447483
LBFGS iteration 21 : ||r|| = 0.836852, ||r||/||r_0|| = 0.521658
LBFGS iteration 22 : ||r|| = 2.59644, ||r||/||r_0|| = 1.61851
LBFGS iteration 23 : ||r|| = 0.388821, ||r||/||r_0|| = 0.242374
LBFGS iteration 24 : ||r|| = 0.234827, ||r||/||r_0|| = 0.146381
LBFGS iteration 25 : ||r|| = 0.263661, ||r||/||r_0|| = 0.164355
LBFGS iteration 26 : ||r|| = 0.277796, ||r||/||r_0|| = 0.173166
LBFGS iteration 27 : ||r|| = 0.975136, ||r||/||r_0|| = 0.607858
LBFGS iteration 28 : ||r|| = 0.128984, ||r||/||r_0|| = 0.0804028
LBFGS iteration 29 : ||r|| = 0.0994523, ||r||/||r_0|| = 0.0619943
LBFGS iteration 30 : ||r|| = 0.102656, ||r||/||r_0|| = 0.0639912
LBFGS iteration 31 : ||r|| = 0.430616, ||r||/||r_0|| = 0.268427
LBFGS iteration 32 : ||r|| = 0.107659, ||r||/||r_0|| = 0.06711
LBFGS iteration 33 : ||r|| = 0.0659709, ||r||/||r_0|| = 0.0411234
LBFGS iteration 34 : ||r|| = 0.108932, ||r||/||r_0|| = 0.0679038
LBFGS iteration 35 : ||r|| = 0.10333, ||r||/||r_0|| = 0.0644116
LBFGS iteration 36 : ||r|| = 0.393613, ||r||/||r_0|| = 0.245362
LBFGS iteration 37 : ||r|| = 0.044456, ||r||/||r_0|| = 0.027712
LBFGS iteration 38 : ||r|| = 0.0293365, ||r||/||r_0|| = 0.0182871
LBFGS iteration 39 : ||r|| = 0.0325774, ||r||/||r_0|| = 0.0203074
LBFGS iteration 40 : ||r|| = 0.0383684, ||r||/||r_0|| = 0.0239172
LBFGS iteration 41 : ||r|| = 0.0935856, ||r||/||r_0|| = 0.0583372
LBFGS iteration 42 : ||r|| = 0.0181591, ||r||/||r_0|| = 0.0113196
LBFGS iteration 43 : ||r|| = 0.0101241, ||r||/||r_0|| = 0.0063109
LBFGS iteration 44 : ||r|| = 0.0103064, ||r||/||r_0|| = 0.00642455
LBFGS iteration 45 : ||r|| = 0.0136856, ||r||/||r_0|| = 0.00853103
LBFGS iteration 46 : ||r|| = 0.0224226, ||r||/||r_0|| = 0.0139773
LBFGS iteration 47 : ||r|| = 0.0121399, ||r||/||r_0|| = 0.00756747
LBFGS iteration 48 : ||r|| = 0.00565715, ||r||/||r_0|| = 0.00352643
LBFGS iteration 49 : ||r|| = 0.00519774, ||r||/||r_0|| = 0.00324005
LBFGS iteration 50 : ||r|| = 0.00683834, ||r||/||r_0|| = 0.00426273
LBFGS iteration 51 : ||r|| = 0.0102297, ||r||/||r_0|| = 0.00637677
LBFGS iteration 52 : ||r|| = 0.0178293, ||r||/||r_0|| = 0.011114
LBFGS iteration 53 : ||r|| = 0.00410073, ||r||/||r_0|| = 0.00255622
LBFGS iteration 54 : ||r|| = 0.00214889, ||r||/||r_0|| = 0.00133952
LBFGS iteration 55 : ||r|| = 0.00179143, ||r||/||r_0|| = 0.0011167
LBFGS iteration 56 : ||r|| = 0.00228298, ||r||/||r_0|| = 0.00142311
LBFGS iteration 57 : ||r|| = 0.00331611, ||r||/||r_0|| = 0.00206712
LBFGS iteration 58 : ||r|| = 0.00287553, ||r||/||r_0|| = 0.00179248
LBFGS iteration 59 : ||r|| = 0.00174206, ||r||/||r_0|| = 0.00108593
LBFGS iteration 60 : ||r|| = 0.00197402, ||r||/||r_0|| = 0.00123052
LBFGS iteration 61 : ||r|| = 0.00271139, ||r||/||r_0|| = 0.00169016
LBFGS iteration 62 : ||r|| = 0.0033751, ||r||/||r_0|| = 0.00210389
LBFGS iteration 63 : ||r|| = 0.00675991, ||r||/||r_0|| = 0.00421384
LBFGS iteration 64 : ||r|| = 0.00199077, ||r||/||r_0|| = 0.00124096
LBFGS iteration 65 : ||r|| = 0.00103921, ||r||/||r_0|| = 0.000647797
LBFGS iteration 66 : ||r|| = 0.00130432, ||r||/||r_0|| = 0.000813055
LBFGS iteration 67 : ||r|| = 0.00173231, ||r||/||r_0|| = 0.00107985
LBFGS iteration 68 : ||r|| = 0.00255953, ||r||/||r_0|| = 0.0015955
LBFGS iteration 69 : ||r|| = 0.00178072, ||r||/||r_0|| = 0.00111003
LBFGS iteration 70 : ||r|| = 0.000654644, ||r||/||r_0|| = 0.000408077
LBFGS iteration 71 : ||r|| = 0.000543947, ||r||/||r_0|| = 0.000339073
LBFGS iteration 72 : ||r|| = 0.000693809, ||r||/||r_0|| = 0.000432491
LBFGS iteration 73 : ||r|| = 0.00123584, ||r||/||r_0|| = 0.000770371
LBFGS iteration 74 : ||r|| = 0.000501059, ||r||/||r_0|| = 0.000312339
LBFGS iteration 75 : ||r|| = 0.000265266, ||r||/||r_0|| = 0.000165356
LBFGS iteration 76 : ||r|| = 0.000251954, ||r||/||r_0|| = 0.000157057
LBFGS iteration 77 : ||r|| = 0.000333886, ||r||/||r_0|| = 0.00020813
LBFGS iteration 78 : ||r|| = 0.000522524, ||r||/||r_0|| = 0.000325719
LBFGS iteration 79 : ||r|| = 0.000369836, ||r||/||r_0|| = 0.00023054
LBFGS iteration 80 : ||r|| = 0.000157428, ||r||/||r_0|| = 9.81341e-05
LBFGS iteration 81 : ||r|| = 0.000134986, ||r||/||r_0|| = 8.41443e-05
LBFGS iteration 82 : ||r|| = 0.000153649, ||r||/||r_0|| = 9.57781e-05
LBFGS iteration 83 : ||r|| = 0.000245621, ||r||/||r_0|| = 0.00015311
LBFGS iteration 84 : ||r|| = 0.000197426, ||r||/||r_0|| = 0.000123067
LBFGS iteration 85 : ||r|| = 6.29115e-05, ||r||/||r_0|| = 3.92164e-05
LBFGS iteration 86 : ||r|| = 5.17471e-05, ||r||/||r_0|| = 3.22569e-05
LBFGS iteration 87 : ||r|| = 6.68762e-05, ||r||/||r_0|| = 4.16877e-05
LBFGS iteration 88 : ||r|| = 7.26244e-05, ||r||/||r_0|| = 4.52709e-05
LBFGS iteration 89 : ||r|| = 0.000227688, ||r||/||r_0|| = 0.000141931
LBFGS iteration 90 : ||r|| = 3.31977e-05, ||r||/||r_0|| = 2.0694e-05
LBFGS iteration 91 : ||r|| = 2.65641e-05, ||r||/||r_0|| = 1.65589e-05
LBFGS iteration 92 : ||r|| = 3.49512e-05, ||r||/||r_0|| = 2.17871e-05
LBFGS iteration 93 : ||r|| = 4.97308e-05, ||r||/||r_0|| = 3.10001e-05
LBFGS iteration 94 : ||r|| = 3.34232e-05, ||r||/||r_0|| = 2.08346e-05
LBFGS iteration 95 : ||r|| = 1.1803e-05, ||r||/||r_0|| = 7.35749e-06
LBFGS iteration 96 : ||r|| = 1.02902e-05, ||r||/||r_0|| = 6.41446e-06
LBFGS iteration 97 : ||r|| = 1.30043e-05, ||r||/||r_0|| = 8.10633e-06
LBFGS iteration 98 : ||r|| = 2.26578e-05, ||r||/||r_0|| = 1.41239e-05
LBFGS iteration 99 : ||r|| = 2.0364e-05, ||r||/||r_0|| = 1.2694e-05
LBFGS iteration 100 : ||r|| = 1.01336e-05, ||r||/||r_0|| = 6.31686e-06
LBFGS iteration 101 : ||r|| = 9.57449e-06, ||r||/||r_0|| = 5.96833e-06
LBFGS iteration 102 : ||r|| = 1.17016e-05, ||r||/||r_0|| = 7.29425e-06
LBFGS iteration 103 : ||r|| = 2.72813e-05, ||r||/||r_0|| = 1.7006e-05
LBFGS iteration 104 : ||r|| = 9.72679e-06, ||r||/||r_0|| = 6.06327e-06
LBFGS iteration 105 : ||r|| = 6.59627e-06, ||r||/||r_0|| = 4.11183e-06
LBFGS iteration 106 : ||r|| = 7.66233e-06, ||r||/||r_0|| = 4.77637e-06
LBFGS iteration 107 : ||r|| = 1.1227e-05, ||r||/||r_0|| = 6.99842e-06
LBFGS iteration 108 : ||r|| = 7.81538e-06, ||r||/||r_0|| = 4.87177e-06
LBFGS iteration 109 : ||r|| = 6.73626e-06, ||r||/||r_0|| = 4.1991e-06
LBFGS iteration 110 : ||r|| = 5.02859e-06, ||r||/||r_0|| = 3.1346e-06
LBFGS iteration 111 : ||r|| = 4.63857e-06, ||r||/||r_0|| = 2.89149e-06
LBFGS iteration 112 : ||r|| = 7.50298e-06, ||r||/||r_0|| = 4.67704e-06
LBFGS iteration 113 : ||r|| = 5.96133e-06, ||r||/||r_0|| = 3.71604e-06
LBFGS iteration 114 : ||r|| = 3.93594e-06, ||r||/||r_0|| = 2.45349e-06
LBFGS iteration 115 : ||r|| = 3.71031e-06, ||r||/||r_0|| = 2.31285e-06
LBFGS iteration 116 : ||r|| = 4.97969e-06, ||r||/||r_0|| = 3.10413e-06
LBFGS iteration 117 : ||r|| = 8.19517e-06, ||r||/||r_0|| = 5.10852e-06
LBFGS iteration 118 : ||r|| = 2.17669e-06, ||r||/||r_0|| = 1.35685e-06
LBFGS iteration 119 : ||r|| = 1.66053e-06, ||r||/||r_0|| = 1.0351e-06
LBFGS iteration 120 : ||r|| = 1.84e-06, ||r||/||r_0|| = 1.14698e-06
LBFGS iteration 121 : ||r|| = 3.54175e-06, ||r||/||r_0|| = 2.20777e-06
LBFGS iteration 122 : ||r|| = 1.39257e-06, ||r||/||r_0|| = 8.6807e-07
LBFGS/Newton+GMRES converged in 122 iterations with a residual norm of 1.39257e-06.
solver took 21.8909s.
|| q_h - q_ex || / || q_ex || = 6.12087e-06
|| t_h - t_ex || / || t_ex || = 3.90288e-06
@@ -0,0 +1,47 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--no-discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--hybridization
--nonlinear
--no-nonlinear-convection
--no-nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 3
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.0137397s.
***********************************************************
dim(V) = 1860
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3420
***********************************************************
Assembly took 0.0117625s.
Preconditioner took 3.3236e-05s.
Newton iteration 0 : ||r|| = 1.60422
Newton iteration 1 : ||r|| = 4.98725e-08, ||r||/||r_0|| = 3.10884e-08
Newton+GMRES+GS/Newton+GMRES converged in 1 iterations with a residual norm of 4.98725e-08.
solver took 0.601921s.
|| q_h - q_ex || / || q_ex || = 6.10477e-06
|| t_h - t_ex || / || t_ex || = 3.90155e-06
+170
View File
@@ -0,0 +1,170 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--no-discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-reduction
--hybridization
--nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 0
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.0109196s.
***********************************************************
dim(V) = 1860
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3420
***********************************************************
Assembly took 0.021188s.
Preconditioner took 5.675e-05s.
LBFGS iteration 0 : ||r|| = 1.60422
LBFGS iteration 1 : ||r|| = 4.04305, ||r||/||r_0|| = 2.52026
LBFGS iteration 2 : ||r|| = 2.27103, ||r||/||r_0|| = 1.41566
LBFGS iteration 3 : ||r|| = 2.86497, ||r||/||r_0|| = 1.7859
LBFGS iteration 4 : ||r|| = 8.10595, ||r||/||r_0|| = 5.0529
LBFGS iteration 5 : ||r|| = 8.73464, ||r||/||r_0|| = 5.4448
LBFGS iteration 6 : ||r|| = 1.87803, ||r||/||r_0|| = 1.17069
LBFGS iteration 7 : ||r|| = 1.07044, ||r||/||r_0|| = 0.667268
LBFGS iteration 8 : ||r|| = 1.19802, ||r||/||r_0|| = 0.746794
LBFGS iteration 9 : ||r|| = 2.05643, ||r||/||r_0|| = 1.28189
LBFGS iteration 10 : ||r|| = 1.71473, ||r||/||r_0|| = 1.06889
LBFGS iteration 11 : ||r|| = 1.80177, ||r||/||r_0|| = 1.12315
LBFGS iteration 12 : ||r|| = 2.94979, ||r||/||r_0|| = 1.83878
LBFGS iteration 13 : ||r|| = 0.788424, ||r||/||r_0|| = 0.49147
LBFGS iteration 14 : ||r|| = 0.688495, ||r||/||r_0|| = 0.429178
LBFGS iteration 15 : ||r|| = 1.15113, ||r||/||r_0|| = 0.717567
LBFGS iteration 16 : ||r|| = 1.20461, ||r||/||r_0|| = 0.750902
LBFGS iteration 17 : ||r|| = 4.95942, ||r||/||r_0|| = 3.09149
LBFGS iteration 18 : ||r|| = 0.596949, ||r||/||r_0|| = 0.372113
LBFGS iteration 19 : ||r|| = 0.467761, ||r||/||r_0|| = 0.291582
LBFGS iteration 20 : ||r|| = 0.71786, ||r||/||r_0|| = 0.447483
LBFGS iteration 21 : ||r|| = 0.836852, ||r||/||r_0|| = 0.521658
LBFGS iteration 22 : ||r|| = 2.59644, ||r||/||r_0|| = 1.61851
LBFGS iteration 23 : ||r|| = 0.388821, ||r||/||r_0|| = 0.242374
LBFGS iteration 24 : ||r|| = 0.234827, ||r||/||r_0|| = 0.146381
LBFGS iteration 25 : ||r|| = 0.263661, ||r||/||r_0|| = 0.164355
LBFGS iteration 26 : ||r|| = 0.277796, ||r||/||r_0|| = 0.173166
LBFGS iteration 27 : ||r|| = 0.975136, ||r||/||r_0|| = 0.607858
LBFGS iteration 28 : ||r|| = 0.128984, ||r||/||r_0|| = 0.0804028
LBFGS iteration 29 : ||r|| = 0.0994523, ||r||/||r_0|| = 0.0619943
LBFGS iteration 30 : ||r|| = 0.102656, ||r||/||r_0|| = 0.0639912
LBFGS iteration 31 : ||r|| = 0.430616, ||r||/||r_0|| = 0.268427
LBFGS iteration 32 : ||r|| = 0.107659, ||r||/||r_0|| = 0.06711
LBFGS iteration 33 : ||r|| = 0.0659709, ||r||/||r_0|| = 0.0411234
LBFGS iteration 34 : ||r|| = 0.108932, ||r||/||r_0|| = 0.0679038
LBFGS iteration 35 : ||r|| = 0.10333, ||r||/||r_0|| = 0.0644116
LBFGS iteration 36 : ||r|| = 0.393613, ||r||/||r_0|| = 0.245362
LBFGS iteration 37 : ||r|| = 0.044456, ||r||/||r_0|| = 0.027712
LBFGS iteration 38 : ||r|| = 0.0293365, ||r||/||r_0|| = 0.0182871
LBFGS iteration 39 : ||r|| = 0.0325774, ||r||/||r_0|| = 0.0203074
LBFGS iteration 40 : ||r|| = 0.0383684, ||r||/||r_0|| = 0.0239172
LBFGS iteration 41 : ||r|| = 0.0935856, ||r||/||r_0|| = 0.0583372
LBFGS iteration 42 : ||r|| = 0.0181591, ||r||/||r_0|| = 0.0113196
LBFGS iteration 43 : ||r|| = 0.0101241, ||r||/||r_0|| = 0.0063109
LBFGS iteration 44 : ||r|| = 0.0103064, ||r||/||r_0|| = 0.00642455
LBFGS iteration 45 : ||r|| = 0.0136856, ||r||/||r_0|| = 0.00853103
LBFGS iteration 46 : ||r|| = 0.0224226, ||r||/||r_0|| = 0.0139773
LBFGS iteration 47 : ||r|| = 0.0121399, ||r||/||r_0|| = 0.00756747
LBFGS iteration 48 : ||r|| = 0.00565715, ||r||/||r_0|| = 0.00352643
LBFGS iteration 49 : ||r|| = 0.00519774, ||r||/||r_0|| = 0.00324005
LBFGS iteration 50 : ||r|| = 0.00683834, ||r||/||r_0|| = 0.00426273
LBFGS iteration 51 : ||r|| = 0.0102297, ||r||/||r_0|| = 0.00637677
LBFGS iteration 52 : ||r|| = 0.0178293, ||r||/||r_0|| = 0.011114
LBFGS iteration 53 : ||r|| = 0.00410073, ||r||/||r_0|| = 0.00255622
LBFGS iteration 54 : ||r|| = 0.00214889, ||r||/||r_0|| = 0.00133952
LBFGS iteration 55 : ||r|| = 0.00179143, ||r||/||r_0|| = 0.0011167
LBFGS iteration 56 : ||r|| = 0.00228298, ||r||/||r_0|| = 0.00142311
LBFGS iteration 57 : ||r|| = 0.00331611, ||r||/||r_0|| = 0.00206712
LBFGS iteration 58 : ||r|| = 0.00287553, ||r||/||r_0|| = 0.00179248
LBFGS iteration 59 : ||r|| = 0.00174206, ||r||/||r_0|| = 0.00108593
LBFGS iteration 60 : ||r|| = 0.00197402, ||r||/||r_0|| = 0.00123052
LBFGS iteration 61 : ||r|| = 0.00271139, ||r||/||r_0|| = 0.00169016
LBFGS iteration 62 : ||r|| = 0.0033751, ||r||/||r_0|| = 0.00210389
LBFGS iteration 63 : ||r|| = 0.00675992, ||r||/||r_0|| = 0.00421385
LBFGS iteration 64 : ||r|| = 0.00199077, ||r||/||r_0|| = 0.00124096
LBFGS iteration 65 : ||r|| = 0.00103921, ||r||/||r_0|| = 0.000647797
LBFGS iteration 66 : ||r|| = 0.00130432, ||r||/||r_0|| = 0.000813055
LBFGS iteration 67 : ||r|| = 0.00173231, ||r||/||r_0|| = 0.00107985
LBFGS iteration 68 : ||r|| = 0.00255953, ||r||/||r_0|| = 0.0015955
LBFGS iteration 69 : ||r|| = 0.00178073, ||r||/||r_0|| = 0.00111003
LBFGS iteration 70 : ||r|| = 0.000654644, ||r||/||r_0|| = 0.000408077
LBFGS iteration 71 : ||r|| = 0.000543947, ||r||/||r_0|| = 0.000339073
LBFGS iteration 72 : ||r|| = 0.000693809, ||r||/||r_0|| = 0.000432491
LBFGS iteration 73 : ||r|| = 0.00123584, ||r||/||r_0|| = 0.000770371
LBFGS iteration 74 : ||r|| = 0.000501059, ||r||/||r_0|| = 0.000312339
LBFGS iteration 75 : ||r|| = 0.000265266, ||r||/||r_0|| = 0.000165356
LBFGS iteration 76 : ||r|| = 0.000251953, ||r||/||r_0|| = 0.000157057
LBFGS iteration 77 : ||r|| = 0.000333886, ||r||/||r_0|| = 0.00020813
LBFGS iteration 78 : ||r|| = 0.000522523, ||r||/||r_0|| = 0.000325719
LBFGS iteration 79 : ||r|| = 0.000369834, ||r||/||r_0|| = 0.000230539
LBFGS iteration 80 : ||r|| = 0.000157428, ||r||/||r_0|| = 9.81338e-05
LBFGS iteration 81 : ||r|| = 0.000134985, ||r||/||r_0|| = 8.41439e-05
LBFGS iteration 82 : ||r|| = 0.000153647, ||r||/||r_0|| = 9.5777e-05
LBFGS iteration 83 : ||r|| = 0.000245494, ||r||/||r_0|| = 0.00015303
LBFGS iteration 84 : ||r|| = 0.000197097, ||r||/||r_0|| = 0.000122862
LBFGS iteration 85 : ||r|| = 6.28938e-05, ||r||/||r_0|| = 3.92053e-05
LBFGS iteration 86 : ||r|| = 5.17492e-05, ||r||/||r_0|| = 3.22582e-05
LBFGS iteration 87 : ||r|| = 6.68573e-05, ||r||/||r_0|| = 4.1676e-05
LBFGS iteration 88 : ||r|| = 7.20488e-05, ||r||/||r_0|| = 4.49121e-05
LBFGS iteration 89 : ||r|| = 0.000230595, ||r||/||r_0|| = 0.000143743
LBFGS iteration 90 : ||r|| = 3.32498e-05, ||r||/||r_0|| = 2.07265e-05
LBFGS iteration 91 : ||r|| = 2.65435e-05, ||r||/||r_0|| = 1.65461e-05
LBFGS iteration 92 : ||r|| = 3.48386e-05, ||r||/||r_0|| = 2.17169e-05
LBFGS iteration 93 : ||r|| = 4.93021e-05, ||r||/||r_0|| = 3.07328e-05
LBFGS iteration 94 : ||r|| = 3.37321e-05, ||r||/||r_0|| = 2.10271e-05
LBFGS iteration 95 : ||r|| = 1.17848e-05, ||r||/||r_0|| = 7.34615e-06
LBFGS iteration 96 : ||r|| = 1.02097e-05, ||r||/||r_0|| = 6.3643e-06
LBFGS iteration 97 : ||r|| = 1.29555e-05, ||r||/||r_0|| = 8.0759e-06
LBFGS iteration 98 : ||r|| = 2.22505e-05, ||r||/||r_0|| = 1.387e-05
LBFGS iteration 99 : ||r|| = 2.10878e-05, ||r||/||r_0|| = 1.31452e-05
LBFGS iteration 100 : ||r|| = 1.02078e-05, ||r||/||r_0|| = 6.36309e-06
LBFGS iteration 101 : ||r|| = 9.50017e-06, ||r||/||r_0|| = 5.922e-06
LBFGS iteration 102 : ||r|| = 1.15863e-05, ||r||/||r_0|| = 7.22239e-06
LBFGS iteration 103 : ||r|| = 2.69417e-05, ||r||/||r_0|| = 1.67943e-05
LBFGS iteration 104 : ||r|| = 9.94455e-06, ||r||/||r_0|| = 6.19901e-06
LBFGS iteration 105 : ||r|| = 6.55722e-06, ||r||/||r_0|| = 4.08749e-06
LBFGS iteration 106 : ||r|| = 7.61877e-06, ||r||/||r_0|| = 4.74921e-06
LBFGS iteration 107 : ||r|| = 1.09382e-05, ||r||/||r_0|| = 6.81844e-06
LBFGS iteration 108 : ||r|| = 7.76942e-06, ||r||/||r_0|| = 4.84313e-06
LBFGS iteration 109 : ||r|| = 7.29928e-06, ||r||/||r_0|| = 4.55006e-06
LBFGS iteration 110 : ||r|| = 4.93978e-06, ||r||/||r_0|| = 3.07925e-06
LBFGS iteration 111 : ||r|| = 4.5857e-06, ||r||/||r_0|| = 2.85853e-06
LBFGS iteration 112 : ||r|| = 7.23401e-06, ||r||/||r_0|| = 4.50937e-06
LBFGS iteration 113 : ||r|| = 6.2086e-06, ||r||/||r_0|| = 3.87018e-06
LBFGS iteration 114 : ||r|| = 3.91586e-06, ||r||/||r_0|| = 2.44098e-06
LBFGS iteration 115 : ||r|| = 3.8682e-06, ||r||/||r_0|| = 2.41127e-06
LBFGS iteration 116 : ||r|| = 4.77772e-06, ||r||/||r_0|| = 2.97823e-06
LBFGS iteration 117 : ||r|| = 1.05549e-05, ||r||/||r_0|| = 6.57945e-06
LBFGS iteration 118 : ||r|| = 2.32515e-06, ||r||/||r_0|| = 1.4494e-06
LBFGS iteration 119 : ||r|| = 1.65531e-06, ||r||/||r_0|| = 1.03185e-06
LBFGS iteration 120 : ||r|| = 1.83133e-06, ||r||/||r_0|| = 1.14157e-06
LBFGS iteration 121 : ||r|| = 2.81453e-06, ||r||/||r_0|| = 1.75445e-06
LBFGS iteration 122 : ||r|| = 1.83419e-06, ||r||/||r_0|| = 1.14336e-06
LBFGS iteration 123 : ||r|| = 8.4473e-07, ||r||/||r_0|| = 5.26568e-07
LBFGS/Newton+GMRES converged in 123 iterations with a residual norm of 8.4473e-07.
solver took 9.23797s.
|| q_h - q_ex || / || q_ex || = 6.11146e-06
|| t_h - t_ex || / || t_ex || = 3.90229e-06
@@ -0,0 +1,47 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--no-discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--hybridization
--nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 3
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.00863252s.
***********************************************************
dim(V) = 1860
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3420
***********************************************************
Assembly took 0.0111083s.
Preconditioner took 1.9831e-05s.
Newton iteration 0 : ||r|| = 1.60422
Newton iteration 1 : ||r|| = 4.77667e-08, ||r||/||r_0|| = 2.97757e-08
Newton+GMRES+GS/Newton+GMRES converged in 1 iterations with a residual norm of 4.77667e-08.
solver took 0.454486s.
|| q_h - q_ex || / || q_ex || = 6.10477e-06
|| t_h - t_ex || / || t_ex || = 3.90155e-06
@@ -0,0 +1,47 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--no-discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--hybridization
--no-nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 3
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.00990361s.
***********************************************************
dim(V) = 1860
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3420
***********************************************************
Assembly took 0.0162211s.
Preconditioner took 2.4778e-05s.
Newton iteration 0 : ||r|| = 1.60422
Newton iteration 1 : ||r|| = 4.77667e-08, ||r||/||r_0|| = 2.97757e-08
Newton+GMRES+GS/Newton+GMRES converged in 1 iterations with a residual norm of 4.77667e-08.
solver took 0.461365s.
|| q_h - q_ex || / || q_ex || = 6.10477e-06
|| t_h - t_ex || / || t_ex || = 3.90155e-06
+231
View File
@@ -0,0 +1,231 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--no-discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-hybridization
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2112
dim(W) = 1024
dim(V+W) = 3136
***********************************************************
Assembly took 0.0122702s.
Preconditioner took 0.00343498s.
Pass : 1 Iteration : 0 ||B r|| = 0.828288
Pass : 1 Iteration : 1 ||B r|| = 0.828288
Pass : 1 Iteration : 2 ||B r|| = 0.780392
Pass : 1 Iteration : 3 ||B r|| = 0.775902
Pass : 1 Iteration : 4 ||B r|| = 0.718999
Pass : 1 Iteration : 5 ||B r|| = 0.712741
Pass : 1 Iteration : 6 ||B r|| = 0.709216
Pass : 1 Iteration : 7 ||B r|| = 0.699357
Pass : 1 Iteration : 8 ||B r|| = 0.685558
Pass : 1 Iteration : 9 ||B r|| = 0.624758
Pass : 1 Iteration : 10 ||B r|| = 0.61651
Pass : 1 Iteration : 11 ||B r|| = 0.491672
Pass : 1 Iteration : 12 ||B r|| = 0.490509
Pass : 1 Iteration : 13 ||B r|| = 0.43273
Pass : 1 Iteration : 14 ||B r|| = 0.432532
Pass : 1 Iteration : 15 ||B r|| = 0.391607
Pass : 1 Iteration : 16 ||B r|| = 0.387505
Pass : 1 Iteration : 17 ||B r|| = 0.369287
Pass : 1 Iteration : 18 ||B r|| = 0.349727
Pass : 1 Iteration : 19 ||B r|| = 0.344534
Pass : 1 Iteration : 20 ||B r|| = 0.308102
Pass : 1 Iteration : 21 ||B r|| = 0.307918
Pass : 1 Iteration : 22 ||B r|| = 0.275424
Pass : 1 Iteration : 23 ||B r|| = 0.275336
Pass : 1 Iteration : 24 ||B r|| = 0.241166
Pass : 1 Iteration : 25 ||B r|| = 0.236098
Pass : 1 Iteration : 26 ||B r|| = 0.220482
Pass : 1 Iteration : 27 ||B r|| = 0.209195
Pass : 1 Iteration : 28 ||B r|| = 0.203284
Pass : 1 Iteration : 29 ||B r|| = 0.184134
Pass : 1 Iteration : 30 ||B r|| = 0.183885
Pass : 1 Iteration : 31 ||B r|| = 0.158572
Pass : 1 Iteration : 32 ||B r|| = 0.15785
Pass : 1 Iteration : 33 ||B r|| = 0.128252
Pass : 1 Iteration : 34 ||B r|| = 0.121277
Pass : 1 Iteration : 35 ||B r|| = 0.105019
Pass : 1 Iteration : 36 ||B r|| = 0.0877653
Pass : 1 Iteration : 37 ||B r|| = 0.0857034
Pass : 1 Iteration : 38 ||B r|| = 0.0695776
Pass : 1 Iteration : 39 ||B r|| = 0.0693421
Pass : 1 Iteration : 40 ||B r|| = 0.060764
Pass : 1 Iteration : 41 ||B r|| = 0.0583294
Pass : 1 Iteration : 42 ||B r|| = 0.0513009
Pass : 1 Iteration : 43 ||B r|| = 0.046381
Pass : 1 Iteration : 44 ||B r|| = 0.0446401
Pass : 1 Iteration : 45 ||B r|| = 0.0351366
Pass : 1 Iteration : 46 ||B r|| = 0.0350703
Pass : 1 Iteration : 47 ||B r|| = 0.0285254
Pass : 1 Iteration : 48 ||B r|| = 0.0275435
Pass : 1 Iteration : 49 ||B r|| = 0.0233101
Pass : 1 Iteration : 50 ||B r|| = 0.0205522
Restarting...
Pass : 2 Iteration : 51 ||B r|| = 0.0201743
Pass : 2 Iteration : 52 ||B r|| = 0.0178036
Pass : 2 Iteration : 53 ||B r|| = 0.0177657
Pass : 2 Iteration : 54 ||B r|| = 0.0155379
Pass : 2 Iteration : 55 ||B r|| = 0.0145024
Pass : 2 Iteration : 56 ||B r|| = 0.0129692
Pass : 2 Iteration : 57 ||B r|| = 0.0111895
Pass : 2 Iteration : 58 ||B r|| = 0.0106264
Pass : 2 Iteration : 59 ||B r|| = 0.00883739
Pass : 2 Iteration : 60 ||B r|| = 0.00881869
Pass : 2 Iteration : 61 ||B r|| = 0.00734547
Pass : 2 Iteration : 62 ||B r|| = 0.00727023
Pass : 2 Iteration : 63 ||B r|| = 0.00664677
Pass : 2 Iteration : 64 ||B r|| = 0.00606592
Pass : 2 Iteration : 65 ||B r|| = 0.00584805
Pass : 2 Iteration : 66 ||B r|| = 0.00471596
Pass : 2 Iteration : 67 ||B r|| = 0.00467814
Pass : 2 Iteration : 68 ||B r|| = 0.00343373
Pass : 2 Iteration : 69 ||B r|| = 0.0034201
Pass : 2 Iteration : 70 ||B r|| = 0.00280534
Pass : 2 Iteration : 71 ||B r|| = 0.00270379
Pass : 2 Iteration : 72 ||B r|| = 0.0025783
Pass : 2 Iteration : 73 ||B r|| = 0.0022472
Pass : 2 Iteration : 74 ||B r|| = 0.00221863
Pass : 2 Iteration : 75 ||B r|| = 0.00186269
Pass : 2 Iteration : 76 ||B r|| = 0.00186179
Pass : 2 Iteration : 77 ||B r|| = 0.00160985
Pass : 2 Iteration : 78 ||B r|| = 0.00160018
Pass : 2 Iteration : 79 ||B r|| = 0.00148445
Pass : 2 Iteration : 80 ||B r|| = 0.00141886
Pass : 2 Iteration : 81 ||B r|| = 0.00139003
Pass : 2 Iteration : 82 ||B r|| = 0.00125305
Pass : 2 Iteration : 83 ||B r|| = 0.00124651
Pass : 2 Iteration : 84 ||B r|| = 0.00111105
Pass : 2 Iteration : 85 ||B r|| = 0.00110481
Pass : 2 Iteration : 86 ||B r|| = 0.001019
Pass : 2 Iteration : 87 ||B r|| = 0.000986979
Pass : 2 Iteration : 88 ||B r|| = 0.000943191
Pass : 2 Iteration : 89 ||B r|| = 0.000887917
Pass : 2 Iteration : 90 ||B r|| = 0.000878207
Pass : 2 Iteration : 91 ||B r|| = 0.000792828
Pass : 2 Iteration : 92 ||B r|| = 0.000792314
Pass : 2 Iteration : 93 ||B r|| = 0.00067918
Pass : 2 Iteration : 94 ||B r|| = 0.000661497
Pass : 2 Iteration : 95 ||B r|| = 0.000607798
Pass : 2 Iteration : 96 ||B r|| = 0.000585659
Pass : 2 Iteration : 97 ||B r|| = 0.000575458
Pass : 2 Iteration : 98 ||B r|| = 0.000536371
Pass : 2 Iteration : 99 ||B r|| = 0.000533329
Pass : 2 Iteration : 100 ||B r|| = 0.000476474
Restarting...
Pass : 3 Iteration : 101 ||B r|| = 0.000476389
Pass : 3 Iteration : 102 ||B r|| = 0.000450568
Pass : 3 Iteration : 103 ||B r|| = 0.00044946
Pass : 3 Iteration : 104 ||B r|| = 0.000448032
Pass : 3 Iteration : 105 ||B r|| = 0.000436727
Pass : 3 Iteration : 106 ||B r|| = 0.000433054
Pass : 3 Iteration : 107 ||B r|| = 0.000384572
Pass : 3 Iteration : 108 ||B r|| = 0.000384151
Pass : 3 Iteration : 109 ||B r|| = 0.000326889
Pass : 3 Iteration : 110 ||B r|| = 0.000320214
Pass : 3 Iteration : 111 ||B r|| = 0.000295531
Pass : 3 Iteration : 112 ||B r|| = 0.00028017
Pass : 3 Iteration : 113 ||B r|| = 0.000271805
Pass : 3 Iteration : 114 ||B r|| = 0.000253182
Pass : 3 Iteration : 115 ||B r|| = 0.000251705
Pass : 3 Iteration : 116 ||B r|| = 0.000224202
Pass : 3 Iteration : 117 ||B r|| = 0.00022401
Pass : 3 Iteration : 118 ||B r|| = 0.000201373
Pass : 3 Iteration : 119 ||B r|| = 0.000195487
Pass : 3 Iteration : 120 ||B r|| = 0.000178312
Pass : 3 Iteration : 121 ||B r|| = 0.000163707
Pass : 3 Iteration : 122 ||B r|| = 0.000159212
Pass : 3 Iteration : 123 ||B r|| = 0.000143717
Pass : 3 Iteration : 124 ||B r|| = 0.000142938
Pass : 3 Iteration : 125 ||B r|| = 0.000129618
Pass : 3 Iteration : 126 ||B r|| = 0.000128535
Pass : 3 Iteration : 127 ||B r|| = 0.000120081
Pass : 3 Iteration : 128 ||B r|| = 0.000114142
Pass : 3 Iteration : 129 ||B r|| = 0.000109227
Pass : 3 Iteration : 130 ||B r|| = 9.74187e-05
Pass : 3 Iteration : 131 ||B r|| = 9.41802e-05
Pass : 3 Iteration : 132 ||B r|| = 7.97569e-05
Pass : 3 Iteration : 133 ||B r|| = 7.97329e-05
Pass : 3 Iteration : 134 ||B r|| = 6.96569e-05
Pass : 3 Iteration : 135 ||B r|| = 6.80129e-05
Pass : 3 Iteration : 136 ||B r|| = 6.39905e-05
Pass : 3 Iteration : 137 ||B r|| = 5.48303e-05
Pass : 3 Iteration : 138 ||B r|| = 5.33803e-05
Pass : 3 Iteration : 139 ||B r|| = 4.51005e-05
Pass : 3 Iteration : 140 ||B r|| = 4.47538e-05
Pass : 3 Iteration : 141 ||B r|| = 3.79739e-05
Pass : 3 Iteration : 142 ||B r|| = 3.79237e-05
Pass : 3 Iteration : 143 ||B r|| = 3.34755e-05
Pass : 3 Iteration : 144 ||B r|| = 3.19968e-05
Pass : 3 Iteration : 145 ||B r|| = 3.00248e-05
Pass : 3 Iteration : 146 ||B r|| = 2.43567e-05
Pass : 3 Iteration : 147 ||B r|| = 2.40027e-05
Pass : 3 Iteration : 148 ||B r|| = 1.75885e-05
Pass : 3 Iteration : 149 ||B r|| = 1.74341e-05
Pass : 3 Iteration : 150 ||B r|| = 1.38964e-05
Restarting...
Pass : 4 Iteration : 151 ||B r|| = 1.33084e-05
Pass : 4 Iteration : 152 ||B r|| = 1.25291e-05
Pass : 4 Iteration : 153 ||B r|| = 1.15613e-05
Pass : 4 Iteration : 154 ||B r|| = 1.15039e-05
Pass : 4 Iteration : 155 ||B r|| = 8.97445e-06
Pass : 4 Iteration : 156 ||B r|| = 8.93619e-06
Pass : 4 Iteration : 157 ||B r|| = 7.17725e-06
Pass : 4 Iteration : 158 ||B r|| = 7.03949e-06
Pass : 4 Iteration : 159 ||B r|| = 6.28998e-06
Pass : 4 Iteration : 160 ||B r|| = 5.80418e-06
Pass : 4 Iteration : 161 ||B r|| = 5.6565e-06
Pass : 4 Iteration : 162 ||B r|| = 4.98291e-06
Pass : 4 Iteration : 163 ||B r|| = 4.97198e-06
Pass : 4 Iteration : 164 ||B r|| = 4.1327e-06
Pass : 4 Iteration : 165 ||B r|| = 4.04729e-06
Pass : 4 Iteration : 166 ||B r|| = 3.41458e-06
Pass : 4 Iteration : 167 ||B r|| = 3.2682e-06
Pass : 4 Iteration : 168 ||B r|| = 3.07084e-06
Pass : 4 Iteration : 169 ||B r|| = 2.6426e-06
Pass : 4 Iteration : 170 ||B r|| = 2.63354e-06
Pass : 4 Iteration : 171 ||B r|| = 2.17891e-06
Pass : 4 Iteration : 172 ||B r|| = 2.15133e-06
Pass : 4 Iteration : 173 ||B r|| = 1.91418e-06
Pass : 4 Iteration : 174 ||B r|| = 1.87277e-06
Pass : 4 Iteration : 175 ||B r|| = 1.75707e-06
Pass : 4 Iteration : 176 ||B r|| = 1.66039e-06
Pass : 4 Iteration : 177 ||B r|| = 1.62259e-06
Pass : 4 Iteration : 178 ||B r|| = 1.51352e-06
Pass : 4 Iteration : 179 ||B r|| = 1.51341e-06
Pass : 4 Iteration : 180 ||B r|| = 1.35973e-06
Pass : 4 Iteration : 181 ||B r|| = 1.34071e-06
Pass : 4 Iteration : 182 ||B r|| = 1.2227e-06
Pass : 4 Iteration : 183 ||B r|| = 1.16459e-06
Pass : 4 Iteration : 184 ||B r|| = 1.10473e-06
Pass : 4 Iteration : 185 ||B r|| = 9.95649e-07
Pass : 4 Iteration : 186 ||B r|| = 9.93491e-07
Pass : 4 Iteration : 187 ||B r|| = 9.20855e-07
Pass : 4 Iteration : 188 ||B r|| = 9.17534e-07
Pass : 4 Iteration : 189 ||B r|| = 8.48816e-07
Pass : 4 Iteration : 190 ||B r|| = 8.13729e-07
GMRES+GS converged in 190 iterations with a residual norm of 8.13729e-07.
GMRES solver took 0.110362s.
|| q_h - q_ex || / || q_ex || = 1.02359e-06
|| t_h - t_ex || / || t_ex || = 1.03461e-06
+420
View File
@@ -0,0 +1,420 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-hybridization
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2048
dim(W) = 1024
dim(V+W) = 3072
***********************************************************
Assembly took 0.0167388s.
Preconditioner took 0.00560065s.
Pass : 1 Iteration : 0 ||B r|| = 0.900577
Pass : 1 Iteration : 1 ||B r|| = 0.900577
Pass : 1 Iteration : 2 ||B r|| = 0.900434
Pass : 1 Iteration : 3 ||B r|| = 0.900408
Pass : 1 Iteration : 4 ||B r|| = 0.900243
Pass : 1 Iteration : 5 ||B r|| = 0.899912
Pass : 1 Iteration : 6 ||B r|| = 0.899901
Pass : 1 Iteration : 7 ||B r|| = 0.898453
Pass : 1 Iteration : 8 ||B r|| = 0.898147
Pass : 1 Iteration : 9 ||B r|| = 0.892867
Pass : 1 Iteration : 10 ||B r|| = 0.89046
Pass : 1 Iteration : 11 ||B r|| = 0.890149
Pass : 1 Iteration : 12 ||B r|| = 0.887881
Pass : 1 Iteration : 13 ||B r|| = 0.886497
Pass : 1 Iteration : 14 ||B r|| = 0.881958
Pass : 1 Iteration : 15 ||B r|| = 0.873768
Pass : 1 Iteration : 16 ||B r|| = 0.866676
Pass : 1 Iteration : 17 ||B r|| = 0.862158
Pass : 1 Iteration : 18 ||B r|| = 0.862121
Pass : 1 Iteration : 19 ||B r|| = 0.861983
Pass : 1 Iteration : 20 ||B r|| = 0.852531
Pass : 1 Iteration : 21 ||B r|| = 0.851407
Pass : 1 Iteration : 22 ||B r|| = 0.81114
Pass : 1 Iteration : 23 ||B r|| = 0.811092
Pass : 1 Iteration : 24 ||B r|| = 0.794531
Pass : 1 Iteration : 25 ||B r|| = 0.794531
Pass : 1 Iteration : 26 ||B r|| = 0.788509
Pass : 1 Iteration : 27 ||B r|| = 0.783442
Pass : 1 Iteration : 28 ||B r|| = 0.75365
Pass : 1 Iteration : 29 ||B r|| = 0.736124
Pass : 1 Iteration : 30 ||B r|| = 0.718001
Pass : 1 Iteration : 31 ||B r|| = 0.70199
Pass : 1 Iteration : 32 ||B r|| = 0.701983
Pass : 1 Iteration : 33 ||B r|| = 0.691506
Pass : 1 Iteration : 34 ||B r|| = 0.687431
Pass : 1 Iteration : 35 ||B r|| = 0.620939
Pass : 1 Iteration : 36 ||B r|| = 0.620787
Pass : 1 Iteration : 37 ||B r|| = 0.579878
Pass : 1 Iteration : 38 ||B r|| = 0.577254
Pass : 1 Iteration : 39 ||B r|| = 0.577153
Pass : 1 Iteration : 40 ||B r|| = 0.573348
Pass : 1 Iteration : 41 ||B r|| = 0.540128
Pass : 1 Iteration : 42 ||B r|| = 0.500686
Pass : 1 Iteration : 43 ||B r|| = 0.474183
Pass : 1 Iteration : 44 ||B r|| = 0.447715
Pass : 1 Iteration : 45 ||B r|| = 0.441645
Pass : 1 Iteration : 46 ||B r|| = 0.43763
Pass : 1 Iteration : 47 ||B r|| = 0.437304
Pass : 1 Iteration : 48 ||B r|| = 0.388192
Pass : 1 Iteration : 49 ||B r|| = 0.386414
Pass : 1 Iteration : 50 ||B r|| = 0.346785
Restarting...
Pass : 2 Iteration : 51 ||B r|| = 0.346783
Pass : 2 Iteration : 52 ||B r|| = 0.346753
Pass : 2 Iteration : 53 ||B r|| = 0.346725
Pass : 2 Iteration : 54 ||B r|| = 0.346369
Pass : 2 Iteration : 55 ||B r|| = 0.345779
Pass : 2 Iteration : 56 ||B r|| = 0.340784
Pass : 2 Iteration : 57 ||B r|| = 0.338059
Pass : 2 Iteration : 58 ||B r|| = 0.330718
Pass : 2 Iteration : 59 ||B r|| = 0.32847
Pass : 2 Iteration : 60 ||B r|| = 0.326365
Pass : 2 Iteration : 61 ||B r|| = 0.32017
Pass : 2 Iteration : 62 ||B r|| = 0.319864
Pass : 2 Iteration : 63 ||B r|| = 0.290191
Pass : 2 Iteration : 64 ||B r|| = 0.29019
Pass : 2 Iteration : 65 ||B r|| = 0.275545
Pass : 2 Iteration : 66 ||B r|| = 0.274977
Pass : 2 Iteration : 67 ||B r|| = 0.274975
Pass : 2 Iteration : 68 ||B r|| = 0.250095
Pass : 2 Iteration : 69 ||B r|| = 0.245757
Pass : 2 Iteration : 70 ||B r|| = 0.226498
Pass : 2 Iteration : 71 ||B r|| = 0.21832
Pass : 2 Iteration : 72 ||B r|| = 0.209813
Pass : 2 Iteration : 73 ||B r|| = 0.197498
Pass : 2 Iteration : 74 ||B r|| = 0.194375
Pass : 2 Iteration : 75 ||B r|| = 0.185865
Pass : 2 Iteration : 76 ||B r|| = 0.160081
Pass : 2 Iteration : 77 ||B r|| = 0.155704
Pass : 2 Iteration : 78 ||B r|| = 0.140027
Pass : 2 Iteration : 79 ||B r|| = 0.138448
Pass : 2 Iteration : 80 ||B r|| = 0.138139
Pass : 2 Iteration : 81 ||B r|| = 0.125615
Pass : 2 Iteration : 82 ||B r|| = 0.12453
Pass : 2 Iteration : 83 ||B r|| = 0.109713
Pass : 2 Iteration : 84 ||B r|| = 0.108677
Pass : 2 Iteration : 85 ||B r|| = 0.105206
Pass : 2 Iteration : 86 ||B r|| = 0.10045
Pass : 2 Iteration : 87 ||B r|| = 0.0995337
Pass : 2 Iteration : 88 ||B r|| = 0.0927337
Pass : 2 Iteration : 89 ||B r|| = 0.0865765
Pass : 2 Iteration : 90 ||B r|| = 0.0836921
Pass : 2 Iteration : 91 ||B r|| = 0.0777179
Pass : 2 Iteration : 92 ||B r|| = 0.0777125
Pass : 2 Iteration : 93 ||B r|| = 0.075328
Pass : 2 Iteration : 94 ||B r|| = 0.0698781
Pass : 2 Iteration : 95 ||B r|| = 0.0695923
Pass : 2 Iteration : 96 ||B r|| = 0.0582517
Pass : 2 Iteration : 97 ||B r|| = 0.0578877
Pass : 2 Iteration : 98 ||B r|| = 0.0509695
Pass : 2 Iteration : 99 ||B r|| = 0.0492122
Pass : 2 Iteration : 100 ||B r|| = 0.049119
Restarting...
Pass : 3 Iteration : 101 ||B r|| = 0.0491174
Pass : 3 Iteration : 102 ||B r|| = 0.048935
Pass : 3 Iteration : 103 ||B r|| = 0.0487952
Pass : 3 Iteration : 104 ||B r|| = 0.048271
Pass : 3 Iteration : 105 ||B r|| = 0.0456151
Pass : 3 Iteration : 106 ||B r|| = 0.0420326
Pass : 3 Iteration : 107 ||B r|| = 0.0405407
Pass : 3 Iteration : 108 ||B r|| = 0.0376982
Pass : 3 Iteration : 109 ||B r|| = 0.0374234
Pass : 3 Iteration : 110 ||B r|| = 0.0359602
Pass : 3 Iteration : 111 ||B r|| = 0.0336756
Pass : 3 Iteration : 112 ||B r|| = 0.0331036
Pass : 3 Iteration : 113 ||B r|| = 0.0304233
Pass : 3 Iteration : 114 ||B r|| = 0.0303832
Pass : 3 Iteration : 115 ||B r|| = 0.0290383
Pass : 3 Iteration : 116 ||B r|| = 0.0270094
Pass : 3 Iteration : 117 ||B r|| = 0.0269671
Pass : 3 Iteration : 118 ||B r|| = 0.0234557
Pass : 3 Iteration : 119 ||B r|| = 0.0233749
Pass : 3 Iteration : 120 ||B r|| = 0.0222709
Pass : 3 Iteration : 121 ||B r|| = 0.0210607
Pass : 3 Iteration : 122 ||B r|| = 0.0210189
Pass : 3 Iteration : 123 ||B r|| = 0.019523
Pass : 3 Iteration : 124 ||B r|| = 0.0190986
Pass : 3 Iteration : 125 ||B r|| = 0.0182602
Pass : 3 Iteration : 126 ||B r|| = 0.0165908
Pass : 3 Iteration : 127 ||B r|| = 0.0165826
Pass : 3 Iteration : 128 ||B r|| = 0.0155958
Pass : 3 Iteration : 129 ||B r|| = 0.0149154
Pass : 3 Iteration : 130 ||B r|| = 0.0148837
Pass : 3 Iteration : 131 ||B r|| = 0.0133188
Pass : 3 Iteration : 132 ||B r|| = 0.0133041
Pass : 3 Iteration : 133 ||B r|| = 0.0126119
Pass : 3 Iteration : 134 ||B r|| = 0.012336
Pass : 3 Iteration : 135 ||B r|| = 0.0123217
Pass : 3 Iteration : 136 ||B r|| = 0.0111051
Pass : 3 Iteration : 137 ||B r|| = 0.0110814
Pass : 3 Iteration : 138 ||B r|| = 0.0105874
Pass : 3 Iteration : 139 ||B r|| = 0.0104149
Pass : 3 Iteration : 140 ||B r|| = 0.0104149
Pass : 3 Iteration : 141 ||B r|| = 0.00988104
Pass : 3 Iteration : 142 ||B r|| = 0.00946548
Pass : 3 Iteration : 143 ||B r|| = 0.00898965
Pass : 3 Iteration : 144 ||B r|| = 0.00849411
Pass : 3 Iteration : 145 ||B r|| = 0.00847611
Pass : 3 Iteration : 146 ||B r|| = 0.00791422
Pass : 3 Iteration : 147 ||B r|| = 0.00760638
Pass : 3 Iteration : 148 ||B r|| = 0.00739417
Pass : 3 Iteration : 149 ||B r|| = 0.00658704
Pass : 3 Iteration : 150 ||B r|| = 0.00657621
Restarting...
Pass : 4 Iteration : 151 ||B r|| = 0.00657611
Pass : 4 Iteration : 152 ||B r|| = 0.00631889
Pass : 4 Iteration : 153 ||B r|| = 0.00630107
Pass : 4 Iteration : 154 ||B r|| = 0.00628496
Pass : 4 Iteration : 155 ||B r|| = 0.00581361
Pass : 4 Iteration : 156 ||B r|| = 0.00572566
Pass : 4 Iteration : 157 ||B r|| = 0.00558237
Pass : 4 Iteration : 158 ||B r|| = 0.00520369
Pass : 4 Iteration : 159 ||B r|| = 0.0052025
Pass : 4 Iteration : 160 ||B r|| = 0.00487642
Pass : 4 Iteration : 161 ||B r|| = 0.00479177
Pass : 4 Iteration : 162 ||B r|| = 0.00468477
Pass : 4 Iteration : 163 ||B r|| = 0.00440739
Pass : 4 Iteration : 164 ||B r|| = 0.00440725
Pass : 4 Iteration : 165 ||B r|| = 0.00415237
Pass : 4 Iteration : 166 ||B r|| = 0.00404373
Pass : 4 Iteration : 167 ||B r|| = 0.00399217
Pass : 4 Iteration : 168 ||B r|| = 0.00361744
Pass : 4 Iteration : 169 ||B r|| = 0.00361199
Pass : 4 Iteration : 170 ||B r|| = 0.00342198
Pass : 4 Iteration : 171 ||B r|| = 0.00332275
Pass : 4 Iteration : 172 ||B r|| = 0.00328849
Pass : 4 Iteration : 173 ||B r|| = 0.00301807
Pass : 4 Iteration : 174 ||B r|| = 0.00297077
Pass : 4 Iteration : 175 ||B r|| = 0.00278725
Pass : 4 Iteration : 176 ||B r|| = 0.00265647
Pass : 4 Iteration : 177 ||B r|| = 0.00265138
Pass : 4 Iteration : 178 ||B r|| = 0.00249713
Pass : 4 Iteration : 179 ||B r|| = 0.0024458
Pass : 4 Iteration : 180 ||B r|| = 0.00226749
Pass : 4 Iteration : 181 ||B r|| = 0.00211128
Pass : 4 Iteration : 182 ||B r|| = 0.00209348
Pass : 4 Iteration : 183 ||B r|| = 0.00199424
Pass : 4 Iteration : 184 ||B r|| = 0.00190927
Pass : 4 Iteration : 185 ||B r|| = 0.00186211
Pass : 4 Iteration : 186 ||B r|| = 0.00157145
Pass : 4 Iteration : 187 ||B r|| = 0.00157142
Pass : 4 Iteration : 188 ||B r|| = 0.00141191
Pass : 4 Iteration : 189 ||B r|| = 0.00136095
Pass : 4 Iteration : 190 ||B r|| = 0.00133934
Pass : 4 Iteration : 191 ||B r|| = 0.00123125
Pass : 4 Iteration : 192 ||B r|| = 0.00122694
Pass : 4 Iteration : 193 ||B r|| = 0.00112965
Pass : 4 Iteration : 194 ||B r|| = 0.00106884
Pass : 4 Iteration : 195 ||B r|| = 0.00106156
Pass : 4 Iteration : 196 ||B r|| = 0.000979129
Pass : 4 Iteration : 197 ||B r|| = 0.000974447
Pass : 4 Iteration : 198 ||B r|| = 0.000913577
Pass : 4 Iteration : 199 ||B r|| = 0.000824117
Pass : 4 Iteration : 200 ||B r|| = 0.000819664
Restarting...
Pass : 5 Iteration : 201 ||B r|| = 0.000819566
Pass : 5 Iteration : 202 ||B r|| = 0.000802101
Pass : 5 Iteration : 203 ||B r|| = 0.000793705
Pass : 5 Iteration : 204 ||B r|| = 0.000779788
Pass : 5 Iteration : 205 ||B r|| = 0.000730173
Pass : 5 Iteration : 206 ||B r|| = 0.000710072
Pass : 5 Iteration : 207 ||B r|| = 0.000686091
Pass : 5 Iteration : 208 ||B r|| = 0.000635314
Pass : 5 Iteration : 209 ||B r|| = 0.000635226
Pass : 5 Iteration : 210 ||B r|| = 0.000604069
Pass : 5 Iteration : 211 ||B r|| = 0.000565668
Pass : 5 Iteration : 212 ||B r|| = 0.000557792
Pass : 5 Iteration : 213 ||B r|| = 0.000515749
Pass : 5 Iteration : 214 ||B r|| = 0.000513034
Pass : 5 Iteration : 215 ||B r|| = 0.000481894
Pass : 5 Iteration : 216 ||B r|| = 0.000451544
Pass : 5 Iteration : 217 ||B r|| = 0.00044852
Pass : 5 Iteration : 218 ||B r|| = 0.000393422
Pass : 5 Iteration : 219 ||B r|| = 0.000381413
Pass : 5 Iteration : 220 ||B r|| = 0.000361236
Pass : 5 Iteration : 221 ||B r|| = 0.000336538
Pass : 5 Iteration : 222 ||B r|| = 0.000336118
Pass : 5 Iteration : 223 ||B r|| = 0.000320216
Pass : 5 Iteration : 224 ||B r|| = 0.000311681
Pass : 5 Iteration : 225 ||B r|| = 0.000300208
Pass : 5 Iteration : 226 ||B r|| = 0.000280096
Pass : 5 Iteration : 227 ||B r|| = 0.000280017
Pass : 5 Iteration : 228 ||B r|| = 0.000265884
Pass : 5 Iteration : 229 ||B r|| = 0.000254531
Pass : 5 Iteration : 230 ||B r|| = 0.000253443
Pass : 5 Iteration : 231 ||B r|| = 0.000232182
Pass : 5 Iteration : 232 ||B r|| = 0.000231948
Pass : 5 Iteration : 233 ||B r|| = 0.000219717
Pass : 5 Iteration : 234 ||B r|| = 0.000210106
Pass : 5 Iteration : 235 ||B r|| = 0.000208378
Pass : 5 Iteration : 236 ||B r|| = 0.000192791
Pass : 5 Iteration : 237 ||B r|| = 0.000191389
Pass : 5 Iteration : 238 ||B r|| = 0.000181136
Pass : 5 Iteration : 239 ||B r|| = 0.000173082
Pass : 5 Iteration : 240 ||B r|| = 0.000172178
Pass : 5 Iteration : 241 ||B r|| = 0.000163582
Pass : 5 Iteration : 242 ||B r|| = 0.000160314
Pass : 5 Iteration : 243 ||B r|| = 0.000154194
Pass : 5 Iteration : 244 ||B r|| = 0.000142641
Pass : 5 Iteration : 245 ||B r|| = 0.000142245
Pass : 5 Iteration : 246 ||B r|| = 0.000135685
Pass : 5 Iteration : 247 ||B r|| = 0.000134161
Pass : 5 Iteration : 248 ||B r|| = 0.00013191
Pass : 5 Iteration : 249 ||B r|| = 0.00011789
Pass : 5 Iteration : 250 ||B r|| = 0.000117448
Restarting...
Pass : 6 Iteration : 251 ||B r|| = 0.000117443
Pass : 6 Iteration : 252 ||B r|| = 0.000111241
Pass : 6 Iteration : 253 ||B r|| = 0.000111092
Pass : 6 Iteration : 254 ||B r|| = 0.000111075
Pass : 6 Iteration : 255 ||B r|| = 0.000101403
Pass : 6 Iteration : 256 ||B r|| = 0.000100984
Pass : 6 Iteration : 257 ||B r|| = 9.60892e-05
Pass : 6 Iteration : 258 ||B r|| = 9.16341e-05
Pass : 6 Iteration : 259 ||B r|| = 9.1184e-05
Pass : 6 Iteration : 260 ||B r|| = 8.57519e-05
Pass : 6 Iteration : 261 ||B r|| = 8.49038e-05
Pass : 6 Iteration : 262 ||B r|| = 8.25868e-05
Pass : 6 Iteration : 263 ||B r|| = 7.84909e-05
Pass : 6 Iteration : 264 ||B r|| = 7.84882e-05
Pass : 6 Iteration : 265 ||B r|| = 7.17122e-05
Pass : 6 Iteration : 266 ||B r|| = 7.06387e-05
Pass : 6 Iteration : 267 ||B r|| = 6.88435e-05
Pass : 6 Iteration : 268 ||B r|| = 6.51125e-05
Pass : 6 Iteration : 269 ||B r|| = 6.51119e-05
Pass : 6 Iteration : 270 ||B r|| = 6.11726e-05
Pass : 6 Iteration : 271 ||B r|| = 5.95685e-05
Pass : 6 Iteration : 272 ||B r|| = 5.69221e-05
Pass : 6 Iteration : 273 ||B r|| = 5.31348e-05
Pass : 6 Iteration : 274 ||B r|| = 5.29896e-05
Pass : 6 Iteration : 275 ||B r|| = 5.06603e-05
Pass : 6 Iteration : 276 ||B r|| = 4.77003e-05
Pass : 6 Iteration : 277 ||B r|| = 4.69104e-05
Pass : 6 Iteration : 278 ||B r|| = 4.35213e-05
Pass : 6 Iteration : 279 ||B r|| = 4.34584e-05
Pass : 6 Iteration : 280 ||B r|| = 4.13801e-05
Pass : 6 Iteration : 281 ||B r|| = 3.80137e-05
Pass : 6 Iteration : 282 ||B r|| = 3.73519e-05
Pass : 6 Iteration : 283 ||B r|| = 3.40659e-05
Pass : 6 Iteration : 284 ||B r|| = 3.35469e-05
Pass : 6 Iteration : 285 ||B r|| = 3.24228e-05
Pass : 6 Iteration : 286 ||B r|| = 2.82691e-05
Pass : 6 Iteration : 287 ||B r|| = 2.82415e-05
Pass : 6 Iteration : 288 ||B r|| = 2.4949e-05
Pass : 6 Iteration : 289 ||B r|| = 2.42639e-05
Pass : 6 Iteration : 290 ||B r|| = 2.35408e-05
Pass : 6 Iteration : 291 ||B r|| = 2.19407e-05
Pass : 6 Iteration : 292 ||B r|| = 2.19132e-05
Pass : 6 Iteration : 293 ||B r|| = 2.03845e-05
Pass : 6 Iteration : 294 ||B r|| = 1.92894e-05
Pass : 6 Iteration : 295 ||B r|| = 1.89518e-05
Pass : 6 Iteration : 296 ||B r|| = 1.72028e-05
Pass : 6 Iteration : 297 ||B r|| = 1.71928e-05
Pass : 6 Iteration : 298 ||B r|| = 1.63643e-05
Pass : 6 Iteration : 299 ||B r|| = 1.56163e-05
Pass : 6 Iteration : 300 ||B r|| = 1.54755e-05
Restarting...
Pass : 7 Iteration : 301 ||B r|| = 1.54724e-05
Pass : 7 Iteration : 302 ||B r|| = 1.53376e-05
Pass : 7 Iteration : 303 ||B r|| = 1.50205e-05
Pass : 7 Iteration : 304 ||B r|| = 1.47195e-05
Pass : 7 Iteration : 305 ||B r|| = 1.34414e-05
Pass : 7 Iteration : 306 ||B r|| = 1.30372e-05
Pass : 7 Iteration : 307 ||B r|| = 1.26163e-05
Pass : 7 Iteration : 308 ||B r|| = 1.17954e-05
Pass : 7 Iteration : 309 ||B r|| = 1.17113e-05
Pass : 7 Iteration : 310 ||B r|| = 1.12938e-05
Pass : 7 Iteration : 311 ||B r|| = 1.04865e-05
Pass : 7 Iteration : 312 ||B r|| = 1.03571e-05
Pass : 7 Iteration : 313 ||B r|| = 9.56454e-06
Pass : 7 Iteration : 314 ||B r|| = 9.44709e-06
Pass : 7 Iteration : 315 ||B r|| = 9.02016e-06
Pass : 7 Iteration : 316 ||B r|| = 8.27621e-06
Pass : 7 Iteration : 317 ||B r|| = 8.26159e-06
Pass : 7 Iteration : 318 ||B r|| = 7.18002e-06
Pass : 7 Iteration : 319 ||B r|| = 6.95003e-06
Pass : 7 Iteration : 320 ||B r|| = 6.73497e-06
Pass : 7 Iteration : 321 ||B r|| = 6.25227e-06
Pass : 7 Iteration : 322 ||B r|| = 6.24358e-06
Pass : 7 Iteration : 323 ||B r|| = 5.90685e-06
Pass : 7 Iteration : 324 ||B r|| = 5.69217e-06
Pass : 7 Iteration : 325 ||B r|| = 5.59816e-06
Pass : 7 Iteration : 326 ||B r|| = 5.19767e-06
Pass : 7 Iteration : 327 ||B r|| = 5.18732e-06
Pass : 7 Iteration : 328 ||B r|| = 4.978e-06
Pass : 7 Iteration : 329 ||B r|| = 4.61108e-06
Pass : 7 Iteration : 330 ||B r|| = 4.60926e-06
Pass : 7 Iteration : 331 ||B r|| = 4.23343e-06
Pass : 7 Iteration : 332 ||B r|| = 4.23029e-06
Pass : 7 Iteration : 333 ||B r|| = 4.01039e-06
Pass : 7 Iteration : 334 ||B r|| = 3.86812e-06
Pass : 7 Iteration : 335 ||B r|| = 3.86282e-06
Pass : 7 Iteration : 336 ||B r|| = 3.60676e-06
Pass : 7 Iteration : 337 ||B r|| = 3.53527e-06
Pass : 7 Iteration : 338 ||B r|| = 3.33113e-06
Pass : 7 Iteration : 339 ||B r|| = 3.15944e-06
Pass : 7 Iteration : 340 ||B r|| = 3.14716e-06
Pass : 7 Iteration : 341 ||B r|| = 2.97802e-06
Pass : 7 Iteration : 342 ||B r|| = 2.95139e-06
Pass : 7 Iteration : 343 ||B r|| = 2.86922e-06
Pass : 7 Iteration : 344 ||B r|| = 2.65035e-06
Pass : 7 Iteration : 345 ||B r|| = 2.64952e-06
Pass : 7 Iteration : 346 ||B r|| = 2.48989e-06
Pass : 7 Iteration : 347 ||B r|| = 2.42609e-06
Pass : 7 Iteration : 348 ||B r|| = 2.35361e-06
Pass : 7 Iteration : 349 ||B r|| = 2.0977e-06
Pass : 7 Iteration : 350 ||B r|| = 2.0743e-06
Restarting...
Pass : 8 Iteration : 351 ||B r|| = 2.074e-06
Pass : 8 Iteration : 352 ||B r|| = 1.9458e-06
Pass : 8 Iteration : 353 ||B r|| = 1.91268e-06
Pass : 8 Iteration : 354 ||B r|| = 1.9109e-06
Pass : 8 Iteration : 355 ||B r|| = 1.71169e-06
Pass : 8 Iteration : 356 ||B r|| = 1.70656e-06
Pass : 8 Iteration : 357 ||B r|| = 1.61858e-06
Pass : 8 Iteration : 358 ||B r|| = 1.53201e-06
Pass : 8 Iteration : 359 ||B r|| = 1.52511e-06
Pass : 8 Iteration : 360 ||B r|| = 1.4294e-06
Pass : 8 Iteration : 361 ||B r|| = 1.40067e-06
Pass : 8 Iteration : 362 ||B r|| = 1.35966e-06
Pass : 8 Iteration : 363 ||B r|| = 1.29997e-06
Pass : 8 Iteration : 364 ||B r|| = 1.29896e-06
Pass : 8 Iteration : 365 ||B r|| = 1.192e-06
Pass : 8 Iteration : 366 ||B r|| = 1.17842e-06
Pass : 8 Iteration : 367 ||B r|| = 1.14545e-06
Pass : 8 Iteration : 368 ||B r|| = 1.08481e-06
Pass : 8 Iteration : 369 ||B r|| = 1.08408e-06
Pass : 8 Iteration : 370 ||B r|| = 1.01158e-06
Pass : 8 Iteration : 371 ||B r|| = 9.87365e-07
Pass : 8 Iteration : 372 ||B r|| = 9.53571e-07
Pass : 8 Iteration : 373 ||B r|| = 9.02865e-07
Pass : 8 Iteration : 374 ||B r|| = 9.02529e-07
Pass : 8 Iteration : 375 ||B r|| = 8.35677e-07
GMRES+GS converged in 375 iterations with a residual norm of 8.35677e-07.
GMRES solver took 0.203855s.
|| q_h - q_ex || / || q_ex || = 5.07159e-05
|| t_h - t_ex || / || t_ex || = 2.61662e-05
+60
View File
@@ -0,0 +1,60 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--hybridization
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2048
dim(W) = 1024
dim(V+W) = 3072
***********************************************************
Assembly took 0.0120309s.
Preconditioner took 9.286e-06s.
Pass : 1 Iteration : 0 ||B r|| = 1.96731
Pass : 1 Iteration : 1 ||B r|| = 1.24082
Pass : 1 Iteration : 2 ||B r|| = 0.785152
Pass : 1 Iteration : 3 ||B r|| = 0.612962
Pass : 1 Iteration : 4 ||B r|| = 0.444865
Pass : 1 Iteration : 5 ||B r|| = 0.308536
Pass : 1 Iteration : 6 ||B r|| = 0.181062
Pass : 1 Iteration : 7 ||B r|| = 0.0872824
Pass : 1 Iteration : 8 ||B r|| = 0.048816
Pass : 1 Iteration : 9 ||B r|| = 0.0234022
Pass : 1 Iteration : 10 ||B r|| = 0.0119249
Pass : 1 Iteration : 11 ||B r|| = 0.00419618
Pass : 1 Iteration : 12 ||B r|| = 0.00219869
Pass : 1 Iteration : 13 ||B r|| = 0.00115642
Pass : 1 Iteration : 14 ||B r|| = 0.000637756
Pass : 1 Iteration : 15 ||B r|| = 0.000297414
Pass : 1 Iteration : 16 ||B r|| = 0.000196751
Pass : 1 Iteration : 17 ||B r|| = 0.000123272
Pass : 1 Iteration : 18 ||B r|| = 6.14247e-05
Pass : 1 Iteration : 19 ||B r|| = 2.32696e-05
Pass : 1 Iteration : 20 ||B r|| = 1.13978e-05
Pass : 1 Iteration : 21 ||B r|| = 4.39964e-06
Pass : 1 Iteration : 22 ||B r|| = 1.71455e-06
GMRES+GS converged in 22 iterations with a residual norm of 1.71455e-06.
GMRES solver took 0.00161297s.
|| q_h - q_ex || / || q_ex || = 1.03793e-05
|| t_h - t_ex || / || t_ex || = 1.12283e-05
+424
View File
@@ -0,0 +1,424 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-hybridization
--nonlinear
--no-nonlinear-convection
--hdg_scheme 1
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2048
dim(W) = 1024
dim(V+W) = 3072
***********************************************************
Assembly took 0.113936s.
Preconditioner took 0.0180309s.
Pass : 1 Iteration : 0 ||B r|| = 0.900577
Pass : 1 Iteration : 1 ||B r|| = 0.900577
Pass : 1 Iteration : 2 ||B r|| = 0.900434
Pass : 1 Iteration : 3 ||B r|| = 0.900408
Pass : 1 Iteration : 4 ||B r|| = 0.900243
Pass : 1 Iteration : 5 ||B r|| = 0.899912
Pass : 1 Iteration : 6 ||B r|| = 0.899901
Pass : 1 Iteration : 7 ||B r|| = 0.898453
Pass : 1 Iteration : 8 ||B r|| = 0.898147
Pass : 1 Iteration : 9 ||B r|| = 0.892867
Pass : 1 Iteration : 10 ||B r|| = 0.89046
Pass : 1 Iteration : 11 ||B r|| = 0.890149
Pass : 1 Iteration : 12 ||B r|| = 0.887881
Pass : 1 Iteration : 13 ||B r|| = 0.886497
Pass : 1 Iteration : 14 ||B r|| = 0.881958
Pass : 1 Iteration : 15 ||B r|| = 0.873768
Pass : 1 Iteration : 16 ||B r|| = 0.866676
Pass : 1 Iteration : 17 ||B r|| = 0.862158
Pass : 1 Iteration : 18 ||B r|| = 0.862121
Pass : 1 Iteration : 19 ||B r|| = 0.861983
Pass : 1 Iteration : 20 ||B r|| = 0.852531
Pass : 1 Iteration : 21 ||B r|| = 0.851407
Pass : 1 Iteration : 22 ||B r|| = 0.81114
Pass : 1 Iteration : 23 ||B r|| = 0.811092
Pass : 1 Iteration : 24 ||B r|| = 0.794531
Pass : 1 Iteration : 25 ||B r|| = 0.794531
Pass : 1 Iteration : 26 ||B r|| = 0.788509
Pass : 1 Iteration : 27 ||B r|| = 0.783442
Pass : 1 Iteration : 28 ||B r|| = 0.75365
Pass : 1 Iteration : 29 ||B r|| = 0.736124
Pass : 1 Iteration : 30 ||B r|| = 0.718001
Pass : 1 Iteration : 31 ||B r|| = 0.70199
Pass : 1 Iteration : 32 ||B r|| = 0.701983
Pass : 1 Iteration : 33 ||B r|| = 0.691506
Pass : 1 Iteration : 34 ||B r|| = 0.687431
Pass : 1 Iteration : 35 ||B r|| = 0.620939
Pass : 1 Iteration : 36 ||B r|| = 0.620787
Pass : 1 Iteration : 37 ||B r|| = 0.579878
Pass : 1 Iteration : 38 ||B r|| = 0.577254
Pass : 1 Iteration : 39 ||B r|| = 0.577153
Pass : 1 Iteration : 40 ||B r|| = 0.573348
Pass : 1 Iteration : 41 ||B r|| = 0.540128
Pass : 1 Iteration : 42 ||B r|| = 0.500686
Pass : 1 Iteration : 43 ||B r|| = 0.474183
Pass : 1 Iteration : 44 ||B r|| = 0.447715
Pass : 1 Iteration : 45 ||B r|| = 0.441645
Pass : 1 Iteration : 46 ||B r|| = 0.43763
Pass : 1 Iteration : 47 ||B r|| = 0.437304
Pass : 1 Iteration : 48 ||B r|| = 0.388192
Pass : 1 Iteration : 49 ||B r|| = 0.386414
Pass : 1 Iteration : 50 ||B r|| = 0.346785
Restarting...
Pass : 2 Iteration : 51 ||B r|| = 0.346783
Pass : 2 Iteration : 52 ||B r|| = 0.346753
Pass : 2 Iteration : 53 ||B r|| = 0.346725
Pass : 2 Iteration : 54 ||B r|| = 0.346369
Pass : 2 Iteration : 55 ||B r|| = 0.345779
Pass : 2 Iteration : 56 ||B r|| = 0.340784
Pass : 2 Iteration : 57 ||B r|| = 0.338059
Pass : 2 Iteration : 58 ||B r|| = 0.330718
Pass : 2 Iteration : 59 ||B r|| = 0.32847
Pass : 2 Iteration : 60 ||B r|| = 0.326365
Pass : 2 Iteration : 61 ||B r|| = 0.32017
Pass : 2 Iteration : 62 ||B r|| = 0.319864
Pass : 2 Iteration : 63 ||B r|| = 0.290191
Pass : 2 Iteration : 64 ||B r|| = 0.29019
Pass : 2 Iteration : 65 ||B r|| = 0.275545
Pass : 2 Iteration : 66 ||B r|| = 0.274977
Pass : 2 Iteration : 67 ||B r|| = 0.274975
Pass : 2 Iteration : 68 ||B r|| = 0.250095
Pass : 2 Iteration : 69 ||B r|| = 0.245757
Pass : 2 Iteration : 70 ||B r|| = 0.226498
Pass : 2 Iteration : 71 ||B r|| = 0.21832
Pass : 2 Iteration : 72 ||B r|| = 0.209813
Pass : 2 Iteration : 73 ||B r|| = 0.197498
Pass : 2 Iteration : 74 ||B r|| = 0.194375
Pass : 2 Iteration : 75 ||B r|| = 0.185865
Pass : 2 Iteration : 76 ||B r|| = 0.160081
Pass : 2 Iteration : 77 ||B r|| = 0.155704
Pass : 2 Iteration : 78 ||B r|| = 0.140027
Pass : 2 Iteration : 79 ||B r|| = 0.138448
Pass : 2 Iteration : 80 ||B r|| = 0.138139
Pass : 2 Iteration : 81 ||B r|| = 0.125615
Pass : 2 Iteration : 82 ||B r|| = 0.12453
Pass : 2 Iteration : 83 ||B r|| = 0.109713
Pass : 2 Iteration : 84 ||B r|| = 0.108677
Pass : 2 Iteration : 85 ||B r|| = 0.105206
Pass : 2 Iteration : 86 ||B r|| = 0.10045
Pass : 2 Iteration : 87 ||B r|| = 0.0995337
Pass : 2 Iteration : 88 ||B r|| = 0.0927337
Pass : 2 Iteration : 89 ||B r|| = 0.0865765
Pass : 2 Iteration : 90 ||B r|| = 0.0836921
Pass : 2 Iteration : 91 ||B r|| = 0.0777179
Pass : 2 Iteration : 92 ||B r|| = 0.0777125
Pass : 2 Iteration : 93 ||B r|| = 0.075328
Pass : 2 Iteration : 94 ||B r|| = 0.0698781
Pass : 2 Iteration : 95 ||B r|| = 0.0695923
Pass : 2 Iteration : 96 ||B r|| = 0.0582517
Pass : 2 Iteration : 97 ||B r|| = 0.0578877
Pass : 2 Iteration : 98 ||B r|| = 0.0509695
Pass : 2 Iteration : 99 ||B r|| = 0.0492122
Pass : 2 Iteration : 100 ||B r|| = 0.049119
Restarting...
Pass : 3 Iteration : 101 ||B r|| = 0.0491174
Pass : 3 Iteration : 102 ||B r|| = 0.048935
Pass : 3 Iteration : 103 ||B r|| = 0.0487952
Pass : 3 Iteration : 104 ||B r|| = 0.048271
Pass : 3 Iteration : 105 ||B r|| = 0.0456151
Pass : 3 Iteration : 106 ||B r|| = 0.0420326
Pass : 3 Iteration : 107 ||B r|| = 0.0405407
Pass : 3 Iteration : 108 ||B r|| = 0.0376982
Pass : 3 Iteration : 109 ||B r|| = 0.0374234
Pass : 3 Iteration : 110 ||B r|| = 0.0359602
Pass : 3 Iteration : 111 ||B r|| = 0.0336756
Pass : 3 Iteration : 112 ||B r|| = 0.0331036
Pass : 3 Iteration : 113 ||B r|| = 0.0304233
Pass : 3 Iteration : 114 ||B r|| = 0.0303832
Pass : 3 Iteration : 115 ||B r|| = 0.0290383
Pass : 3 Iteration : 116 ||B r|| = 0.0270094
Pass : 3 Iteration : 117 ||B r|| = 0.0269671
Pass : 3 Iteration : 118 ||B r|| = 0.0234557
Pass : 3 Iteration : 119 ||B r|| = 0.0233749
Pass : 3 Iteration : 120 ||B r|| = 0.0222709
Pass : 3 Iteration : 121 ||B r|| = 0.0210607
Pass : 3 Iteration : 122 ||B r|| = 0.0210189
Pass : 3 Iteration : 123 ||B r|| = 0.019523
Pass : 3 Iteration : 124 ||B r|| = 0.0190986
Pass : 3 Iteration : 125 ||B r|| = 0.0182602
Pass : 3 Iteration : 126 ||B r|| = 0.0165908
Pass : 3 Iteration : 127 ||B r|| = 0.0165826
Pass : 3 Iteration : 128 ||B r|| = 0.0155958
Pass : 3 Iteration : 129 ||B r|| = 0.0149154
Pass : 3 Iteration : 130 ||B r|| = 0.0148837
Pass : 3 Iteration : 131 ||B r|| = 0.0133188
Pass : 3 Iteration : 132 ||B r|| = 0.0133041
Pass : 3 Iteration : 133 ||B r|| = 0.0126119
Pass : 3 Iteration : 134 ||B r|| = 0.012336
Pass : 3 Iteration : 135 ||B r|| = 0.0123217
Pass : 3 Iteration : 136 ||B r|| = 0.0111051
Pass : 3 Iteration : 137 ||B r|| = 0.0110814
Pass : 3 Iteration : 138 ||B r|| = 0.0105874
Pass : 3 Iteration : 139 ||B r|| = 0.0104149
Pass : 3 Iteration : 140 ||B r|| = 0.0104149
Pass : 3 Iteration : 141 ||B r|| = 0.00988104
Pass : 3 Iteration : 142 ||B r|| = 0.00946548
Pass : 3 Iteration : 143 ||B r|| = 0.00898965
Pass : 3 Iteration : 144 ||B r|| = 0.00849411
Pass : 3 Iteration : 145 ||B r|| = 0.00847611
Pass : 3 Iteration : 146 ||B r|| = 0.00791422
Pass : 3 Iteration : 147 ||B r|| = 0.00760638
Pass : 3 Iteration : 148 ||B r|| = 0.00739417
Pass : 3 Iteration : 149 ||B r|| = 0.00658704
Pass : 3 Iteration : 150 ||B r|| = 0.00657621
Restarting...
Pass : 4 Iteration : 151 ||B r|| = 0.00657611
Pass : 4 Iteration : 152 ||B r|| = 0.00631889
Pass : 4 Iteration : 153 ||B r|| = 0.00630107
Pass : 4 Iteration : 154 ||B r|| = 0.00628496
Pass : 4 Iteration : 155 ||B r|| = 0.00581361
Pass : 4 Iteration : 156 ||B r|| = 0.00572566
Pass : 4 Iteration : 157 ||B r|| = 0.00558237
Pass : 4 Iteration : 158 ||B r|| = 0.00520369
Pass : 4 Iteration : 159 ||B r|| = 0.0052025
Pass : 4 Iteration : 160 ||B r|| = 0.00487642
Pass : 4 Iteration : 161 ||B r|| = 0.00479177
Pass : 4 Iteration : 162 ||B r|| = 0.00468477
Pass : 4 Iteration : 163 ||B r|| = 0.00440739
Pass : 4 Iteration : 164 ||B r|| = 0.00440725
Pass : 4 Iteration : 165 ||B r|| = 0.00415237
Pass : 4 Iteration : 166 ||B r|| = 0.00404373
Pass : 4 Iteration : 167 ||B r|| = 0.00399217
Pass : 4 Iteration : 168 ||B r|| = 0.00361744
Pass : 4 Iteration : 169 ||B r|| = 0.00361199
Pass : 4 Iteration : 170 ||B r|| = 0.00342198
Pass : 4 Iteration : 171 ||B r|| = 0.00332275
Pass : 4 Iteration : 172 ||B r|| = 0.00328849
Pass : 4 Iteration : 173 ||B r|| = 0.00301807
Pass : 4 Iteration : 174 ||B r|| = 0.00297077
Pass : 4 Iteration : 175 ||B r|| = 0.00278725
Pass : 4 Iteration : 176 ||B r|| = 0.00265647
Pass : 4 Iteration : 177 ||B r|| = 0.00265138
Pass : 4 Iteration : 178 ||B r|| = 0.00249713
Pass : 4 Iteration : 179 ||B r|| = 0.0024458
Pass : 4 Iteration : 180 ||B r|| = 0.00226749
Pass : 4 Iteration : 181 ||B r|| = 0.00211128
Pass : 4 Iteration : 182 ||B r|| = 0.00209348
Pass : 4 Iteration : 183 ||B r|| = 0.00199424
Pass : 4 Iteration : 184 ||B r|| = 0.00190927
Pass : 4 Iteration : 185 ||B r|| = 0.00186211
Pass : 4 Iteration : 186 ||B r|| = 0.00157145
Pass : 4 Iteration : 187 ||B r|| = 0.00157142
Pass : 4 Iteration : 188 ||B r|| = 0.00141191
Pass : 4 Iteration : 189 ||B r|| = 0.00136095
Pass : 4 Iteration : 190 ||B r|| = 0.00133934
Pass : 4 Iteration : 191 ||B r|| = 0.00123125
Pass : 4 Iteration : 192 ||B r|| = 0.00122694
Pass : 4 Iteration : 193 ||B r|| = 0.00112965
Pass : 4 Iteration : 194 ||B r|| = 0.00106884
Pass : 4 Iteration : 195 ||B r|| = 0.00106156
Pass : 4 Iteration : 196 ||B r|| = 0.000979129
Pass : 4 Iteration : 197 ||B r|| = 0.000974447
Pass : 4 Iteration : 198 ||B r|| = 0.000913577
Pass : 4 Iteration : 199 ||B r|| = 0.000824117
Pass : 4 Iteration : 200 ||B r|| = 0.000819664
Restarting...
Pass : 5 Iteration : 201 ||B r|| = 0.000819566
Pass : 5 Iteration : 202 ||B r|| = 0.000802101
Pass : 5 Iteration : 203 ||B r|| = 0.000793705
Pass : 5 Iteration : 204 ||B r|| = 0.000779788
Pass : 5 Iteration : 205 ||B r|| = 0.000730173
Pass : 5 Iteration : 206 ||B r|| = 0.000710072
Pass : 5 Iteration : 207 ||B r|| = 0.000686091
Pass : 5 Iteration : 208 ||B r|| = 0.000635314
Pass : 5 Iteration : 209 ||B r|| = 0.000635226
Pass : 5 Iteration : 210 ||B r|| = 0.000604069
Pass : 5 Iteration : 211 ||B r|| = 0.000565668
Pass : 5 Iteration : 212 ||B r|| = 0.000557792
Pass : 5 Iteration : 213 ||B r|| = 0.000515749
Pass : 5 Iteration : 214 ||B r|| = 0.000513034
Pass : 5 Iteration : 215 ||B r|| = 0.000481894
Pass : 5 Iteration : 216 ||B r|| = 0.000451544
Pass : 5 Iteration : 217 ||B r|| = 0.00044852
Pass : 5 Iteration : 218 ||B r|| = 0.000393422
Pass : 5 Iteration : 219 ||B r|| = 0.000381413
Pass : 5 Iteration : 220 ||B r|| = 0.000361236
Pass : 5 Iteration : 221 ||B r|| = 0.000336538
Pass : 5 Iteration : 222 ||B r|| = 0.000336118
Pass : 5 Iteration : 223 ||B r|| = 0.000320216
Pass : 5 Iteration : 224 ||B r|| = 0.000311681
Pass : 5 Iteration : 225 ||B r|| = 0.000300208
Pass : 5 Iteration : 226 ||B r|| = 0.000280096
Pass : 5 Iteration : 227 ||B r|| = 0.000280017
Pass : 5 Iteration : 228 ||B r|| = 0.000265884
Pass : 5 Iteration : 229 ||B r|| = 0.000254531
Pass : 5 Iteration : 230 ||B r|| = 0.000253443
Pass : 5 Iteration : 231 ||B r|| = 0.000232182
Pass : 5 Iteration : 232 ||B r|| = 0.000231948
Pass : 5 Iteration : 233 ||B r|| = 0.000219717
Pass : 5 Iteration : 234 ||B r|| = 0.000210106
Pass : 5 Iteration : 235 ||B r|| = 0.000208378
Pass : 5 Iteration : 236 ||B r|| = 0.000192791
Pass : 5 Iteration : 237 ||B r|| = 0.000191389
Pass : 5 Iteration : 238 ||B r|| = 0.000181136
Pass : 5 Iteration : 239 ||B r|| = 0.000173082
Pass : 5 Iteration : 240 ||B r|| = 0.000172178
Pass : 5 Iteration : 241 ||B r|| = 0.000163582
Pass : 5 Iteration : 242 ||B r|| = 0.000160314
Pass : 5 Iteration : 243 ||B r|| = 0.000154194
Pass : 5 Iteration : 244 ||B r|| = 0.000142641
Pass : 5 Iteration : 245 ||B r|| = 0.000142245
Pass : 5 Iteration : 246 ||B r|| = 0.000135685
Pass : 5 Iteration : 247 ||B r|| = 0.000134161
Pass : 5 Iteration : 248 ||B r|| = 0.00013191
Pass : 5 Iteration : 249 ||B r|| = 0.00011789
Pass : 5 Iteration : 250 ||B r|| = 0.000117448
Restarting...
Pass : 6 Iteration : 251 ||B r|| = 0.000117443
Pass : 6 Iteration : 252 ||B r|| = 0.000111241
Pass : 6 Iteration : 253 ||B r|| = 0.000111092
Pass : 6 Iteration : 254 ||B r|| = 0.000111075
Pass : 6 Iteration : 255 ||B r|| = 0.000101403
Pass : 6 Iteration : 256 ||B r|| = 0.000100984
Pass : 6 Iteration : 257 ||B r|| = 9.60892e-05
Pass : 6 Iteration : 258 ||B r|| = 9.16341e-05
Pass : 6 Iteration : 259 ||B r|| = 9.1184e-05
Pass : 6 Iteration : 260 ||B r|| = 8.57519e-05
Pass : 6 Iteration : 261 ||B r|| = 8.49038e-05
Pass : 6 Iteration : 262 ||B r|| = 8.25868e-05
Pass : 6 Iteration : 263 ||B r|| = 7.84909e-05
Pass : 6 Iteration : 264 ||B r|| = 7.84882e-05
Pass : 6 Iteration : 265 ||B r|| = 7.17122e-05
Pass : 6 Iteration : 266 ||B r|| = 7.06387e-05
Pass : 6 Iteration : 267 ||B r|| = 6.88435e-05
Pass : 6 Iteration : 268 ||B r|| = 6.51125e-05
Pass : 6 Iteration : 269 ||B r|| = 6.51119e-05
Pass : 6 Iteration : 270 ||B r|| = 6.11726e-05
Pass : 6 Iteration : 271 ||B r|| = 5.95685e-05
Pass : 6 Iteration : 272 ||B r|| = 5.69221e-05
Pass : 6 Iteration : 273 ||B r|| = 5.31348e-05
Pass : 6 Iteration : 274 ||B r|| = 5.29896e-05
Pass : 6 Iteration : 275 ||B r|| = 5.06603e-05
Pass : 6 Iteration : 276 ||B r|| = 4.77003e-05
Pass : 6 Iteration : 277 ||B r|| = 4.69104e-05
Pass : 6 Iteration : 278 ||B r|| = 4.35213e-05
Pass : 6 Iteration : 279 ||B r|| = 4.34584e-05
Pass : 6 Iteration : 280 ||B r|| = 4.13801e-05
Pass : 6 Iteration : 281 ||B r|| = 3.80137e-05
Pass : 6 Iteration : 282 ||B r|| = 3.73519e-05
Pass : 6 Iteration : 283 ||B r|| = 3.40659e-05
Pass : 6 Iteration : 284 ||B r|| = 3.35469e-05
Pass : 6 Iteration : 285 ||B r|| = 3.24228e-05
Pass : 6 Iteration : 286 ||B r|| = 2.82691e-05
Pass : 6 Iteration : 287 ||B r|| = 2.82415e-05
Pass : 6 Iteration : 288 ||B r|| = 2.4949e-05
Pass : 6 Iteration : 289 ||B r|| = 2.42639e-05
Pass : 6 Iteration : 290 ||B r|| = 2.35408e-05
Pass : 6 Iteration : 291 ||B r|| = 2.19407e-05
Pass : 6 Iteration : 292 ||B r|| = 2.19132e-05
Pass : 6 Iteration : 293 ||B r|| = 2.03845e-05
Pass : 6 Iteration : 294 ||B r|| = 1.92894e-05
Pass : 6 Iteration : 295 ||B r|| = 1.89518e-05
Pass : 6 Iteration : 296 ||B r|| = 1.72028e-05
Pass : 6 Iteration : 297 ||B r|| = 1.71928e-05
Pass : 6 Iteration : 298 ||B r|| = 1.63643e-05
Pass : 6 Iteration : 299 ||B r|| = 1.56163e-05
Pass : 6 Iteration : 300 ||B r|| = 1.54755e-05
Restarting...
Pass : 7 Iteration : 301 ||B r|| = 1.54724e-05
Pass : 7 Iteration : 302 ||B r|| = 1.53376e-05
Pass : 7 Iteration : 303 ||B r|| = 1.50205e-05
Pass : 7 Iteration : 304 ||B r|| = 1.47195e-05
Pass : 7 Iteration : 305 ||B r|| = 1.34414e-05
Pass : 7 Iteration : 306 ||B r|| = 1.30372e-05
Pass : 7 Iteration : 307 ||B r|| = 1.26163e-05
Pass : 7 Iteration : 308 ||B r|| = 1.17954e-05
Pass : 7 Iteration : 309 ||B r|| = 1.17113e-05
Pass : 7 Iteration : 310 ||B r|| = 1.12938e-05
Pass : 7 Iteration : 311 ||B r|| = 1.04865e-05
Pass : 7 Iteration : 312 ||B r|| = 1.03571e-05
Pass : 7 Iteration : 313 ||B r|| = 9.56454e-06
Pass : 7 Iteration : 314 ||B r|| = 9.44709e-06
Pass : 7 Iteration : 315 ||B r|| = 9.02016e-06
Pass : 7 Iteration : 316 ||B r|| = 8.27621e-06
Pass : 7 Iteration : 317 ||B r|| = 8.26159e-06
Pass : 7 Iteration : 318 ||B r|| = 7.18002e-06
Pass : 7 Iteration : 319 ||B r|| = 6.95003e-06
Pass : 7 Iteration : 320 ||B r|| = 6.73497e-06
Pass : 7 Iteration : 321 ||B r|| = 6.25227e-06
Pass : 7 Iteration : 322 ||B r|| = 6.24358e-06
Pass : 7 Iteration : 323 ||B r|| = 5.90685e-06
Pass : 7 Iteration : 324 ||B r|| = 5.69217e-06
Pass : 7 Iteration : 325 ||B r|| = 5.59816e-06
Pass : 7 Iteration : 326 ||B r|| = 5.19767e-06
Pass : 7 Iteration : 327 ||B r|| = 5.18732e-06
Pass : 7 Iteration : 328 ||B r|| = 4.978e-06
Pass : 7 Iteration : 329 ||B r|| = 4.61108e-06
Pass : 7 Iteration : 330 ||B r|| = 4.60926e-06
Pass : 7 Iteration : 331 ||B r|| = 4.23343e-06
Pass : 7 Iteration : 332 ||B r|| = 4.23029e-06
Pass : 7 Iteration : 333 ||B r|| = 4.01039e-06
Pass : 7 Iteration : 334 ||B r|| = 3.86812e-06
Pass : 7 Iteration : 335 ||B r|| = 3.86282e-06
Pass : 7 Iteration : 336 ||B r|| = 3.60676e-06
Pass : 7 Iteration : 337 ||B r|| = 3.53527e-06
Pass : 7 Iteration : 338 ||B r|| = 3.33113e-06
Pass : 7 Iteration : 339 ||B r|| = 3.15944e-06
Pass : 7 Iteration : 340 ||B r|| = 3.14716e-06
Pass : 7 Iteration : 341 ||B r|| = 2.97802e-06
Pass : 7 Iteration : 342 ||B r|| = 2.95139e-06
Pass : 7 Iteration : 343 ||B r|| = 2.86922e-06
Pass : 7 Iteration : 344 ||B r|| = 2.65035e-06
Pass : 7 Iteration : 345 ||B r|| = 2.64952e-06
Pass : 7 Iteration : 346 ||B r|| = 2.48989e-06
Pass : 7 Iteration : 347 ||B r|| = 2.42609e-06
Pass : 7 Iteration : 348 ||B r|| = 2.35361e-06
Pass : 7 Iteration : 349 ||B r|| = 2.0977e-06
Pass : 7 Iteration : 350 ||B r|| = 2.0743e-06
Restarting...
Pass : 8 Iteration : 351 ||B r|| = 2.074e-06
Pass : 8 Iteration : 352 ||B r|| = 1.9458e-06
Pass : 8 Iteration : 353 ||B r|| = 1.91268e-06
Pass : 8 Iteration : 354 ||B r|| = 1.9109e-06
Pass : 8 Iteration : 355 ||B r|| = 1.71169e-06
Pass : 8 Iteration : 356 ||B r|| = 1.70656e-06
Pass : 8 Iteration : 357 ||B r|| = 1.61858e-06
Pass : 8 Iteration : 358 ||B r|| = 1.53201e-06
Pass : 8 Iteration : 359 ||B r|| = 1.52511e-06
Pass : 8 Iteration : 360 ||B r|| = 1.4294e-06
Pass : 8 Iteration : 361 ||B r|| = 1.40067e-06
Pass : 8 Iteration : 362 ||B r|| = 1.35966e-06
Pass : 8 Iteration : 363 ||B r|| = 1.29997e-06
Pass : 8 Iteration : 364 ||B r|| = 1.29896e-06
Pass : 8 Iteration : 365 ||B r|| = 1.192e-06
Pass : 8 Iteration : 366 ||B r|| = 1.17842e-06
Pass : 8 Iteration : 367 ||B r|| = 1.14545e-06
Pass : 8 Iteration : 368 ||B r|| = 1.08481e-06
Pass : 8 Iteration : 369 ||B r|| = 1.08408e-06
Pass : 8 Iteration : 370 ||B r|| = 1.01158e-06
Pass : 8 Iteration : 371 ||B r|| = 9.87365e-07
Pass : 8 Iteration : 372 ||B r|| = 9.53571e-07
Pass : 8 Iteration : 373 ||B r|| = 9.02865e-07
Pass : 8 Iteration : 374 ||B r|| = 9.02529e-07
Pass : 8 Iteration : 375 ||B r|| = 8.35677e-07
GMRES+GS converged in 375 iterations with a residual norm of 8.35677e-07.
solver took 3.20645s.
|| q_h - q_ex || / || q_ex || = 5.07159e-05
|| t_h - t_ex || / || t_ex || = 2.61662e-05
@@ -0,0 +1,56 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-hybridization
--nonlinear
--no-nonlinear-convection
--hdg_scheme 1
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2048
dim(W) = 1024
dim(V+W) = 3072
***********************************************************
Assembly took 0.109221s.
Preconditioner took 0.0286016s.
Pass : 1 Iteration : 0 ||B r|| = 34.0948
Pass : 1 Iteration : 1 ||B r|| = 34.0948
Pass : 1 Iteration : 2 ||B r|| = 0.0882945
Pass : 1 Iteration : 3 ||B r|| = 0.0197291
Pass : 1 Iteration : 4 ||B r|| = 0.0182002
Pass : 1 Iteration : 5 ||B r|| = 0.00466911
Pass : 1 Iteration : 6 ||B r|| = 0.00191841
Pass : 1 Iteration : 7 ||B r|| = 0.00153367
Pass : 1 Iteration : 8 ||B r|| = 0.00108376
Pass : 1 Iteration : 9 ||B r|| = 0.00106531
Pass : 1 Iteration : 10 ||B r|| = 0.000264455
Pass : 1 Iteration : 11 ||B r|| = 9.66463e-05
Pass : 1 Iteration : 12 ||B r|| = 9.54134e-05
Pass : 1 Iteration : 13 ||B r|| = 4.64374e-05
Pass : 1 Iteration : 14 ||B r|| = 2.53717e-05
GMRES+UMFPack converged in 14 iterations with a residual norm of 2.53717e-05.
solver took 0.128301s.
|| q_h - q_ex || / || q_ex || = 5.06633e-05
|| t_h - t_ex || / || t_ex || = 2.61371e-05
+425
View File
@@ -0,0 +1,425 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-hybridization
--no-nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2048
dim(W) = 1024
dim(V+W) = 3072
***********************************************************
Assembly took 0.125661s.
Preconditioner took 0.06072s.
Pass : 1 Iteration : 0 ||B r|| = 0.900577
Pass : 1 Iteration : 1 ||B r|| = 0.900577
Pass : 1 Iteration : 2 ||B r|| = 0.900434
Pass : 1 Iteration : 3 ||B r|| = 0.900408
Pass : 1 Iteration : 4 ||B r|| = 0.900243
Pass : 1 Iteration : 5 ||B r|| = 0.899912
Pass : 1 Iteration : 6 ||B r|| = 0.899901
Pass : 1 Iteration : 7 ||B r|| = 0.898453
Pass : 1 Iteration : 8 ||B r|| = 0.898147
Pass : 1 Iteration : 9 ||B r|| = 0.892867
Pass : 1 Iteration : 10 ||B r|| = 0.89046
Pass : 1 Iteration : 11 ||B r|| = 0.890149
Pass : 1 Iteration : 12 ||B r|| = 0.887881
Pass : 1 Iteration : 13 ||B r|| = 0.886497
Pass : 1 Iteration : 14 ||B r|| = 0.881958
Pass : 1 Iteration : 15 ||B r|| = 0.873768
Pass : 1 Iteration : 16 ||B r|| = 0.866676
Pass : 1 Iteration : 17 ||B r|| = 0.862158
Pass : 1 Iteration : 18 ||B r|| = 0.862121
Pass : 1 Iteration : 19 ||B r|| = 0.861983
Pass : 1 Iteration : 20 ||B r|| = 0.852531
Pass : 1 Iteration : 21 ||B r|| = 0.851407
Pass : 1 Iteration : 22 ||B r|| = 0.81114
Pass : 1 Iteration : 23 ||B r|| = 0.811092
Pass : 1 Iteration : 24 ||B r|| = 0.794531
Pass : 1 Iteration : 25 ||B r|| = 0.794531
Pass : 1 Iteration : 26 ||B r|| = 0.788509
Pass : 1 Iteration : 27 ||B r|| = 0.783442
Pass : 1 Iteration : 28 ||B r|| = 0.75365
Pass : 1 Iteration : 29 ||B r|| = 0.736124
Pass : 1 Iteration : 30 ||B r|| = 0.718001
Pass : 1 Iteration : 31 ||B r|| = 0.70199
Pass : 1 Iteration : 32 ||B r|| = 0.701983
Pass : 1 Iteration : 33 ||B r|| = 0.691506
Pass : 1 Iteration : 34 ||B r|| = 0.687431
Pass : 1 Iteration : 35 ||B r|| = 0.620939
Pass : 1 Iteration : 36 ||B r|| = 0.620787
Pass : 1 Iteration : 37 ||B r|| = 0.579878
Pass : 1 Iteration : 38 ||B r|| = 0.577254
Pass : 1 Iteration : 39 ||B r|| = 0.577153
Pass : 1 Iteration : 40 ||B r|| = 0.573348
Pass : 1 Iteration : 41 ||B r|| = 0.540128
Pass : 1 Iteration : 42 ||B r|| = 0.500686
Pass : 1 Iteration : 43 ||B r|| = 0.474183
Pass : 1 Iteration : 44 ||B r|| = 0.447715
Pass : 1 Iteration : 45 ||B r|| = 0.441645
Pass : 1 Iteration : 46 ||B r|| = 0.43763
Pass : 1 Iteration : 47 ||B r|| = 0.437304
Pass : 1 Iteration : 48 ||B r|| = 0.388192
Pass : 1 Iteration : 49 ||B r|| = 0.386414
Pass : 1 Iteration : 50 ||B r|| = 0.346785
Restarting...
Pass : 2 Iteration : 51 ||B r|| = 0.346783
Pass : 2 Iteration : 52 ||B r|| = 0.346753
Pass : 2 Iteration : 53 ||B r|| = 0.346725
Pass : 2 Iteration : 54 ||B r|| = 0.346369
Pass : 2 Iteration : 55 ||B r|| = 0.345779
Pass : 2 Iteration : 56 ||B r|| = 0.340784
Pass : 2 Iteration : 57 ||B r|| = 0.338059
Pass : 2 Iteration : 58 ||B r|| = 0.330718
Pass : 2 Iteration : 59 ||B r|| = 0.32847
Pass : 2 Iteration : 60 ||B r|| = 0.326365
Pass : 2 Iteration : 61 ||B r|| = 0.32017
Pass : 2 Iteration : 62 ||B r|| = 0.319864
Pass : 2 Iteration : 63 ||B r|| = 0.290191
Pass : 2 Iteration : 64 ||B r|| = 0.29019
Pass : 2 Iteration : 65 ||B r|| = 0.275545
Pass : 2 Iteration : 66 ||B r|| = 0.274977
Pass : 2 Iteration : 67 ||B r|| = 0.274975
Pass : 2 Iteration : 68 ||B r|| = 0.250095
Pass : 2 Iteration : 69 ||B r|| = 0.245757
Pass : 2 Iteration : 70 ||B r|| = 0.226498
Pass : 2 Iteration : 71 ||B r|| = 0.21832
Pass : 2 Iteration : 72 ||B r|| = 0.209813
Pass : 2 Iteration : 73 ||B r|| = 0.197498
Pass : 2 Iteration : 74 ||B r|| = 0.194375
Pass : 2 Iteration : 75 ||B r|| = 0.185865
Pass : 2 Iteration : 76 ||B r|| = 0.160081
Pass : 2 Iteration : 77 ||B r|| = 0.155704
Pass : 2 Iteration : 78 ||B r|| = 0.140027
Pass : 2 Iteration : 79 ||B r|| = 0.138448
Pass : 2 Iteration : 80 ||B r|| = 0.138139
Pass : 2 Iteration : 81 ||B r|| = 0.125615
Pass : 2 Iteration : 82 ||B r|| = 0.12453
Pass : 2 Iteration : 83 ||B r|| = 0.109713
Pass : 2 Iteration : 84 ||B r|| = 0.108677
Pass : 2 Iteration : 85 ||B r|| = 0.105206
Pass : 2 Iteration : 86 ||B r|| = 0.10045
Pass : 2 Iteration : 87 ||B r|| = 0.0995337
Pass : 2 Iteration : 88 ||B r|| = 0.0927337
Pass : 2 Iteration : 89 ||B r|| = 0.0865765
Pass : 2 Iteration : 90 ||B r|| = 0.0836921
Pass : 2 Iteration : 91 ||B r|| = 0.0777179
Pass : 2 Iteration : 92 ||B r|| = 0.0777125
Pass : 2 Iteration : 93 ||B r|| = 0.075328
Pass : 2 Iteration : 94 ||B r|| = 0.0698781
Pass : 2 Iteration : 95 ||B r|| = 0.0695923
Pass : 2 Iteration : 96 ||B r|| = 0.0582517
Pass : 2 Iteration : 97 ||B r|| = 0.0578877
Pass : 2 Iteration : 98 ||B r|| = 0.0509695
Pass : 2 Iteration : 99 ||B r|| = 0.0492122
Pass : 2 Iteration : 100 ||B r|| = 0.049119
Restarting...
Pass : 3 Iteration : 101 ||B r|| = 0.0491174
Pass : 3 Iteration : 102 ||B r|| = 0.048935
Pass : 3 Iteration : 103 ||B r|| = 0.0487952
Pass : 3 Iteration : 104 ||B r|| = 0.048271
Pass : 3 Iteration : 105 ||B r|| = 0.0456151
Pass : 3 Iteration : 106 ||B r|| = 0.0420326
Pass : 3 Iteration : 107 ||B r|| = 0.0405407
Pass : 3 Iteration : 108 ||B r|| = 0.0376982
Pass : 3 Iteration : 109 ||B r|| = 0.0374234
Pass : 3 Iteration : 110 ||B r|| = 0.0359602
Pass : 3 Iteration : 111 ||B r|| = 0.0336756
Pass : 3 Iteration : 112 ||B r|| = 0.0331036
Pass : 3 Iteration : 113 ||B r|| = 0.0304233
Pass : 3 Iteration : 114 ||B r|| = 0.0303832
Pass : 3 Iteration : 115 ||B r|| = 0.0290383
Pass : 3 Iteration : 116 ||B r|| = 0.0270094
Pass : 3 Iteration : 117 ||B r|| = 0.0269671
Pass : 3 Iteration : 118 ||B r|| = 0.0234557
Pass : 3 Iteration : 119 ||B r|| = 0.0233749
Pass : 3 Iteration : 120 ||B r|| = 0.0222709
Pass : 3 Iteration : 121 ||B r|| = 0.0210607
Pass : 3 Iteration : 122 ||B r|| = 0.0210189
Pass : 3 Iteration : 123 ||B r|| = 0.019523
Pass : 3 Iteration : 124 ||B r|| = 0.0190986
Pass : 3 Iteration : 125 ||B r|| = 0.0182602
Pass : 3 Iteration : 126 ||B r|| = 0.0165908
Pass : 3 Iteration : 127 ||B r|| = 0.0165826
Pass : 3 Iteration : 128 ||B r|| = 0.0155958
Pass : 3 Iteration : 129 ||B r|| = 0.0149154
Pass : 3 Iteration : 130 ||B r|| = 0.0148837
Pass : 3 Iteration : 131 ||B r|| = 0.0133188
Pass : 3 Iteration : 132 ||B r|| = 0.0133041
Pass : 3 Iteration : 133 ||B r|| = 0.0126119
Pass : 3 Iteration : 134 ||B r|| = 0.012336
Pass : 3 Iteration : 135 ||B r|| = 0.0123217
Pass : 3 Iteration : 136 ||B r|| = 0.0111051
Pass : 3 Iteration : 137 ||B r|| = 0.0110814
Pass : 3 Iteration : 138 ||B r|| = 0.0105874
Pass : 3 Iteration : 139 ||B r|| = 0.0104149
Pass : 3 Iteration : 140 ||B r|| = 0.0104149
Pass : 3 Iteration : 141 ||B r|| = 0.00988104
Pass : 3 Iteration : 142 ||B r|| = 0.00946548
Pass : 3 Iteration : 143 ||B r|| = 0.00898965
Pass : 3 Iteration : 144 ||B r|| = 0.00849411
Pass : 3 Iteration : 145 ||B r|| = 0.00847611
Pass : 3 Iteration : 146 ||B r|| = 0.00791422
Pass : 3 Iteration : 147 ||B r|| = 0.00760638
Pass : 3 Iteration : 148 ||B r|| = 0.00739417
Pass : 3 Iteration : 149 ||B r|| = 0.00658704
Pass : 3 Iteration : 150 ||B r|| = 0.00657621
Restarting...
Pass : 4 Iteration : 151 ||B r|| = 0.00657611
Pass : 4 Iteration : 152 ||B r|| = 0.00631889
Pass : 4 Iteration : 153 ||B r|| = 0.00630107
Pass : 4 Iteration : 154 ||B r|| = 0.00628496
Pass : 4 Iteration : 155 ||B r|| = 0.00581361
Pass : 4 Iteration : 156 ||B r|| = 0.00572566
Pass : 4 Iteration : 157 ||B r|| = 0.00558237
Pass : 4 Iteration : 158 ||B r|| = 0.00520369
Pass : 4 Iteration : 159 ||B r|| = 0.0052025
Pass : 4 Iteration : 160 ||B r|| = 0.00487642
Pass : 4 Iteration : 161 ||B r|| = 0.00479177
Pass : 4 Iteration : 162 ||B r|| = 0.00468477
Pass : 4 Iteration : 163 ||B r|| = 0.00440739
Pass : 4 Iteration : 164 ||B r|| = 0.00440725
Pass : 4 Iteration : 165 ||B r|| = 0.00415237
Pass : 4 Iteration : 166 ||B r|| = 0.00404373
Pass : 4 Iteration : 167 ||B r|| = 0.00399217
Pass : 4 Iteration : 168 ||B r|| = 0.00361744
Pass : 4 Iteration : 169 ||B r|| = 0.00361199
Pass : 4 Iteration : 170 ||B r|| = 0.00342198
Pass : 4 Iteration : 171 ||B r|| = 0.00332275
Pass : 4 Iteration : 172 ||B r|| = 0.00328849
Pass : 4 Iteration : 173 ||B r|| = 0.00301807
Pass : 4 Iteration : 174 ||B r|| = 0.00297077
Pass : 4 Iteration : 175 ||B r|| = 0.00278725
Pass : 4 Iteration : 176 ||B r|| = 0.00265647
Pass : 4 Iteration : 177 ||B r|| = 0.00265138
Pass : 4 Iteration : 178 ||B r|| = 0.00249713
Pass : 4 Iteration : 179 ||B r|| = 0.0024458
Pass : 4 Iteration : 180 ||B r|| = 0.00226749
Pass : 4 Iteration : 181 ||B r|| = 0.00211128
Pass : 4 Iteration : 182 ||B r|| = 0.00209348
Pass : 4 Iteration : 183 ||B r|| = 0.00199424
Pass : 4 Iteration : 184 ||B r|| = 0.00190927
Pass : 4 Iteration : 185 ||B r|| = 0.00186211
Pass : 4 Iteration : 186 ||B r|| = 0.00157145
Pass : 4 Iteration : 187 ||B r|| = 0.00157142
Pass : 4 Iteration : 188 ||B r|| = 0.00141191
Pass : 4 Iteration : 189 ||B r|| = 0.00136095
Pass : 4 Iteration : 190 ||B r|| = 0.00133934
Pass : 4 Iteration : 191 ||B r|| = 0.00123125
Pass : 4 Iteration : 192 ||B r|| = 0.00122694
Pass : 4 Iteration : 193 ||B r|| = 0.00112965
Pass : 4 Iteration : 194 ||B r|| = 0.00106884
Pass : 4 Iteration : 195 ||B r|| = 0.00106156
Pass : 4 Iteration : 196 ||B r|| = 0.000979129
Pass : 4 Iteration : 197 ||B r|| = 0.000974447
Pass : 4 Iteration : 198 ||B r|| = 0.000913577
Pass : 4 Iteration : 199 ||B r|| = 0.000824117
Pass : 4 Iteration : 200 ||B r|| = 0.000819664
Restarting...
Pass : 5 Iteration : 201 ||B r|| = 0.000819566
Pass : 5 Iteration : 202 ||B r|| = 0.000802101
Pass : 5 Iteration : 203 ||B r|| = 0.000793705
Pass : 5 Iteration : 204 ||B r|| = 0.000779788
Pass : 5 Iteration : 205 ||B r|| = 0.000730173
Pass : 5 Iteration : 206 ||B r|| = 0.000710072
Pass : 5 Iteration : 207 ||B r|| = 0.000686091
Pass : 5 Iteration : 208 ||B r|| = 0.000635314
Pass : 5 Iteration : 209 ||B r|| = 0.000635226
Pass : 5 Iteration : 210 ||B r|| = 0.000604069
Pass : 5 Iteration : 211 ||B r|| = 0.000565668
Pass : 5 Iteration : 212 ||B r|| = 0.000557792
Pass : 5 Iteration : 213 ||B r|| = 0.000515749
Pass : 5 Iteration : 214 ||B r|| = 0.000513034
Pass : 5 Iteration : 215 ||B r|| = 0.000481894
Pass : 5 Iteration : 216 ||B r|| = 0.000451544
Pass : 5 Iteration : 217 ||B r|| = 0.00044852
Pass : 5 Iteration : 218 ||B r|| = 0.000393422
Pass : 5 Iteration : 219 ||B r|| = 0.000381413
Pass : 5 Iteration : 220 ||B r|| = 0.000361236
Pass : 5 Iteration : 221 ||B r|| = 0.000336538
Pass : 5 Iteration : 222 ||B r|| = 0.000336118
Pass : 5 Iteration : 223 ||B r|| = 0.000320216
Pass : 5 Iteration : 224 ||B r|| = 0.000311681
Pass : 5 Iteration : 225 ||B r|| = 0.000300208
Pass : 5 Iteration : 226 ||B r|| = 0.000280096
Pass : 5 Iteration : 227 ||B r|| = 0.000280017
Pass : 5 Iteration : 228 ||B r|| = 0.000265884
Pass : 5 Iteration : 229 ||B r|| = 0.000254531
Pass : 5 Iteration : 230 ||B r|| = 0.000253443
Pass : 5 Iteration : 231 ||B r|| = 0.000232182
Pass : 5 Iteration : 232 ||B r|| = 0.000231948
Pass : 5 Iteration : 233 ||B r|| = 0.000219717
Pass : 5 Iteration : 234 ||B r|| = 0.000210106
Pass : 5 Iteration : 235 ||B r|| = 0.000208378
Pass : 5 Iteration : 236 ||B r|| = 0.000192791
Pass : 5 Iteration : 237 ||B r|| = 0.000191389
Pass : 5 Iteration : 238 ||B r|| = 0.000181136
Pass : 5 Iteration : 239 ||B r|| = 0.000173082
Pass : 5 Iteration : 240 ||B r|| = 0.000172178
Pass : 5 Iteration : 241 ||B r|| = 0.000163582
Pass : 5 Iteration : 242 ||B r|| = 0.000160314
Pass : 5 Iteration : 243 ||B r|| = 0.000154194
Pass : 5 Iteration : 244 ||B r|| = 0.000142641
Pass : 5 Iteration : 245 ||B r|| = 0.000142245
Pass : 5 Iteration : 246 ||B r|| = 0.000135685
Pass : 5 Iteration : 247 ||B r|| = 0.000134161
Pass : 5 Iteration : 248 ||B r|| = 0.00013191
Pass : 5 Iteration : 249 ||B r|| = 0.00011789
Pass : 5 Iteration : 250 ||B r|| = 0.000117448
Restarting...
Pass : 6 Iteration : 251 ||B r|| = 0.000117443
Pass : 6 Iteration : 252 ||B r|| = 0.000111241
Pass : 6 Iteration : 253 ||B r|| = 0.000111092
Pass : 6 Iteration : 254 ||B r|| = 0.000111075
Pass : 6 Iteration : 255 ||B r|| = 0.000101403
Pass : 6 Iteration : 256 ||B r|| = 0.000100984
Pass : 6 Iteration : 257 ||B r|| = 9.60892e-05
Pass : 6 Iteration : 258 ||B r|| = 9.16341e-05
Pass : 6 Iteration : 259 ||B r|| = 9.1184e-05
Pass : 6 Iteration : 260 ||B r|| = 8.57519e-05
Pass : 6 Iteration : 261 ||B r|| = 8.49038e-05
Pass : 6 Iteration : 262 ||B r|| = 8.25868e-05
Pass : 6 Iteration : 263 ||B r|| = 7.84909e-05
Pass : 6 Iteration : 264 ||B r|| = 7.84882e-05
Pass : 6 Iteration : 265 ||B r|| = 7.17122e-05
Pass : 6 Iteration : 266 ||B r|| = 7.06387e-05
Pass : 6 Iteration : 267 ||B r|| = 6.88435e-05
Pass : 6 Iteration : 268 ||B r|| = 6.51125e-05
Pass : 6 Iteration : 269 ||B r|| = 6.51119e-05
Pass : 6 Iteration : 270 ||B r|| = 6.11726e-05
Pass : 6 Iteration : 271 ||B r|| = 5.95685e-05
Pass : 6 Iteration : 272 ||B r|| = 5.69221e-05
Pass : 6 Iteration : 273 ||B r|| = 5.31348e-05
Pass : 6 Iteration : 274 ||B r|| = 5.29896e-05
Pass : 6 Iteration : 275 ||B r|| = 5.06603e-05
Pass : 6 Iteration : 276 ||B r|| = 4.77003e-05
Pass : 6 Iteration : 277 ||B r|| = 4.69104e-05
Pass : 6 Iteration : 278 ||B r|| = 4.35213e-05
Pass : 6 Iteration : 279 ||B r|| = 4.34584e-05
Pass : 6 Iteration : 280 ||B r|| = 4.13801e-05
Pass : 6 Iteration : 281 ||B r|| = 3.80137e-05
Pass : 6 Iteration : 282 ||B r|| = 3.73519e-05
Pass : 6 Iteration : 283 ||B r|| = 3.40659e-05
Pass : 6 Iteration : 284 ||B r|| = 3.35469e-05
Pass : 6 Iteration : 285 ||B r|| = 3.24228e-05
Pass : 6 Iteration : 286 ||B r|| = 2.82691e-05
Pass : 6 Iteration : 287 ||B r|| = 2.82415e-05
Pass : 6 Iteration : 288 ||B r|| = 2.4949e-05
Pass : 6 Iteration : 289 ||B r|| = 2.42639e-05
Pass : 6 Iteration : 290 ||B r|| = 2.35408e-05
Pass : 6 Iteration : 291 ||B r|| = 2.19407e-05
Pass : 6 Iteration : 292 ||B r|| = 2.19132e-05
Pass : 6 Iteration : 293 ||B r|| = 2.03845e-05
Pass : 6 Iteration : 294 ||B r|| = 1.92894e-05
Pass : 6 Iteration : 295 ||B r|| = 1.89518e-05
Pass : 6 Iteration : 296 ||B r|| = 1.72028e-05
Pass : 6 Iteration : 297 ||B r|| = 1.71928e-05
Pass : 6 Iteration : 298 ||B r|| = 1.63643e-05
Pass : 6 Iteration : 299 ||B r|| = 1.56163e-05
Pass : 6 Iteration : 300 ||B r|| = 1.54755e-05
Restarting...
Pass : 7 Iteration : 301 ||B r|| = 1.54724e-05
Pass : 7 Iteration : 302 ||B r|| = 1.53376e-05
Pass : 7 Iteration : 303 ||B r|| = 1.50205e-05
Pass : 7 Iteration : 304 ||B r|| = 1.47195e-05
Pass : 7 Iteration : 305 ||B r|| = 1.34414e-05
Pass : 7 Iteration : 306 ||B r|| = 1.30372e-05
Pass : 7 Iteration : 307 ||B r|| = 1.26163e-05
Pass : 7 Iteration : 308 ||B r|| = 1.17954e-05
Pass : 7 Iteration : 309 ||B r|| = 1.17113e-05
Pass : 7 Iteration : 310 ||B r|| = 1.12938e-05
Pass : 7 Iteration : 311 ||B r|| = 1.04865e-05
Pass : 7 Iteration : 312 ||B r|| = 1.03571e-05
Pass : 7 Iteration : 313 ||B r|| = 9.56454e-06
Pass : 7 Iteration : 314 ||B r|| = 9.44709e-06
Pass : 7 Iteration : 315 ||B r|| = 9.02016e-06
Pass : 7 Iteration : 316 ||B r|| = 8.27621e-06
Pass : 7 Iteration : 317 ||B r|| = 8.26159e-06
Pass : 7 Iteration : 318 ||B r|| = 7.18002e-06
Pass : 7 Iteration : 319 ||B r|| = 6.95003e-06
Pass : 7 Iteration : 320 ||B r|| = 6.73497e-06
Pass : 7 Iteration : 321 ||B r|| = 6.25227e-06
Pass : 7 Iteration : 322 ||B r|| = 6.24358e-06
Pass : 7 Iteration : 323 ||B r|| = 5.90685e-06
Pass : 7 Iteration : 324 ||B r|| = 5.69217e-06
Pass : 7 Iteration : 325 ||B r|| = 5.59816e-06
Pass : 7 Iteration : 326 ||B r|| = 5.19767e-06
Pass : 7 Iteration : 327 ||B r|| = 5.18732e-06
Pass : 7 Iteration : 328 ||B r|| = 4.978e-06
Pass : 7 Iteration : 329 ||B r|| = 4.61108e-06
Pass : 7 Iteration : 330 ||B r|| = 4.60926e-06
Pass : 7 Iteration : 331 ||B r|| = 4.23343e-06
Pass : 7 Iteration : 332 ||B r|| = 4.23029e-06
Pass : 7 Iteration : 333 ||B r|| = 4.01039e-06
Pass : 7 Iteration : 334 ||B r|| = 3.86812e-06
Pass : 7 Iteration : 335 ||B r|| = 3.86282e-06
Pass : 7 Iteration : 336 ||B r|| = 3.60676e-06
Pass : 7 Iteration : 337 ||B r|| = 3.53527e-06
Pass : 7 Iteration : 338 ||B r|| = 3.33113e-06
Pass : 7 Iteration : 339 ||B r|| = 3.15944e-06
Pass : 7 Iteration : 340 ||B r|| = 3.14716e-06
Pass : 7 Iteration : 341 ||B r|| = 2.97802e-06
Pass : 7 Iteration : 342 ||B r|| = 2.95139e-06
Pass : 7 Iteration : 343 ||B r|| = 2.86922e-06
Pass : 7 Iteration : 344 ||B r|| = 2.65035e-06
Pass : 7 Iteration : 345 ||B r|| = 2.64952e-06
Pass : 7 Iteration : 346 ||B r|| = 2.48989e-06
Pass : 7 Iteration : 347 ||B r|| = 2.42609e-06
Pass : 7 Iteration : 348 ||B r|| = 2.35361e-06
Pass : 7 Iteration : 349 ||B r|| = 2.0977e-06
Pass : 7 Iteration : 350 ||B r|| = 2.0743e-06
Restarting...
Pass : 8 Iteration : 351 ||B r|| = 2.074e-06
Pass : 8 Iteration : 352 ||B r|| = 1.9458e-06
Pass : 8 Iteration : 353 ||B r|| = 1.91268e-06
Pass : 8 Iteration : 354 ||B r|| = 1.9109e-06
Pass : 8 Iteration : 355 ||B r|| = 1.71169e-06
Pass : 8 Iteration : 356 ||B r|| = 1.70656e-06
Pass : 8 Iteration : 357 ||B r|| = 1.61858e-06
Pass : 8 Iteration : 358 ||B r|| = 1.53201e-06
Pass : 8 Iteration : 359 ||B r|| = 1.52511e-06
Pass : 8 Iteration : 360 ||B r|| = 1.4294e-06
Pass : 8 Iteration : 361 ||B r|| = 1.40067e-06
Pass : 8 Iteration : 362 ||B r|| = 1.35966e-06
Pass : 8 Iteration : 363 ||B r|| = 1.29997e-06
Pass : 8 Iteration : 364 ||B r|| = 1.29896e-06
Pass : 8 Iteration : 365 ||B r|| = 1.192e-06
Pass : 8 Iteration : 366 ||B r|| = 1.17842e-06
Pass : 8 Iteration : 367 ||B r|| = 1.14545e-06
Pass : 8 Iteration : 368 ||B r|| = 1.08481e-06
Pass : 8 Iteration : 369 ||B r|| = 1.08408e-06
Pass : 8 Iteration : 370 ||B r|| = 1.01158e-06
Pass : 8 Iteration : 371 ||B r|| = 9.87365e-07
Pass : 8 Iteration : 372 ||B r|| = 9.53571e-07
Pass : 8 Iteration : 373 ||B r|| = 9.02865e-07
Pass : 8 Iteration : 374 ||B r|| = 9.02529e-07
Pass : 8 Iteration : 375 ||B r|| = 8.35677e-07
GMRES+GS converged in 375 iterations with a residual norm of 8.35677e-07.
solver took 2.17952s.
|| q_h - q_ex || / || q_ex || = 5.07159e-05
|| t_h - t_ex || / || t_ex || = 2.61662e-05
@@ -0,0 +1,57 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-hybridization
--no-nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2048
dim(W) = 1024
dim(V+W) = 3072
***********************************************************
Assembly took 0.141771s.
Preconditioner took 0.0573248s.
Pass : 1 Iteration : 0 ||B r|| = 34.0948
Pass : 1 Iteration : 1 ||B r|| = 34.0948
Pass : 1 Iteration : 2 ||B r|| = 0.0882945
Pass : 1 Iteration : 3 ||B r|| = 0.0197291
Pass : 1 Iteration : 4 ||B r|| = 0.0182002
Pass : 1 Iteration : 5 ||B r|| = 0.00466911
Pass : 1 Iteration : 6 ||B r|| = 0.00191841
Pass : 1 Iteration : 7 ||B r|| = 0.00153367
Pass : 1 Iteration : 8 ||B r|| = 0.00108376
Pass : 1 Iteration : 9 ||B r|| = 0.00106531
Pass : 1 Iteration : 10 ||B r|| = 0.000264455
Pass : 1 Iteration : 11 ||B r|| = 9.66463e-05
Pass : 1 Iteration : 12 ||B r|| = 9.54134e-05
Pass : 1 Iteration : 13 ||B r|| = 4.64374e-05
Pass : 1 Iteration : 14 ||B r|| = 2.53717e-05
GMRES+UMFPack converged in 14 iterations with a residual norm of 2.53717e-05.
solver took 0.0894688s.
|| q_h - q_ex || / || q_ex || = 5.06633e-05
|| t_h - t_ex || / || t_ex || = 2.61371e-05
+80
View File
@@ -0,0 +1,80 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--reduction
--no-hybridization
--no-nonlinear
--no-nonlinear-convection
--no-nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 1
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Reduction init took 0.000134119s.
***********************************************************
dim(W) = 1024
***********************************************************
Assembly took 0.136547s.
Preconditioner took 1.374e-05s.
Pass : 1 Iteration : 0 ||B r|| = 0.940451
Pass : 1 Iteration : 1 ||B r|| = 0.842832
Pass : 1 Iteration : 2 ||B r|| = 0.725223
Pass : 1 Iteration : 3 ||B r|| = 0.522084
Pass : 1 Iteration : 4 ||B r|| = 0.445295
Pass : 1 Iteration : 5 ||B r|| = 0.355162
Pass : 1 Iteration : 6 ||B r|| = 0.297819
Pass : 1 Iteration : 7 ||B r|| = 0.238349
Pass : 1 Iteration : 8 ||B r|| = 0.192402
Pass : 1 Iteration : 9 ||B r|| = 0.143872
Pass : 1 Iteration : 10 ||B r|| = 0.0949139
Pass : 1 Iteration : 11 ||B r|| = 0.0606282
Pass : 1 Iteration : 12 ||B r|| = 0.0414828
Pass : 1 Iteration : 13 ||B r|| = 0.0284458
Pass : 1 Iteration : 14 ||B r|| = 0.0188111
Pass : 1 Iteration : 15 ||B r|| = 0.0114118
Pass : 1 Iteration : 16 ||B r|| = 0.00590335
Pass : 1 Iteration : 17 ||B r|| = 0.00348072
Pass : 1 Iteration : 18 ||B r|| = 0.00219975
Pass : 1 Iteration : 19 ||B r|| = 0.00152431
Pass : 1 Iteration : 20 ||B r|| = 0.00105872
Pass : 1 Iteration : 21 ||B r|| = 0.000589053
Pass : 1 Iteration : 22 ||B r|| = 0.000294206
Pass : 1 Iteration : 23 ||B r|| = 0.00017458
Pass : 1 Iteration : 24 ||B r|| = 0.000108035
Pass : 1 Iteration : 25 ||B r|| = 7.75177e-05
Pass : 1 Iteration : 26 ||B r|| = 5.53841e-05
Pass : 1 Iteration : 27 ||B r|| = 4.10593e-05
Pass : 1 Iteration : 28 ||B r|| = 2.95403e-05
Pass : 1 Iteration : 29 ||B r|| = 2.27173e-05
Pass : 1 Iteration : 30 ||B r|| = 1.53028e-05
Pass : 1 Iteration : 31 ||B r|| = 9.45566e-06
Pass : 1 Iteration : 32 ||B r|| = 5.05412e-06
Pass : 1 Iteration : 33 ||B r|| = 2.90871e-06
Pass : 1 Iteration : 34 ||B r|| = 1.67544e-06
Pass : 1 Iteration : 35 ||B r|| = 9.57804e-07
Pass : 1 Iteration : 36 ||B r|| = 5.39153e-07
GMRES+GS converged in 36 iterations with a residual norm of 5.39153e-07.
solver took 0.0189671s.
|| q_h - q_ex || / || q_ex || = 5.07039e-05
|| t_h - t_ex || / || t_ex || = 2.61565e-05
@@ -0,0 +1,45 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--reduction
--no-hybridization
--no-nonlinear
--no-nonlinear-convection
--no-nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 1
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Reduction init took 0.00110061s.
***********************************************************
dim(W) = 1024
***********************************************************
Assembly took 0.134487s.
Preconditioner took 0.00721732s.
Pass : 1 Iteration : 0 ||B r|| = 46.4068
Pass : 1 Iteration : 1 ||B r|| = 6.79805e-14
GMRES+UMFPack converged in 1 iterations with a residual norm of 6.79805e-14.
solver took 0.00359861s.
|| q_h - q_ex || / || q_ex || = 5.07127e-05
|| t_h - t_ex || / || t_ex || = 2.6156e-05
@@ -0,0 +1,52 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-hybridization
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2048
dim(W) = 1024
dim(V+W) = 3072
***********************************************************
Assembly took 0.140492s.
Preconditioner took 0.0152542s.
Pass : 1 Iteration : 0 ||B r|| = 34.0948
Pass : 1 Iteration : 1 ||B r|| = 34.0948
Pass : 1 Iteration : 2 ||B r|| = 0.0882945
Pass : 1 Iteration : 3 ||B r|| = 0.0197291
Pass : 1 Iteration : 4 ||B r|| = 0.0182002
Pass : 1 Iteration : 5 ||B r|| = 0.00466911
Pass : 1 Iteration : 6 ||B r|| = 0.00191841
Pass : 1 Iteration : 7 ||B r|| = 0.00153367
Pass : 1 Iteration : 8 ||B r|| = 0.00108376
Pass : 1 Iteration : 9 ||B r|| = 0.00106531
Pass : 1 Iteration : 10 ||B r|| = 0.000264455
Pass : 1 Iteration : 11 ||B r|| = 9.66463e-05
Pass : 1 Iteration : 12 ||B r|| = 9.54134e-05
Pass : 1 Iteration : 13 ||B r|| = 4.64374e-05
Pass : 1 Iteration : 14 ||B r|| = 2.53717e-05
GMRES+UMFPack converged in 14 iterations with a residual norm of 2.53717e-05.
GMRES solver took 0.0206901s.
|| q_h - q_ex || / || q_ex || = 5.06633e-05
|| t_h - t_ex || / || t_ex || = 2.61371e-05
+63
View File
@@ -0,0 +1,63 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--no-discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--hybridization
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2112
dim(W) = 1024
dim(V+W) = 3136
***********************************************************
Assembly took 0.0342793s.
Preconditioner took 1.2454e-05s.
Pass : 1 Iteration : 0 ||B r|| = 1.36532
Pass : 1 Iteration : 1 ||B r|| = 0.999065
Pass : 1 Iteration : 2 ||B r|| = 0.687902
Pass : 1 Iteration : 3 ||B r|| = 0.493004
Pass : 1 Iteration : 4 ||B r|| = 0.376497
Pass : 1 Iteration : 5 ||B r|| = 0.282937
Pass : 1 Iteration : 6 ||B r|| = 0.178236
Pass : 1 Iteration : 7 ||B r|| = 0.108367
Pass : 1 Iteration : 8 ||B r|| = 0.0611648
Pass : 1 Iteration : 9 ||B r|| = 0.0306066
Pass : 1 Iteration : 10 ||B r|| = 0.0182875
Pass : 1 Iteration : 11 ||B r|| = 0.00795556
Pass : 1 Iteration : 12 ||B r|| = 0.00414347
Pass : 1 Iteration : 13 ||B r|| = 0.00181918
Pass : 1 Iteration : 14 ||B r|| = 0.00121887
Pass : 1 Iteration : 15 ||B r|| = 0.000633013
Pass : 1 Iteration : 16 ||B r|| = 0.000336192
Pass : 1 Iteration : 17 ||B r|| = 0.000190052
Pass : 1 Iteration : 18 ||B r|| = 0.000142776
Pass : 1 Iteration : 19 ||B r|| = 8.08217e-05
Pass : 1 Iteration : 20 ||B r|| = 4.04241e-05
Pass : 1 Iteration : 21 ||B r|| = 1.64814e-05
Pass : 1 Iteration : 22 ||B r|| = 9.59614e-06
Pass : 1 Iteration : 23 ||B r|| = 2.9853e-06
Pass : 1 Iteration : 24 ||B r|| = 1.56186e-06
Pass : 1 Iteration : 25 ||B r|| = 4.80159e-07
GMRES+GS converged in 25 iterations with a residual norm of 4.80159e-07.
GMRES solver took 0.00317834s.
|| q_h - q_ex || / || q_ex || = 3.55334e-07
|| t_h - t_ex || / || t_ex || = 1.76357e-07
+236
View File
@@ -0,0 +1,236 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--no-discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-hybridization
--nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2112
dim(W) = 1024
dim(V+W) = 3136
***********************************************************
Assembly took 0.0541371s.
Preconditioner took 0.129626s.
Pass : 1 Iteration : 0 ||B r|| = 0.828288
Pass : 1 Iteration : 1 ||B r|| = 0.828288
Pass : 1 Iteration : 2 ||B r|| = 0.780392
Pass : 1 Iteration : 3 ||B r|| = 0.775902
Pass : 1 Iteration : 4 ||B r|| = 0.718999
Pass : 1 Iteration : 5 ||B r|| = 0.712741
Pass : 1 Iteration : 6 ||B r|| = 0.709216
Pass : 1 Iteration : 7 ||B r|| = 0.699357
Pass : 1 Iteration : 8 ||B r|| = 0.685558
Pass : 1 Iteration : 9 ||B r|| = 0.624758
Pass : 1 Iteration : 10 ||B r|| = 0.61651
Pass : 1 Iteration : 11 ||B r|| = 0.491672
Pass : 1 Iteration : 12 ||B r|| = 0.490509
Pass : 1 Iteration : 13 ||B r|| = 0.43273
Pass : 1 Iteration : 14 ||B r|| = 0.432532
Pass : 1 Iteration : 15 ||B r|| = 0.391607
Pass : 1 Iteration : 16 ||B r|| = 0.387505
Pass : 1 Iteration : 17 ||B r|| = 0.369287
Pass : 1 Iteration : 18 ||B r|| = 0.349727
Pass : 1 Iteration : 19 ||B r|| = 0.344534
Pass : 1 Iteration : 20 ||B r|| = 0.308102
Pass : 1 Iteration : 21 ||B r|| = 0.307918
Pass : 1 Iteration : 22 ||B r|| = 0.275424
Pass : 1 Iteration : 23 ||B r|| = 0.275336
Pass : 1 Iteration : 24 ||B r|| = 0.241166
Pass : 1 Iteration : 25 ||B r|| = 0.236098
Pass : 1 Iteration : 26 ||B r|| = 0.220482
Pass : 1 Iteration : 27 ||B r|| = 0.209195
Pass : 1 Iteration : 28 ||B r|| = 0.203284
Pass : 1 Iteration : 29 ||B r|| = 0.184134
Pass : 1 Iteration : 30 ||B r|| = 0.183885
Pass : 1 Iteration : 31 ||B r|| = 0.158572
Pass : 1 Iteration : 32 ||B r|| = 0.15785
Pass : 1 Iteration : 33 ||B r|| = 0.128252
Pass : 1 Iteration : 34 ||B r|| = 0.121277
Pass : 1 Iteration : 35 ||B r|| = 0.105019
Pass : 1 Iteration : 36 ||B r|| = 0.0877653
Pass : 1 Iteration : 37 ||B r|| = 0.0857034
Pass : 1 Iteration : 38 ||B r|| = 0.0695776
Pass : 1 Iteration : 39 ||B r|| = 0.0693421
Pass : 1 Iteration : 40 ||B r|| = 0.060764
Pass : 1 Iteration : 41 ||B r|| = 0.0583294
Pass : 1 Iteration : 42 ||B r|| = 0.0513009
Pass : 1 Iteration : 43 ||B r|| = 0.046381
Pass : 1 Iteration : 44 ||B r|| = 0.0446401
Pass : 1 Iteration : 45 ||B r|| = 0.0351366
Pass : 1 Iteration : 46 ||B r|| = 0.0350703
Pass : 1 Iteration : 47 ||B r|| = 0.0285254
Pass : 1 Iteration : 48 ||B r|| = 0.0275435
Pass : 1 Iteration : 49 ||B r|| = 0.0233101
Pass : 1 Iteration : 50 ||B r|| = 0.0205522
Restarting...
Pass : 2 Iteration : 51 ||B r|| = 0.0201743
Pass : 2 Iteration : 52 ||B r|| = 0.0178036
Pass : 2 Iteration : 53 ||B r|| = 0.0177657
Pass : 2 Iteration : 54 ||B r|| = 0.0155379
Pass : 2 Iteration : 55 ||B r|| = 0.0145024
Pass : 2 Iteration : 56 ||B r|| = 0.0129692
Pass : 2 Iteration : 57 ||B r|| = 0.0111895
Pass : 2 Iteration : 58 ||B r|| = 0.0106264
Pass : 2 Iteration : 59 ||B r|| = 0.00883739
Pass : 2 Iteration : 60 ||B r|| = 0.00881869
Pass : 2 Iteration : 61 ||B r|| = 0.00734547
Pass : 2 Iteration : 62 ||B r|| = 0.00727023
Pass : 2 Iteration : 63 ||B r|| = 0.00664677
Pass : 2 Iteration : 64 ||B r|| = 0.00606592
Pass : 2 Iteration : 65 ||B r|| = 0.00584805
Pass : 2 Iteration : 66 ||B r|| = 0.00471596
Pass : 2 Iteration : 67 ||B r|| = 0.00467814
Pass : 2 Iteration : 68 ||B r|| = 0.00343373
Pass : 2 Iteration : 69 ||B r|| = 0.0034201
Pass : 2 Iteration : 70 ||B r|| = 0.00280534
Pass : 2 Iteration : 71 ||B r|| = 0.00270379
Pass : 2 Iteration : 72 ||B r|| = 0.0025783
Pass : 2 Iteration : 73 ||B r|| = 0.0022472
Pass : 2 Iteration : 74 ||B r|| = 0.00221863
Pass : 2 Iteration : 75 ||B r|| = 0.00186269
Pass : 2 Iteration : 76 ||B r|| = 0.00186179
Pass : 2 Iteration : 77 ||B r|| = 0.00160985
Pass : 2 Iteration : 78 ||B r|| = 0.00160018
Pass : 2 Iteration : 79 ||B r|| = 0.00148445
Pass : 2 Iteration : 80 ||B r|| = 0.00141886
Pass : 2 Iteration : 81 ||B r|| = 0.00139003
Pass : 2 Iteration : 82 ||B r|| = 0.00125305
Pass : 2 Iteration : 83 ||B r|| = 0.00124651
Pass : 2 Iteration : 84 ||B r|| = 0.00111105
Pass : 2 Iteration : 85 ||B r|| = 0.00110481
Pass : 2 Iteration : 86 ||B r|| = 0.001019
Pass : 2 Iteration : 87 ||B r|| = 0.000986979
Pass : 2 Iteration : 88 ||B r|| = 0.000943191
Pass : 2 Iteration : 89 ||B r|| = 0.000887917
Pass : 2 Iteration : 90 ||B r|| = 0.000878207
Pass : 2 Iteration : 91 ||B r|| = 0.000792828
Pass : 2 Iteration : 92 ||B r|| = 0.000792314
Pass : 2 Iteration : 93 ||B r|| = 0.00067918
Pass : 2 Iteration : 94 ||B r|| = 0.000661497
Pass : 2 Iteration : 95 ||B r|| = 0.000607798
Pass : 2 Iteration : 96 ||B r|| = 0.000585659
Pass : 2 Iteration : 97 ||B r|| = 0.000575458
Pass : 2 Iteration : 98 ||B r|| = 0.000536371
Pass : 2 Iteration : 99 ||B r|| = 0.000533329
Pass : 2 Iteration : 100 ||B r|| = 0.000476474
Restarting...
Pass : 3 Iteration : 101 ||B r|| = 0.000476389
Pass : 3 Iteration : 102 ||B r|| = 0.000450568
Pass : 3 Iteration : 103 ||B r|| = 0.00044946
Pass : 3 Iteration : 104 ||B r|| = 0.000448032
Pass : 3 Iteration : 105 ||B r|| = 0.000436727
Pass : 3 Iteration : 106 ||B r|| = 0.000433054
Pass : 3 Iteration : 107 ||B r|| = 0.000384572
Pass : 3 Iteration : 108 ||B r|| = 0.000384151
Pass : 3 Iteration : 109 ||B r|| = 0.000326889
Pass : 3 Iteration : 110 ||B r|| = 0.000320214
Pass : 3 Iteration : 111 ||B r|| = 0.000295531
Pass : 3 Iteration : 112 ||B r|| = 0.00028017
Pass : 3 Iteration : 113 ||B r|| = 0.000271805
Pass : 3 Iteration : 114 ||B r|| = 0.000253182
Pass : 3 Iteration : 115 ||B r|| = 0.000251705
Pass : 3 Iteration : 116 ||B r|| = 0.000224202
Pass : 3 Iteration : 117 ||B r|| = 0.00022401
Pass : 3 Iteration : 118 ||B r|| = 0.000201373
Pass : 3 Iteration : 119 ||B r|| = 0.000195487
Pass : 3 Iteration : 120 ||B r|| = 0.000178312
Pass : 3 Iteration : 121 ||B r|| = 0.000163707
Pass : 3 Iteration : 122 ||B r|| = 0.000159212
Pass : 3 Iteration : 123 ||B r|| = 0.000143717
Pass : 3 Iteration : 124 ||B r|| = 0.000142938
Pass : 3 Iteration : 125 ||B r|| = 0.000129618
Pass : 3 Iteration : 126 ||B r|| = 0.000128535
Pass : 3 Iteration : 127 ||B r|| = 0.000120081
Pass : 3 Iteration : 128 ||B r|| = 0.000114142
Pass : 3 Iteration : 129 ||B r|| = 0.000109227
Pass : 3 Iteration : 130 ||B r|| = 9.74187e-05
Pass : 3 Iteration : 131 ||B r|| = 9.41802e-05
Pass : 3 Iteration : 132 ||B r|| = 7.97569e-05
Pass : 3 Iteration : 133 ||B r|| = 7.97329e-05
Pass : 3 Iteration : 134 ||B r|| = 6.96569e-05
Pass : 3 Iteration : 135 ||B r|| = 6.80129e-05
Pass : 3 Iteration : 136 ||B r|| = 6.39905e-05
Pass : 3 Iteration : 137 ||B r|| = 5.48303e-05
Pass : 3 Iteration : 138 ||B r|| = 5.33803e-05
Pass : 3 Iteration : 139 ||B r|| = 4.51005e-05
Pass : 3 Iteration : 140 ||B r|| = 4.47538e-05
Pass : 3 Iteration : 141 ||B r|| = 3.79739e-05
Pass : 3 Iteration : 142 ||B r|| = 3.79237e-05
Pass : 3 Iteration : 143 ||B r|| = 3.34755e-05
Pass : 3 Iteration : 144 ||B r|| = 3.19968e-05
Pass : 3 Iteration : 145 ||B r|| = 3.00248e-05
Pass : 3 Iteration : 146 ||B r|| = 2.43567e-05
Pass : 3 Iteration : 147 ||B r|| = 2.40027e-05
Pass : 3 Iteration : 148 ||B r|| = 1.75885e-05
Pass : 3 Iteration : 149 ||B r|| = 1.74341e-05
Pass : 3 Iteration : 150 ||B r|| = 1.38964e-05
Restarting...
Pass : 4 Iteration : 151 ||B r|| = 1.33084e-05
Pass : 4 Iteration : 152 ||B r|| = 1.25291e-05
Pass : 4 Iteration : 153 ||B r|| = 1.15613e-05
Pass : 4 Iteration : 154 ||B r|| = 1.15039e-05
Pass : 4 Iteration : 155 ||B r|| = 8.97445e-06
Pass : 4 Iteration : 156 ||B r|| = 8.93619e-06
Pass : 4 Iteration : 157 ||B r|| = 7.17725e-06
Pass : 4 Iteration : 158 ||B r|| = 7.03949e-06
Pass : 4 Iteration : 159 ||B r|| = 6.28998e-06
Pass : 4 Iteration : 160 ||B r|| = 5.80418e-06
Pass : 4 Iteration : 161 ||B r|| = 5.6565e-06
Pass : 4 Iteration : 162 ||B r|| = 4.98291e-06
Pass : 4 Iteration : 163 ||B r|| = 4.97198e-06
Pass : 4 Iteration : 164 ||B r|| = 4.1327e-06
Pass : 4 Iteration : 165 ||B r|| = 4.04729e-06
Pass : 4 Iteration : 166 ||B r|| = 3.41458e-06
Pass : 4 Iteration : 167 ||B r|| = 3.2682e-06
Pass : 4 Iteration : 168 ||B r|| = 3.07084e-06
Pass : 4 Iteration : 169 ||B r|| = 2.6426e-06
Pass : 4 Iteration : 170 ||B r|| = 2.63354e-06
Pass : 4 Iteration : 171 ||B r|| = 2.17891e-06
Pass : 4 Iteration : 172 ||B r|| = 2.15133e-06
Pass : 4 Iteration : 173 ||B r|| = 1.91418e-06
Pass : 4 Iteration : 174 ||B r|| = 1.87277e-06
Pass : 4 Iteration : 175 ||B r|| = 1.75707e-06
Pass : 4 Iteration : 176 ||B r|| = 1.66039e-06
Pass : 4 Iteration : 177 ||B r|| = 1.62259e-06
Pass : 4 Iteration : 178 ||B r|| = 1.51352e-06
Pass : 4 Iteration : 179 ||B r|| = 1.51341e-06
Pass : 4 Iteration : 180 ||B r|| = 1.35973e-06
Pass : 4 Iteration : 181 ||B r|| = 1.34071e-06
Pass : 4 Iteration : 182 ||B r|| = 1.2227e-06
Pass : 4 Iteration : 183 ||B r|| = 1.16459e-06
Pass : 4 Iteration : 184 ||B r|| = 1.10473e-06
Pass : 4 Iteration : 185 ||B r|| = 9.95649e-07
Pass : 4 Iteration : 186 ||B r|| = 9.93491e-07
Pass : 4 Iteration : 187 ||B r|| = 9.20855e-07
Pass : 4 Iteration : 188 ||B r|| = 9.17534e-07
Pass : 4 Iteration : 189 ||B r|| = 8.48816e-07
Pass : 4 Iteration : 190 ||B r|| = 8.13729e-07
GMRES+GS converged in 190 iterations with a residual norm of 8.13729e-07.
solver took 1.79382s.
|| q_h - q_ex || / || q_ex || = 1.02359e-06
|| t_h - t_ex || / || t_ex || = 1.03461e-06
@@ -0,0 +1,47 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--no-discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-hybridization
--nonlinear
--no-nonlinear-convection
--nonlinear-diffusion
--hdg_scheme 1
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2112
dim(W) = 1024
dim(V+W) = 3136
***********************************************************
Assembly took 0.0474844s.
Preconditioner took 0.140224s.
Pass : 1 Iteration : 0 ||B r|| = 41.2501
Pass : 1 Iteration : 1 ||B r|| = 41.2501
Pass : 1 Iteration : 2 ||B r|| = 0.000174926
Pass : 1 Iteration : 3 ||B r|| = 4.73276e-05
Pass : 1 Iteration : 4 ||B r|| = 5.87823e-06
GMRES+UMFPack converged in 4 iterations with a residual norm of 5.87823e-06.
solver took 0.0465522s.
|| q_h - q_ex || / || q_ex || = 3.02391e-07
|| t_h - t_ex || / || t_ex || = 1.63476e-07
+42
View File
@@ -0,0 +1,42 @@
Options used:
--mesh
--ncells-x 8
--ncells-y 8
--size-x 1
--size-y 1
--order 3
--no-discontinuous
--centered
--problem 1
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-hybridization
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
***********************************************************
dim(V) = 2112
dim(W) = 1024
dim(V+W) = 3136
***********************************************************
Assembly took 0.185992s.
Preconditioner took 0.0221916s.
Pass : 1 Iteration : 0 ||B r|| = 41.2501
Pass : 1 Iteration : 1 ||B r|| = 41.2501
Pass : 1 Iteration : 2 ||B r|| = 0.000174926
Pass : 1 Iteration : 3 ||B r|| = 4.73276e-05
Pass : 1 Iteration : 4 ||B r|| = 5.87823e-06
GMRES+UMFPack converged in 4 iterations with a residual norm of 5.87823e-06.
GMRES solver took 0.0108975s.
|| q_h - q_ex || / || q_ex || = 3.02391e-07
|| t_h - t_ex || / || t_ex || = 1.63476e-07
+126
View File
@@ -0,0 +1,126 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 0
--size-x 1
--size-y 1
--order 2
--discontinuous
--no-broken-RT
--centered
--problem 2
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--no-bc-neumann
--no-reduction
--hybridization
--nonlinear
--no-nonlinear-convection
--no-nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 0
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.00686143s.
***********************************************************
dim(V) = 1800
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3360
***********************************************************
Assembly took 0.0120627s.
Preconditioner took 7.2073e-05s.
LBFGS iteration 0 : ||r|| = 0.0487525
LBFGS iteration 1 : ||r|| = 0.0692476, ||r||/||r_0|| = 1.42039
LBFGS iteration 2 : ||r|| = 0.0822451, ||r||/||r_0|| = 1.68699
LBFGS iteration 3 : ||r|| = 0.118638, ||r||/||r_0|| = 2.43348
LBFGS iteration 4 : ||r|| = 0.10805, ||r||/||r_0|| = 2.2163
LBFGS iteration 5 : ||r|| = 0.123018, ||r||/||r_0|| = 2.52331
LBFGS iteration 6 : ||r|| = 0.0331166, ||r||/||r_0|| = 0.67928
LBFGS iteration 7 : ||r|| = 0.028239, ||r||/||r_0|| = 0.579233
LBFGS iteration 8 : ||r|| = 0.0339501, ||r||/||r_0|| = 0.696376
LBFGS iteration 9 : ||r|| = 0.0632489, ||r||/||r_0|| = 1.29735
LBFGS iteration 10 : ||r|| = 0.0197064, ||r||/||r_0|| = 0.404214
LBFGS iteration 11 : ||r|| = 0.0115797, ||r||/||r_0|| = 0.23752
LBFGS iteration 12 : ||r|| = 0.0132388, ||r||/||r_0|| = 0.271551
LBFGS iteration 13 : ||r|| = 0.0185307, ||r||/||r_0|| = 0.380097
LBFGS iteration 14 : ||r|| = 0.0080584, ||r||/||r_0|| = 0.165292
LBFGS iteration 15 : ||r|| = 0.0039921, ||r||/||r_0|| = 0.0818851
LBFGS iteration 16 : ||r|| = 0.00336111, ||r||/||r_0|| = 0.0689424
LBFGS iteration 17 : ||r|| = 0.00385752, ||r||/||r_0|| = 0.0791246
LBFGS iteration 18 : ||r|| = 0.00192135, ||r||/||r_0|| = 0.0394103
LBFGS iteration 19 : ||r|| = 0.000721511, ||r||/||r_0|| = 0.0147995
LBFGS iteration 20 : ||r|| = 0.000602175, ||r||/||r_0|| = 0.0123517
LBFGS iteration 21 : ||r|| = 0.000652919, ||r||/||r_0|| = 0.0133925
LBFGS iteration 22 : ||r|| = 0.00115966, ||r||/||r_0|| = 0.0237866
LBFGS iteration 23 : ||r|| = 0.000458624, ||r||/||r_0|| = 0.00940719
LBFGS iteration 24 : ||r|| = 0.000389708, ||r||/||r_0|| = 0.0079936
LBFGS iteration 25 : ||r|| = 0.000556569, ||r||/||r_0|| = 0.0114162
LBFGS iteration 26 : ||r|| = 0.000629825, ||r||/||r_0|| = 0.0129188
LBFGS iteration 27 : ||r|| = 0.00235984, ||r||/||r_0|| = 0.0484044
LBFGS iteration 28 : ||r|| = 0.000319451, ||r||/||r_0|| = 0.00655251
LBFGS iteration 29 : ||r|| = 0.000182618, ||r||/||r_0|| = 0.00374581
LBFGS iteration 30 : ||r|| = 0.000134455, ||r||/||r_0|| = 0.00275791
LBFGS iteration 31 : ||r|| = 0.000165894, ||r||/||r_0|| = 0.00340278
LBFGS iteration 32 : ||r|| = 0.000266006, ||r||/||r_0|| = 0.00545626
LBFGS iteration 33 : ||r|| = 0.000247654, ||r||/||r_0|| = 0.00507981
LBFGS iteration 34 : ||r|| = 8.2696e-05, ||r||/||r_0|| = 0.00169624
LBFGS iteration 35 : ||r|| = 6.20613e-05, ||r||/||r_0|| = 0.00127299
LBFGS iteration 36 : ||r|| = 7.09828e-05, ||r||/||r_0|| = 0.00145598
LBFGS iteration 37 : ||r|| = 0.000188153, ||r||/||r_0|| = 0.00385936
LBFGS iteration 38 : ||r|| = 7.43305e-05, ||r||/||r_0|| = 0.00152465
LBFGS iteration 39 : ||r|| = 5.84411e-05, ||r||/||r_0|| = 0.00119873
LBFGS iteration 40 : ||r|| = 6.66851e-05, ||r||/||r_0|| = 0.00136783
LBFGS iteration 41 : ||r|| = 8.73801e-05, ||r||/||r_0|| = 0.00179232
LBFGS iteration 42 : ||r|| = 5.69932e-05, ||r||/||r_0|| = 0.00116903
LBFGS iteration 43 : ||r|| = 1.66973e-05, ||r||/||r_0|| = 0.000342492
LBFGS iteration 44 : ||r|| = 1.28376e-05, ||r||/||r_0|| = 0.000263322
LBFGS iteration 45 : ||r|| = 1.44508e-05, ||r||/||r_0|| = 0.000296411
LBFGS iteration 46 : ||r|| = 2.93946e-05, ||r||/||r_0|| = 0.000602936
LBFGS iteration 47 : ||r|| = 6.07783e-06, ||r||/||r_0|| = 0.000124667
LBFGS iteration 48 : ||r|| = 4.09353e-06, ||r||/||r_0|| = 8.39656e-05
LBFGS iteration 49 : ||r|| = 4.37315e-06, ||r||/||r_0|| = 8.9701e-05
LBFGS iteration 50 : ||r|| = 5.92802e-06, ||r||/||r_0|| = 0.000121594
LBFGS iteration 51 : ||r|| = 6.92108e-06, ||r||/||r_0|| = 0.000141964
LBFGS iteration 52 : ||r|| = 2.81197e-06, ||r||/||r_0|| = 5.76786e-05
LBFGS iteration 53 : ||r|| = 2.16963e-06, ||r||/||r_0|| = 4.4503e-05
LBFGS iteration 54 : ||r|| = 2.09303e-06, ||r||/||r_0|| = 4.29317e-05
LBFGS iteration 55 : ||r|| = 3.14986e-06, ||r||/||r_0|| = 6.46092e-05
LBFGS iteration 56 : ||r|| = 1.71347e-06, ||r||/||r_0|| = 3.51464e-05
LBFGS iteration 57 : ||r|| = 1.61416e-06, ||r||/||r_0|| = 3.31093e-05
LBFGS iteration 58 : ||r|| = 1.84854e-06, ||r||/||r_0|| = 3.79169e-05
LBFGS iteration 59 : ||r|| = 4.36115e-06, ||r||/||r_0|| = 8.9455e-05
LBFGS iteration 60 : ||r|| = 8.47721e-07, ||r||/||r_0|| = 1.73883e-05
LBFGS iteration 61 : ||r|| = 4.73673e-07, ||r||/||r_0|| = 9.71588e-06
LBFGS iteration 62 : ||r|| = 5.08728e-07, ||r||/||r_0|| = 1.04349e-05
LBFGS iteration 63 : ||r|| = 5.89533e-07, ||r||/||r_0|| = 1.20924e-05
LBFGS iteration 64 : ||r|| = 9.02349e-07, ||r||/||r_0|| = 1.85088e-05
LBFGS iteration 65 : ||r|| = 2.67276e-07, ||r||/||r_0|| = 5.48231e-06
LBFGS iteration 66 : ||r|| = 1.73874e-07, ||r||/||r_0|| = 3.56647e-06
LBFGS iteration 67 : ||r|| = 1.67946e-07, ||r||/||r_0|| = 3.44488e-06
LBFGS iteration 68 : ||r|| = 2.39486e-07, ||r||/||r_0|| = 4.91227e-06
LBFGS iteration 69 : ||r|| = 1.74799e-07, ||r||/||r_0|| = 3.58544e-06
LBFGS iteration 70 : ||r|| = 1.38108e-07, ||r||/||r_0|| = 2.83284e-06
LBFGS iteration 71 : ||r|| = 1.5727e-07, ||r||/||r_0|| = 3.22588e-06
LBFGS iteration 72 : ||r|| = 1.69831e-07, ||r||/||r_0|| = 3.48354e-06
LBFGS iteration 73 : ||r|| = 1.44929e-07, ||r||/||r_0|| = 2.97275e-06
LBFGS iteration 74 : ||r|| = 9.706e-08, ||r||/||r_0|| = 1.99087e-06
LBFGS iteration 75 : ||r|| = 9.15601e-08, ||r||/||r_0|| = 1.87806e-06
LBFGS iteration 76 : ||r|| = 1.55269e-07, ||r||/||r_0|| = 3.18485e-06
LBFGS iteration 77 : ||r|| = 7.85595e-08, ||r||/||r_0|| = 1.6114e-06
LBFGS iteration 78 : ||r|| = 3.44741e-08, ||r||/||r_0|| = 7.07125e-07
LBFGS/Newton+GMRES converged in 78 iterations with a residual norm of 3.44741e-08.
solver took 10.3609s.
|| q_h - q_ex || / || q_ex || = 0.000103258
|| t_h - t_ex || / || t_ex || = 6.13896e-05
@@ -0,0 +1,86 @@
Options used:
--mesh
--ncells-x 10
--ncells-y 10
--size-x 1
--size-y 1
--order 2
--discontinuous
--centered
--problem 2
--time-final 1
--ntimesteps 0
--ode-solver 1
--kappa 1
--velocity 1
--stab_diff 0.5
--bc-neumann
--no-reduction
--hybridization
--nonlinear
--no-nonlinear-convection
--no-nonlinear-diffusion
--hdg_scheme 1
--nonlinear-solver 3
--no-partial-assembly
--device cpu
--no-mfem
--no-visit
--no-paraview
--no-visualization
--no-analytic
Device configuration: cpu
Memory configuration: host-std
Hybridization init took 0.00638558s.
***********************************************************
dim(V) = 1800
dim(W) = 900
dim(M) = 660
dim(V+W+M) = 3360
***********************************************************
Assembly took 0.00964168s.
Preconditioner took 3.6389e-05s.
Newton iteration 0 : ||r|| = 0.102997
Newton iteration 1 : ||r|| = 0.000212358, ||r||/||r_0|| = 0.00206179
Newton iteration 2 : ||r|| = 7.28894e-05, ||r||/||r_0|| = 0.000707684
Newton iteration 3 : ||r|| = 3.17779e-05, ||r||/||r_0|| = 0.000308532
Newton iteration 4 : ||r|| = 2.76903e-05, ||r||/||r_0|| = 0.000268845
Newton iteration 5 : ||r|| = 2.17462e-05, ||r||/||r_0|| = 0.000211134
Newton iteration 6 : ||r|| = 1.7992e-05, ||r||/||r_0|| = 0.000174684
Newton iteration 7 : ||r|| = 1.50151e-05, ||r||/||r_0|| = 0.000145781
Newton iteration 8 : ||r|| = 1.26765e-05, ||r||/||r_0|| = 0.000123076
Newton iteration 9 : ||r|| = 1.07699e-05, ||r||/||r_0|| = 0.000104565
Newton iteration 10 : ||r|| = 9.18746e-06, ||r||/||r_0|| = 8.92011e-05
Newton iteration 11 : ||r|| = 7.85578e-06, ||r||/||r_0|| = 7.62718e-05
Newton iteration 12 : ||r|| = 6.72573e-06, ||r||/||r_0|| = 6.53002e-05
Newton iteration 13 : ||r|| = 5.76189e-06, ||r||/||r_0|| = 5.59422e-05
Newton iteration 14 : ||r|| = 4.93744e-06, ||r||/||r_0|| = 4.79377e-05
Newton iteration 15 : ||r|| = 4.23115e-06, ||r||/||r_0|| = 4.10802e-05
Newton iteration 16 : ||r|| = 3.62564e-06, ||r||/||r_0|| = 3.52014e-05
Newton iteration 17 : ||r|| = 3.10642e-06, ||r||/||r_0|| = 3.01602e-05
Newton iteration 18 : ||r|| = 2.66118e-06, ||r||/||r_0|| = 2.58375e-05
Newton iteration 19 : ||r|| = 2.27945e-06, ||r||/||r_0|| = 2.21312e-05
Newton iteration 20 : ||r|| = 1.95223e-06, ||r||/||r_0|| = 1.89543e-05
Newton iteration 21 : ||r|| = 1.6718e-06, ||r||/||r_0|| = 1.62315e-05
Newton iteration 22 : ||r|| = 1.43151e-06, ||r||/||r_0|| = 1.38985e-05
Newton iteration 23 : ||r|| = 1.22566e-06, ||r||/||r_0|| = 1.18999e-05
Newton iteration 24 : ||r|| = 1.04934e-06, ||r||/||r_0|| = 1.0188e-05
Newton iteration 25 : ||r|| = 8.98328e-07, ||r||/||r_0|| = 8.72188e-06
Newton iteration 26 : ||r|| = 7.69016e-07, ||r||/||r_0|| = 7.46639e-06
Newton iteration 27 : ||r|| = 6.58293e-07, ||r||/||r_0|| = 6.39137e-06
Newton iteration 28 : ||r|| = 5.63494e-07, ||r||/||r_0|| = 5.47097e-06
Newton iteration 29 : ||r|| = 4.82335e-07, ||r||/||r_0|| = 4.68299e-06
Newton iteration 30 : ||r|| = 4.12856e-07, ||r||/||r_0|| = 4.00842e-06
Newton iteration 31 : ||r|| = 3.5338e-07, ||r||/||r_0|| = 3.43096e-06
Newton iteration 32 : ||r|| = 3.02467e-07, ||r||/||r_0|| = 2.93666e-06
Newton iteration 33 : ||r|| = 2.58889e-07, ||r||/||r_0|| = 2.51355e-06
Newton iteration 34 : ||r|| = 2.21585e-07, ||r||/||r_0|| = 2.15137e-06
Newton iteration 35 : ||r|| = 1.89656e-07, ||r||/||r_0|| = 1.84137e-06
Newton iteration 36 : ||r|| = 1.62327e-07, ||r||/||r_0|| = 1.57603e-06
Newton iteration 37 : ||r|| = 1.38934e-07, ||r||/||r_0|| = 1.34891e-06
Newton iteration 38 : ||r|| = 1.18913e-07, ||r||/||r_0|| = 1.15453e-06
Newton iteration 39 : ||r|| = 1.01775e-07, ||r||/||r_0|| = 9.88139e-07
Newton+GMRES+GS/Newton+GMRES converged in 39 iterations with a residual norm of 1.01775e-07.
solver took 13.3521s.
|| q_h - q_ex || / || q_ex || = 0.000108111
|| t_h - t_ex || / || t_ex || = 1.8685e-05

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