!----- AGPL -------------------------------------------------------------------- ! ! Copyright (C) Stichting Deltares, 2017-2022. ! ! This file is part of Delft3D (D-Flow Flexible Mesh component). ! ! Delft3D is free software: you can redistribute it and/or modify ! it under the terms of the GNU Affero General Public License as ! published by the Free Software Foundation version 3. ! ! Delft3D is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU Affero General Public License for more details. ! ! You should have received a copy of the GNU Affero General Public License ! along with Delft3D. If not, see . ! ! contact: delft3d.support@deltares.nl ! Stichting Deltares ! P.O. Box 177 ! 2600 MH Delft, The Netherlands ! ! All indications and logos of, and references to, "Delft3D", ! "D-Flow Flexible Mesh" and "Deltares" are registered trademarks of Stichting ! Deltares, and remain the property of Stichting Deltares. All rights reserved. ! !------------------------------------------------------------------------------- ! $Id$ ! $HeadURL$ subroutine getAVCOR( n, xz, yz, zz ) ! average coordinate values use m_netw implicit none double precision :: xz, yz, zz ! integer :: m, n, nn, k xz = 0d0 ; yz = 0d0 ; zz = 0d0 nn = netcell(n)%n ! zwaartepunt do m = 1,nn k = netcell(n)%NOD(m) xz = xz + xk(k) yz = yz + yk(k) zz = zz + zk(k) enddo xz = xz / nn yz = yz / nn zz = zz / nn end subroutine getAVCOR