Commit Graph
182 Commits
Author SHA1 Message Date
Tzanio Kolev 3e277808a9 Merge pull request #5210 from mfem/hughcars/array-move-assignment-bugfix
Fix Array non-owning move assignment
2026-02-24 08:41:48 -08:00
Veselin Dobrev 2d021685de Fix a bug in QuadratureFunction::GetValues when getting a reference to
the data for one mesh element as a DenseMatrix.

Added new methods:
- Array<T>::MakeRef(Memory<T> &base, int offset, int size_)
- DenseMatrix::MakeRef(Memory<real_t> &base, int offset, int h, int w)
2026-02-02 08:42:58 -08:00
Hugh Carson d6ea262498 Address PR feedback
- Hoist src deletion
- Remove unneeded explicit cast given src is named
2026-01-30 14:01:59 -05:00
Hugh Carson 894de992da Move assignment of non-owned arrays must fallback to copy assignment 2026-01-27 14:01:23 -05:00
Will Pazner c78863a437 Merge remote-tracking branch 'origin/master' into table-array
# Conflicts:
#	fem/tmop/tmop_pa_da3.cpp
#	fem/tmop/tmop_pa_tc2.cpp
#	fem/tmop/tmop_pa_tc3.cpp
#	general/array.hpp
#	linalg/densemat.hpp
2025-11-25 14:00:20 -08:00
Andrew Ho d276ad6aff Merge branch 'master' into array-vector-improvements-dev 2025-10-28 11:48:12 -07:00
Joseph Signorelli 83362c7b4d Add HostReadWrite to beginnning of Array 2025-08-21 15:13:50 -07:00
Joseph Signorelli dda6b0dbe1 Add Array::DeleteAt w/ unit test. 2025-08-13 14:39:29 -07:00
Veselin Dobrev 3372b2d1a8 Proposed addtions and changes to PR #4028 (branch table-array)
* Add mfem::swap for the classes Memory, Array, Array2D, and Vector.
* These mfem::swap functions are for use by the standard library.
* Re-define mfem::Swap to use mfem::swap, or, if is not defined, std::swap
* Remove some calls to Memory::Reset after Memory::Delete since the latter
  calls the former
* Update/improve the definitions of the Vector move-constructor and move-
  assignment; in the copy-assignment, skip the virtual calls to
  v.UseDevice(bool) when they are not needed.
* In DenseMatrix::SetSize, update the size of the data Array to match
  height x width.
* Propagate the parameter use_dev in Table::{ReadI,ReadJ} to the respective
  Array::Read calls.
* In Table::Size_of_connections, return J.Size() instead of I[size].
* Some small Doxygen tweaks.
2025-08-12 14:51:58 -07:00
Will Pazner 7fea470192 Modify Array::Copy to match semantics of Vector
Also revert Array copy assignment to use Array::Copy
2025-08-11 15:24:25 -07:00
Will Pazner 6bab6a283f Use same copy assignment semantics in Array as in Vector 2025-08-09 10:25:57 -07:00
Will PaznerandVeselin Dobrev 5a7edc9548 Fix Array move constructor and assignment operator
Co-authored-by: Veselin Dobrev <dobrev@llnl.gov>
2025-08-09 08:28:40 -07:00
Veselin Dobrev bdb627a5ae Merge branch 'master' into table-array
Resolved conflicts:
   general/array.hpp
