Commit Graph
94 Commits
Author SHA1 Message Date
William F Godoy 9c379891bf Resolving conflicts with latest master 2020-03-18 09:41:46 -04:00
Tzanio 05125e19d5 Removed a space 2020-03-09 15:36:41 -07:00
Tzanio Kolev 7bb573285a Merge pull request #1315 from mfem/bsd-relicense
Switch from LGPL-2.1 to BSD-3 [bsd-relicense]
2020-03-04 13:55:12 -08:00
Tzanio Kolev d1b37d08b0 Merge pull request #1327 from mfem/acc_and_cnt-bugfix-dev
GridFunction::AccumulateAndCountZones bug fix
2020-03-03 07:07:19 -08:00
Veselin Dobrev d959588bdd Tweak GridFunction::GetTrueDofs and GridFunction::SetFromTrueDofs
to avoid copies when the mesh is conforming.
2020-03-02 17:41:14 -08:00
Tzanio ca55ef0217 The release number for mfem-4.1 is LLNL-CODE-806117 2020-03-02 17:18:46 -08:00
Veselin Dobrev 006a1590ef Comment out unnecessary call to HostReadWrite. 2020-03-02 16:21:08 -08:00
camierjs 3f3013084d Dont need to Host-read tdof vector 2020-03-02 13:55:25 -08:00
camierjs da45d8d6a5 Fix ex24p uninitialized X vector 2020-03-02 11:53:17 -08:00
Tzanio 88a78bb6aa Merge branch 'master' into bsd-relicense
Conflicts:
	CONTRIBUTING.md
2020-03-02 09:28:37 -08:00
rcarson3 d4b1ec5f05 AccumulateAndCount* bug fixes for device runs
Whenever GridFunction::ProjectDiscCoefficient* was called with the device being run the gridfunction didn't necessarily have the gridfunction data on the host thus causing errors when the AccumulateAndCount* functions were called.
2020-02-27 18:57:47 -08:00
Tzanio 2bcd8b5293 Merge branch 'master' into ndpa-dev
Conflicts:
	examples/CMakeLists.txt
	examples/makefile
	fem/bilinearform_ext.cpp
2020-02-27 10:32:08 -08:00
Tzanio e689fd5b28 Merge branch 'master' into bsd-relicense 2020-02-27 09:29:25 -08:00
Tzanio Kolev cfbe0bf5ac Merge pull request #1271 from salazardetroya/zz-with-coeff
Consider the coefficient in the BilinearIntegrator when computing the fluxes in ZienkiewiczZhuEstimator
2020-02-23 17:57:53 -08:00
Tzanio 2caa222edf A number of changes to switch the code from LGPL-2.1 to BSD-3:
- Updated LICENSE, README, CHANGELOG and CONTRIBUTING.md
- Removed COPYRIGHT, added NOTICE
- Updated the headers in all source files, makefiles, etc.
2020-02-23 11:16:46 -08:00
Ido Akkerman fe3446d50f Remove white space 2020-02-10 17:33:15 +01:00
Miguel Salazar de Troya 58ed2c2333 adding setter and fixing with_coeff to bool 2020-02-03 16:23:44 -08:00
Dylan Copeland a02409f8c9 Removed absolute value in diagonal assembly, by using a new MultTransposeUnsigned function in ElementRestriction. Made some changes for gpu support. 2020-02-03 09:58:28 -08:00
Miguel Salazar de Troya 32a0104a0d passing the flag to consider the coefficient in the flux computation 2020-01-29 10:06:49 -08:00
Ido Akkerman fef5517ec2 Merge branch 'master' into laplacian_dev 2020-01-09 10:14:25 +01:00
Ido Akkerman c606ff21d5 Merge branch 'master' into laplacian_dev 2019-06-05 09:41:55 +02:00
artv3 80f781df02 first pass at app fixes 2019-05-30 06:29:07 -07:00
Tzanio b3c3c5cf4c Merge branch 'memory-dev' of github.com:mfem/mfem into memory-dev 2019-05-24 14:23:56 -07:00
Tzanio 1a69dcff78 Replaced FIXMEs with TODO or NOTE 2019-05-24 14:23:39 -07:00
camierjs bd08fa9592 Merge branch 'memory-dev' of github.com:mfem/mfem into memory-dev 2019-05-24 14:21:12 -07:00
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 e36d1ea8fd Several change to (hopefully) simplify the interface:
* The parameter of Vector::UseDevice(bool) no longer has a default value. All
  the calls to UseDevice() in operator.cpp bilinearform_ext.cpp gridfunc.?pp and
  linearform.?pp have been replaced with UseDevice(true).

