diff --git a/fem/src/modules/VectorHelmholtz.F90 b/fem/src/modules/VectorHelmholtz.F90 index 4d5b87f581..ded823af5c 100644 --- a/fem/src/modules/VectorHelmholtz.F90 +++ b/fem/src/modules/VectorHelmholtz.F90 @@ -117,6 +117,8 @@ SUBROUTINE VectorHelmholtzSolver_Init0(Model,Solver,dt,Transient) END IF END IF + CALL ListAddNewLogical(SolverParams, 'Bubbles in Global System', .TRUE.) + !CALL ListAddNewLogical( SolverParams,'Hcurl Basis',.TRUE.) IF (WithNDOFs) THEN CALL ListAddNewLogical(SolverParams,'Variable Output',.TRUE.) @@ -367,7 +369,7 @@ FUNCTION DoSolve() RESULT(Converged) TYPE(ValueList_t), POINTER :: BC REAL(KIND=dp), POINTER CONTIG:: SavedValues(:) => NULL() REAL(KIND=dp) :: Norm - INTEGER :: Active,k,n,nd,t + INTEGER :: Active,k,n,nd,nb,t LOGICAL :: InitHandles !--------------------------------------------------------------------------------------------- ! System assembly: @@ -382,10 +384,11 @@ FUNCTION DoSolve() RESULT(Converged) Element => GetActiveElement(t) n = GetElementNOFNodes() nd = GetElementNOFDOFs() + nb = GetElementNOFBDOFs() ! Glue local element matrix and rhs vector: !---------------------------------------- - CALL LocalMatrix( Element, n, nd, InitHandles ) + CALL LocalMatrix( Element, n, nd+nb, nb, InitHandles ) END DO CALL DefaultFinishBulkAssembly() @@ -556,10 +559,10 @@ END SUBROUTINE SingleDipoleLoad !----------------------------------------------------------------------------- - SUBROUTINE LocalMatrix( Element, n, nd, InitHandles ) + SUBROUTINE LocalMatrix( Element, n, nd, nb, InitHandles ) !------------------------------------------------------------------------------ TYPE(Element_t), POINTER :: Element - INTEGER :: n, nd + INTEGER :: n, nd, nb LOGICAL :: InitHandles !------------------------------------------------------------------------------ COMPLEX(KIND=dp) :: eps, muinv, Cond, L(3) @@ -811,15 +814,16 @@ SUBROUTINE LocalMatrix( Element, n, nd, InitHandles ) END IF IF( PrecMatrix ) THEN - IF (CurlCurlPrec) THEN - CALL DefaultUpdatePrec(PREC(1:nd,1:nd)) - ELSE - CALL DefaultUpdatePrec(STIFF(1:nd,1:nd) + PREC(1:nd,1:nd)) + IF (.NOT. CurlCurlPrec) THEN + PREC(1:nd,1:nd) = STIFF(1:nd,1:nd) + PREC(1:nd,1:nd) END IF + IF (nb > 0) CALL CondensateP(nd-nb, nb, PREC) + CALL DefaultUpdatePrec(PREC(1:nd,1:nd)) END IF ! Update global matrix and rhs vector from local matrix & vector: !--------------------------------------------------------------- + IF (nb > 0) CALL CondensateP(nd-nb, nb, STIFF, FORCE) CALL DefaultUpdateEquations( STIFF, FORCE, Element ) !------------------------------------------------------------------------------ diff --git a/fem/tests/VectorHelmholtzWaveguide2/waveguide.sif b/fem/tests/VectorHelmholtzWaveguide2/waveguide.sif index 0cbef4a130..5e39627303 100644 --- a/fem/tests/VectorHelmholtzWaveguide2/waveguide.sif +++ b/fem/tests/VectorHelmholtzWaveguide2/waveguide.sif @@ -53,7 +53,8 @@ End Solver 1 Equation = "VectorHelmholtz" - Use Piola Transform = Logical False +! Use Piola Transform = True +! Bubbles in Global System = False Procedure = "VectorHelmholtz" "VectorHelmholtzSolver" Linear System Row Equilibration = True