Commit Graph
118 Commits
Author SHA1 Message Date
Tzanio Kolev c11424df05 Merge pull request #1185 from mfem/mesh-partitioning-warning-fix
Tweak the warning messages in Mesh::GeneratePartitioning() [mesh-partitioning-warning-fix]
2019-12-24 15:44:05 -08:00
Tzanio Kolev 123321c886 Merge pull request #892 from mfem/print-as-one-1d-dev
Adding support for 1D meshes in ParMesh::PrintAsOne [print-as-one-1d-dev]
2019-12-08 11:18:33 -08:00
Veselin Dobrev db97372598 Improve the messages printed by the method Mesh::GeneratePartitioning()
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.
2019-12-06 19:01:59 -08:00
Tzanio Kolev 27fc41fee4 Merge pull request #1119 from mfem/uniform-refinement-element-ordering-dev
Improve element order upon uniform refinement
2019-11-20 08:22:54 -08:00
Tzanio Kolev 103a711c80 Merge pull request #1021 from mfem/custom-rebalance-dev
Load balancing with custom partitioning [custom-rebalance-dev]
2019-11-20 08:21:23 -08:00
Veselin Dobrev f5e20f33e3 Fix a few bugs and revert some debugging edits. 2019-11-12 19:40:20 -08:00
Jakub Červený 2d48336f5c ParMesh::ReorientTetMesh: implemented global vertex ordering-based orientation. 2019-11-09 19:49:23 +01:00
Jakub Červený d10ffb4f3f More debugging output on shared triangles. 2019-11-08 13:44:55 +01:00
Jakub Červený 2617ebc59e Debugging shared triangle orientation (mpirun -n 3 ex3p -m ../data/inline-tet.mesh) 2019-11-05 18:19:20 +01:00
Jakub Červený 88623f6ece Custom partitioning interface in ParNCMesh and ParMesh. 2019-07-31 17:14:34 +02:00
Stowell, Mark L 2bebcc7d42 Adding comment to explain placement of call to deletion method 2019-06-03 14:22:59 -07:00
Stowell, Mark L 352ec38beb make style 2019-06-01 15:35:45 -07:00
Stowell, Mark L 820da17681 Deleting face neighbor data during derefinement 2019-06-01 15:34:38 -07:00
Veselin Dobrev 798ded1f55 Merge branch 'master' into memory-dev 2019-05-22 23:53:04 -07:00
Veselin Dobrev 40378a046b Introduce a new Memory class for handling host + device allocations
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.
2019-05-16 14:53:39 -07:00
Tzanio 5b00c3d0e6 Merge branch 'master' into stefanozampini/small-improvements
Conflicts:
	fem/bilininteg.hpp
2019-05-15 11:38:18 -07:00
Stowell, Mark L 5b005edd6b Adding support for 1D meshes in ParMesh::PrintAsOne 2019-04-29 15:33:38 -07:00
camierjs 6e82bd6ada Update new nodes before rebalancing 2019-04-19 17:01:07 -07:00
Veselin Dobrev b750de4608 In ParMesh::Rebalance(), check for nodes before checking for
parallel FE space.
2019-04-11 13:53:58 -07:00
Veselin Dobrev 14f063d608 In ParMesh::Rebalance, make sure the mesh nodes use a ParGridFunction. 2019-04-11 12:36:29 -07:00
camierjs 2020335b50 Renaming + free functions in mfem namespace 2019-04-09 18:17:00 -07:00
camierjs 8411c70cb6 make style 2019-04-04 14:01:46 -07:00
Will Pazner a5ecb742a0 Revert to using new and delete
Also rename mm::malloc to mm::New and mm::free to mm::Delete.
2019-04-04 13:44:10 -07:00
Tzanio Kolev d9917cb13f Merge branch 'master' into okina 2019-03-29 09:33:16 -07:00
Andrew T. Barker 7af1ef647c pmesh: delete faces_tbl in UniformRefinement3D() 2019-03-22 10:03:31 -07:00
Stefano Zampini c7eeca7c51 WIP: specify partitioning for NCMesh 2019-03-18 11:34:24 +03:00
camierjs eb68f79ee2 MM sanitized 2019-02-28 12:47:09 -08:00
camierjs 842a59f6dc Merge branch 'master' into okina 2019-02-27 16:14:32 -08:00
Veselin Dobrev 169b0e679b In ParMesh::NonconformingRefinement, delete face-neighbor-data so
that it can be reconstructed correctly when needed.

