Skip to content

Commit

Permalink
[skip ci] Fixes to cases where dim /= dofs.
Browse files Browse the repository at this point in the history
  • Loading branch information
raback committed Nov 8, 2024
1 parent 07c7548 commit 0ed9641
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions fem/src/SolverUtils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23893,13 +23893,17 @@ SUBROUTINE GenerateConstraintMatrix( Model, Solver )
IF(dofs==dim .OR. dofs == 1) THEN
cdofs = dofs
ELSE IF(dofs==dim+1) THEN
cdofs = dim
! For contact mechanics we want to ignore the pressure.
IF( ListGetLogical( Solver % Values,'Apply Contact BCs',Found ) ) THEN
cdofs = dim
ELSE
cdofs = dofs
END IF
ELSE
CALL Fatal(Caller,'Invalid number of dofs for field: '//I2S(dofs))
END IF
END IF



ALLOCATE( ActiveComponents(dofs), SetDefined(dofs), rsum(dofs) )

IF( SumProjectors ) THEN
Expand All @@ -23908,9 +23912,7 @@ SUBROUTINE GenerateConstraintMatrix( Model, Solver )
ALLOCATE( SumCount( arows ) )
SumCount = 0
END IF




AnyPriority = ListCheckPresentAnyBC( Model,'Projector Priority')
IF( AnyPriority ) THEN
IF(.NOT. SumProjectors ) THEN
Expand Down Expand Up @@ -24043,9 +24045,9 @@ SUBROUTINE GenerateConstraintMatrix( Model, Solver )

! By default all components are applied mortar BC and some are turned off.
! If the user does the opposite then the default for other components is True.
IF( SomeSet .AND. .NOT. ALL(SetDefined) ) THEN
IF( SomeSet .AND. .NOT. ALL(SetDefined(1:cdofs)) ) THEN
IF( SomeSkip ) THEN
CALL Fatal(Caller,'Do not know what to do with all components')
CALL Fatal(Caller,'Do not know what to do with all '//I2S(cdofs)//' components')
ELSE
CALL Info(Caller,'Unspecified components will not be set for BC '//I2S(bc_ind),Level=10)
DO i=1,cDofs
Expand Down

0 comments on commit 0ed9641

Please sign in to comment.