Commit Graph
53 Commits
Author SHA1 Message Date
Tzanio 6d2530775b Extended copyright to 2022 2022-02-25 10:24:50 -08:00
Stowell, Mark L 00622b78fc Fixing shadow variables in fem classes 2021-12-23 16:32:09 -08:00
Veselin Dobrev 3f40c5796f More bugfixes and tweaks for hypre+cuda support. 2021-07-22 08:57:25 -07:00
Veselin Dobrev b7ab371c80 Tweak the impementation of Vector::NewMemoryAndSize to create
an alias when the 'own_mem' parameter is fasle.

Several simplifications/tweaks related to Vector::NewMemoryAndSize
and Vector::MakeRef in BlockVector, GridFunction, LinearForm, and
ParBlockNonlinearForm.

Add more MFEM_ASSERTs in MemoryManager::Delete_.

Remove MemoryManager::RegisterAliasBases().

In Memory<T>::MakeAlias, register the 'base' when the globally
configured device memory type (which can be a host type, e.g. when
running on host) is a device memory type. Always registering the
'base' creates errors in the unit tests:
   "alias already exists with different base/offset!"
which are probably due to dangling aliases. If we want to always
register the 'base', we need to address these errors.

Updated the unit test "MemoryManager/Scopes" to test for the new
behavior of Vector::NewMemoryAndSize.

Disable the unit test "MemoryManager" since it defined a Device
object which destroys the MemoryManager at the end of the test.
2021-05-12 13:47:11 -07:00
Veselin Dobrev 656b976340 Merge branch 'master' into tmopt-split-api
Resolved conflicts:
   fem/nonlinearform.cpp
   fem/nonlinearform.hpp
   fem/nonlinearform_ext.cpp
   fem/nonlinearform_ext.hpp
   fem/nonlininteg.cpp
   fem/nonlininteg.hpp
2021-02-16 23:31:53 -08:00
Veselin Dobrev 86895821b9 Re-worked class PANonlinearFormExtension::Gradient to implement
an Update method, reuse vectors from PANonlinearFormExtension,
and support FormSystemOperator by implementing GetProlongation.

Fix the size of the NonlinearFormExtension operator -- it is an
L-to-L operator.

In class NonlinearForm, add methods to access the interior and
boundary face integrators.

Small tweaks the methods (Par)NonlinearForm::GetGradient,
ConstrainedOperator::AssembleDiagonal, and
RAPOperator::AssembleDiagonal.

Add more doxygen documentation and other comments.
2021-01-27 13:07:45 -08:00
Adrien M. Bernede 04fb572359 Let's forget about 2020 2021-01-26 11:55:36 -08:00
camierjs e96188ae17 Merge branch 'master' into tmopt-split-api 2020-10-15 12:36:42 -07:00
Tzanio Kolev 99c541aaf0 Merge pull request #1702 from mfem/bug_parblocknlform
Bug - double ParBlockNonlinearForm::GetEnergy(const Vector &x)
2020-10-08 12:01:05 -07:00
Julian Andrej 5e2cc2d63b readability and refactoring 2020-09-25 13:57:11 -07:00
bslazarov 7b297e6661 cosmetics 2020-09-24 10:47:55 -07:00
Tomov 1932692c75 Comments and minor corrections. 2020-09-10 17:13:43 -07:00
Tomov 54b3781d0a GetProlongationMatrix instead of Dof_TrueDof_Matrix. 2020-09-10 16:00:53 -07:00
Julian Andrej 7933fd9b88 Make blocknonlinearform and parblocknonlinearform work with non conforming meshes 2020-09-04 08:05:11 -07:00
Julian Andrej f7f5b9a82b Moved ess dof elimination from vdofs to tdofs in parallel 2020-09-02 16:13:16 -07:00
Tomov b7dc77fe41 Extended interface for PANonlinearFormExtention and its gradient.
Extracted from the [tmopt] branch.
2020-08-31 16:52:21 -07:00
lazarov 79760fc4ab Bug fix for double ParBlockNonlinearForm::GetEnergy(const Vector &x) 2020-08-12 22:30:56 -07:00
Will Pazner b4daabfc10 Change Elem2No in GetSharedFaceTransformations
Instead of returning the element neighbor index (i.e. starting from 0)
in `Elem2No`, now return the "shifted element index" (i.e. starting
from `NumOfElements`), so that callers of method (e.g. integrators)
can distinguish between local elements (`index < NumOfElements`) and
face neighbor element (`index >= NumOfElements`). The element neighbor
index can be recovered simply by subtracting `NumOfElements`.
2020-05-19 12:01:16 -07:00
Tzanio 05125e19d5 Removed a space 2020-03-09 15:36:41 -07:00
Tzanio ca55ef0217 The release number for mfem-4.1 is LLNL-CODE-806117 2020-03-02 17:18:46 -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
Veselin Dobrev 04c83381c9 A few small tweaks in ParNonlinearForm::Mult. 2020-01-29 19:51:07 -08:00
artv3 f77a8b4fbd add X.ExchangeFaceNbrData - deleted by mistake 2020-01-21 15:59:12 -08:00
artv3 25aaef346f avoid using an alias 2020-01-21 13:48:36 -08:00
Veselin Dobrev 6e457ec497 Fix a few issues related to using the classes SparseMatrix,
HypreParVector, HypreParMatrix, and HypreSmoother with GPU backends.

