Commit Graph
166 Commits
Author SHA1 Message Date
camierjs 283264ade4 {Read,Write,ReadWrite}Access => {Read,Write,ReadWrite}
Add shortcut for Host{Read,Write,ReadWrite}
2019-05-24 14:08:45 -07:00
Tzanio Kolev e51f058263 Merge branch 'master' into memory-dev 2019-05-20 22:28:22 -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 634d7e8de5 minor styling 2019-04-22 12:29:40 -07:00
Tzanio 8888cfb04b make style 2019-04-22 12:25:42 -07:00
Pratyuksh Bansal 15639cec41 Add conversion of local dofs for vector elements in ExchangeFaceNbrData 2019-04-21 16:55:24 +02:00
camierjs 2020335b50 Renaming + free functions in mfem namespace 2019-04-09 18:17:00 -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
camierjs 574e5f6604 Standard integrator in examples, mm to get all parallel tests working. 2019-03-14 16:34:35 -07:00
camierjs 3ae0d68d50 Remove unused mm calls and linalg/kernels/sparsemat 2019-03-06 13:39:44 -08:00
camierjs eb68f79ee2 MM sanitized 2019-02-28 12:47:09 -08:00
camierjs 148929e807 mm, occa, cuda and device 2018-12-19 16:16:33 -08:00
camierjs f5434dc77a Merge branch 'master' into okina-laghos 2018-12-18 11:29:53 -08:00
camierjs 178e5b8215 Cleanup 2018-12-17 14:11:01 -08:00
camierjs 0a58311b39 Cleanup toward getting rid of Push/Pull 2018-12-14 15:17:03 -08:00
camierjs 450905d58a Cleanup and mm rewrite 2018-12-12 17:30:13 -08:00
camierjs 029dce3072 Laghos, all tests, all checks 2018-12-11 18:07:36 -08:00
camierjs 961b20e711 Laghos Sedov GPU, same results 2018-12-10 20:35:53 -08:00
camierjs 2708f63dd9 Swaping ranges for alias 2018-12-10 08:43:59 -08:00
camierjs 4fcf5de2c4 make check with right x_gf 2018-12-07 13:26:55 -08:00
camierjs e15cea2b86 All 2D CPU checks 2018-12-06 18:30:11 -08:00
camierjs 966e50c6c8 ./laghos -cfl 0.1 2018-12-03 12:21:58 -08:00
camierjs 339e182505 Up to Laghos with --qupdate 2018-12-03 11:29:48 -08:00
Tzanio b270dc8323 PMATRIX_STATS -> MFEM_PMATRIX_STATS; Some typos 2018-11-08 14:48:06 -08:00
Jakub Červený ff43f75b5b Replaced std::cout with mfem::out. 2018-11-08 21:03:24 +01:00
camierjs 31c4bd43cb Non-WIP melded ex1(p) PA, GPU, MPI 2018-11-06 16:10:10 -08:00
camierjs e8682fac9d mpirun ex1p GPU with pull/push in Conforming Prolongation Operators 2018-11-02 11:00:17 -07:00
camierjs 47ce4ecf8e Merge branch 'master' into okina-wip 2018-10-29 17:11:21 -07:00
Jakub Cerveny 00227e56ad Merge branch 'master' into laghos-amr-dev 2018-10-26 11:18:10 +02:00
Veselin Dobrev 0d6e920cc7 Add checks to ensure the mesh is conforming in the methods
ParGridFunction::ParallelAverage.

Remove a check for non-conforming mesh in the method
ParFiniteElementSpace::Synchronize which now should work for
NC meshes too.

A few additions to the doxygen documentation of class
ParFiniteElementSpace.
2018-10-19 15:31:49 -07:00
camierjs 35ffb9f53f NVVP markers cleanup 2018-10-19 11:04:03 -07:00
Jakub Cerveny 895b935807 Fixed a problem for slave DOFs in ParFESpace::DivideByGroupSize. 2018-10-18 17:24:37 -07:00
camierjs 4c4e1707aa ex1p, one process 2018-10-16 17:40:21 -07:00
Jakub Cerveny cc9df02fe5 Merge branch 'master' into cut-mesh-groups-dev-3 2018-10-12 17:03:22 +02: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 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 26a77da393 Added TODO. 2018-09-16 21:00:26 +02:00
Jakub Cerveny 3bc5c3f1f3 More cleanup. 2018-09-16 19:07:46 +02:00
Jakub Cerveny d372d76336 Removed debugging code. 2018-09-16 12:05:49 +02:00
Jakub Cerveny b11335c3ab ParMesh compatibility: creating shared_edges, shared_faces. 2018-09-14 20:20:55 +02:00
Veselin Dobrev 0d6d850e09 Updates related to wedge/prism elements and mixed meshes.
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.
2018-09-10 14:22:14 -07:00
Jakub Cerveny 6d815143b9 Adding some temporary debug code. 2018-09-07 17:21:34 +02:00
Jakub Cerveny bd5007e868 WIP trying to make ParallelAverage work for NCMeshes. 2018-09-06 16:54:17 +02:00
Robert W. Anderson 6331f5c43d DivideByGroupSize is a valid operation now on the cut mesh 2018-08-31 10:46:39 -07:00
Robert W. Anderson de88f554fd construct vector group communicator in nc case that is usually constructed in ConstructTrueDofs 2018-08-30 22:01:24 -07:00
Robert W. Anderson 3a8c0ddc5e merge eba6d48 from branch and resolve conflicts 2018-08-27 16:03:29 -07:00
Stowell, Mark L bf0b2be104 Merge remote-tracking branch 'origin/master' into prism-dev 2018-07-24 15:11:45 -07:00
Stowell, Mark L d525f0a730 Adding support for mixed meshes in parallel 2018-07-23 15:01:08 -07:00
Stowell, Mark L c3e023deed Merge remote-tracking branch 'origin/master' into prism-dev
# Conflicts:
#	fem/fespace.cpp
2018-07-19 19:51:39 -07:00
Veselin Dobrev 39fd944dba Revert "Group communicator on (parallel) cut meshes [cut-mesh-groups-dev]" 2018-07-18 14:26:30 -07:00