so that only rank 0 prints the message when running in parallel.
Fix inaccurate warnings (in DEBUG mode) about inverted elements which
were generated when refining a periodic parallel mesh in 2D.
Some formatting improvements.
and transfers.
The Memory class is now used by some MFEM classes (like Array and
Vector) which can be used on the Device. Such classes now provide
methods to access the underlying Memory object, e.g. GetMemory.
Updated ex1/ex1p and ex6/ex6p to not need to enable/disable the
Device at specific points -- the Device is now enabled just at the
start. Also, the same examples can now run on Device (e.g. -d cuda)
without the partial assembly option (-pa) -- full assembly will
be still done on CPU but the sparse matrix action and vector
operations will be done using the Device.
Reverted changes in class DenseMatrix related to using the Device.
At this point, DenseMatrix operations are only used for small matrices
and using the Device in this case is not a good option.
In class Mesh/ParMesh:
* Move the serial implementation of UniformRefinement3D to a new
method: UniformRefinement3D_base. The implementations of the virtual
method UniformRefinement3D (which now have no parameters) use the
new UniformRefinement3D_base method.
* In UniformRefinement3D_base, implemented two algorithms for choosing
how to split the middle octahedron when refining a tetrahedron by
cutting off its four corner tets. (These four tets have the same
shape as the original tet and half the edge-length.) The choice of
the algorithm is hard-coded in a const variable for now.
* Add an optional parameter to UniformRefinement which is used to
choose how to refine tet-only meshes: the default choice is to use
the new algorithm defined by UniformRefinement3D; the second option
is to use the old default - call LocalRefinement (marking all
elements) to perform 3 levels of bisection. The new algorithm
always produces elements with better shape (aspect ratio) than the
old default (at least for the meshes in the data/ directory and a
few other meshes).
* Make the method Finalize virtual - its implementation in parallel
requires updates in the ParMesh data.
* Add a consistency check in ParMesh::ReorientTetMesh that verifies
the assumption made in the method about the update of the shared
triangles.
* Simplify implementation of some methods in class ParMesh by
separating common code in a new protected method: FinalizeParTopo.
Other updates:
* In the examples and miniapps, when using a tet-only mesh which is
first refined uniformly and then locally, it is now necessary to
call the method Mesh::Finalize(true) (which is now virtual) in order
to mark the elements for local refinement after the uniform
refinement.
* In example 12p, use better random seed values.
* In examples 3/3p, add a sample run with order=2 on a tet mesh - this
will test the methods {Mesh,ParMesh}::ReorientTetMesh. Previously,
these were only tested by one sample run in example 4p.
* In the mesh-explorer miniapp, add a refinement option to perform
uniform refinement of tet-only meshes using bisection.
* In the MFEM_LOCATION macro print the <file> and <line> location
using a standard format: <file>:<line>, as used by most compilers
when reporting warnings and errors.
* Remove FIXME comments about mesh format v1.0.1.
In the classes Mesh and ParMesh:
* Small optimization in Mixed3DUniformRefinement for hex-only meshes.
* In Mixed3DUniformRefinement, use marker array instead of std::map.
* Rename the methods Mixed{2D,3D}UniformRefinement to
UniformRefinement{2D,3D}.
* Remove the methods {Quad,Hex,Wedge}UniformRefinement and use
UniformRefinement{2D,3D} instead. In terms of performance, the
difference was negligible.
The issue was: in the transition from serial to parallel mesh, a
shared triangle face was rotated (marked for bisection refinement)
if its processor-local adjacent element was a tetrahedron with a
non-zero refinement flag. This led to inconsistent shared triangles
in the two neighbor processors when the other adjacent element was
a wedge.
The solution is to apply the shared triangle rotation only when
we have a tet-only mesh (globally).
In class ParMesh:
* Introduced internal struct's Vert3 and Vert4 holding 3 and 4
integers, respectively.
* Replaced 'shared_faces' with two separate arrays 'shared_trias'
and 'shared_quads' with types Array<Vert3> and Array<Vert4>,
respectively.
* Removed the arrays 'stria_lface', 'squad_lface', 'stria_sface',
'squad_sface', and 'sface_stype'.
* Restore the array 'sface_lface' used previously. Shared face
indices are shred triangle / quad indices offset by 0 / "number
of shared triangles", respectively.
* Made the two RefineGroups methods protected.
* Added two new protected methods: UniformRefineGroups2D and
UniformRefineGroups3D. These two methods simplify the
implementations of almost all uniform-refinement methods in
the class.
* Fixed a bug in ReorderTetMesh that was causing ex8p to fail with
fichera-mixed.mesh.
* Updated the implementations of all ParMesh methods as necessary
due to the above changes.
In class Triangle, add a static method MarkEdge that works on a
given array of 3 indices.
In class Array, add a method CopyTo - implemented using std::copy.