Add 2 versions of a new method: Vector::MakeRef -- one that takes
a Vector and an offset and another that takes a Vector, an offset
and a new size.

Add some simple debugging tools:
 * Add a new output "trace" stream: mfem::trc. By default, the output
   of mfem::trc goes to std::cout; the new function mfem::OpenTraceFile()
   can be used to redirect the output of mfem::trc to a file called
   'mfem-trace-<pid>' where <pid> is the process id. Note that this
   function can be called from a debugger.
 * In class Vector, add a new method Vector::PrintTrace() that prints a
   Vector to the mfem::trc stream -- this method can be called from a
   debugger, unlike Vector::Print with mfem::trc as argument (at least
   in gdb this did not work).
 * In class Memory<T>, add 2 new methods: PrintFlags() and
   CompareHostAndDevice() which are explicitly instantiated for T=int
   and T=double, so that they can be called inside a debugger for
   these two types.
2019-06-17 18:55:17 -07:00
Tzanio e47cf10881 Merge branch 'master' into mixednonlin-dev
Conflicts:
	CHANGELOG
	fem/pnonlinearform.cpp
2018-01-25 08:30:03 -08:00
Jamie A. Bramwell dee36cfae8 Changed increment ordering for performance 2018-01-19 10:13:47 -08:00
Veselin Dobrev 687afb2f15 Invoke MFEM_ABORT() if trying to use ParBlockNonlinearForm with face
integrators - contributions from shared faces are not implemented yet.
2018-01-18 11:54:10 -08:00
Veselin Dobrev 09cc19336a Fix a bug in ParNonlinearForm::Mult().
Add a new method - NonlinearForm::GetEssentialTrueDofs().
2018-01-17 22:14:44 -08:00
Tzanio c1d9e20ada Some styling 2018-01-16 13:01:55 -08:00
Veselin Dobrev 889d075159 In class ParBlockNonlinearForm, add default constructor, method
SetParSpaces(), plus const and non-const versions of ParFESpace().

In class BlockNonlinearForm, add const and non-const methods,
FESpace().

