| e969e7a5 | 14-Mar-2024 |
Jose E. Roman <jroman@dsic.upv.es> |
Fix compile warning in dmplex.c (Intel C++)
petsc/src/dm/impls/plex/plex.c(7570): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have
Fix compile warning in dmplex.c (Intel C++)
petsc/src/dm/impls/plex/plex.c(7570): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have been variable "f" (declared at line 7547) for (f = 0; f < numFields; ++f) { ^
petsc/src/dm/impls/plex/plex.c(7570): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have been variable "f" (declared at line 7547) for (f = 0; f < numFields; ++f) { ^
petsc/src/dm/impls/plex/plex.c(7570): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have been variable "f" (declared at line 7547) for (f = 0; f < numFields; ++f) { ^
petsc/src/dm/impls/plex/plex.c(7573): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have been variable "f" (declared at line 7547) if (a >= sStart && a < sEnd) PetscCall(PetscSectionGetFieldDof(section, a, f, &fDof)); ^
petsc/src/dm/impls/plex/plex.c(7574): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have been variable "f" (declared at line 7547) newOffsets[f + 1] += fDof; ^
petsc/src/dm/impls/plex/plex.c(7581): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have been variable "f" (declared at line 7547) for (f = 0; f < numFields; ++f) { ^
petsc/src/dm/impls/plex/plex.c(7581): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have been variable "f" (declared at line 7547) for (f = 0; f < numFields; ++f) { ^
petsc/src/dm/impls/plex/plex.c(7581): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have been variable "f" (declared at line 7547) for (f = 0; f < numFields; ++f) { ^
petsc/src/dm/impls/plex/plex.c(7584): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have been variable "f" (declared at line 7547) PetscCall(PetscSectionGetFieldDof(section, b, f, &fDof)); ^
petsc/src/dm/impls/plex/plex.c(7585): warning #823: reference is to variable "f" (declared at line 7514) -- under old for-init scoping rules it would have been variable "f" (declared at line 7547) newOffsets[f + 1] += fDof; ^
show more ...
|
| c789d87f | 29-Feb-2024 |
Toby Isaac <toby.isaac@gmail.com> |
DMPlex: refactor anchors modifications to element matrices
DMPlexMatSetClosureGeneral() has an interface that promises to handle different modifications (permutations, sign flips, and anchor modific
DMPlex: refactor anchors modifications to element matrices
DMPlexMatSetClosureGeneral() has an interface that promises to handle different modifications (permutations, sign flips, and anchor modifications) correctly to an element matrix that has two different dms: one for the left space and one for the right space. This was not implemented properly before, but now it is
This is accomplish by refactoring DMPlexAnchorsModifyMat(). Before it applied subsets of the anchor constraint matrix to each element in a flop-optimal way, going field by field and point by point. This was very complicated. The refactorization now is based on an internal routine, DMPLexAnchorsModifyMat_Internal(), that produces the modification matrix as a dense array. For a multifield element or one with many points in the closure, this could have lots of computed zeros, but the code is much simpler, and applying the modification now calls gemm, which for moderate sizes should be faster than the hand-coded mat-mat loops that it replaces.
Producing the modification matrix also allows for an internal refactorization of DMPlexGetClosureIndices() to rely on DMPlexGetClosureIndices_Internal(), which correctly handles left-multiplication and right-multiplication by modification matrices.
WIP: Simplify DMPlexAnchorsModifyMat()
WIP: Simplify DMPlexAnchorsModifyMat()
WIP: Selective do anchor modification on left or right in newly added DMPlexGetClosureIndices_Internal()
WIP: Correct integer printf formatting
WIP: Remove unused variables
WIP: correct PETSC_SCALAR to MPIU_SCALAR in DMGetWorkArray()
WIP: correct short-circuit behavior of anchor mat modifications
WIP: correctly handle construction of modMat when there are rows for both constrained and unconstrained dofs
WIP: corecct tabulation of anchor points
WIP: only apply permutations on the left of cMat extraction
WIP: compute modMat field by field
WIP: update argument check numbers
WIP: precalculate the number of rows and columns in DMPlexMatSetClosureGeneral()
WIP: do not assume outNumIndices is present
WIP: remove dummy constraints from coordinate DM
show more ...
|