From 56b2827256c58947f660fa8981075e909d458268 Mon Sep 17 00:00:00 2001 From: Dave Whipp <dwhipp@dal.ca> Date: Thu, 10 Dec 2009 21:38:10 +0000 Subject: [PATCH] Added a few comments --- src/smooth_pressures.f90 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/smooth_pressures.f90 b/src/smooth_pressures.f90 index b655c25c..06697f95 100644 --- a/src/smooth_pressures.f90 +++ b/src/smooth_pressures.f90 @@ -79,6 +79,10 @@ allocate (field(osolve%nnode)) field=0 countnode=0 +! A few comments for reference by dwhipp - 12/09 +! This loop goes through each element, loops through the associated nodes and +! adds the elemental pressure to field (the nodal sum). countnode tracks the +! number of times a pressure value is contributed do i=1,osolve%nleaves do j=1,8 k=osolve%icon(j,i) @@ -87,12 +91,16 @@ do i=1,osolve%nleaves end do end do +! This loop goes through each node and divides the field value from above by +! countnode, to yield a nodal value that averages the elemental pressures from +! each element that shares that node do i=1,osolve%nnode if (countnode(i).gt.0.d0) then field(i) = field(i) / countnode(i) end if end do +! This stores the averaged nodal pressures ov%temporary_nodal_pressure=field do ie=1,osolve%nleaves -- GitLab