2025-08-07 11:24:27 -07:00
Will Pazner 30d975fb9b Don't need specializations of mfem::Swap for Array or Array2D 2025-08-05 15:39:29 -07:00
Will Pazner dd68bbe9fd Use explicitly defaulted copy and move operations in Array2D 2025-08-05 15:38:43 -07:00
Will Pazner d1efdf93be Use default move constructor and assignment in Array<T> 2025-08-05 15:38:14 -07:00
Will Pazner e95d59cdf1 Implement mfem::Swap in terms of std::swap 2025-08-05 15:37:49 -07:00
Dylan Copeland 84c08a69ee Merge branch 'master' of github.com:mfem/mfem into nurbs-nc 2025-07-16 10:46:32 -07:00
Dylan Copeland 5932fcd331 Merge branch 'master' of github.com:mfem/mfem into nurbs-nc 2025-06-27 16:22:47 -07:00
camierjs d696fc2cea Merge branch 'master' into ubsan 2025-06-26 17:23:44 -07:00
Veselin Dobrev 0a5730eac3 Merge pull request #4769 from mfem/dev/abs-diag-smoothers
Abs-Val-Jacobi-type of preconditions/smoothers for PA operators
2025-06-26 09:36:30 -07:00
John Camier 960379a43d Merge branch 'master' into ubsan 2025-06-23 16:11:00 -07:00
camierjs 298a4bc32a Avoid CopyFrom in DeviceConformingProlongationOperator 2025-06-22 18:18:03 -07:00
camierjs c691658232 Switch to ctests 2025-06-22 13:05:08 -07:00
camierjs 157ffad537 Simplify, meld back & ninja default nproc 2025-06-22 12:07:07 -07:00
camierjs e11a093e72 Setup DofToQuad information mode 2025-06-21 14:36:25 -07:00
camierjs bade193d79 [asan] tests/unit/mesh/test_ncmesh: TetMemory MFEM_USE_MEMALLOC=OFF 2025-06-21 11:56:40 -07:00
Hugh Carson 01479824f5 Address MR feedback
- Remove static_cast to void, rely on future usage of [[nodiscard]] for dangerous discards
- Restore explicit to prevent implicit conversion of initializer_list
2025-06-04 16:16:02 -04:00
Dylan Copeland 9d3047b3a7 Documentation. 2025-05-05 11:59:00 -07:00
Gabriel Pinochet-SotoandWill Pazner 4745e062f2 Docstring Array<T>::Abs
Co-authored-by: Will Pazner <11493037+pazner@users.noreply.github.com>
2025-05-01 09:56:57 -07:00
Gabriel Pinochet-Soto 73014e34c5 Add Array<T>::Abs()
- static assert of arithmetic type of T
2025-03-28 22:13:22 -07:00
Dylan Copeland 5602c66e1a Generalized to allow varying refinement factors on auxiliary and slave edges. Added new partial spacing formula. 2025-03-05 22:28:52 -08:00
Hugh Carson fb5e610ca5 Add support and test for back_inserter along with some more stl-style interactions 2025-02-24 10:40:07 -05:00
Dylan Copeland 12896cd9ed Merge branch 'master' of github.com:mfem/mfem into nurbs-nc 2025-02-12 12:29:48 -08:00
Dylan Copeland b5ed99e1cd Added the capability to specify a refinement factor for each knotvector. Piecewise knotvectors can have multiple refinement factors. 2025-02-11 21:24:07 -08:00
Tzanio Kolev e4c2152419 Update Copyright to 2010-2025 2025-02-03 12:17:26 -08:00
Will Pazner d08c019d4c Avoid initializing data twice in Array constructors 2024-12-24 18:19:37 -08:00
Will Pazner e69ad849ff Ensure *this is initialized in Array move constructor 2024-12-24 18:19:37 -08:00
Tzanio Kolev 899a96b769 Merge pull request #4566 from david-kamensky/nurbs-constructors
Adding new constructors for NURBS patches
2024-11-26 15:51:38 -08:00
Veselin Dobrev 5ec2931690 Merge pull request #4564 from mfem/array-init-list
Use std::initializer_list for braced-list construction
2024-11-25 19:16:23 -08:00
Will Pazner d0a994fa02 Add Array<T>::NewMemoryAndSize
Analogous to Vector::NewMemoryAndSize.

Implement DenseTensor::NewMemoryAndSize in terms of Array<T>::NewMemoryAndSize.
2024-11-22 10:50:12 -08:00
Will Pazner 6e4f6d11be Merge remote-tracking branch 'origin/master' into table-array 2024-11-22 10:41:03 -08:00
Will Pazner 7645bce2b5 Merge remote-tracking branch 'origin/master' into array-init-list
# Conflicts:
#	general/array.hpp
#	tests/unit/general/test_array.cpp
2024-11-21 13:27:02 -08:00
Justin Laughlin 8e3674396f Merge branch 'master' into nurbs-constructors 2024-11-18 11:49:58 -08:00
adam-sim-dev 4eac35a79a Fix conversion of pointer differences __int64 to int. Suggested by najlkin 2024-11-16 16:08:20 +08:00
737d9032d7 Adding new constructors for NURBS meshes.
This adds some convenience constructors for NURBS patches, and also includes a test exercising the new functionality.

Co-authored-by: Derek Thomas <derek@coreform.com>
Co-authored-by: Kevin Tew <kevin@coreform.com>
Co-authored-by: David Kamensky <david@coreform.com>
Co-authored-by: Justin Laughlin <laughlin6@llnl.gov>
2024-11-14 12:08:15 -07:00
Will Pazner 7195af90b1 Compile-time check for Array convertible-type constructor 2024-11-01 14:43:39 -07:00
Will Pazner c7bb0201c0 Re-add C-style array constructor for Array 2024-10-31 10:09:59 -07:00
Will Pazner ff0b016126 Use std::initializer_list for braced-list construction
In the previous implementation, Array<T>({1}) would select the Array<T>(int)
constructor rather than the braced-list constructor.
2024-10-31 09:32:01 -07:00
Hugh Carson 449ae5e8c3 Fix bug where ncmesh would not discover new boundary attribute group 2024-10-11 10:56:28 -04:00