Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
f3b5965
Merge pull request #14072 from peterrum/GridRefinement_other_tria
masterleinad Jul 14, 2022
83f56ac
Merge pull request #14073 from peterrum/pst_communicate_refinement
drwells Jul 14, 2022
eff409c
Fix a reference.
bangerth Jul 14, 2022
766a9f8
Clarify documentation of p::s::T.
bangerth Jul 15, 2022
7663f40
Use only enough bits in an enum as necessary.
bangerth Jul 15, 2022
ff7f19b
Use pre-increment operator.
bangerth Jul 15, 2022
1b1f745
Merge pull request #14139 from bangerth/increment
peterrum Jul 15, 2022
2750ea9
Merge pull request #14137 from bangerth/bits
Rombur Jul 15, 2022
0c512d6
Merge pull request #14136 from bangerth/doc
drwells Jul 15, 2022
6ecbe7c
Add FieldTransfer for the transfer of field with FE_Nothing
Rombur Sep 14, 2021
24f4c19
Add some assertions about hypercube reference cells.
bangerth Jul 14, 2022
103a91c
Reduce the volume of communication somewhat.
bangerth Jul 15, 2022
88b5a08
p:d:GridRefinement: actually accept other types of triangulations
peterrum Jul 15, 2022
787d04d
Fix type in FPE
peterrum Jul 15, 2022
d29c065
Expand a discussion in step-58.
bangerth Jul 15, 2022
d742f22
Add some functions to convert active cell iterators
jppelteret Jul 15, 2022
ded7727
Merge pull request #14126 from kronbichler/adjust_tolerance
tamiko Jul 16, 2022
3e917bd
Merge pull request #14134 from bangerth/reference
tamiko Jul 16, 2022
af32be1
Merge pull request #14135 from bangerth/assert
tamiko Jul 16, 2022
1d37630
Merge pull request #14138 from bangerth/shrink
tamiko Jul 16, 2022
1867159
Merge pull request #14141 from peterrum/GridRefinement_other_tria_fix
tamiko Jul 16, 2022
41ac2ba
Merge pull request #14144 from bangerth/58
tamiko Jul 16, 2022
cb11849
avoid deprecated names
tjhei Jul 14, 2022
01b69d7
Added quicktests to Intel workflow.
marcfehling Jul 18, 2022
fa653fa
Merge pull request #14142 from peterrum/fpe_grad_type
kronbichler Jul 18, 2022
3e09316
Merge pull request #13990 from NiklasWik/non-affine_piola
kronbichler Jul 18, 2022
a4affd8
Do not use 'typename' where not necessary.
bangerth Jul 18, 2022
0761881
Replace std::enable_if by std::enable_if_t throughout.
bangerth Jul 18, 2022
f961d22
Declare 'enable_if_all_t' in analogy to std::enable_if_t.
bangerth Jul 18, 2022
a98a6ee
Merge pull request #14114 from kronbichler/dofh_minor_reorganization
bangerth Jul 19, 2022
710f27d
Merge pull request #14147 from bangerth/typename
drwells Jul 19, 2022
19e4a1e
Merge pull request #14148 from bangerth/enable-if
marcfehling Jul 19, 2022
e46c8ff
Merge pull request #14089 from a-shahba/explicitInstanForDistribute_c…
marcfehling Jul 19, 2022
edb39ba
Merge pull request #14149 from bangerth/enable-if-all
marcfehling Jul 19, 2022
307cb8a
Alternative implementation to convert iterators
jppelteret Jul 15, 2022
f49e185
Show a formula.
bangerth Jul 18, 2022
7fa9699
Merge pull request #14115 from kronbichler/avoid_some_expensive_loops
bangerth Jul 20, 2022
09e1a9f
Merge pull request #14145 from marcfehling/intel-quicktest
bangerth Jul 20, 2022
07ef4b5
Merge pull request #14146 from bangerth/doc
marcfehling Jul 20, 2022
aa7fe72
Update tutorials to use cell->as_dof_handler_iterator()
jppelteret Jul 19, 2022
b957bee
Merge pull request #14123 from tjhei/par-int-out-test
tjhei Jul 20, 2022
3727478
FEEvaluation: Fix two places where the address sanitizer complained
kronbichler Jul 20, 2022
49fff78
MatrixFree: Use separate data arrays for two separate evaluators
kronbichler Jul 20, 2022
eb7488d
Merge pull request #14143 from jppelteret/iterator_conversion_01
masterleinad Jul 20, 2022
388a369
Merge pull request #14153 from kronbichler/separate_array
tjhei Jul 20, 2022
5252a92
Merge pull request #14154 from kronbichler/fix_possible_memory_leaks
tjhei Jul 20, 2022
de0c98b
Add test for FEEvaluationShift with FE_Q and FE_DGQ
bergbauer Jul 13, 2022
6b07f5c
matrix-free FEEvaluation: initialize with nan
tjhei Jul 19, 2022
6c05560
qualify namspace for MSVC
tjhei Jul 21, 2022
94d3122
Make all template specialization of FPE compile for float
peterrum Jul 20, 2022
01598a7
Merge pull request #14152 from tjhei/mf_nans
masterleinad Jul 21, 2022
1b424d8
epic doxygen fixes
tjhei Jul 21, 2022
261a8cb
Implement get_affine_constraints()
bergbauer Jul 14, 2022
dfeffe3
Merge pull request #14132 from bergbauer/get_affine_constraints
kronbichler Jul 22, 2022
abd26aa
Merge pull request #14131 from bergbauer/test_fe_eval_shift
kronbichler Jul 22, 2022
18fb6cc
Merge pull request #14104 from gfcas/mass_operator_doc
kronbichler Jul 22, 2022
ccf5334
more fixes
tjhei Jul 22, 2022
40a860c
CMake: remove find_package override
tamiko Jul 23, 2022
972ca29
CMake: use proper FIND_PACKAGE call in python bindings setup
tamiko Jul 23, 2022
1577bfa
Merge pull request #14157 from tjhei/epic-doxygen
drwells Jul 24, 2022
cad76bc
Failing test.
luca-heltai Jul 19, 2022
f71ca8f
Added a fix.
luca-heltai Jul 19, 2022
1971cc0
Fixed clang-tidy.
luca-heltai Jul 25, 2022
2ebd2c3
Merge pull request #14041 from luca-heltai/compute_affine_transformat…
masterleinad Jul 25, 2022
c6f8651
Merge pull request #14158 from tamiko/remove_find_package_override
tjhei Jul 25, 2022
fdf0cbe
normal vector doc
zjiaqi2018 Jul 26, 2022
997628f
Clean cgal utilities
fdrmrc Jul 5, 2022
8137161
Merge pull request #9937 from masterleinad/remove_even_more_deprecation
drwells Jul 27, 2022
db6a4d8
Require PETSc 3.7.0 or newer.
drwells Jul 27, 2022
3f3e380
Remove some old PETSc workarounds.
drwells Jul 27, 2022
d6a7376
Fix a typo in deal.II/base/numbers.h
tamiko Jul 27, 2022
857efe9
Merge pull request #14161 from drwells/petsc-cleanup-1
tamiko Jul 27, 2022
644d2de
Merge pull request #14162 from tamiko/fix_compilation
drwells Jul 28, 2022
f25be08
Fix generation of the tutorial graph.
drwells Jul 28, 2022
2bc4ee1
Merge pull request #14150 from luca-heltai/fix-has-hanging-nodes
masterleinad Jul 28, 2022
ba98428
Merge pull request #14165 from drwells/fix-tutorial-graph
masterleinad Jul 29, 2022
ebdb75a
Merge pull request #14039 from bangerth/isend-irecv
masterleinad Jul 29, 2022
4155558
Fix various typos
luzpaz Jul 30, 2022
8061ede
luzpaz Aug 1, 2022
284e1c3
Merge pull request #14168 from luzpaz/typos
masterleinad Aug 1, 2022
630b343
Clean up of VectorTools::project functions
Jul 6, 2022
7a6736d
Merge pull request #14101 from gfcas/vector_tools_project_1
marcfehling Aug 2, 2022
808f924
Fix typos in tests/ subdirectory
luzpaz Aug 2, 2022
769f2d0
Fixed indentation
luzpaz Aug 2, 2022
91e6f19
Merge pull request #14172 from luzpaz/typos/tests
marcfehling Aug 2, 2022
c2eed4a
Implement TensorProductMatrixSymmetricSumBase::memory_consumption()
peterrum Aug 4, 2022
dd277ea
Merge pull request #14175 from peterrum/TensorProductMatrixSymmetricS…
drwells Aug 4, 2022
145e5d4
Add some missing headers.
drwells Aug 4, 2022
fe71e2f
Add FEFaceEvaluation::at_boundary() and boundary_id()
peterrum Jul 10, 2022
3c3c4c3
Don't include Sacado.hpp in base/numbers.h.
drwells Aug 3, 2022
62a71b8
Get things working with adol-c too
drwells Aug 3, 2022
3504a22
Add second version to initialize MFF::ConstraintInfo
peterrum Aug 7, 2022
5155498
Merge pull request #14174 from drwells/refactor-sacado
masterleinad Aug 10, 2022
7c9903f
Remove some template specializations for QAnisotropic.
drwells Aug 10, 2022
8eb2937
Move Threads::Mutex to a dedicated header.
drwells Aug 7, 2022
1cc7f7e
Merge pull request #14181 from drwells/refactor-mutex-wrapper
masterleinad Aug 11, 2022
a9d9281
Fix some theory in step-44 introduction
jppelteret Aug 11, 2022
6e488f9
Consistently update notation in SymmetricTensor docs
jppelteret Aug 12, 2022
9f9801a
Merge pull request #14184 from jppelteret/docfix-step_44-01
Rombur Aug 12, 2022
49473af
Fix typo in step-52.
marcfehling Aug 12, 2022
6f9ca31
Merge pull request #14177 from peterrum/ConstraintInfo_new_reinit
kronbichler Aug 12, 2022
594e59b
Merge pull request #14188 from marcfehling/typo-52
marcfehling Aug 12, 2022
eec50fd
Merge pull request #14182 from drwells/remove-qanisotropic-specializa…
kronbichler Aug 12, 2022
91c2c01
Move 'using MPI_Comm = int' et al to a separate header.
drwells Aug 12, 2022
c401f69
Pass ReferenceCell by reference in QProjector.
drwells Aug 12, 2022
d3c20ff
Clean up some header inclusions.
drwells Aug 12, 2022
6304488
Remove now redundant namespace identifier.
marcfehling Aug 8, 2022
bd7dbcb
Merge pull request #14187 from marcfehling/cleanup-hpref
marcfehling Aug 14, 2022
e49a88c
Merge pull request #14185 from drwells/mpi-stub-header
kronbichler Aug 16, 2022
1b586d4
Merge pull request #14186 from drwells/misc-header-cleanup
masterleinad Aug 16, 2022
52a07eb
Added missing header.
marcfehling Aug 16, 2022
8ae0508
Merge pull request #14192 from marcfehling/set
kronbichler Aug 17, 2022
c2da304
FEEvaluationData: add virtual destructor
peterrum Aug 16, 2022
260f596
fix missing header
mschreter Aug 17, 2022
33e9dd7
Introduce inverse of MF::get_cell_iterator()
peterrum Jul 12, 2022
f884205
Merge pull request #14194 from mschreter/fix_missing_mpi_header
drwells Aug 17, 2022
0cb9feb
Assert for released handle on Transfer classes.
marcfehling Aug 16, 2022
872d79e
no normal flux on levels
zjiaqi2018 Jul 28, 2022
a26572c
combine into one function
zjiaqi2018 Aug 4, 2022
defac2d
add more tests
zjiaqi2018 Aug 8, 2022
b33ccf8
stokes test
zjiaqi2018 Aug 11, 2022
537840c
fix a bug
zjiaqi2018 Aug 15, 2022
43ce800
address comments
zjiaqi2018 Aug 17, 2022
cf175c6
Fix header in Zoltan tests.
marcfehling Aug 17, 2022
ff26d6a
Remove an unused forward declaration.
drwells Aug 16, 2022
95ac18e
Move Trilinos utilities into a separate header.
drwells Aug 14, 2022
735eff4
Merge pull request #14193 from marcfehling/assert-soltrans
drwells Aug 17, 2022
190df2f
Merge pull request #14196 from marcfehling/zoltan
marcfehling Aug 17, 2022
52722a7
Merge pull request #14191 from drwells/trilinos-utilities
marcfehling Aug 18, 2022
17f36a7
Fix more headers in Zoltan tests.
marcfehling Aug 18, 2022
3349d95
Fix MatrixFree + FE_Q_iso_Q1(2)
peterrum Aug 17, 2022
618acce
Add second version of TensorProductMatrixSymmetricSum::apply_inverse()
peterrum Aug 7, 2022
7bfe2cd
Merge pull request #14198 from marcfehling/zoltan
peterrum Aug 18, 2022
1867885
Use ReferenceCell instead of StaticMappingQ1.
drwells Aug 16, 2022
1f154da
Merge pull request #13895 from bangerth/ca-free-2
masterleinad Aug 18, 2022
1c1d2ef
Add a missing header to vector_relations.h.
drwells Aug 18, 2022
15c179c
Merge pull request #14197 from peterrum/FE_Q_iso_Q1_2_MF
peterrum Aug 18, 2022
40d9941
Clean up inclusions of mapping_q1.h
drwells Aug 14, 2022
12f237b
Add some more missing Trilinos headers.
drwells Aug 18, 2022
dc8c981
Merge pull request #14202 from drwells/more-trilinos-header-fixes
marcfehling Aug 19, 2022
c17d23b
Merge pull request #14201 from drwells/vector-relations-headers
marcfehling Aug 19, 2022
65d8fb0
Merge pull request #14199 from drwells/cleanup-mapping-q1-inclusions
kronbichler Aug 19, 2022
58dcd47
Fix Kokkos flags
masterleinad Aug 19, 2022
8793536
CMake: Avoid --date=iso-strict for git versions older than 2.2
tamiko Aug 20, 2022
1b4f9ae
Change get_active_fe_indices() to return the result.
marcfehling Aug 21, 2022
5699d05
Added get/set functions for future FE indices.
marcfehling Aug 21, 2022
0158902
Move active_fe_index_type to types.
marcfehling Aug 21, 2022
6a61448
address comments
zjiaqi2018 Aug 22, 2022
a34e8c8
Merge pull request #14206 from tamiko/cmake_date
masterleinad Aug 22, 2022
4174262
Merge pull request #14160 from zjiaqi2018/manifold-documentation
masterleinad Aug 22, 2022
678cde5
Fix Tensor assignment of nested Tensors and provide a function overlo…
bergbauer Jul 26, 2022
c9b5b6a
Merge pull request #14190 from peterrum/feevaldata_vd
kronbichler Aug 23, 2022
3971250
Merge pull request #14159 from bergbauer/fpe_float
kronbichler Aug 23, 2022
57d16ff
Merge pull request #14207 from marcfehling/getset_active
drwells Aug 23, 2022
664f5b4
Merge pull request #14178 from peterrum/apply_inverse_tmp
kronbichler Aug 23, 2022
4519475
Merge pull request #14210 from marcfehling/feindex-type
marcfehling Aug 23, 2022
420dbbb
Merge pull request #14208 from marcfehling/getset_future
marcfehling Aug 23, 2022
a16fe82
Clarify comments about get_generalized_support_points().
bangerth Aug 23, 2022
3ceffc7
Move invalid_fe_index to numbers.
marcfehling Jun 2, 2022
2bee8af
Add tests for FieldTransfer
Rombur Sep 14, 2021
331b154
address comments
zjiaqi2018 Aug 24, 2022
7b92a96
Merge pull request #14130 from peterrum/get_matrix_free_cell_index
kronbichler Aug 24, 2022
99f83f7
Fix find_package for boost python
bergbauer Aug 24, 2022
3bc9850
Generalized VT::point_gradients() for multiple components
peterrum Jul 15, 2022
d36a545
Merge pull request #14097 from luca-heltai/cgal-clean_utilities
luca-heltai Aug 24, 2022
695d3ce
Optimize PreconditionRelaxation
peterrum Aug 21, 2022
e12054e
Merge pull request #14140 from peterrum/point_gradient_vectorial
peterrum Aug 24, 2022
2a3cf19
Merge pull request #14203 from masterleinad/fix_kokkos_falgs
kronbichler Aug 24, 2022
06fc54c
Merge pull request #14209 from peterrum/PreconditionRelaxation_optimize
peterrum Aug 24, 2022
c7df819
Avoid warning about unused variable
kronbichler Aug 25, 2022
9f0ed61
MatrixFree: Fix bug in setup of new cell_index for MG
kronbichler Aug 25, 2022
6a4e580
Merge pull request #14218 from kronbichler/fix_warning
drwells Aug 25, 2022
f109540
Merge pull request #14219 from kronbichler/fix_matrixfree_bug
masterleinad Aug 25, 2022
9973ae7
Merge pull request #14214 from bergbauer/fix_docker_build
masterleinad Aug 25, 2022
b972833
Fix test case with clang compiler
kronbichler Aug 26, 2022
8bda46f
Merge pull request #14213 from bangerth/doc
kronbichler Aug 26, 2022
7734f1b
Merge pull request #14222 from kronbichler/fix_test
drwells Aug 26, 2022
4a2fc49
Update output
peterrum Aug 26, 2022
8d79948
Fix bug in matrix-free operators regarding diagonal
kronbichler Aug 26, 2022
c915345
Merge pull request #14223 from peterrum/rpe_update_output
kronbichler Aug 26, 2022
24f1546
Merge pull request #14212 from marcfehling/feindex-type-1
kronbichler Aug 26, 2022
7804230
Merge pull request #14224 from kronbichler/fix_bug
tjhei Aug 26, 2022
70c5f01
Set another OMP environment variable.
drwells Aug 27, 2022
ab60cd0
Move up the check with ExcGridHasInvalidCell.
drwells Jul 21, 2022
c91cba2
Add some more output to the ExodusII test.
drwells May 25, 2022
b20acba
Add pyramids and wedges to invert_cells_with_negative_measure().
drwells May 25, 2022
eecce28
Refactor the way we apply grid fixup functions.
drwells May 25, 2022
7a4be03
Merge two loops in setup of triangulation
kronbichler Aug 25, 2022
1b93661
Add specialization of PreconditionChebyshev functions
peterrum Aug 24, 2022
a8db48a
Merge pull request #14227 from drwells/omp-fix
kronbichler Aug 29, 2022
b7ad639
Merge pull request #14220 from kronbichler/tria_merge_loops
masterleinad Aug 29, 2022
1f02212
Fuse some loops in Triangulation::execute_coarsening
kronbichler Aug 26, 2022
b5a6b1e
Merge pull request #14167 from zjiaqi2018/normal_flux_constraints_on_…
masterleinad Aug 29, 2022
2a0319b
Fix PETSc version detection.
drwells Aug 24, 2022
7fcc776
Clean up side effect
kronbichler Aug 29, 2022
01d26e0
Update checks for AD-types.
drwells Aug 23, 2022
950fe7d
Handle a test which fails under GCC 5.4
drwells Aug 29, 2022
c277e4e
Merge pull request #14216 from peterrum/PreconditionChebyshev_precond…
kronbichler Aug 29, 2022
65b823f
Restructure computation of diagonal
kronbichler Aug 27, 2022
d670e42
Add test case
kronbichler Aug 27, 2022
1e381dc
Extend comment
kronbichler Aug 29, 2022
ac6da80
Merge pull request #14211 from drwells/update-ad-checks
masterleinad Aug 30, 2022
c31dda9
Remove an outdated comment. Link to step-19.
bangerth Aug 30, 2022
20a4758
Clarify a comment for one of the particle generators.
bangerth Aug 30, 2022
c7ad09c
Merge pull request #14122 from peterrum/fe_face_eval_boundary
kronbichler Aug 30, 2022
f630fb1
Merge pull request #14230 from bangerth/doc-2
kronbichler Aug 30, 2022
55935e2
Merge pull request #14229 from bangerth/doc-3
kronbichler Aug 30, 2022
89d9598
Merge pull request #14215 from drwells/fix-petsc-version-detection
kronbichler Aug 30, 2022
32e47af
Merge pull request #13820 from drwells/refactor-grid-fixup-functions
masterleinad Aug 31, 2022
18d1ebc
Doc update in GridTools.
bangerth Aug 30, 2022
5b761b3
Merge pull request #14231 from bangerth/doc-1
kronbichler Sep 1, 2022
6dfc776
Merge pull request #12759 from Rombur/field_transfer_fe_nothing
marcfehling Sep 1, 2022
d4344eb
fix: step-50 PETSc
tjhei Sep 2, 2022
168ea69
Merge pull request #14235 from tjhei/step-50-petsc-include
marcfehling Sep 2, 2022
dd816b6
Add MatrixFreeTools::ElementActivationAndDeactivationMatrixFree
peterrum Jul 9, 2022
943da32
Enable SolverIDR for block vectors
peterrum Aug 30, 2022
8e6e6eb
Specialize EvaluatorTensorProduct<evaluate_evenodd> for non-templated…
peterrum Sep 3, 2022
f9c843e
Precompile TensorProductMatrixSymmetricSum kernels
peterrum Aug 28, 2022
a70d836
Merge pull request #14226 from kronbichler/test_case
peterrum Sep 3, 2022
6d118c3
Add functions to restrict a matrix
peterrum Jul 4, 2022
c2be8a5
Add specializations of PreconditionRelaxation functions
peterrum Sep 4, 2022
3184d81
Merge pull request #14232 from peterrum/idr_block_vectors
kronbichler Sep 4, 2022
ce4789b
Merge pull request #14228 from peterrum/TensorProductMatrixSymmetricS…
kronbichler Sep 4, 2022
46d7e74
Merge pull request #14121 from peterrum/birth_and_death_mf
kronbichler Sep 4, 2022
3e24a48
Merge pull request #14221 from kronbichler/simplify_loops
kronbichler Sep 4, 2022
9bf999d
MatrixFree: Fix assertion in presence of FE_Nothing
kronbichler Sep 5, 2022
5e92743
FEEvaluation: Create temporary copy of Jacobian matrix in submit_grad…
kronbichler Sep 5, 2022
96c2a44
Merge pull request #14239 from kronbichler/fix_inaccurate_assertion
peterrum Sep 5, 2022
def31d5
Merge pull request #14240 from kronbichler/improve_jacobian
peterrum Sep 5, 2022
12dfa30
Merge pull request #14238 from peterrum/PreconditionRelaxation_precon…
kronbichler Sep 5, 2022
7219d12
Fix a warning
kronbichler Sep 6, 2022
0b81c2e
Merge pull request #14241 from kronbichler/fix_warning
peterrum Sep 6, 2022
c57d987
PreconditionChebyshev: reduce number of writes by one
peterrum Sep 6, 2022
29e258f
Update deal.ii to August 2022 (#4)
OpenFCST Sep 6, 2022
7ecd9c8
Merge branch 'dealii:master' into master
OpenFCST Sep 6, 2022
8d03987
Merge pull request #14242 from peterrum/cheby_w
drwells Sep 6, 2022
76fc8de
DiagonalMatrix: specialize for LA:d:V
peterrum Sep 7, 2022
2330bb4
PreconditionRelaxation: add specialization
peterrum Sep 7, 2022
5433ad4
Merge branch 'dealii:master' into master
OpenFCST Sep 7, 2022
ef74666
Merge pull request #14237 from peterrum/even_odd_apply
kronbichler Sep 7, 2022
6dff4a6
Merge pull request #14244 from peterrum/diagonal_ladv
kronbichler Sep 7, 2022
55b136c
Merge branch 'master' of https://github.com/OpenFCST/dealii
mkghadban Sep 8, 2022
1504c8c
Merge pull request #14245 from peterrum/relaxation_pre_post_a_p
kronbichler Sep 8, 2022
9d55a83
Fix warning regarding unused variables
kronbichler Sep 8, 2022
a986023
Fix another warning about an unused variable
kronbichler Sep 8, 2022
0721426
Merge pull request #14248 from kronbichler/address_warning
peterrum Sep 8, 2022
b567a5a
Merge pull request #14249 from kronbichler/fix_warning2
peterrum Sep 8, 2022
44e212f
merged deal/master into OpenFCST/Mohamad/author_fix
mkghadban Sep 8, 2022
4fdcac0
Merge pull request #14096 from peterrum/sparse_matrix_tools
drwells Sep 8, 2022
ad5c822
Merge branch 'dealii:master' into Mohamad/author_fix
mkghadban Sep 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 50 additions & 2 deletions include/deal.II/lac/diagonal_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@

DEAL_II_NAMESPACE_OPEN

// forward declarations
#ifndef DOXYGEN
template <typename number>
class Vector;
namespace LinearAlgebra
{
namespace distributed
{
template <typename, typename>
class Vector;
} // namespace distributed
} // namespace LinearAlgebra
#endif

/**
* This class represents a <i>n x n</i> diagonal matrix based on a vector of
* size <i>n</i>. The matrix-vector products are realized by @p
Expand Down Expand Up @@ -386,12 +400,46 @@ DiagonalMatrix<VectorType>::add(const size_type i,



namespace internal
{
namespace DiagonalMatrix
{
template <typename VectorType>
void
assign_and_scale(VectorType & dst,
const VectorType &src,
const VectorType &diagonal)
{
dst = src;
dst.scale(diagonal);
}

template <typename Number>
void
assign_and_scale(
LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> & dst,
const LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> &src,
const LinearAlgebra::distributed::Vector<Number, MemorySpace::Host>
&diagonal)
{
const auto dst_ptr = dst.begin();
const auto src_ptr = src.begin();
const auto diagonal_ptr = diagonal.begin();

DEAL_II_OPENMP_SIMD_PRAGMA
for (unsigned int i = 0; i < src.locally_owned_size(); ++i)
dst_ptr[i] = src_ptr[i] * diagonal_ptr[i];
}
} // namespace DiagonalMatrix
} // namespace internal



template <typename VectorType>
void
DiagonalMatrix<VectorType>::vmult(VectorType &dst, const VectorType &src) const
{
dst = src;
dst.scale(diagonal);
internal::DiagonalMatrix::assign_and_scale(dst, src, diagonal);
}


Expand Down
198 changes: 149 additions & 49 deletions include/deal.II/lac/precondition.h
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,8 @@ namespace internal
typename PreconditionerType>
constexpr bool has_vmult_with_std_functions =
is_supported_operation<vmult_functions_t, MatrixType, VectorType> &&
std::is_same<PreconditionerType, DiagonalMatrix<VectorType>>::value &&
std::is_same<PreconditionerType,
dealii::DiagonalMatrix<VectorType>>::value &&
(std::is_same<VectorType,
dealii::Vector<typename VectorType::value_type>>::value ||
std::is_same<
Expand Down Expand Up @@ -1086,13 +1087,16 @@ namespace internal

// 1) specialized implementation with a preconditioner that accepts
// ranges
template <typename MatrixType,
typename PreconditionerType,
typename VectorType,
std::enable_if_t<has_vmult_with_std_functions_for_precondition<
PreconditionerType,
VectorType>,
int> * = nullptr>
template <
typename MatrixType,
typename PreconditionerType,
typename VectorType,
std::enable_if_t<
has_vmult_with_std_functions_for_precondition<PreconditionerType,
VectorType> &&
!has_vmult_with_std_functions_for_precondition<MatrixType,
VectorType>,
int> * = nullptr>
void
step_operations(const MatrixType & A,
const PreconditionerType &preconditioner,
Expand Down Expand Up @@ -1172,22 +1176,116 @@ namespace internal
}
}

// 2) specialized implementation for inverse-diagonal preconditioner
// 2) specialized implementation with a preconditioner and a matrix that
// accepts ranges
template <
typename MatrixType,
typename PreconditionerType,
typename VectorType,
std::enable_if_t<
has_vmult_with_std_functions_for_precondition<PreconditionerType,
VectorType> &&
has_vmult_with_std_functions_for_precondition<MatrixType, VectorType>,
int> * = nullptr>
void
step_operations(const MatrixType & A,
const PreconditionerType &preconditioner,
VectorType & dst,
const VectorType & src,
const double relaxation,
VectorType & tmp,
VectorType &,
const unsigned int i,
const bool transposed)
{
(void)transposed;
using Number = typename VectorType::value_type;

if (i == 0)
{
Number * dst_ptr = dst.begin();
const Number *src_ptr = src.begin();

preconditioner.vmult(
dst,
src,
[&](const unsigned int start_range, const unsigned int end_range) {
// zero 'dst' before running the vmult operation
if (end_range > start_range)
std::memset(dst.begin() + start_range,
0,
sizeof(Number) * (end_range - start_range));
},
[&](const unsigned int start_range, const unsigned int end_range) {
if (relaxation == 1.0)
return; // nothing to do

const auto src_ptr = src.begin();
const auto dst_ptr = dst.begin();

DEAL_II_OPENMP_SIMD_PRAGMA
for (std::size_t i = start_range; i < end_range; ++i)
dst_ptr[i] *= relaxation;
});
}
else
{
tmp.reinit(src, true);

Assert(transposed == false, ExcNotImplemented());

A.vmult(
tmp,
src,
[&](const unsigned int start_range, const unsigned int end_range) {
// zero 'tmp' before running the vmult
// operation
if (end_range > start_range)
std::memset(tmp.begin() + start_range,
0,
sizeof(Number) * (end_range - start_range));
},
[&](const unsigned int start_range, const unsigned int end_range) {
const auto src_ptr = src.begin();
const auto tmp_ptr = tmp.begin();

if (relaxation == 1.0)
{
DEAL_II_OPENMP_SIMD_PRAGMA
for (std::size_t i = start_range; i < end_range; ++i)
tmp_ptr[i] = src_ptr[i] - tmp_ptr[i];
}
else
{
// note: we scale the residual here to be able to add into
// the dst vector, which contains the solution from the last
// iteration
DEAL_II_OPENMP_SIMD_PRAGMA
for (std::size_t i = start_range; i < end_range; ++i)
tmp_ptr[i] = relaxation * (src_ptr[i] - tmp_ptr[i]);
}
});

preconditioner.vmult(dst, tmp);
}
}

// 3) specialized implementation for inverse-diagonal preconditioner
template <typename MatrixType,
typename VectorType,
std::enable_if_t<
!IsBlockVector<VectorType>::value &&
!has_vmult_with_std_functions<MatrixType,
VectorType,
DiagonalMatrix<VectorType>>,
VectorType> * = nullptr>
std::enable_if_t<!IsBlockVector<VectorType>::value &&
!has_vmult_with_std_functions<
MatrixType,
VectorType,
dealii::DiagonalMatrix<VectorType>>,
VectorType> * = nullptr>
void
step_operations(const MatrixType & A,
const DiagonalMatrix<VectorType> &preconditioner,
VectorType & dst,
const VectorType & src,
const double relaxation,
VectorType & tmp,
step_operations(const MatrixType & A,
const dealii::DiagonalMatrix<VectorType> &preconditioner,
VectorType & dst,
const VectorType & src,
const double relaxation,
VectorType & tmp,
VectorType &,
const unsigned int i,
const bool transposed)
Expand Down Expand Up @@ -1243,23 +1341,23 @@ namespace internal
}
}

// 3) specialized implementation for inverse-diagonal preconditioner and
// 4) specialized implementation for inverse-diagonal preconditioner and
// matrix that accepts ranges
template <typename MatrixType,
typename VectorType,
std::enable_if_t<
!IsBlockVector<VectorType>::value &&
has_vmult_with_std_functions<MatrixType,
VectorType,
DiagonalMatrix<VectorType>>,
VectorType> * = nullptr>
std::enable_if_t<!IsBlockVector<VectorType>::value &&
has_vmult_with_std_functions<
MatrixType,
VectorType,
dealii::DiagonalMatrix<VectorType>>,
VectorType> * = nullptr>
void
step_operations(const MatrixType & A,
const DiagonalMatrix<VectorType> &preconditioner,
VectorType & dst,
const VectorType & src,
const double relaxation,
VectorType & tmp,
step_operations(const MatrixType & A,
const dealii::DiagonalMatrix<VectorType> &preconditioner,
VectorType & dst,
const VectorType & src,
const double relaxation,
VectorType & tmp,
VectorType &,
const unsigned int i,
const bool transposed)
Expand Down Expand Up @@ -2871,15 +2969,16 @@ namespace internal
// selection for diagonal matrix around deal.II vector
template <typename Number>
inline void
vector_updates(const ::dealii::Vector<Number> & rhs,
const DiagonalMatrix<::dealii::Vector<Number>> &jacobi,
const unsigned int iteration_index,
const double factor1,
const double factor2,
::dealii::Vector<Number> &solution_old,
::dealii::Vector<Number> &temp_vector1,
::dealii::Vector<Number> &,
::dealii::Vector<Number> &solution)
vector_updates(
const ::dealii::Vector<Number> & rhs,
const dealii::DiagonalMatrix<::dealii::Vector<Number>> &jacobi,
const unsigned int iteration_index,
const double factor1,
const double factor2,
::dealii::Vector<Number> & solution_old,
::dealii::Vector<Number> & temp_vector1,
::dealii::Vector<Number> &,
::dealii::Vector<Number> &solution)
{
VectorUpdater<Number> upd(rhs.begin(),
jacobi.get_vector().begin(),
Expand Down Expand Up @@ -2909,7 +3008,7 @@ namespace internal
inline void
vector_updates(
const LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> &rhs,
const DiagonalMatrix<
const dealii::DiagonalMatrix<
LinearAlgebra::distributed::Vector<Number, MemorySpace::Host>> &jacobi,
const unsigned int iteration_index,
const double factor1,
Expand Down Expand Up @@ -3053,13 +3152,14 @@ namespace internal
template <typename MatrixType, typename VectorType>
inline void
initialize_preconditioner(
const MatrixType & matrix,
std::shared_ptr<DiagonalMatrix<VectorType>> &preconditioner)
const MatrixType & matrix,
std::shared_ptr<dealii::DiagonalMatrix<VectorType>> &preconditioner)
{
if (preconditioner.get() == nullptr || preconditioner->m() != matrix.m())
{
if (preconditioner.get() == nullptr)
preconditioner = std::make_shared<DiagonalMatrix<VectorType>>();
preconditioner =
std::make_shared<dealii::DiagonalMatrix<VectorType>>();

Assert(
preconditioner->m() == 0,
Expand Down Expand Up @@ -3438,8 +3538,8 @@ PreconditionChebyshev<MatrixType, VectorType, PreconditionerType>::
// We do not need the second temporary vector in case we have a
// DiagonalMatrix as preconditioner and use deal.II's own vectors
using NumberType = typename VectorType::value_type;
if (std::is_same<PreconditionerType, DiagonalMatrix<VectorType>>::value ==
false ||
if (std::is_same<PreconditionerType,
dealii::DiagonalMatrix<VectorType>>::value == false ||
(std::is_same<VectorType, dealii::Vector<NumberType>>::value == false &&
((std::is_same<VectorType,
LinearAlgebra::distributed::
Expand Down
Loading