Commit Graph
101 Commits
Author SHA1 Message Date
Dylan Copeland 096605f532 Revert empty line. 2025-11-17 15:03:29 -08:00
Dylan Copeland 69b4689048 Fix a bug so that "m" option works for 3D NURBS meshes. 2025-11-17 14:58:21 -08:00
Dylan Copeland a1179d6489 Merge branch 'master' of github.com:mfem/mfem into nurbs-nc 2025-07-07 11:15:19 -07:00
Stowell, Mark L. 2ed6fdc85a Cleaning up compiler warnings 2025-05-07 13:12:53 -07:00
Stowell, Mark L. 83ca977d71 Adding an affine transformation option to mesh-explorer 2025-04-21 16:38:16 -07:00
Stowell, Mark L. 7354e1ce6c Adding option to increase the space dimension of the mesh 2025-04-18 12:00:58 -07:00
Dylan Copeland 02dd999886 Merge branch 'master' of github.com:mfem/mfem into nurbs-nc 2025-04-09 20:56:36 -07:00
Tzanio Kolev b3e19a2e7a Typos and styling 2025-03-31 18:48:43 -07:00
Dylan Copeland 622985d8da Interface improvements and refactoring. 2025-03-22 20:39:15 -07:00
Dylan Copeland ecab08e1b6 Merge branch 'master' of github.com:mfem/mfem into nurbs-nc 2025-03-05 22:30:22 -08:00
Mittal, Ketan 3eabf0746b make style 2025-02-17 15:51:40 -08:00
Mittal, Ketan 9f11cb489c minor 2025-02-14 11:50:19 -08:00
Mittal, Ketan 8e5ea695d5 initial commit 2025-02-14 11:28:53 -08:00
Dylan Copeland 12896cd9ed Merge branch 'master' of github.com:mfem/mfem into nurbs-nc 2025-02-12 12:29:48 -08:00
Dylan Copeland b5ed99e1cd Added the capability to specify a refinement factor for each knotvector. Piecewise knotvectors can have multiple refinement factors. 2025-02-11 21:24:07 -08:00
Tzanio Kolev e4c2152419 Update Copyright to 2010-2025 2025-02-03 12:17:26 -08:00
Tzanio Kolev 21537ec6c6 Separate array for element partitioning in Mesh Explorer 2025-01-27 18:05:16 -08:00
Tzanio Kolev d9850f4baa minor 2024-12-22 10:38:53 -08:00
Tzanio Kolev 4219887355 Added helpful information for GLVis visualization of mesh elements in Mesh Explorer 2024-12-22 10:36:07 -08:00
Tzanio Kolev f51d715503 Fix element visualization in Mesh Explorer 2024-12-21 19:48:21 -08:00
john bowen c8644c4b13 Reorder args 2024-08-12 15:56:29 -07:00
john bowen 0c12c9298b Make visport user configurable for miniapps 2024-08-12 13:01:37 -07:00
Edward PalmerEdward PalmerTzanio KolevStowell, Mark L <stowell1@llnl.gov>
7ace2dedf1 Exodus II Writer (#4208)
* Added WriteExodusII method to the Mesh; added exodus_writer cpp file; updated cmakelists.

* Added test_exodus_writer file for Exodus II writer unit tests.

* Setting title, num_dim, num_elem.

* Added function to generate Exodus II element blocks from MFEM mesh.

* Added a function to generate sideset information from an MFEM mesh.

* Added function to get num_nodes for an MFEM mesh.

* Writing coordinates to file.

* Rewritten GenerateExodusIIElementBlocksFromMesh to make use of element attributes.

* Now defining some element block parameters.

* Added WriteNodeConnectivityForBlock; fixed naming of one of the variables.

* Fixed naming for number of nodes per element variable.

* Added function to write sideset boundary IDs to file.

* Added function to write block IDs.

* Added incomplete functiono "GenerateExodusIISidesetsFromMesh" which generates key information about each boundary which can then be written to the file.

* Now also writing the number of elements for each sideset.

* Updated Exodus II writer to write boundary element IDs and side IDs to file.

* Corrected the side_ids_for_boundary_id mapping.

* Rewritten function to generate Exodus II boundary info.

* Fixed incorrect dimensions passed to nc_def_var.

* Added line length and version number info.

* Added header information.

* Removed NETCDF_4 flag (not supported by some programs). Manually setting nc_enddef and nc_redef.

* Added info for timesteps, updated file size info, added info for block element types.

* Added dummy variable to get-around bug in libMesh which prevents the x-coordinate from being read.

* Added ExodusII writer Hex8 test case.

* Updated exodus_writer to handle Tet4.

* Added Tet4 test case and a comparison test function.

* Fixed incorrect variable name.

* Added MFEM to ExodusII side map for Hex8.

* Added Tet4 test ExodusII file.

* Added Wedge6 support to ExodusII writer.

(cherry picked from commit 9412dac5c4dde84732d2f8e82787eac3f9e48906)

* Added ExodusII Wedge6 test case.

(cherry picked from commit 0e69f28a5f357fc44d22f52b1cd5f7a63e492b2b)

* Added Pyramid5 support.

(cherry picked from commit 679b1e4c3f9298513627d27ea130b5e87b80350c)

* Added Pyramid5 test case.

(cherry picked from commit 2f90b786a0228892f76f926af5e0fe04ab741977)

* Commented-out Wedge6 and Pyramid5 tests since the files cannot be read until ReadCubit is updated in a separate PR.

* Removed unused dimension definition; Added support for writing mixed first-order meshes.

(cherry picked from commit 4c111d6f9198f418d32df98fd5e711455f73170a)

* Commented-out test cases that cannot be run with existing ReadCubit ExodusII reader.

* STarted writing a class to encapsulate writing.

* Converted functions to methods in class.

* Removed mesh argument from methods.

* Added CreateEmptyFile, WriteTitle and WriteNumOFElements methods.

* Added database/api versions, floating point word size, max line/name lengths.

* writing element block parameters now handled in class method.

* Sideset information now stored inside class.

* writing nodal variables is now done in a method.

* Add functionality now added to class.

* Added a DefineDimension wrapper around nc_def_dim.

* Added DefineVar wrapper method.

* Added a static method for writing to a file.

* Reordered methods.

* Updated documentation.

* Added safety check to ensure mesh is first-order.

* Added PutVar wrapper method.

* Added PutAtt method.

* Replaced nc_put_att_text.

* Moved nc_redef and nc_enddef into methods.

* WriteNodalCoordinates is now a single method.

* Added DefineAndPutVar method to simplify code.

* Added a macro to check NetCDF status.

* Added a GenerateLabel method.

* Added global named C string labels.

* Updated documentation; merged methods.

* Merged methods for writing boundary info.

* WriteElementBlocks now contains all methods related to this.

* Moved ExodusII file information writer methods into a new method.

* Moved all mesh writer methods into new method.

* Added safety check method.

* Reordered globals; updated documentation; switched set to unordered_set.

* Added test case for Tet10; added additional dofs checks.

* Added handling of second-order Tet (Tet10) elements to exodus writer.

* Updated the "elem_type" names.

* Added Hex27 support to writer.

* Added Hex27 test.

* Added support for Wedge18.

* Added mapping for Pyramid14 (cannot test until reader is able to handle higher-order pyramids).

* Added test files; added additional unit tests.

* Added test comments.

* Commented-out mixed second-order writer test since current reader cannot handle multiple element types.

* Addresses compiler warnings.

* Updated documentation.

* Minor changes to increase readability.

* Updated changelog.

* Address build issue.

* Address compiler warning for unused function used in the unit tests.

* Moves "WriteExodusII" further down to live with the Print methods.

* Renamed "WriteExodusII" to "PrintExodusII" to be consistent.

* Moves ExodusII labels into their own namespace to avoid polluting mfem namespace.

* Temporary mesh output files are now placed in current directory.

* Removes temporary output meshes to avoid false positives.

* Adding Exodus II output option to mesh-explorer

* make style

* Moves ExodusII test meshes into mfem/data directory.

* Fixes minor typo for GenerateExodusIIElementBlocks  documentation.

* Adds a check to confirm that the nodes correspond to a 2nd order H1 space.

* Moves CheckNodalFESpaceIsSecondOrderH1 implementation to bottom.

* Applies style.

* Removes unneeded semi-colon from ExodusIILabels namespace.

* Moves side map arrays into ExodusIISideMaps labels.

Avoids polluting mfem namespace.

* Moves node ordering maps into ExodusIINodeOrderings namespace.

Ensures that mfem namespace is not polluted.

* Removes documentation from #define to fix failing check.

* Revert "Removes documentation from #define to fix failing check."

This reverts commit 39bc2ce836.

* Removes Doxygen documentation from #define to hopefully fix failing test.

* Fixes an issue where the writer failed on interior boundaries.

This initial fix skips internal boundaries. These are not added and a warning is printed indicating which interior boundaries have been skipped.

* Removes mesh test files.

* ExodusII write tests now use mfem/data repository.

* Adds ExodusII test tag.

* Removes varaible underscore prefixes.

* Applies style.

* Uses Generate macro to avoid test duplication.

* Adds link to libMesh issue.

---------

Co-authored-by: Edward Palmer <edward.palmer@ukaea.uk>
Co-authored-by: Tzanio Kolev <tzanio@llnl.gov>
Co-authored-by: Stowell, Mark L <stowell1@llnl.gov>
2024-06-14 10:26:55 -07:00
Veselin Dobrev a0e1df7154 Address reviewer feedback about mesh-explorer.cpp 2024-04-19 13:07:38 -07:00
Veselin Dobrev cba47bc4cd Initial draft of mesh partitioning capability that allows big
serial meshes to be partitioned and saved in parallel format
using one processor. This capability allows MFEM to work around
the current bottleneck which requires every MPI rank to load
the big serial mesh before it can be partitioned.

This new capability is added to the `mesh-explorer` miniapp with
the new menu option `D` and is based on two new classes:
* `MeshPartitioner`, constructed from a serial mesh and any
  partitioning array. Once constructed, it can extract any part
  of the mesh consisting of the elements with ids `elem_id` such
  that `partitioning[elem_id] == part_id`. The extracted mesh
  part is given in the form of a `MeshPart` object.
* `MeshPart`, which is currently construced by a `MeshPartitioner`.
  In the future, it can be created by other methods to facilitate
  other capabilities such as parallel mesh re-partitioing. Once
  constructed, the `MeshPart` can be saved to a file using the
  text-based parallel MFEM format. Support for other formats can
  be added as well. Another capability that can be added is the
  MPI communication of `MeshPart` objects between different ranks
  which can be used, for example, for implementing a `ParMesh`
  constructor that needs the serial mesh only on one processor.

Current limitations:
* Non-conforming and NURBS meshes are not supported.
* Meshes with nodes (e.g. high-order or periodic meshes) are
  not supported.

Small extension: if `Mesh::SetCurvature` is called with `order = 0`
then the method will remove the nodal `GridFunction` and use the
vertices array instead. This "curvature removal" capability can be
used from the `mesh-explorer` miniapp with the `c` menu option,
by specifying 0 when prompted to enter order.

Temporary change: `ex1p.cpp` is modified to disregard the (serial)
mesh specified with the option `-m`/`--mesh`. Instead, it loads
the parallel mesh `../miniapps/meshing/mesh-explorer.mesh.<rank>`
produced by the `D` menu option of the `mesh-explorer` miniapp.
2024-03-31 12:57:13 -07:00
Veselin Dobrev 7be646b8ce Fix the HIP build with single precision.
Fix warnings about RAND_MAX when using single precision.

Introduce an inline function `real_t rand_real()` that returns a
random number in the interval [0,1) using rand(). This function
handles better the case of single precision where the expression
`real_t(rand())/(real_t(RAND_MAX)+1)` can return 1.0f due to round-off
when rand() returns a number close to RAND_MAX.

Use `rand_real()` in a few places that before used code similar to
`real_t(rand())/(real_t(RAND_MAX)+1)`.
2024-03-24 10:43:15 -07:00
Dylan Copeland c009fb9bde Merge branch 'master' of github.com:mfem/mfem into float 2024-03-15 11:31:39 -07:00
Dylan Copeland d2e89166f9 Merge branch 'master' of github.com:mfem/mfem into float 2024-03-05 10:23:02 -08:00
dylan-copeland c866fefed1 Merge branch 'master' of github.com:mfem/mfem into nurbs-ref-formula 2024-02-26 10:03:47 -08:00
Dylan Copeland 046a874cfb Merge branch 'master' of github.com:mfem/mfem into float 2024-02-06 10:56:41 -08:00
Tzanio Kolev 87290fbf56 Update Copyright to 2010-2024 2024-01-27 13:06:49 -08:00
Tzanio Kolev d983b34924 Renamed ftype -> real_t 2023-12-13 12:51:43 -08:00
Dylan Copeland 9eca33b09d Generalized everything in miniapps/meshing. 2023-11-06 19:06:55 -08:00
Dylan Copeland 041ce914d8 Making NURBSUniformRefinement public and removing NURBS-specific inputs from UnioformRefinement. 2023-11-01 13:10:35 -07:00
Dylan Copeland ee3a46af24 Added support for LAPACK in single-precision. Changed fmax -> std::max, etc. 2023-10-31 14:30:44 -07:00
Dylan Copeland 106a47ae5d Added NURBS tolerance input in mesh-explorer refinement and coarsening. Fixed a bug in KnotVector copy constructor. 2023-10-16 19:22:25 -07:00
Dylan Copeland 693b319c97 Generalized mesh-explorer NURBS refinement to allow for different refinement factors in each dimension. 2023-10-07 20:28:06 -07:00
Dylan Copeland e89580e82a Adding NURBS coarsening option in mesh-explorer. 2023-10-06 14:55:19 -07:00
Dylan Copeland 47ac017e36 Merge branch 'master' of github.com:mfem/mfem into nurbs-ref-formula 2023-09-28 13:32:42 -07:00
Dylan Copeland 65a26340e8 Added option for NURBS refinement by a factor. Implemented piecewise spacing functions with an example mesh file. 2023-09-28 13:31:38 -07:00
Stowell, Mark L 8094cc46a7 Adding random refinement option to mesh-explorer 2023-06-09 10:56:46 -07:00
Tzanio Kolev 96e00dc815 Updated COPYRIGHT to 2010-2023 2023-03-11 16:58:18 -08:00
Veselin Dobrev 6992c1daac In the mesh-explorer miniapp, use high-order ParaView export when
the mesh is high-order.

Tweak doxygen comments in class ParaViewDataCollection.

Fix a bug in ParaViewDataCollection::SetCompression -- it still
needs work, I think, so I left a FIXME comment there too.
2023-01-13 15:55:12 -08:00
Veselin Dobrev 253eac37d2 A few small tweaks and fixes 2023-01-12 07:08:04 -08:00
Stowell, Mark L 11b1d2a597 Removing extraneous setting (thanks @pazner!) 2023-01-11 12:05:43 -05:00
Stowell, Mark L ff6fed8ee9 Increased error handling in DataCollection option 2023-01-11 12:05:09 -05:00
Stowell, Mark L 3b98856717 Adding DataCollection output to mesh-explorer 2023-01-11 11:48:39 -05:00
Ketan Mittal cd48e65827 restore relative path 2022-10-19 08:13:21 -07:00
Ketan MittalandChris Vogl 096f3143fb Get rid of relative path
Co-authored-by: Chris Vogl <vogl2@llnl.gov>
2022-10-07 15:05:18 -07:00
Ketan Mittal 15e3f3f35b reviewer comments 2022-09-28 13:08:35 -07:00