Skip to content

Commit b6d4751

Browse files
authored
Merge pull request #769 from ElmerCSC/ProjectorUpdate
Projector update
2 parents 7a8a33a + bed20c5 commit b6d4751

12 files changed

+12110
-13028
lines changed

fem/src/BlockSolve.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ MODULE BlockSolve
4242
BackScaleLinearSystem, AMGXMatrixVectorMultiply, AMGXSolver, DiagonalMatrixSumming, &
4343
StructureCouplingAssembly, FSICouplingAssembly, SaveLinearSystem, &
4444
MassMatrixAssembly, VectorValuesRange, LaplaceMatrixAssembly
45-
USE MeshUtils, ONLY : SaveProjector
45+
USE MortarUtils, ONLY : SaveProjector
4646
USE DefUtils, ONLY : DefaultSolve, GetElementDOFs, GetElementNodes, GetLogical
4747

4848
IMPLICIT NONE

fem/src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ SET(solverlib_SOURCES AddrFunc.F90 NavierStokes.F90 NavierStokesGeneral.F90
2929
ElementUtils.F90 Radiation.F90 fft.c Load.c Differentials.F90
3030
FreeSurface.F90
3131
Walls.F90 SolverUtils.F90 SolveSBand.F90 CPUTime.c Interpolation.F90
32-
MainUtils.F90 Adaptive.F90 EigenSolve.F90 HashTable.F90
32+
MainUtils.F90 Adaptive.F90 EigenSolve.F90 HashTable.F90 MortarUtils.F90
33+
MeshAllocations.F90 GeometryFitting.F90
3334
MeshUtils.F90 SaveUtils.F90 SParIterGlobals.F90 SParIterComm.F90
3435
SParIterPrecond.F90 SParIterSolver.F90 Messages.F90 Multigrid.F90
3536
Smoothers.F90 ClusteringMethods.F90 ParallelUtils.F90

fem/src/ElementDescription.F90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3180,6 +3180,9 @@ RECURSIVE FUNCTION ElementInfo( Element, Nodes, u, v, w, detJ, &
31803180
ApplyPiolaTransform = PerformPiolaTransform, &
31813181
SimplicialMesh = SimplicialElements)
31823182
ELSE
3183+
IF(Element % Type % ElementCode == 504 .AND. ANY([u,v,w] < 0.0) ) THEN
3184+
PRINT *,'Negative local coordinates for tet:',u,v,w
3185+
END IF
31833186
stat = ElementInfo( Element, Nodes, u, v, w, detJ, Basis, dBasisdx )
31843187
CALL GetEdgeBasis(Element,EdgeBasis,RotBasis,Basis,dBasisdx)
31853188
END IF

fem/src/ElementUtils.F90

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4138,6 +4138,56 @@ SUBROUTINE mGetBoundaryIndexesFromParent( Mesh, Element, Indexes, indSize )
41384138
END SUBROUTINE mGetBoundaryIndexesFromParent
41394139
!------------------------------------------------------------------------------
41404140

4141+
!------------------------------------------------------------------------------
4142+
FUNCTION Find_Edge(Mesh,Parent,Element) RESULT(ptr)
4143+
!------------------------------------------------------------------------------
4144+
TYPE(Element_t), POINTER :: Ptr
4145+
TYPE(Mesh_t) :: Mesh
4146+
TYPE(Element_t) :: Parent, Element
4147+
4148+
INTEGER :: i,j,k,n
4149+
4150+
Ptr => NULL()
4151+
DO i=1,Parent % TYPE % NumberOfEdges
4152+
Ptr => Mesh % Edges(Parent % EdgeIndexes(i))
4153+
n=0
4154+
DO j=1,Ptr % TYPE % NumberOfNodes
4155+
DO k=1,Element % TYPE % NumberOfNodes
4156+
IF (Ptr % NodeIndexes(j) == Element % NodeIndexes(k)) n=n+1
4157+
END DO
4158+
END DO
4159+
IF (n==Ptr % TYPE % NumberOfNodes) EXIT
4160+
END DO
4161+
!------------------------------------------------------------------------------
4162+
END FUNCTION Find_Edge
4163+
!------------------------------------------------------------------------------
4164+
4165+
!------------------------------------------------------------------------------
4166+
FUNCTION Find_Face(Mesh,Parent,Element) RESULT(ptr)
4167+
!------------------------------------------------------------------------------
4168+
TYPE(Element_t), POINTER :: Ptr
4169+
TYPE(Mesh_t) :: Mesh
4170+
TYPE(Element_t) :: Parent, Element
4171+
4172+
INTEGER :: i,j,k,n
4173+
4174+
Ptr => NULL()
4175+
DO i=1,Parent % TYPE % NumberOfFaces
4176+
Ptr => Mesh % Faces(Parent % FaceIndexes(i))
4177+
n=0
4178+
DO j=1,Ptr % TYPE % NumberOfNodes
4179+
DO k=1,Element % TYPE % NumberOfNodes
4180+
IF (Ptr % NodeIndexes(j) == Element % NodeIndexes(k)) n=n+1
4181+
END DO
4182+
END DO
4183+
IF (n==Ptr % TYPE % NumberOfNodes) EXIT
4184+
END DO
4185+
!------------------------------------------------------------------------------
4186+
END FUNCTION Find_Face
4187+
!------------------------------------------------------------------------------
4188+
4189+
4190+
41414191
END MODULE ElementUtils
41424192

41434193
!> \} ElmerLib

fem/src/ElmerSolver.F90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ SUBROUTINE ElmerSolver(initialize, args, NoArgs)
7878
#endif
7979
USE SolverUtils, ONLY: GetControlValue, FinalizeLumpedMatrix, UpdateExportedVariables, &
8080
UpdateIpPerm, VectorValuesRange
81-
USE MeshUtils, ONLY : MeshExtrude, MeshExtrudeSlices, PeriodicProjector, &
81+
USE MeshUtils, ONLY : MeshExtrude, MeshExtrudeSlices, &
8282
CoordinateTransformation, InitializeElementDescriptions, ReleaseMesh, &
8383
CalculateMeshPieces, SetActiveElementsTable, SetCurrentMesh, &
8484
MarkSharpEdges, TagBodiesUsingCondition
85+
USE MortarUtils, ONLY : PeriodicProjector
8586
USE MainUtils, ONLY : AddEquationBasics, AddEquationSolution, AddExecWhenFlag, &
8687
PredictorCorrectorControl, SingleSolver, SolveEquations, SolverActivate, &
8788
SwapMesh

0 commit comments

Comments
 (0)