Commit Graph
121 Commits
Author SHA1 Message Date
Robert W. Anderson ba5904e66a automatically build dof_to arrays in functions where they are needed 2019-05-21 12:38:26 -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
Stowell, Mark L 6410f4e814 make style 2019-04-22 13:55:26 -07:00
Stowell, Mark L 0a9acf4ac4 Increasing integration order in ComputeLpError methods so they work with DG spaces 2019-04-22 13:40:30 -07:00
Stowell, Mark L 7cbc593816 Adding size check on result vector 2019-04-22 13:39:34 -07:00
Stowell, Mark L 2b7569c900 Generalizing ComputeElementError methods to accept Vectors 2019-04-22 13:36:40 -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
Ido Akkerman afb49afda0 Adding Hessian and Laplacian evaluation routines to gridfun 2018-08-24 14:53:11 +02:00
Stowell, Mark L 72c52af4c3 Changing method names to what was suggested... (oops) 2018-08-16 18:33:15 -07:00
Stowell, Mark L 196a193224 Changing the method names 2018-08-16 18:29:06 -07:00
Veselin Dobrev 8e21f7f5d0 Apply 'make style' 2018-08-16 17:11:11 -07:00
Stowell, Mark L 2fc7eb39ab Adding GridFunction methods which compute element-wise Lp errors (useful for visualization) 2018-08-07 16:27:26 -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
Jan Nikl 67da6e2d30 Added assignment operators to QuadratureFunction. 2018-05-21 22:30:33 +02:00
Jan Nikl 717abb99a7 Added the possibility to select the dimension in which the boundary coefficients are projected. Moreover, it serves as a protection against dereferencing NULL pointers. 2018-04-21 19:11:28 +02:00
Tzanio 59435a7cd1 make style 2018-03-05 12:34:09 -08:00
White, Dan e76fba29a5 Fixed sign bug for H(curl) and H(div) elements. 2018-03-05 10:39:08 -08:00
Veselin Dobrev a59c1d0847 In classes GridFunction and ParGridFunction, add a new projection
method, ProjectDiscCoefficient, that works with VectorCoefficients
performing averaging over elements.
2018-02-16 13:35:06 -08:00
Stowell, Mark L bae718680d Merge remote-tracking branch 'origin/master' into prism-dev
# Conflicts:
#	fem/fespace.cpp
#	fem/pfespace.cpp
2018-01-26 20:44:48 -08:00
Veselin Dobrev 27b6f1e2a8 Merge branch 'master' into nonlin-form-dev 2018-01-17 22:53:53 -08:00
Stowell, Mark L 6cfc1081d8 Merge remote-tracking branch 'origin/master' into prism-dev
# Conflicts:
#	fem/geom.hpp
#	mesh/mesh.cpp
#	mesh/mesh.hpp
2018-01-16 10:53:03 -08:00
Stowell, Mark L 8a5a250204 Merge remote-tracking branch 'origin/master' into prism-dev
# Conflicts:
#	fem/fe.cpp
#	fem/fe.hpp
#	fem/fe_coll.cpp
#	fem/geom.cpp
#	fem/geom.hpp
#	mesh/mesh.cpp
2018-01-12 11:36:49 -08:00
Tzanio 5a1370aa79 Merge branch 'master' into varnurbs-dev 2018-01-02 11:35:19 -08:00
Veselin Dobrev 8f70b25ce8 In class GridFunction:
* 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.
2018-01-02 06:51:22 -08:00
Kenneth Weiss 72329ae7e2 Fixes decision about when a grid function is output as a vector field to VTK. 2017-12-14 18:46:15 -08:00
Veselin Dobrev 0498086748 Add support for reading NURBS GridFunctions in patch-by-patch format,
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.
2017-11-22 13:54:46 -08:00
Veselin Dobrev 224851268e Restore backward compatibility for reading and writing NURBS meshes and
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.
2017-11-21 14:35:05 -08:00
Stowell, Mark L 6a236ada82 Changing int to Geometry::Type 2017-11-19 20:14:42 -08:00
Stowell, Mark L c8cee31d33 Removing assumption that all elements are the same . 2017-11-16 13:22:58 -08:00
Stowell, Mark L 5956e157c1 Switching more occurrences of "int" to Geometry::Type 2017-11-16 10:42:16 -08:00