* Added shortcuts for the device flags of the Memory objects inside the Vector
  and Array classes:

    bool Array::UseDevice()
    bool Vector::UseDevice()

* The internal device flag in Memory::FlagMask is now called USE_DEVICE (it was
  previously called EXEC_FLAG). The accessor function for this flag have been
  renamed:

    bool Memory::GetExecFlag()     -> bool Memory::UseDevice()
    void Memory::SetExecFlag(bool) -> void Memory::UseDevice(bool)

* Further renamed:

    Memory::SyncWith         -> Memory::Sync
    Memory::SyncAliasToBase  -> Memory::SyncAlias
    Memory::SyncAliasToBase_ -> Memory::SyncAlias_

* Replaced FIXME with TODO in general/mem_manager.cpp
2019-05-24 14:01:15 -07:00
Veselin Dobrev 798ded1f55 Merge branch 'master' into memory-dev 2019-05-22 23:53:04 -07:00
Veselin Dobrev f8d1f5d557 Make sure GridFunction::MakeRef marks itself and its base vector
for execution on the mfem::Device.

Refine the logic in Vector::operator=.

Update the comment for Memory::SyncWith.
2019-05-18 00:40:43 -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
Stefano Zampini 0c1318dfd3 FiniteElementForGeometry can return NULL
This fixes the segfault but this should be handled better
2019-03-19 11:18:03 +03:00
Veselin Dobrev 634d9431d8 Add support for parallel non-conforming meshes in class
ZienkiewiczZhuEstimator.

This support is based on the update in ParGridFunction::ComputeFlux
which, in turn, is based on the support for GroupCommunicators in
ParFiniteElementSpaces on non-conforming meshes.
2018-12-05 20:11:57 -08:00
Tzanio 7ca6676475 Merge branch 'master' into elasticity-flux
Conflicts:
	CHANGELOG
2018-11-14 08:48:54 -06:00
Stowell, Mark L 1d66080c77 Merge remote-tracking branch 'origin/master' into derived-coefs-dev 2018-11-08 18:03:37 -08:00
Veselin Dobrev 797370ec97 Fix a copy-paste bug in GridFunction::AccumulateAndCountBdrValues 2018-11-07 21:20:30 -08:00
Veselin Dobrev d5d51cee9b In classes GridFunction and ParGridFunction, add method
ProjectBdrCoefficient for VectorCoefficients.
2018-11-02 20:44:12 -07:00
Tzanio Kolev 559acc05fc Merge pull request #628 from mfem/bugfix-linearform-equal-dev
Adding LinearForm::operator=() methods [bugfix-linearform-equal-dev]
2018-10-22 07:21:25 -07:00
Veselin Dobrev 4307149838 A few tweaks in the methods GridFunction::GetGradients. 2018-10-17 13:07:32 -07:00
Stowell, Mark L 10ce20447b Adding GridFunction::GetGradients(ElementTransformation &T, ...) 2018-10-17 10:34:58 -07:00
Veselin Dobrev 6c6ac7ea6b Small optimization of some GridFunction methods.
The optimization is to use the (potentially cached) inverse Jacobian
matrix from the ElementTransformation class instead of computing
it from the Jacobian.
2018-10-16 17:44:25 -07:00
Stowell, Mark L 32793336bd Removing unneeded operator= operload 2018-10-15 14:30:50 -07:00
Vladimir Tomov 40534e4f48 Fixed a bug. 2018-10-15 10:42:51 -07:00
Stowell, Mark L 54125a350d merging with prism-dev 2018-09-30 10:47:52 -07:00
Stowell, Mark L e8382c0b75 Merge remote-tracking branch 'origin/master' into prism-dev 2018-09-25 13:26:26 -07:00
Tzanio Kolev 9dc443e3d3 Merge pull request #606 from mfem/project-bdr-coeff-fix
Fix an issue in ProjectBdrCoefficient [project-bdr-coeff-fix]
2018-09-25 12:07:45 -07:00
Veselin Dobrev 1ddbc1e719 Fix an issue with ParGridFunction::ProjectBdrCoefficientTangent.
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.
2018-09-18 15:47:47 -07:00
Veselin Dobrev 2ecebf912f In ParGridFunction::ProjectBdrCoefficient, add temporary
workaround for nonconforming meshes.

The workaround is to disable the parallel synchronization.
Also, added a debug check that all boundary dofs are set.
2018-09-13 16:53:02 -07:00
Tzanio d80c92ec54 Style 2018-09-13 09:23:28 -07:00
Veselin Dobrev e9176049bf Fix for an issue in the method ProjectBdrCoefficient in
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.
2018-09-12 21:18:01 -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