Add some more comments/documentation.
2018-01-11 00:57:30 -08:00
Tzanio cdb88eecfe minor styling 2018-01-08 17:40:56 -08:00
Veselin Dobrev bf2f0fd00e In class ParBlockNonlinearForm, add BlockVector members that
serve as wrappers for true-dof block-vectors. This change also
fixes a bug in the method GetLocalGradient(): 'block_offsets'
was used instead of 'block_trueOffsets'.
2018-01-04 23:58:16 -08:00
Veselin Dobrev 9f89afa45c Tweak the implementations of (Par)BlockNonlinearForm.
This commit addresses the FIXME comments in ParBlockNonlinearForm.
2018-01-04 20:57:25 -08:00
Veselin Dobrev 9394644c97 In class ParBlockNonlinearForm:
* In the destructor, delete all objects owned by ParBlockNonlinearForm.
* Add a few FIXME comments that should improve the implementation a bit.
2018-01-03 21:15:57 -08:00
Veselin Dobrev 5845928116 In (Par)NonlinearForm, add support for non-conforming AMR meshes:
* NonlinearForm is now an Operator between true-dof vectors.
* In both classes, essential b.c. are represented internally as a list
  of true dofs.
* Move the methods GetProlongation() and GetRestriction(), which are
  part of the Operator interface, from class ParNonlinearForm to the
  base class, NonlinearForm.
* Add doxygen documentation.
* Add a new Update() method, similar to (Par)BilinearForm.
* The method ParNonlinearForm::GetLocalGradient() does not impose
  essential b.c. - they must be imposed at the true-dof level.
2018-01-02 06:13:19 -08:00
Jamie A. Bramwell e03184a065 Merge branch 'master' into mixednonlin-dev 2017-11-08 14:04:46 -08:00
Veselin Dobrev 3cde88ed38 In class BilinearFormIntegrator, implement the method AssembleFaceGrad
using the method AssembleFaceMatrix.

In class NonlinearForm, rename the data members 'dfi', 'fbfi', etc to
use the ending 'nfi' (from nonlinear form integrator) instead of 'bfi'.

In NonlinearForm::GetEnergy, replace the warning messages with abort
calls.

In the destructor of NonlinearForm, delete the NonlinearFormIntegrator
objects stored in 'fnfi' and 'bfnfi'.

Add a version of NonlinearForm::AddBdrFaceIntegrator that allows
restricting the integrator to a subset of the boundary.

In ParNonlinearForm::GetGradient, call abort when the form has face
terms - not implemented.

In class ParNonlinearForm, add the methods GetProlongation and
GetRestriction - they use the associated ParFiniteElementSpace.
2017-11-01 18:25:02 -07:00
Tzanio eb8070d9cb make style 2017-10-17 11:12:54 -07:00
Johann Dahm 06f9a5d501 Clean up ParNonlinearForm::Mult 2017-10-01 22:29:00 -07:00
Jamie A. Bramwell 64fbf39ccc Fixed superlu/metis linking order issue and operator type name change 2017-09-29 14:06:27 -07:00
Jamie A. Bramwell 93a833d5d4 Merge branch 'master' into mixednonlin-dev 2017-09-29 13:44:32 -07:00
Jamie A. Bramwell f5cfa91d16 More block nonlinear fixes 2017-09-27 12:47:00 -07:00
Johann Dahm a988d654c3 Fix ex18p and make consistent with ex18 2017-09-19 15:57:03 -07:00
Johann Dahm cfab828a1f Merge branch 'master' into hydro-dev 2017-09-18 16:29:52 -07:00
Johann Dahm d463258c88 Attempt #1 at adding shared face support for nonlinearforms 2017-09-15 21:05:03 -04:00
Jamie A. Bramwell c0a69331bb Fixed run issues. Still getting zero residual 2017-09-14 12:58:15 -07:00
Jamie A. Bramwell 4a8c80c624 Changed mixednonlinearform to blocknonlinearform per meeting comments 2017-09-07 09:06:32 -07:00
Jamie A. Bramwell fa5c40d5f5 The new mixed nonlinear form stuff compiles in parallel. 2017-09-06 12:10:18 -07:00
Veselin Dobrev 14d552503c Replace calls to ParFiniteElementSpace::Dof_TrueDof_Matrix() with
calls to ParFiniteElementSpace::GetProlongationMatrix() in places
where only the action of the matrix is required.

In ParNonlinearForm::Mult(), use the parallel prolongation operator
instead of relying on the GroupCommunicator.
2017-08-29 16:40:40 -07:00