This should resolve GitHub issue #739.
2019-02-12 17:11:44 -08:00
Tzanio 677b6f8aad Merge branch 'master' into okina
Conflicts:
	fem/bilinearform.hpp
	fem/pbilinearform.hpp
	makefile
2018-12-18 10:07:49 -08:00
Jakub Červený 588548b13d WIP fix order of shared entities in ParMesh compatibility groups. 2018-11-16 17:30:50 +01:00
camierjs 668ad9c5ac ex1p host mode through memory manager 2018-11-01 10:21:09 -07:00
Veselin Dobrev 9032dd3c9a Fix a bug in ParMesh::PrintAsOne
Reported by: @Dan2997925
2018-10-23 16:34:34 -07:00
Jakub Cerveny 52a3e70765 Removed unused parameter in ParMesh::FindSharedVertices. 2018-10-18 17:46:59 -07:00
Jakub Cerveny cc9df02fe5 Merge branch 'master' into cut-mesh-groups-dev-3 2018-10-12 17:03:22 +02:00
Tzanio b1537b5648 Small edits 2018-10-10 17:54:26 -07:00
Veselin Dobrev da2fb88a17 Improved uniform refinement of tetrahedral meshes
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.
2018-09-27 21:04:58 -07:00
Veselin Dobrev 46d92466fa Simplify the uniform-refinement mesh methods.
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.
2018-09-20 20:17:30 -07:00
Jakub Cerveny 200c906e3c Merge branch 'master' into cut-mesh-groups-dev-3 2018-09-19 20:32:26 +02:00
Veselin Dobrev 0f828353da Rework the changes in the parallel mesh format methods in ParMesh.
The goal was to preserve the parallel format from 'master' while
supporting the new features in this branch, prism-dev/prism-dev-dev-2.
2018-09-18 14:42:42 -07:00
Jakub Cerveny b995f44a41 Added GetConformingSharedStructures call to ParMesh::NonconformingDerefinement. 2018-09-18 21:16:08 +02:00
Veselin Dobrev e47d652a88 Bugfix in the ParMesh constructor from serial Mesh.
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).
2018-09-16 16:40:06 -07:00
Veselin Dobrev f9694c3c2b Simplified data structures in class ParMesh
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.
2018-09-16 14:30:09 -07:00
Jakub Cerveny 3506544b42 ParNCMesh cannot take prescribed partitioning (at the moment).
Reorganized and added a warning.
2018-09-16 20:42:13 +02:00
Jakub Cerveny 132cd5d316 Fixed merging errors, removed TODOs. 2018-09-16 20:41:15 +02:00
Jakub Cerveny 2bec165a83 Trying to reorder refactored methods to minimize diff to master. 2018-09-16 19:19:10 +02:00
Jakub Cerveny b11335c3ab ParMesh compatibility: creating shared_edges, shared_faces. 2018-09-14 20:20:55 +02:00
Jakub Cerveny b4d3473dab Conforming groups (ParallelAverage) seem to work for linear elements. 2018-09-14 16:45:15 +02:00
Veselin Dobrev 4f059c1898 Merge branch 'prism-dev' into prism-dev-dev-2 2018-09-12 21:46:11 -07:00
Stowell, Mark L 5cce8731af Bugfix: missing indirection in element lookup 2018-09-12 21:17:27 -07:00