1!
2!     CalculiX - A 3-dimensional finite element program
3!              Copyright (C) 1998-2021 Guido Dhondt
4!
5!     This program is free software; you can redistribute it and/or
6!     modify it under the terms of the GNU General Public License as
7!     published by the Free Software Foundation(version 2);
8!
9!
10!     This program is distributed in the hope that it will be useful,
11!     but WITHOUT ANY WARRANTY; without even the implied warranty of
12!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13!     GNU General Public License for more details.
14!
15!     You should have received a copy of the GNU General Public License
16!     along with this program; if not, write to the Free Software
17!     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18!
19      subroutine smoothshock(aub,adl,sol,aux,irow,jq,
20     &  neqa,neqb,sa)
21!
22!     smoothing the finite element solution
23!
24!     Ref: The Finite Element Method for Fluid Dynamics,
25!          O.C. Zienkiewicz, R.L. Taylor & P. Nithiarasu
26!          6th edition (2006) ISBN 0 7506 6322 7
27!          p. 61
28!
29      implicit none
30!
31      integer irow(*),jq(*),neqa,neqb,i,j
32!
33      real*8 aub(*),adl(*),sol(*),aux(*),sa(*)
34!
35      do i=neqa,neqb
36        do j=jq(i),jq(i+1)-1
37          aux(i)=aux(i)+aub(j)*sol(irow(j))
38        enddo
39         sol(i)=sol(i)+sa(i)*aux(i)*adl(i)
40      enddo
41!
42      return
43      end
44