apply strong boundary conditions at axis and edge for solution update
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_sBase), | intent(in) | :: | sf |
self |
||
| real(kind=wp), | intent(inout) | :: | RHS(sf%nBase) |
DOFs with boundary conditions applied |
||
| integer, | intent(in) | :: | BC_Type(2) |
bc type on axis (1) and edge (2) |
SUBROUTINE sBase_applyBCtoRHS(sf ,RHS,BC_Type) ! MODULES IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES CLASS(t_sbase), INTENT(IN ) :: sf !! self INTEGER , INTENT(IN ) :: BC_Type(2) !! bc type on axis (1) and edge (2) !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES REAL(wp) , INTENT(INOUT) :: RHS(sf%nBase) !! DOFs with boundary conditions applied !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES REAL(wp):: r(0:sf%deg) !=================================================================================================================================== ASSOCIATE( tBCaxis => BC_Type(BC_AXIS) & ,tBCedge => BC_Type(BC_EDGE) & ! ,nDaxis => sf%nDOF_BC(BC_Type(BC_AXIS)) & !number of dofs involved in BC axis ! ,nDedge => sf%nDOF_BC(BC_Type(BC_EDGE)) & !number of dofs involved in BC edge ,nB => sf%nBase & ,deg => sf%deg ) SELECT CASE(tBCaxis) CASE(BC_TYPE_OPEN) !do noting CASE(BC_TYPE_DIRICHLET) RHS(1)= 0.0_wp CASE DEFAULT !BC_TYPE_NEUMANN,BC_TYPE_SYMM,BC_TYPE_SYMMZERO,BC_TYPE_ANTISYMM r(:) = RHS(1:deg+1) RHS(1:deg+1)= MATMUL(sf%R_axis(1:deg+1,1:deg+1,tBCaxis),r(:)) !RHS(1:nDaxis)= 0.0_wp END SELECT !tBCaxis SELECT CASE(tBCedge) CASE(BC_TYPE_OPEN) !do noting CASE(BC_TYPE_DIRICHLET) RHS(nB)= 0.0_wp CASE DEFAULT !BC_TYPE_NEUMANN,BC_TYPE_SYMM,BC_TYPE_SYMMZERO,BC_TYPE_ANTISYMM r(:) = RHS(nB-deg:nB) RHS(nB-deg:nB)= MATMUL(sf%R_edge(nB-deg:nB,nB-deg:nB,tBCedge),r(:)) !RHS(nB-nDedge:nB)= 0.0_wp END SELECT !tBCedge END ASSOCIATE END SUBROUTINE sbase_applyBCtoRHS