Commit Graph
57 Commits
Author SHA1 Message Date
Veselin Dobrev 75065b0ea1 Addressing some feedback from the PR. 2019-05-24 10:25:34 -07:00
Veselin Dobrev b69fd1e038 Some tweaks and additions to the MemoryManager class.
Modify the Device class to require the creation of an object in
order to use backends other then Backend::CPU. At destriction,
this object will call the Destroy() method of the MemoryManager to
deallocate any remaining registered device pointers.

In class Device, remove the method Disable() and make the method
Enable() private.

Use a global Array<double> as the buffer used by the cuda functions
for minimum and dot product.
2019-05-23 23:21:27 -07:00
Tzanio 3a860f124c Added a call to Device::Enable at the end of Device::Configure.
Updated examples to use only Device::Configure (no more calls to Enable/Disable)
2019-05-21 19:17:06 -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
camierjs e9de1fcf7b Remove '>' in front of devices tests 2019-04-15 16:05:18 -07:00
Veselin Dobrev 2d39e09c12 Further small tweaks of the examples. 2019-04-11 15:52:59 -07:00
Veselin Dobrev 678759a2d6 Updates in the BilinearForm and related classes.
Small updates in ex1, ex1p, ex6, ex6p.
2019-04-10 21:34:47 -07:00
Tzanio ec1ed611be Take out second size printing from ex1p 2019-04-09 12:18:03 -07:00
Veselin Dobrev 55f0a7ec66 Updates to the mfem::Device class. 2019-04-08 16:48:56 -07:00
Jean-Sylvain Camier 840e5f97c6 Add the --pa (-p) option to the ex1p, ex6 and ex6p examples 2019-04-07 11:08:45 -07:00
Tzanio c2e3f8cd00 Adding Device::Print() method that print the configured device + programming
models in order of priority.
2019-03-25 14:50:52 -07:00
Tzanio 2aee6c0b2a Adding device sample runs in examples 2019-03-22 14:57:20 -07:00
Tzanio 614c78b65e Renamed the config class to Device, and simplified its use in the examples. 2019-03-22 14:15:27 -07:00
Tzanio bb7c142ce0 Renamed linalg/device.hpp to linalg/dtensor.hpp.
Some edits in the examples.
2019-03-22 12:15:14 -07:00
camierjs 574e5f6604 Standard integrator in examples, mm to get all parallel tests working. 2019-03-14 16:34:35 -07:00
camierjs 12ba87cf41 OpenMP flags in examples, kernel orders for Q3Q2 Laghos 2019-03-07 12:25:48 -08:00
camierjs baa1d5bfb8 Add examples mode and cuda cleanup 2019-03-05 12:31:47 -08:00
camierjs 64cf91cf21 - config rename convention
- ex1, ex6 switch back to host
- mm filtering
- dot device ptr call
2019-03-05 12:20:26 -08:00
camierjs 1705a1e99a Ex1 and Laghos with DeviceTensors 2019-02-28 18:22:06 -08:00
camierjs 04ddfc3803 Coherency between all Insert/Erase vs new/delete found by mmcheck 2019-02-13 13:14:35 -08:00
camierjs fb4babf124 make style 2019-02-08 16:45:41 -08:00
camierjs 082977e0fe FiniteElementSpace pointer to reference 2019-02-06 12:21:18 -08:00
camierjs a10da74264 Merge branch 'okina-integ' into okina-examples 2019-02-06 12:20:12 -08:00
camierjs 570eda5cf6 Bring back the MFEM_GPU_CANNOT_PASS in linalg 2019-02-01 15:15:40 -08:00
camierjs 9bf0e4fda8 Remove bfi abstract class and insert diffusion/mass integrator extensions 2019-01-24 11:58:02 -08:00
Tzanio 143785de69 make style 2018-12-20 16:57:07 -08:00
camierjs fa4df4b8b3 MFEM_USE_MM, EnsureNodes and MM logic 2018-12-20 16:53:25 -08:00
Tzanio fb9f3ed514 Simplified parallel bilinear form 2018-12-20 16:26:37 -08:00
Tzanio bfed0b80a9 Minor 2018-11-09 10:33:17 -08:00
camierjs 900c4d75f4 Remove max_iter in ex1p 2018-11-08 15:12:02 -08:00
camierjs d5fa01b6b7 ex1p cleanup 2018-11-08 14:46:29 -08:00
camierjs b8672453a4 Examples ex1 and ex1p cleanup 2018-11-08 13:04:47 -08:00
camierjs e8682fac9d mpirun ex1p GPU with pull/push in Conforming Prolongation Operators 2018-11-02 11:00:17 -07:00
camierjs 5ab75543f1 ex1p PA host mpirun 2018-11-01 16:09:57 -07:00
camierjs 6439103d6a Headers for MPI and ex1p 2018-10-31 10:51:33 -07:00
camierjs 8e05a1da6f Melding okina-wip to okina 2018-10-31 10:10:12 -07:00
camierjs 9ad1b24ced make style 2018-10-19 18:06:44 -07:00
camierjs 2d7ee029d3 Cleanup outputs 2018-10-16 18:17:17 -07:00
camierjs cbb950877e mesh => pmesh SetCurvature 2018-10-16 17:52:29 -07:00
camierjs 7671a4dbdb Ex1p cleanup 2018-10-16 17:46:16 -07:00
camierjs 4c4e1707aa ex1p, one process 2018-10-16 17:40:21 -07:00
camierjs a0b68f5c0b Kernel'ed up to H1_TriangleElement 2018-10-16 11:50:18 -07: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
Mark L. Stowell dc113bd29d Merge pull request #600 from mfem/prism-dev-dev
Veselin and I discussed these proposed changes last week and after one small modification I agree with his suggestions.
2018-09-07 14:29:09 -07:00
Stowell, Mark L 1f67431608 Reverting ex1p to its standard form 2018-09-07 14:23:54 -07:00
Veselin Dobrev b4c143c40d A number of proposed tweaks for merging into prism-dev.
* Removed the fixed low-order finite element classes for wedges.
* Replace more cases of 'int' variables with 'Geometry::Type',
  mainly in class FiniteElement and its derived classes.
* Use constants from BasisType (instead of Quadrature1D) in the
  parameters of the *WedgeElement finite element classes.
* Impose ordering on the construction of some global objects by
  moving them into the same translation unit: specifically, moved
  the objects 'TriangleFE', 'TetrahedronFE', 'WedgeFE', and
  'Geometries' into fem/fe.cpp.
* In switchs on 'Geometry::Type', move the 'Geometry::PRISM' case
  last - just to follow the order in the enumeration.
* Add a new method CoarseFineTransformations::GetPointMatrices
  that simplifies some code that uses CoarseFineTransformations.
* Removed the 'INVALID' and 'MIXED' constants from the enum
  Element::Type.
* Remove the static method Element::GeometryType.
* Tweak some doxygen comments in the classes Embedding and
  CoarseFineTransformations.
* Generate an error if the method Wedge::GetNFaces is called:
  its parameter 'nFaceVertices' does not make sense for wedges.
2018-08-30 16:57:23 -07:00
Stowell, Mark L d7f0640204 Inline wedge format now uses "wedge" rather than "pri". Also trying to increase code coverage by adding wedge example runs. 2018-08-18 10:31:05 -07:00
Stowell, Mark L 959cd13211 make style 2018-07-24 14:51:47 -07:00
Stowell, Mark L 0c087abe42 Fixing a typo 2018-07-23 16:07:20 -07:00
Stowell, Mark L 396969db0d Adding capability to extrude 2D meshes to ex1p (with new sample run) 2018-07-23 15:58:29 -07:00