{"id":18707888,"url":"https://github.com/ceed/remhos","last_synced_at":"2025-04-12T10:32:14.739Z","repository":{"id":38997799,"uuid":"159875144","full_name":"CEED/Remhos","owner":"CEED","description":"High-order Remap Miniapp","archived":false,"fork":false,"pushed_at":"2024-04-24T19:42:30.000Z","size":3873,"stargazers_count":17,"open_issues_count":7,"forks_count":8,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-07-09T09:13:23.316Z","etag":null,"topics":["advection","ceed","dg","finite-elements","high-order","hpc","miniapps","proxy-application","remap"],"latest_commit_sha":null,"homepage":"http://ceed.exascaleproject.org/miniapps","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CEED.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-11-30T20:27:45.000Z","updated_at":"2023-10-05T04:46:30.000Z","dependencies_parsed_at":"2024-02-02T22:26:45.348Z","dependency_job_id":"2d483536-c1af-4c47-b02a-1b049b15608b","html_url":"https://github.com/CEED/Remhos","commit_stats":{"total_commits":421,"total_committers":13,"mean_commits":32.38461538461539,"dds":0.6912114014251782,"last_synced_commit":"57d44084239b42a5e7374d46c793d94102dc939c"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CEED%2FRemhos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CEED%2FRemhos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CEED%2FRemhos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CEED%2FRemhos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CEED","download_url":"https://codeload.github.com/CEED/Remhos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223510955,"owners_count":17157443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advection","ceed","dg","finite-elements","high-order","hpc","miniapps","proxy-application","remap"],"created_at":"2024-11-07T12:20:03.069Z","updated_at":"2025-04-12T10:32:14.375Z","avatar_url":"https://github.com/CEED.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"              ____                 __\n             / __ \\___  ____ ___  / /_  ____  _____\n            / /_/ / _ \\/ __ `__ \\/ __ \\/ __ \\/ ___/\n           / _, _/  __/ / / / / / / / / /_/ (__  )\n          /_/ |_|\\___/_/ /_/ /_/_/ /_/\\____/____/\n\n                  High-order Remap Miniapp\n\n[![Build Status](https://travis-ci.org/CEED/Remhos.svg?branch=master)](https://travis-ci.org/CEED/Remhos)\n[![Build and Test (GH Actions)](https://github.com/CEED/Remhos/workflows/build-and-test-remhos/badge.svg?branch=master)](https://github.com/CEED/Remhos/actions?query=workflow%3Abuild-and-test-remhos)\n\n## Purpose\n\n**Remhos** (REMap High-Order Solver) is a miniapp that solves the pure advection\nequations that are used to perform monotonic and conservative discontinuous\nfield interpolation (remap) as part of the Eulerian phase in Arbitrary\nLagrangian Eulerian (ALE) simulations.\n\nRemhos combines discretization methods described in the following articles:\n\n\u003e R. Anderson, V. Dobrev, Tz. Kolev and R. Rieben \u003cbr\u003e\n\u003e [Monotonicity in high-order curvilinear finite element arbitrary\n   Lagrangian-Eulerian remap](https://doi.org/10.1002/fld.3965) \u003cbr\u003e\n\u003e *International Journal for Numerical Methods in Fluids* 77(5), 2015, pp. 249-273.\n\n\u003e R. Anderson, V. Dobrev, Tz. Kolev, D. Kuzmin,\n  M. Quezada de Luna, R. Rieben and V. Tomov \u003cbr\u003e\n\u003e [High-order local maximum principle preserving (MPP) discontinuous Galerkin\n   finite element method for the transport equation](https://doi.org/10.1016/j.jcp.2016.12.031) \u003cbr\u003e\n\u003e *Journal of Computational Physics* 334, 2017, pp. 102-124.\n\n\u003e R. Anderson, V. Dobrev, Tz. Kolev, R. Rieben and V. Tomov \u003cbr\u003e\n\u003e [High-order multi-material ALE hydrodynamics](https://doi.org/10.1137/17M1116453) \u003cbr\u003e\n\u003e *SIAM Journal on Scientific Computing* 40(1), 2018, pp. B32-B58.\n\n\u003e H. Hajduk, D. Kuzmin, Tz. Kolev and R. Abgrall \u003cbr\u003e\n\u003e [Matrix-free subcell residual distribution for Bernstein finite element\n   discretizations of linear advection equations](https://doi.org/10.1016/j.cma.2019.112658) \u003cbr\u003e\n\u003e *Computer Methods in Applied Mechanics and Engineering* 359, 2020.\n\n\u003e H. Hajduk, D. Kuzmin, Tz. Kolev, V. Tomov, I. Tomas and J. Shadid \u003cbr\u003e\n\u003e [Matrix-free subcell residual distribution for Bernstein finite elements:\n   Monolithic limiting](https://doi.org/10.1016/j.compfluid.2020.104451) \u003cbr\u003e\n\u003e *Computers and Fluids* 200, 2020.\n\n\nThe Remhos miniapp is part of the [CEED software suite](http://ceed.exascaleproject.org/software),\na collection of software benchmarks, miniapps, libraries and APIs for\nefficient exascale discretizations based on high-order finite element\nand spectral element methods. See http://github.com/ceed for more\ninformation and source code availability.\n\nThe CEED research is supported by the [Exascale Computing Project](https://exascaleproject.org/exascale-computing-project)\n(17-SC-20-SC), a collaborative effort of two U.S. Department of Energy\norganizations (Office of Science and the National Nuclear Security\nAdministration) responsible for the planning and preparation of a\n[capable exascale ecosystem](https://exascaleproject.org/what-is-exascale),\nincluding software, applications, hardware, advanced system engineering and early\ntestbed platforms, in support of the nation’s exascale computing imperative.\n\n## Characteristics\n\nThe problem that Remhos is solving is formulated as a time-dependent system of\nordinary differential equations (ODEs) for the unknown coefficients of a\nhigh-order finite element (FE) function. The left-hand side of this system is\ncontrolled by a *mass matrix*, while the right-hand side is constructed\nfrom a *advection matrix*.\n\nRemhos supports two execution modes, namely, *transport* and *remap*, which\nresult in slightly different algebraic operators. The main difference\nbetween the two modes is that in the case of remap, the mass and advection\nmatrices change in time, while they are constant for the transport case.\n\nRemhos supports two options for deriving and solving the ODE system, namely the\n*full assembly* and the *partial assembly* methods. Partial assembly is the main\nalgorithm of interest for high orders. For low orders (e.g. 2nd order in 3D),\nboth algorithms are of interest.\n\nThe full assembly option relies on constructing and utilizing global mass and\nadvection matrices stored in compressed sparse row (CSR) format.  In contrast,\nthe [partial assembly](http://ceed.exascaleproject.org/ceed-code) option defines\nonly the local action of those matrices, which is then used to perform all\nnecessary operations. As the local action is defined by utilizing the tensor\nstructure of the finite element spaces, the amount of data storage, memory\ntransfers, and FLOPs are lower (especially for higher orders).\n\nOther computational motives in Remhos include the following:\n\n- Support for unstructured meshes, in 2D and 3D, with quadrilateral and\n  hexahedral elements. Serial and parallel mesh refinement options can be\n  set via a command-line flag.\n- Explicit time-stepping loop with a variety of time integrator options. Remhos\n  supports Runge-Kutta ODE solvers of orders 1, 2, 3, 4 and 6.\n- Discontinuous high-order finite element discretization spaces\n  of runtime-specified order.\n- Moving (high-order) meshes.\n- Mass operator that is local per each zone. It is inverted by iterative or exact\n  methods at each time step. This operator is constant in time (transport mode) or\n  changing in time (remap mode). Options for full or partial assembly.\n- Advection operator that couples neighboring zones. It is applied once at each\n  time step. This operator is constant in time (transport mode) or\n  changing in time (remap mode). Options for full or partial assembly.\n- Domain-decomposed MPI parallelism.\n- Optional in-situ visualization with [GLVis](http:/glvis.org) and data output\n  for visualization and data analysis with [VisIt](http://visit.llnl.gov).\n\n## Code Structure\n\n- The file `remhos.cpp` contains the main driver with the time integration loop.\n- The files `remhos_ho.hpp` and `remhos_ho.cpp` contain all methods that\n  are used to obtain high-order (but not bounds-preserving) solutions of the problem.\n- The files `remhos_lo.hpp` and `remhos_lo.cpp` contain all methods that\n  are used to obtain low-order (but bounds-preserving) solutions\n  of the problem.\n- The files `remhos_fct.hpp` and `remhos_fct.cpp` contain all methods that\n  combine already computed high-order and low-order solutions, thus obtaining a\n  high-order and bounds-preserving solutions of the problem.\n- The files `remhos_tools.hpp` and `remhos_tools.cpp` contain helper functions\n  utilized by the main classes of the miniapp.\n\n## Building\n\nRemhos has the following external dependencies:\n\n- *hypre*, used for parallel linear algebra, we recommend version 2.10.0b\u003cbr\u003e\n   https://computation.llnl.gov/casc/hypre/software.html\n\n-  METIS, used for parallel domain decomposition (optional), we recommend [version 4.0.3](http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz) \u003cbr\u003e\n   http://glaros.dtc.umn.edu/gkhome/metis/metis/download\n\n- MFEM, used for (high-order) finite element discretization, its GitHub master branch \u003cbr\u003e\n  https://github.com/mfem/mfem\n\nTo build the miniapp, first download *hypre* and METIS from the links above\nand put everything on the same level as the `Remhos` directory:\n```sh\n~\u003e ls\nRemhos/  hypre-2.10.0b.tar.gz  metis-4.0.tar.gz\n```\n\nBuild *hypre*:\n```sh\n~\u003e tar -zxvf hypre-2.10.0b.tar.gz\n~\u003e cd hypre-2.10.0b/src/\n~/hypre-2.10.0b/src\u003e ./configure --disable-fortran\n~/hypre-2.10.0b/src\u003e make -j\n~/hypre-2.10.0b/src\u003e cd ../..\n```\nFor large runs (problem size above 2 billion unknowns), add the\n`--enable-bigint` option to the above `configure` line.\n\nBuild METIS:\n```sh\n~\u003e tar -zxvf metis-4.0.3.tar.gz\n~\u003e cd metis-4.0.3\n~/metis-4.0.3\u003e make\n~/metis-4.0.3\u003e cd ..\n~\u003e ln -s metis-4.0.3 metis-4.0\n```\n\nClone and build the parallel version of MFEM:\n```sh\n~\u003e git clone https://github.com/mfem/mfem.git ./mfem\n~\u003e cd mfem/\n~/mfem\u003e make parallel -j\n~/mfem\u003e cd ..\n```\nThe above uses the `master` branch of MFEM. See the [MFEM\nbuilding page](http://mfem.org/building/) for additional details.\n\n(Optional) Clone and build GLVis:\n```sh\n~\u003e git clone https://github.com/GLVis/glvis.git ./glvis\n~\u003e cd glvis/\n~/glvis\u003e make\n~/glvis\u003e cd ..\n```\nThe easiest way to visualize Remhos results is to have GLVis running in a\nseparate terminal. Then the `-vis` option in Remhos will stream results directly\nto the GLVis socket.\n\nBuild Remhos\n```sh\n~\u003e cd Remhos/\n~/Remhos\u003e make\n```\nSee `make help` for additional options.\n\n## Running\n\n#### Sample remap examples\n\nSome *remap* mode sample runs for in 2D and 3D respectively are:\n```sh\nmpirun -np 8 remhos -m ./data/inline-quad.mesh -p 14 -rs 2 -rp 1 -dt 0.0005 -tf 0.6 -ho 1 -lo 2 -fct 3\nmpirun -np 8 remhos -m ./data/cube01_hex.mesh -p 10 -rs 1 -o 2 -dt 0.02 -tf 0.8 -ho 1 -lo 4 -fct 2\n```\nThis first of the above runs can produce the following plots (notice the `-vis` option)\n\n\u003ctable border=\"0\"\u003e\n\u003ctd\u003e \u003cimg src=\"data/remap_0.png\"\u003e\n\u003ctd\u003e \u003cimg src=\"data/remap_1.png\"\u003e\n\u003ctd\u003e \u003ca href=\"https://glvis.org/live/?stream=../data/remhos.saved\"\u003e\u003cimg src=\"data/remap_2.png\"\u003e\u003c/a\u003e\n\u003c/table\u003e\n\n#### Sample transport examples\n\nSome *transport* mode sample runs for in 2D and 3D respectively are:\n```sh\nmpirun -np 8 remhos -m ./data/periodic-square.mesh -p 5 -rs 3 -rp 1 -dt 0.00025 -tf 0.8 -ho 1 -lo 4 -fct 3\nmpirun -np 8 remhos -m ./data/periodic-cube.mesh -p 0 -rs 1 -o 2 -dt 0.014 -tf 8 -ho 1 -lo 4 -fct 2\n```\nThis first of the above runs can produce the following plots (notice the `-vis` option)\n\n\u003ctable border=\"0\"\u003e\n\u003ctd\u003e \u003cimg src=\"data/transport_0.png\"\u003e\n\u003ctd\u003e \u003cimg src=\"data/transport_1.png\"\u003e\n\u003ctd\u003e \u003cimg src=\"data/transport_2.png\"\u003e\n\u003c/table\u003e\n\n## Verification of Results\n\nTo perform thorough testing, run the script `Remhos\\autotest\\test.sh` and\ncompare its output, `out_test.dat`, to `out_baseline.dat`.\nAlternatively, verify the final mass (`mass`) and maximum value (`max`) for the runs listed below:\n\n1.  `mpirun -np 8 remhos -m ./data/periodic-hexagon.mesh -p 0 -rs 2 -dt 0.005 -tf 10 -ho 1 -lo 2 -fct 2`\n2.  `mpirun -np 8 remhos -m ./data/periodic-hexagon.mesh -p 0 -rs 2 -dt 0.005 -tf 10 -ho 1 -lo 4 -fct 2`\n3.  `mpirun -np 8 remhos -m ./data/disc-nurbs.mesh -p 1 -rs 3 -dt 0.005 -tf 3 -ho 1 -lo 2 -fct 2`\n4.  `mpirun -np 8 remhos -m ./data/disc-nurbs.mesh -p 1 -rs 3 -dt 0.005 -tf 3 -ho 1 -lo 4 -fct 2`\n5.  `mpirun -np 8 remhos -m ./data/periodic-square.mesh -p 5 -rs 3 -dt 0.005 -tf 0.8 -ho 1 -lo 2 -fct 2`\n6.  `mpirun -np 8 remhos -m ./data/periodic-square.mesh -p 5 -rs 3 -dt 0.002 -tf 0.8 -ho 1 -lo 4 -fct 2`\n7.  `mpirun -np 8 remhos -m ./data/periodic-cube.mesh -p 0 -rs 1 -o 2 -dt 0.014 -tf 8 -ho 1 -lo 4 -fct 2`\n8.  `mpirun -np 8 remhos -m ../mfem/data/ball-nurbs.mesh -p 1 -rs 1 -dt 0.02 -tf 3 -ho 1 -lo 4 -fct 2`\n9.  `mpirun -np 8 remhos -m ./data/inline-quad.mesh -p 14 -rs 1 -dt 0.001 -tf 0.75 -ho 1 -lo 4 -fct 2`\n10. `mpirun -np 8 remhos -m ./data/inline-quad.mesh -p 14 -rs 3 -dt 0.005 -tf 0.75 -ho 1 -lo 5 -fct 4 -ps -s 13`\n11. `mpirun -np 8 remhos -m ./data/cube01_hex.mesh -p 10 -rs 1 -o 2 -dt 0.02 -tf 0.8 -ho 1 -lo 4 -fct 2`\n12. `mpirun -np 8 remhos -m ./data/inline-quad.mesh -p 7 -rs 3 -o 1 -dt 0.01 -tf 20 -mono 1 -si 2`\n13. `mpirun -np 8 remhos -m ./data/inline-quad.mesh -p 6 -rs 2 -o 1 -dt 0.01 -tf 20 -mono 1 -si 1`\n\n\n| `run` | `mass` | `max` |\n| ----- | ------ | ----- |\n|  1. | 0.3888354875 | 0.9333315791 |\n|  2. | 0.3888354875 | 0.9446390369 |\n|  3. | 3.5982222    | 0.9995717563 |\n|  4. | 3.5982222    | 0.9995717563 |\n|  5. | 0.1623263888 | 0.7676354393 |\n|  6. | 0.1623263888 | 0.7480960657 |\n|  7. | 0.9607429525 | 0.7678305756 |\n|  8. | 0.8087104604 | 0.9999889315 |\n|  9. | 0.08479546709| 0.8156091428 |\n| 10. | 0.09317738757| 0.9994170644 |\n| 11. | 0.1197294512 | 0.9990312449 |\n| 12. | 0.1570667907 | 0.9987771164 |\n| 13. | 0.3182739921 | 1            |\n\nAn implementation is considered valid if the computed values are all within\nround-off distance from the above reference values.\n\n## Performance Timing and FOM\n\nTo appear soon.\n\n## Versions\n\nTo appear soon.\n\n## Contact\n\nYou can reach the Remhos team by emailing remhos@llnl.gov or by leaving a\ncomment in the [issue tracker](https://github.com/CEED/Remhos/issues).\n\n## Copyright\n\nThe following copyright applies to each file in the CEED software suite,\nunless otherwise stated in the file:\n\n\u003e Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the\n\u003e Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights reserved.\n\nSee files LICENSE and NOTICE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceed%2Fremhos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceed%2Fremhos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceed%2Fremhos/lists"}