Commit Graph
111 Commits
Author SHA1 Message Date
George Zagaris 1a59129be5 ENH: propagate tolerance to lu.Factor()
Propagate the specified tolerance in LinearSolve() to the
lu.Factor() call.
2020-02-10 19:48:58 -08:00
Jakub Cerveny 5669a12c57 Fixed memory leak when lu.Factor() fails. 2020-01-30 10:05:21 +01:00
Jakub Cerveny 56e20df48e A couple more style changes. 2020-01-30 09:49:08 +01:00
George Zagaris 152d984b2b STYLE: manual style fixes based on review comments 2020-01-29 19:17:11 -08:00
George Zagaris 20da647259 ENH: access matrix components directly 2020-01-29 19:08:18 -08:00
George Zagaris 1c83482ef3 ENH: optional tolerance argument in LinearSolve()
Add optional argument to set the tolerance in LinearSolve().
If not specified, the default is set to 1.e-9.
2020-01-29 18:54:59 -08:00
George Zagaris d9d6377fcb ENH: change return value to boolean
Changed the return value of the LUFactors::Factor() and
LinearSolve() to a boolean. Updated test accordingly.
2020-01-29 18:45:41 -08:00
George Zagaris 73ca8f8918 ENH: avoid using magic number in LUFactors::Factor
Add optional argument to LUFactors::Factor that prescribes
a tolernace for fuzzy comparisons. This avoids using magic
numerical values in the implementation and allows the caller
to modify the tolerance if needed. If a tolerance is not
specified, the default is set to 1.e-9.
2020-01-29 17:55:45 -08:00
George Zagaris 2b0ed55119 ENH: overload SetCol/SetRow to take pointers
Overloads the SetCol and SetRow methods of the DenseMatrix class
to take raw pointers for convenience and to avoid creation of
small objects in a tight loop.
2020-01-29 17:55:45 -08:00
George Zagaris 0e156169a7 ENH: make LUFactors::Factor less verbose on error 2020-01-29 17:55:45 -08:00
George Zagaris 0f1d8cab71 ENH: add LinearSolve(A,X) convenience routine
This commit adds a convenience routine to solve linear systems
of the form `Ax=b` for a given square DenseMatrix instance `A`
and right handside vector, `b`. In general non-trivial case of
a matrix that is 3x3 or greater, this routine serves as a thin
wrapper around the functionality of the LUFactors class that
is provided for convenience. In addition, this commit adds
associated unit tests for the new routine.
2020-01-29 17:55:45 -08:00
George Zagaris 1c3735c659 ENH: add return code to LUFactors::Factor() method
Change the LUFactors::Factor() routine such that it returns
zero on success and a negative integer otherwise.
2020-01-29 17:55:45 -08:00
Will Pazner a431e1e472 Add RightSolve function to LUFactors 2020-01-13 16:40:04 -08:00
Will Pazner 22111a33a2 Formatting 2020-01-13 12:46:20 -08:00
Will Pazner c9aeaaa987 Compute ILU factorization 2020-01-10 15:19:51 -08:00
artv3 80f781df02 first pass at app fixes 2019-05-30 06:29:07 -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
Tzanio a28a779df1 Merge branch 'okina' into okina-mm-object
Conflicts:
        fem/bilininteg_ext.cpp
        general/mem_manager.cpp
	general/mem_manager.hpp
	general/occa.cpp
2019-04-09 19:19:45 -07:00
camierjs 2020335b50 Renaming + free functions in mfem namespace 2019-04-09 18:17:00 -07:00
Tzanio a49cd5df97 Merge branch 'okina-device-tweaks' into okina-rename
Conflicts:
        fem/bilinearform_ext.cpp
        fem/bilininteg_ext.cpp
        general/cuda.cpp
2019-04-09 18:08:44 -07:00
camierjs 94c5397c7d Remove the memory manager singleton 2019-04-09 17:12:20 -07:00
Tzanio 8d43da7938 Loop styling 2019-04-09 12:17:38 -07:00
camierjs 471eba4d2d Move Device::Tracking to mm::Enable/Disable
Swap lasts +=1 for ++
2019-04-09 11:42:12 -07:00
Tzanio e0c45fb9d4 Reserve okina name for future kernel interface 2019-04-08 23:39:10 -07:00
Will Pazner a5ecb742a0 Revert to using new and delete
Also rename mm::malloc to mm::New and mm::free to mm::Delete.
2019-04-04 13:44:10 -07:00
camierjs 8a4ae9a556 Rework include hierarchy not to present cuda/occa internal headers
Separate dvector3 from dtensor because it is used in coefficient.hpp
2019-04-04 11:45:46 -07:00
Will Pazner 4292eb80bc Replace new and delete with malloc and free in mm
This matches the names of the functions in mm:: and also more closely
matches their use in the rest of mfem.

Also removed the template parameter for mm::free since it is not needed.

It is possible in the future to add equivalents of new and delete to the
mm class (with different names since those are keywords) in case it is
desirable to call the constructor and destructor.
2019-04-03 16:14:13 -07:00
Tzanio 66e769d6a5 - Remove asserts
- Introduce MFEM_LINK_FLAGS to handle the fact that nvcc compiler cannot link with -x=cu
- Fixed building of 'make cuda; make all; make test'
2019-03-25 18:20:43 -07:00
camierjs a03364e473 MFEM_GPU_CANNOT_PASS cleanup and simplify cuda header 2019-03-25 12:55:19 -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 e4d79d0020 Delete fem/kernels subdir 2019-03-06 18:40:18 -08:00
camierjs d7fad1b3ca Deleted linalg/kernels/densemat.?pp 2019-03-06 14:24:46 -08:00
camierjs c008e101a9 Rewind and cleanup 2019-02-08 16:24:04 -08:00
camierjs 5db5c37b07 All tests passed. 2019-02-08 15:49:54 -08:00
camierjs 9b3fc4d585 new/delete through mm_*, to work with LD_PRELOAD and stack 2019-02-07 19:59:33 -08:00
camierjs d1c153f8cc mm_(malloc|free) 2019-02-07 17:25:28 -08:00
camierjs 570eda5cf6 Bring back the MFEM_GPU_CANNOT_PASS in linalg 2019-02-01 15:15:40 -08:00
camierjs dd2b906a2e Merge branch 'okina' into okina-laghos 2019-01-18 15:46:23 -08:00
camierjs dc91041e4a linalg dir to kernels namespace 2019-01-18 12:20:09 -08:00
camierjs fa4df4b8b3 MFEM_USE_MM, EnsureNodes and MM logic 2018-12-20 16:53:25 -08:00
camierjs 148929e807 mm, occa, cuda and device 2018-12-19 16:16:33 -08:00
camierjs 0a58311b39 Cleanup toward getting rid of Push/Pull 2018-12-14 15:17:03 -08:00
camierjs 450905d58a Cleanup and mm rewrite 2018-12-12 17:30:13 -08:00
camierjs fdd66894e5 [cuda] Up to vecToQuad2D 2018-12-03 17:21:47 -08:00
camierjs 22e576f128 Up to KMassIntegrator::MultAdd 2018-11-30 17:37:46 -08:00
camierjs 431b0e6bae Add CUDA stub to cleanup the code 2018-11-07 17:00:56 -08: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 4c4e1707aa ex1p, one process 2018-10-16 17:40:21 -07:00