This fixes is the same issue is in ProjectBdrCoefficient which was
fixed by the previous commit.
An outstanding issue is the handling of nonconforming meshes in these
two methods - I left 'FIXME' comments there as reminders.
workaround for nonconforming meshes.
The workaround is to disable the parallel synchronization.
Also, added a debug check that all boundary dofs are set.
class GridFunction when used in parallel.
The issue appears when the master processor for a boundary DOF does
not own any of the boundary elements adjacent to that DOF.
The method ProjectBdrCoefficientTangent is probably affected by the
same issue, however, it is not addressed by this commit.
List of changes and additions:
* In class Mesh:
* Replaced the data fields BaseGeom, BaseBdrGeom, and BaseFaceGeom
with a new data field: mesh_geoms that is a bitwise mask for all
Geometry::Types found in the (local) Mesh including entities of
lower dimensions.
* The new data field mesh_geoms is set by the method SetMeshGen.
* Removed the (protected) method InitBaseGeom.
* Add new methods: HasGeometry, GetNumGeometries, and GetGeometries
that can be used to query the content of mesh_geoms. Also, added
class Mesh::GeometryList that can simplify such queries too.
* The methods GetFaceBaseGeometry, GetElementBaseGeometry, and
GetBdrElementBaseGeometry no longer have a default value for
their input parameter (the entity index) and accept only values
within their respective ranges.
* Removed the parameter of the method GetRefinementTransforms.
* Updated the methods PrepareNodeReorder and DoNodeReorder to
support mixed meshes.
* In parallel, the data field meshgen is now required to represent
information about the global mesh - updated relevant ParMesh
methods.
* Made any required changes outside of class Mesh due to the above
changes.
* Made various tweaks and improvements in the following methods:
CheckBdrElementOrientation, Mixed2DUniformRefinement,
Mixed3DUniformRefinement, UniformRefinement, and
GeneralRefinement.
* Updated the method PrintCharacteristics to print the types of
elements, boundary elements and faces used in the mesh.
* In the method ReadInlineMesh, replace remaining "pri" strings
with "wedge".
* In the mesh reader method ReadGmshMesh, recover the term "prism"
in the comments - it was replaced, unintentionally, I assume,
by "wedge".
* Add support for refinement of curvilinear mixed meshes:
* In class FiniteElementSpace, updated the methods:
GetLocalRefinementMatrices, GetLocalDerefinementMatrices,
RefinementMatrix, RefinementMatrix_main, as well as class
RefinementOperator to support mixed meshes.
* Add two new meshes: star-mixed-p2.mesh and fichera-mixed-p2.mesh
which represent examples of quadratic mixed meshes in 2D and 3D,
respectively.
* Add sample runs in ex1/ex1p using the new quadratic mixed meshes.
* In class Geometry:
* In the enumeration Type: removed the constant MIXED and added
new constant: NUM_GEOMETRIES.
* Add new static data field: DimStart[] that indexes the Types by
dimension: the Types of dimension 'd' are given by the range
[ DimStart[d], DimStart[d+1] ).
* In class ParNCMesh, added method GetGhostFaceGeometry that,
for now, returns Geometry::SQUARE.
* Update the return type of the method DofOrderForOrientation in
class FiniteElementCollection (and all derived classes) from
'int *' to 'const int *'.
* Removed the virtual method Element::GetRefinementFlag and made
the only relevant derived version (in class Tetrahedron),
non-virtual.
* In class Tetrahedron, added method Init.
* Added FIXME comments for some outstanding issues.
* In the mesh-explorer miniapp:
* Added option to enable or disable the 'refine' parameter when
reading a mesh from file.
* In the 'jitter' menu option, ask the user if the boundary
nodes should be moved or not.
* In the 'Print sub-element stats' menu option, count and print
bad/inverted elements by their Geometry::Type as well.
* Add an (optional) new data field, 'Vector t_vec' that may hold
associated true-dof data, either external or owned.
* Add two methods for const and non-const access to t_vec, called
GetTVector().
* Add a new method, SetTVector(), which as just a shortcut for
GetTrueDofs(GetTVector()).
* Add a new method, SetFromTVector(), which is just a shortcut for
SetFromTrueDofs(GetTVector()).
* Add two new methods, both called MakeTRef(), similar to MakeRef()
that (re-)construct GridFunctions that wrap external true-dof data.
All of the above functionality also works for ParGridFunctions without
modifications.
Add const qualifiers to some methods in class GridFunction and to some
parameters of these methods.
Use the shortcut 'infinity()' in more places.
A few tweaks in the implementation of the methods Update(), SetSpace(),
and MakeRef() in class GridFunction.
identified by the keyword "NURBS_patches".
In class NURBSExtension, add two new methods: LoadSolution and
PrintSolution which can be used to read and write GridFunctions in
patch-by-patch format.
solutions. Restore the NURBS meshes in the data directory to use their
original format.
Add a new FiniteElementSpace format for writing variable-order spaces,
currently implemented for NURBS spaces only. Move the reading of FE
space input in a new method: FiniteElementSpace::Load. Add new default
constructor for FiniteElementSpace that should be used with the Load
method.
Add a bunch of const qualifiers in NURBSExtension and NURBSPatchMap.
Extended the method Mesh::DegreeElevate to make it easier to work with
variable-order NURBS meshes.
In class Array, add copy constructors and copy assignment operators.
Add a number of FIXME comments.
general/globals.[ch].
Renamed class WrappedOStream to OutStream and use a different
implementation in order to support the case when the OutStream is passed
as a parameter of type std::ostream.
In class MPI_Session, added an MPI_Comm parameter to both constructors,
with a default value of MPI_COMM_WORLD.
Hide the global variable MFEM_COMM_WORLD and allow access (read and
write) with global functions: GetGlobalMPI_Comm() and
SetGlobalMPI_Comm() - in the future, we may want to perform some tasks
when changing the "global" MPI communicator.
In mfem_error(), use GetGlobalMPI_Comm() instead of MPI_COMM_WORLD.
Minor formatting changes and #include reordering.
In class ParGridFunction, implement the inherited virtual methods
SetSpace(FiniteElementSpace*), MakeRef(FiniteElementSpace*, double*),
and MakeRef(FiniteElementSpace*, Vector&, int) - they will use a
dynamic_cast to get required ParFiniteElementSpace*. Also, made the
versions of these methods taking ParFiniteElementSpace* non-virtual.