Implicit solution of wave setup problem following Dingemans for structured and unstructured grids.
More...
|
| subroutine | differentiate_xydir_native (VAR, DVDX, DVDY) |
| | Differentiate xy, using linear shape function. More...
|
| |
| subroutine | differentiate_xydir_mapsta (VAR, DVDX, DVDY) |
| | Differentiate xy based on mapsta, using linear shape function. More...
|
| |
| subroutine | differentiate_xydir (VAR, DVDX, DVDY) |
| | Driver routine for xydir. More...
|
| |
| subroutine | trig_compute_lh_stress (F_X, F_Y, DWNX) |
| | Setup boundary pointer. More...
|
| |
| subroutine | trig_compute_diff (IE, I1, UGRAD, VGRAD) |
| | Differentiate other way around. More...
|
| |
| subroutine | trig_wave_setup_compute_system (ASPAR, B, FX, FY, DWNX, ACTIVE, ACTIVESEC) |
| | Setup system matrix for solutions of wave setup eq. More...
|
| |
| subroutine | trig_wave_setup_apply_precond (ASPAR, TheIn, TheOut, ACTIVE, ACTIVESEC) |
| | Preconditioner. More...
|
| |
| subroutine | trig_wave_setup_apply_fct (ASPAR, TheIn, TheOut, ACTIVE, ACTIVESEC) |
| |
| subroutine | trig_wave_setup_scalar_prod (V1, V2, eScal) |
| | Scalar product plus exchange. More...
|
| |
| subroutine | trig_wave_setup_solve_poisson_neumann_dir (ASPAR, B, TheOut, ACTIVE, ACTIVESEC) |
| | Poisson equation solver. More...
|
| |
| subroutine | trig_set_meanvalue_to_zero (TheVar) |
| | Set mean value. More...
|
| |
| subroutine | compute_active_node (DWNX, ACTIVE) |
| | Compute active node for setup comp. More...
|
| |
| subroutine | trig_wave_setup_computation |
| | Setup computation. More...
|
| |
| subroutine | preparation_fd_scheme (IMOD) |
| | Wave setup for FD grids. More...
|
| |
| subroutine | fd_wave_setup_apply_fct (ASPAR, TheIn, TheOut) |
| | Compute off diagonal for FD grids. More...
|
| |
| subroutine | fd_wave_setup_apply_precond (ASPAR, TheIn, TheOut) |
| | Preconditioning for FD grids. More...
|
| |
| subroutine | fd_collect_sxx_xy_yy (SXX_t, SXY_t, SYY_t) |
| | Radiation stresses for FD grids. More...
|
| |
| subroutine | fd_compute_lh_stress (SXX_t, SXY_t, SYY_t, FX, FY) |
| | Setup fluxes. More...
|
| |
| subroutine | fd_compute_diff (IEDGE, ISEA, UGRAD, VGRAD, dist) |
| | Differences on FD grids. More...
|
| |
| subroutine | fd_wave_setup_compute_system (ASPAR, B, FX, FY) |
| | Setup matrix on FD grids. More...
|
| |
| subroutine | fd_wave_setup_scalar_prod (V1, V2, eScal) |
| | Scalar product. More...
|
| |
| subroutine | fd_wave_setup_solve_poisson_neumann_dir (ASPAR, B, TheOut) |
| | Poisson solver on FD grids. More...
|
| |
| subroutine | fd_set_meanvalue_to_zero (TheVar) |
| | Set mean value. More...
|
| |
| subroutine | fd_wave_setup_computation |
| | Wave setup comp on FD grids. More...
|
| |
| subroutine | wave_setup_computation |
| | General driver. More...
|
| |
Implicit solution of wave setup problem following Dingemans for structured and unstructured grids.
- Author
- Aron Roland
-
Mathieu Dutour-Sikiric
- Date
- 1-Jun-2018
◆ compute_active_node()
| subroutine w3wavset::compute_active_node |
( |
real(rkind), dimension(npa), intent(in) |
DWNX, |
|
|
integer, dimension(npa), intent(out) |
ACTIVE |
|
) |
| |
Compute active node for setup comp.
- Parameters
-
- Author
- Aron Roland
-
Mathieu Dutour-Sikiric
- Date
- 1-May-2018
Definition at line 1494 of file w3wavset.F90.
1554 INTEGER,
SAVE :: IENT = 0
1559 REAL(rkind),
INTENT(in) :: DWNX(npa)
1560 INTEGER,
INTENT(out) :: ACTIVE(npa)
1566 CALL strace (ient,
'VA_SETUP_IOBPD')
1578 nbactive=nbactive + eact
1583 WRITE(740+
iaproc,*)
'min/max(DWNX)=', minval(dwnx), maxval(dwnx)
1585 WRITE(740+
iaproc,*)
'nbActive=', nbactive,
' npa=',
npa
References w3gdatmd::crit_dep_stp, w3odatmd::iaproc, yownodepool::iplg, yownodepool::np, yownodepool::npa, yownodepool::pdlib_ia, yownodepool::pdlib_ja, yownodepool::pdlib_nnz, and w3servmd::strace().
Referenced by trig_wave_setup_computation().
◆ differentiate_xydir()
| subroutine w3wavset::differentiate_xydir |
( |
real(rkind), dimension(npa), intent(in) |
VAR, |
|
|
real(rkind), dimension(npa), intent(out) |
DVDX, |
|
|
real(rkind), dimension(npa), intent(out) |
DVDY |
|
) |
| |
◆ differentiate_xydir_mapsta()
| subroutine w3wavset::differentiate_xydir_mapsta |
( |
real(rkind), dimension(npa), intent(in) |
VAR, |
|
|
real(rkind), dimension(npa), intent(out) |
DVDX, |
|
|
real(rkind), dimension(npa), intent(out) |
DVDY |
|
) |
| |
Differentiate xy based on mapsta, using linear shape function.
- Parameters
-
| [in] | VAR | |
| [out] | DVDX | |
| [out] | DVDY | |
- Author
- Aron Roland
-
Mathieu Dutour-Sikiric
- Date
- 1-May-2018
Definition at line 226 of file w3wavset.F90.
288 INTEGER,
SAVE :: IENT = 0
293 REAL(rkind),
INTENT(IN) :: VAR(npa)
294 REAL(rkind),
INTENT(OUT) :: DVDX(npa), DVDY(npa)
296 INTEGER :: IE, I1, I2, I3, IP, IX
297 REAL(rkind) :: DEDY(3),DEDX(3)
298 REAL(rkind) :: DVDXIE, DVDYIE
299 REAL(rkind) :: WEI(npa), eW
300 INTEGER :: IX1, IX2, IX3, ISEA
302 CALL strace (ient,
'VA_SETUP_IOBPD')
316 IF ((
mapsta(1,ix1) .gt. 0).and.(
mapsta(1,ix2) .gt. 0).and.(
mapsta(1,ix3) .gt. 0))
THEN
324 dvdxie = dot_product( var(ni),dedx)
325 dvdyie = dot_product( var(ni),dedy)
326 dvdx(ni) = dvdx(ni) + dvdxie
327 dvdy(ni) = dvdy(ni) + dvdyie
333 IF (ew .gt. 0 .and.
mapsta(1,ix) .gt. 0)
THEN
334 dvdx(ip)=dvdx(ip) / ew
335 dvdy(ip)=dvdy(ip) / ew
343 IF (
mapsta(1,ix) .lt. 0)
THEN
References yowelementpool::ine, w3parall::init_get_isea(), yownodepool::iplg, w3gdatmd::mapsta, yowelementpool::ne, yownodepool::npa, yowexchangemodule::pdlib_exchange1dreal(), yownodepool::pdlib_ien, yownodepool::pdlib_tria, and w3servmd::strace().
Referenced by differentiate_xydir().
◆ differentiate_xydir_native()
| subroutine w3wavset::differentiate_xydir_native |
( |
real(rkind), dimension(npa), intent(in) |
VAR, |
|
|
real(rkind), dimension(npa), intent(out) |
DVDX, |
|
|
real(rkind), dimension(npa), intent(out) |
DVDY |
|
) |
| |
Differentiate xy, using linear shape function.
- Parameters
-
| [in] | VAR | |
| [out] | DVDX | |
| [out] | DVDY | |
- Author
- Aron Roland
-
Mathieu Dutour-Sikiric
- Date
- 1-May-2018
Definition at line 106 of file w3wavset.F90.
167 INTEGER,
SAVE :: IENT = 0
173 REAL(rkind),
INTENT(IN) :: VAR(npa)
174 REAL(rkind),
INTENT(OUT) :: DVDX(npa), DVDY(npa)
176 INTEGER :: IE, I1, I2, I3, IP
177 REAL(rkind) :: DEDY(3),DEDX(3)
178 REAL(rkind) :: DVDXIE, DVDYIE
179 REAL(rkind) :: WEI(npa), eW
182 CALL strace (ient,
'VA_SETUP_IOBPD')
200 dvdxie = dot_product( var(ni),dedx)
201 dvdyie = dot_product( var(ni),dedy)
202 dvdx(ni) = dvdx(ni) + dvdxie
203 dvdy(ni) = dvdy(ni) + dvdyie
207 dvdx(ix)=dvdx(ix) / ew
208 dvdy(ix)=dvdy(ix) / ew
References yowelementpool::ine, w3gdatmd::mapsta, yowelementpool::ne, yownodepool::npa, yowexchangemodule::pdlib_exchange1dreal(), yownodepool::pdlib_ien, yownodepool::pdlib_tria, and w3servmd::strace().
◆ fd_collect_sxx_xy_yy()
| subroutine w3wavset::fd_collect_sxx_xy_yy |
( |
real(rkind), dimension(nsea), intent(out) |
SXX_t, |
|
|
real(rkind), dimension(nsea), intent(out) |
SXY_t, |
|
|
real(rkind), dimension(nsea), intent(out) |
SYY_t |
|
) |
| |
Radiation stresses for FD grids.
- Parameters
-
| [out] | SXX_t | |
| [out] | SXY_t | |
| [out] | SYY_t | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 2153 of file w3wavset.F90.
2215 INTEGER,
SAVE :: IENT = 0
2222 real(rkind),
intent(out) :: SXX_t(NSEA), SXY_t(NSEA), SYY_t(NSEA)
2223 real(rkind) :: SXX_p(NSEAL), SXY_p(NSEAL), SYY_p(NSEAL)
2224 real(rkind),
allocatable :: rVect(:)
2225 integer IPROC, NSEAL_loc
2227 CALL strace (ient,
'VA_SETUP_IOBPD')
2230 sxx_p(isea)=sxx(isea)
2231 sxy_p(isea)=sxy(isea)
2232 syy_p(isea)=syy(isea)
2237 sxx_t(isea)=sxx_p(jsea)
2238 sxy_t(isea)=sxy_p(jsea)
2239 syy_t(isea)=syy_p(jsea)
2243 allocate(rvect(nseal_loc))
2246 isea = iproc + (jsea-1)*
naproc
2247 sxx_t(isea)=rvect(jsea)
2251 isea = iproc + (jsea-1)*
naproc
2252 sxy_t(isea)=rvect(jsea)
2256 isea = iproc + (jsea-1)*
naproc
2257 syy_t(isea)=rvect(jsea)
References w3odatmd::iaproc, yowdatapool::istatus, w3adatmd::mpi_comm_wcmp, w3odatmd::naproc, w3gdatmd::nsea, w3gdatmd::nseal, yowdatapool::rtype, w3servmd::strace(), w3adatmd::sxx, w3adatmd::sxy, and w3adatmd::syy.
Referenced by fd_wave_setup_computation().
◆ fd_compute_diff()
| subroutine w3wavset::fd_compute_diff |
( |
integer, intent(in) |
IEDGE, |
|
|
integer, intent(in) |
ISEA, |
|
|
real(rkind), intent(inout) |
UGRAD, |
|
|
real(rkind), intent(inout) |
VGRAD, |
|
|
real(rkind), intent(inout) |
dist |
|
) |
| |
Differences on FD grids.
- Parameters
-
| [in] | IEDGE | |
| [in] | ISEA | |
| [in,out] | UGRAD | |
| [in,out] | VGRAD | |
| [in,out] | dist | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 2434 of file w3wavset.F90.
2493 INTEGER,
SAVE :: IENT = 0
2498 INTEGER,
intent(in) :: IEDGE, ISEA
2499 REAL(rkind),
intent(inout) :: UGRAD, VGRAD, dist
2501 integer I2, I3, IP1, IP2, IP3
2502 integer IX1, IY1, IX2, IY2
2503 integer ISEA1, ISEA2
2504 REAL(rkind) deltaX, deltaY
2506 CALL strace (ient,
'VA_SETUP_IOBPD')
2509 isea1=edges(iedge,1)
2510 isea2=edges(iedge,2)
2515 deltax=
xgrd(ix1,iy1) -
xgrd(ix2,iy2)
2516 deltay=
ygrd(ix1,iy1) -
ygrd(ix2,iy2)
2517 dist=sqrt(deltax*deltax + deltay*deltay)
2518 IF (isea .eq. isea1)
THEN
References w3gdatmd::edges, w3gdatmd::mapsf, w3servmd::strace(), w3gdatmd::xgrd, and w3gdatmd::ygrd.
Referenced by fd_wave_setup_compute_system().
◆ fd_compute_lh_stress()
| subroutine w3wavset::fd_compute_lh_stress |
( |
real(rkind), dimension(nsea), intent(in) |
SXX_t, |
|
|
real(rkind), dimension(nsea), intent(in) |
SXY_t, |
|
|
real(rkind), dimension(nsea), intent(in) |
SYY_t, |
|
|
real(rkind), dimension(nsea), intent(out) |
FX, |
|
|
real(rkind), dimension(nsea), intent(out) |
FY |
|
) |
| |
Setup fluxes.
- Parameters
-
| [in] | SXX_t | |
| [in] | SXY_t | |
| [in] | SYY_t | |
| [out] | FX | |
| [out] | FY | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 2282 of file w3wavset.F90.
2341 INTEGER,
SAVE :: IENT = 0
2346 real(rkind),
intent(in) :: SXX_t(NSEA), SXY_t(NSEA), SYY_t(NSEA)
2347 real(rkind),
intent(out) :: FX(NSEA), FY(NSEA)
2349 REAL(rkind) :: SXX_X, SXX_Y
2350 REAL(rkind) :: SXY_X, SXY_Y
2351 REAL(rkind) :: SYY_X, SYY_Y
2352 REAL(rkind) :: eFX, eFY
2353 REAL(rkind) :: UGRAD, VGRAD
2354 INTEGER IE, I1, I2, I3, IP1, IP2, IP3
2355 integer ISEA, JSEA1, JSEA2, JSEA3, JSEA4
2356 integer NeighMat(4,2)
2357 real(rkind) dist_X, dist_Y
2359 CALL strace (ient,
'VA_SETUP_IOBPD')
2383 IF ((jsea1 .gt. 0).and.(jsea2 .gt. 0))
THEN
2384 sxx_x=(
sxx(jsea1) -
sxx(jsea2))/(2*dist_x)
2385 sxy_x=(
sxy(jsea1) -
sxy(jsea2))/(2*dist_x)
2386 syy_x=(
sxy(jsea1) -
syy(jsea2))/(2*dist_x)
2388 IF ((jsea1 .gt. 0).and.(jsea2 .eq. 0))
THEN
2389 sxx_x=(
sxx(jsea1) -
sxx(isea ))/dist_x
2390 sxy_x=(
sxy(jsea1) -
sxy(isea ))/dist_x
2391 syy_x=(
sxy(jsea1) -
syy(isea ))/dist_x
2393 IF ((jsea1 .eq. 0).and.(jsea2 .gt. 0))
THEN
2394 sxx_x=(
sxx(isea ) -
sxx(jsea2))/dist_x
2395 sxy_x=(
sxy(isea ) -
sxy(jsea2))/dist_x
2396 syy_x=(
sxy(isea ) -
syy(jsea2))/dist_x
2398 IF ((jsea3 .gt. 0).and.(jsea4 .gt. 0))
THEN
2399 sxx_x=(
sxx(jsea3) -
sxx(jsea4))/(2*dist_y)
2400 sxy_x=(
sxy(jsea3) -
sxy(jsea4))/(2*dist_y)
2401 syy_x=(
sxy(jsea3) -
syy(jsea4))/(2*dist_y)
2403 IF ((jsea3 .eq. 0).and.(jsea4 .gt. 0))
THEN
2404 sxx_x=(
sxx(isea ) -
sxx(jsea4))/dist_y
2405 sxy_x=(
sxy(isea ) -
sxy(jsea4))/dist_y
2406 syy_x=(
sxy(isea ) -
syy(jsea4))/dist_y
2408 IF ((jsea3 .gt. 0).and.(jsea4 .gt. 0))
THEN
2409 sxx_x=(
sxx(jsea3) -
sxx(isea ))/dist_y
2410 sxy_x=(
sxy(jsea3) -
sxy(isea ))/dist_y
2411 syy_x=(
sxy(jsea3) -
syy(isea ))/dist_y
References w3gdatmd::neigh, w3gdatmd::nsea, w3gdatmd::nx, w3gdatmd::ny, w3servmd::strace(), w3adatmd::sxx, w3adatmd::sxy, and w3adatmd::syy.
Referenced by fd_wave_setup_computation().
◆ fd_set_meanvalue_to_zero()
| subroutine w3wavset::fd_set_meanvalue_to_zero |
( |
real(rkind), dimension(nx), intent(inout) |
TheVar | ) |
|
Set mean value.
- Parameters
-
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 2864 of file w3wavset.F90.
2922 INTEGER,
SAVE :: IENT = 0
2927 real(rkind),
intent(inout) :: TheVar(NX)
2928 real(rkind) :: SUM_SI_Var, SUM_SI, TheMean
2931 CALL strace (ient,
'VA_SETUP_IOBPD')
2936 sum_si_var = sum_si_var +
si(ip)*thevar(ip)
2937 sum_si = sum_si +
si(ip)
2939 themean=sum_si_var/sum_si
2941 thevar(ip)=thevar(ip) - themean
References w3gdatmd::nx, w3gdatmd::si, and w3servmd::strace().
Referenced by fd_wave_setup_computation().
◆ fd_wave_setup_apply_fct()
| subroutine w3wavset::fd_wave_setup_apply_fct |
( |
real(rkind), dimension(nnz), intent(in) |
ASPAR, |
|
|
real(rkind), dimension(nsea), intent(in) |
TheIn, |
|
|
real(rkind), dimension(nsea), intent(out) |
TheOut |
|
) |
| |
Compute off diagonal for FD grids.
- Parameters
-
| [in] | ASPAR | |
| [in] | TheIn | |
| [out] | TheOut | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 1946 of file w3wavset.F90.
2005 INTEGER,
SAVE :: IENT = 0
2010 REAL(rkind),
intent(in) :: ASPAR(NNZ)
2011 REAL(rkind),
intent(in) :: TheIn(NSEA)
2012 REAL(rkind),
intent(out) :: TheOut(NSEA)
2014 REAL(rkind) :: eCoeff
2016 CALL strace (ient,
'VA_SETUP_IOBPD')
2023 theout(ip)=theout(ip) + ecoeff*thein(jp)
References w3gdatmd::iaa, w3gdatmd::jaa, w3gdatmd::nnz, w3gdatmd::nsea, w3gdatmd::nx, yownodepool::pdlib_ia, yownodepool::pdlib_ja, and w3servmd::strace().
Referenced by fd_wave_setup_solve_poisson_neumann_dir().
◆ fd_wave_setup_apply_precond()
| subroutine w3wavset::fd_wave_setup_apply_precond |
( |
real(rkind), dimension(pdlib_nnz), intent(in) |
ASPAR, |
|
|
real(rkind), dimension(nsea), intent(in) |
TheIn, |
|
|
real(rkind), dimension(nsea), intent(out) |
TheOut |
|
) |
| |
Preconditioning for FD grids.
- Parameters
-
| [in] | ASPAR | |
| [in] | TheIn | |
| [out] | TheOut | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 2040 of file w3wavset.F90.
2099 INTEGER,
SAVE :: IENT = 0
2104 REAL(rkind),
intent(in) :: ASPAR(PDLIB_NNZ)
2105 REAL(rkind),
intent(in) :: TheIn(NSEA)
2106 REAL(rkind),
intent(out) :: TheOut(NSEA)
2107 integer IP, J1, J, JP, J2
2108 REAL(rkind) :: eCoeff
2109 INTEGER :: ThePrecond = 0
2111 CALL strace (ient,
'VA_SETUP_IOBPD')
2113 IF (theprecond .eq. 0)
THEN
2116 IF (theprecond .eq. 1)
THEN
2126 ecoeff=-aspar(j) /(aspar(j1)*aspar(j2))
2128 theout(ip)=theout(ip) + ecoeff*thein(jp)
2132 IF (theprecond .eq. 2)
THEN
2136 theout(ip)=thein(ip)/aspar(j)
References w3gdatmd::nsea, yownodepool::pdlib_i_diag, yownodepool::pdlib_ia, yownodepool::pdlib_ja, yownodepool::pdlib_nnz, and w3servmd::strace().
Referenced by fd_wave_setup_solve_poisson_neumann_dir().
◆ fd_wave_setup_computation()
| subroutine w3wavset::fd_wave_setup_computation |
Wave setup comp on FD grids.
- Parameters
-
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 2955 of file w3wavset.F90.
3018 INTEGER,
SAVE :: IENT = 0
3023 REAL(rkind) :: ZETA_WORK(NSEA)
3024 REAL(rkind) :: F_X(NSEA), F_Y(NSEA)
3025 REAL(rkind) :: ASPAR(PDLIB_NNZ), B(NX)
3027 real(rkind) :: SXX_t(NSEA), SXY_t(NSEA), SYY_t(NSEA)
3030 real(rkind) max_val, min_val
3033 CALL strace (ient,
'VA_SETUP_IOBPD')
3035 CALL fd_collect_sxx_xy_yy(sxx_t, sxy_t, syy_t)
3037 CALL fd_compute_lh_stress(sxx_t, sxy_t, syy_t, f_x, f_y)
3041 CALL fd_wave_setup_compute_system(aspar, b, f_x, f_y)
3042 CALL fd_wave_setup_solve_poisson_neumann_dir(aspar, b, zeta_work)
3043 CALL fd_set_meanvalue_to_zero(zeta_work)
3051 max_val = zeta_work(isea)
3052 min_val = zeta_work(isea)
3057 max_val = max(max_val, zeta_work(isea))
3058 min_val = min(min_val, zeta_work(isea))
3062 WRITE(740+
iaproc,*)
'FD_WAVE_SETUP_COMPUTATION, max/min=', max_val, min_val
References fd_collect_sxx_xy_yy(), fd_compute_lh_stress(), fd_set_meanvalue_to_zero(), fd_wave_setup_compute_system(), fd_wave_setup_solve_poisson_neumann_dir(), w3odatmd::iaproc, yowdatapool::istatus, w3adatmd::mpi_comm_wcmp, w3odatmd::naproc, w3gdatmd::nsea, w3gdatmd::nseal, w3gdatmd::nx, yownodepool::pdlib_nnz, yowdatapool::rtype, w3servmd::strace(), and w3wdatmd::zeta_setup.
Referenced by wave_setup_computation().
◆ fd_wave_setup_compute_system()
| subroutine w3wavset::fd_wave_setup_compute_system |
( |
real(rkind), dimension(pdlib_nnz), intent(out) |
ASPAR, |
|
|
real(rkind), dimension(nx), intent(out) |
B, |
|
|
real(rkind), dimension(nsea), intent(in) |
FX, |
|
|
real(rkind), dimension(nsea), intent(in) |
FY |
|
) |
| |
Setup matrix on FD grids.
- Parameters
-
| [out] | ASPAR | |
| [out] | B | |
| [in] | FX | |
| [in] | FY | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 2540 of file w3wavset.F90.
2600 INTEGER,
SAVE :: IENT = 0
2605 real(rkind),
intent(in) :: FX(NSEA), FY(NSEA)
2606 real(rkind),
intent(out) :: ASPAR(PDLIB_NNZ)
2607 real(rkind),
intent(out) :: B(NX)
2608 INTEGER :: POS_TRICK(3,2), POS_SHIFT(3,3)
2609 integer I1, I2, I3, IP1, IP2, IP3
2610 integer IDX, IDX1, IDX2, IDX3
2611 INTEGER IE, IP, I, J, K, IPp, JPp
2612 real(rkind) :: eDep, eFX, eFY, eScal, eFact, eLen
2613 real(rkind) :: UGRAD, VGRAD, UGRAD1, VGRAD1, dist1, dist2
2614 INTEGER LIDX(2), KIDX(2), jdx
2615 INTEGER ISEAREL, JSEAREL, ISEA, JSEA, IEDGE
2617 CALL strace (ient,
'VA_SETUP_IOBPD')
2625 edep=(
dw(isea) +
dw(jsea))/2.0
2626 efx =(fx(isea) + fx(jsea))/2.0
2627 efy =(fy(isea) + fy(jsea))/2.0
2629 isearel=
edges(iedge,i)
2630 CALL fd_compute_diff(iedge, isearel, ugrad1, vgrad1, dist1)
2631 escal=ugrad1*efx + vgrad1*efy
2632 b(isearel) = b(isearel) + escal*dist1
2635 jsearel=
edges(iedge,j)
2636 CALL fd_compute_diff(iedge, jsearel, ugrad, vgrad, dist2)
2637 escal=ugrad*ugrad1 + vgrad*vgrad1
2638 aspar(j)=aspar(j)+efact*escal
References w3adatmd::dw, w3gdatmd::edges, fd_compute_diff(), w3gdatmd::nbedge, w3gdatmd::nsea, w3gdatmd::nx, w3gdatmd::ny, yownodepool::pdlib_nnz, and w3servmd::strace().
Referenced by fd_wave_setup_computation().
◆ fd_wave_setup_scalar_prod()
| subroutine w3wavset::fd_wave_setup_scalar_prod |
( |
real(rkind), dimension(nx), intent(in) |
V1, |
|
|
real(rkind), dimension(nx), intent(in) |
V2, |
|
|
real(rkind), intent(inout) |
eScal |
|
) |
| |
◆ fd_wave_setup_solve_poisson_neumann_dir()
| subroutine w3wavset::fd_wave_setup_solve_poisson_neumann_dir |
( |
real(rkind), dimension(pdlib_nnz), intent(in) |
ASPAR, |
|
|
real(rkind), dimension(nx), intent(in) |
B, |
|
|
real(rkind), dimension(nx), intent(out) |
TheOut |
|
) |
| |
Poisson solver on FD grids.
- Parameters
-
| [in] | ASPAR | |
| [in] | B | |
| [out] | TheOut | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 2743 of file w3wavset.F90.
2802 INTEGER,
SAVE :: IENT = 0
2807 real(rkind),
intent(in) :: ASPAR(PDLIB_NNZ)
2808 real(rkind),
intent(in) :: B(NX)
2809 real(rkind),
intent(out) :: TheOut(NX)
2810 real(rkind) :: V_X(NX), V_R(NX), V_Z(NX), V_P(NX), V_Y(NX)
2811 real(rkind) :: uO, uN, alphaV, h1, h2
2812 real(rkind) :: eNorm, beta
2813 real(rkind) :: SOLVERTHR
2816 CALL strace (ient,
'VA_SETUP_IOBPD')
2818 solverthr=0.00000001
2822 CALL fd_wave_setup_apply_precond(aspar, v_r, v_z)
2824 CALL fd_wave_setup_scalar_prod(v_z, v_r, uo)
2827 CALL fd_wave_setup_apply_fct(aspar, v_p, v_y)
2828 CALL fd_wave_setup_scalar_prod(v_p, v_y, h2)
2832 v_x(ip) = v_x(ip) + alphav * v_p(ip)
2833 v_r(ip) = v_r(ip) - alphav * v_y(ip)
2836 CALL fd_wave_setup_scalar_prod(v_r, v_r, enorm)
2837 IF (enorm .le. solverthr)
THEN
2841 CALL fd_wave_setup_apply_precond(aspar, v_r, v_z)
2842 CALL fd_wave_setup_scalar_prod(v_z, v_r, un)
2848 v_p(ip)=v_z(ip) + beta * v_p(ip)
References fd_wave_setup_apply_fct(), fd_wave_setup_apply_precond(), fd_wave_setup_scalar_prod(), w3gdatmd::nx, yownodepool::pdlib_nnz, and w3servmd::strace().
Referenced by fd_wave_setup_computation().
◆ preparation_fd_scheme()
| subroutine w3wavset::preparation_fd_scheme |
( |
integer, intent(in) |
IMOD | ) |
|
Wave setup for FD grids.
- Parameters
-
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 1778 of file w3wavset.F90.
1837 INTEGER,
SAVE :: IENT = 0
1842 integer,
intent(in) :: IMOD
1843 integer IN, ISEA, nbEdge
1845 integer NeighMat(4,2)
1846 integer,
allocatable :: STAT_SeaLand(:,:)
1847 integer,
allocatable :: EDGES(:,:)
1848 integer IXN, JXN, JSEA, J
1850 CALL strace (ient,
'VA_SETUP_IOBPD')
1855 allocate(stat_sealand(
nx,
ny))
1860 stat_sealand(ix,iy)=isea
1877 ixn=ix+neighmat(in,1)
1878 jxn=ix+neighmat(in,2)
1879 jsea=stat_sealand(ixn,jxn)
1880 IF (jsea .gt. 0)
THEN
1882 grids(imod)%NEIGH(isea,idx)=jsea
1883 IF (jsea < isea)
THEN
1892 grids(imod)%NBEDGE=nbedge
1893 ALLOCATE(
grids(imod)%EDGES(nbedge,2))
1899 ixn=ix+neighmat(in,1)
1900 jxn=ix+neighmat(in,2)
1901 jsea=stat_sealand(ixn,jxn)
1902 IF (jsea .gt. 0)
THEN
1903 IF (jsea < isea)
THEN
1905 grids(imod)%EDGES(idx,1)=jsea
1906 grids(imod)%EDGES(idx,2)=isea
1919 ixn=ix+neighmat(in,1)
1920 jxn=ix+neighmat(in,2)
1921 jsea=stat_sealand(ixn,jxn)
1922 IF (jsea .gt. 0)
THEN
References w3gdatmd::grids, w3gdatmd::mapsf, w3gdatmd::nsea, w3gdatmd::nx, w3gdatmd::ny, yownodepool::pdlib_i_diag, yownodepool::pdlib_ia, yownodepool::pdlib_ja, yownodepool::pdlib_nnz, and w3servmd::strace().
Referenced by w3initmd::w3init().
◆ trig_compute_diff()
| subroutine w3wavset::trig_compute_diff |
( |
integer, intent(in) |
IE, |
|
|
integer, intent(in) |
I1, |
|
|
real(rkind), intent(inout) |
UGRAD, |
|
|
real(rkind), intent(inout) |
VGRAD |
|
) |
| |
Differentiate other way around.
- Parameters
-
| [in] | IE | |
| [in] | I1 | |
| [in,out] | UGRAD | |
| [in,out] | VGRAD | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 599 of file w3wavset.F90.
658 INTEGER,
SAVE :: IENT = 0
663 INTEGER,
intent(in) :: IE, I1
664 REAL(rkind),
intent(inout) :: UGRAD, VGRAD
666 integer I2, I3, IP1, IP2, IP3
667 INTEGER :: POS_TRICK(3,2)
669 CALL strace (ient,
'VA_SETUP_IOBPD')
683 ugrad=-(
y(ip3) -
y(ip2))/h
684 vgrad= (
x(ip3) -
x(ip2))/h
References yowelementpool::ine, yownodepool::pdlib_tria, w3servmd::strace(), yownodepool::x, and yownodepool::y.
Referenced by trig_wave_setup_compute_system().
◆ trig_compute_lh_stress()
| subroutine w3wavset::trig_compute_lh_stress |
( |
real(rkind), dimension(npa), intent(out) |
F_X, |
|
|
real(rkind), dimension(npa), intent(out) |
F_Y, |
|
|
real(rkind), dimension(npa), intent(out) |
DWNX |
|
) |
| |
Setup boundary pointer.
- Parameters
-
| [out] | F_X | |
| [out] | F_Y | |
| [out] | DWNX | |
- Author
- Aron Roland
-
Mathieu Dutour-Sikiric
- Date
- 1-May-2018
Definition at line 449 of file w3wavset.F90.
514 INTEGER,
SAVE :: IENT = 0
519 real(rkind),
intent(out) :: F_X(npa), F_Y(npa), DWNX(npa)
521 REAL(rkind) :: SXX_X, SXX_Y
522 REAL(rkind) :: SXY_X, SXY_Y
523 REAL(rkind) :: SYY_X, SYY_Y
526 real(rkind) :: U_X1(npa), U_Y1(npa)
527 real(rkind) :: U_X2(npa), U_Y2(npa)
528 real(rkind) :: SXX_p(npa), SXY_p(npa), SYY_p(npa)
529 real(rkind) :: eSXX, eSXY, eSYY
530 integer :: SXXmethod = 1
532 CALL strace (ient,
'VA_SETUP_IOBPD')
542 IF (sxxmethod .eq. 1)
THEN
554 WRITE(740+
iaproc,*)
'min/max(DEP)=', minval(dwnx), maxval(dwnx)
555 WRITE(740+
iaproc,*)
'sum(abs(SXX))=', sum(abs(sxx_p))
556 WRITE(740+
iaproc,*)
'sum(abs(SXY))=', sum(abs(sxy_p))
557 WRITE(740+
iaproc,*)
'sum(abs(SYY))=', sum(abs(syy_p))
561 CALL differentiate_xydir(sxx_p, u_x1, u_y1)
563 WRITE(740+
iaproc,*)
'sum(absU_XY1)=', sum(abs(u_x1)), sum(abs(u_y1))
566 CALL differentiate_xydir(sxy_p, u_x2, u_y2)
568 WRITE(740+
iaproc,*)
'sum(absU_XY2)=', sum(abs(u_x2)), sum(abs(u_y2))
573 CALL differentiate_xydir(syy_p, u_x1, u_y1)
575 WRITE(740+
iaproc,*)
'sum(absU_XY1)=', sum(abs(u_x1)), sum(abs(u_y1))
580 WRITE(740+
iaproc,*)
'sum(F_X)=', sum(f_x)
581 WRITE(740+
iaproc,*)
'sum(F_Y)=', sum(f_y)
References w3adatmd::cg, differentiate_xydir(), w3adatmd::dw, constants::dwat, constants::grav, w3odatmd::iaproc, w3parall::init_get_isea(), yownodepool::iplg, w3gdatmd::mapfs, w3gdatmd::mapsta, yownodepool::npa, w3gdatmd::nseal, w3servmd::strace(), w3adatmd::sxx, w3adatmd::sxy, w3adatmd::syy, and w3adatmd::wn.
Referenced by trig_wave_setup_computation().
◆ trig_set_meanvalue_to_zero()
| subroutine w3wavset::trig_set_meanvalue_to_zero |
( |
real(rkind), dimension(npa), intent(inout) |
TheVar | ) |
|
Set mean value.
- Parameters
-
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 1380 of file w3wavset.F90.
1435 USE mpi,
only : mpi_sum
1445 INTEGER,
SAVE :: IENT = 0
1450 real(rkind),
intent(inout) :: TheVar(npa)
1451 real(rkind) :: SUM_SI_Var, SUM_SI, TheMean
1453 real(rkind) :: eVect_loc(2), eVect_gl(2)
1456 CALL strace (ient,
'VA_SETUP_IOBPD')
1461 sum_si_var = sum_si_var + pdlib_si(ip)*thevar(ip)
1462 sum_si = sum_si + pdlib_si(ip)
1464 evect_loc(1)=sum_si_var
1467 WRITE(740+
iaproc,*)
'SUM_SI_Var=', sum_si_var,
'SUM_SI=', sum_si
1471 sum_si_var=evect_gl(1)
1473 themean=sum_si_var/sum_si
1475 WRITE(740+
iaproc,*)
'TheMean=', themean
1479 thevar(ip)=thevar(ip) - themean
References w3odatmd::iaproc, yowdatapool::istatus, w3adatmd::mpi_comm_wcmp, w3odatmd::naproc, yownodepool::np, yownodepool::npa, w3gdatmd::nseal, w3odatmd::ntproc, w3gdatmd::nx, yownodepool::pdlib_si, yowdatapool::rtype, w3gdatmd::si, and w3servmd::strace().
Referenced by trig_wave_setup_computation().
◆ trig_wave_setup_apply_fct()
| subroutine w3wavset::trig_wave_setup_apply_fct |
( |
real(rkind), dimension(pdlib_nnz), intent(in) |
ASPAR, |
|
|
real(rkind), dimension(npa), intent(in) |
TheIn, |
|
|
real(rkind), dimension(npa), intent(out) |
TheOut, |
|
|
integer, dimension(npa), intent(in) |
ACTIVE, |
|
|
integer, dimension(npa), intent(in) |
ACTIVESEC |
|
) |
| |
- Parameters
-
| [in] | ASPAR | |
| [in] | TheIn | |
| [out] | TheOut | |
| [in] | ACTIVE | |
| [in] | ACTIVESEC | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 1021 of file w3wavset.F90.
1082 INTEGER,
SAVE :: IENT = 0
1087 REAL(rkind),
intent(in) :: ASPAR(PDLIB_NNZ)
1088 REAL(rkind),
intent(in) :: TheIn(npa)
1089 REAL(rkind),
intent(out) :: TheOut(npa)
1090 INTEGER,
intent(in) :: ACTIVE(npa), ACTIVESEC(npa)
1092 REAL(rkind) :: eCoeff
1094 CALL strace (ient,
'VA_SETUP_IOBPD')
1098 IF (activesec(ip) .eq. 1)
THEN
1099 DO j=pdlib_ia(ip),pdlib_ia(ip+1)-1
1102 theout(ip)=theout(ip) + ecoeff*thein(jp)
References yownodepool::np, yownodepool::npa, w3gdatmd::nseal, yowexchangemodule::pdlib_exchange1dreal(), yownodepool::pdlib_ia, yownodepool::pdlib_ja, yownodepool::pdlib_nnz, and w3servmd::strace().
Referenced by trig_wave_setup_solve_poisson_neumann_dir().
◆ trig_wave_setup_apply_precond()
| subroutine w3wavset::trig_wave_setup_apply_precond |
( |
real(rkind), dimension(pdlib_nnz), intent(in) |
ASPAR, |
|
|
real(rkind), dimension(npa), intent(in) |
TheIn, |
|
|
real(rkind), dimension(npa), intent(out) |
TheOut, |
|
|
integer, dimension(npa), intent(in) |
ACTIVE, |
|
|
integer, dimension(npa), intent(in) |
ACTIVESEC |
|
) |
| |
Preconditioner.
- Parameters
-
| [in] | ASPAR | |
| [in] | TheIn | |
| [out] | TheOut | |
| [in] | ACTIVE | |
| [in] | ACTIVESEC | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 893 of file w3wavset.F90.
956 INTEGER,
SAVE :: IENT = 0
961 REAL(rkind),
intent(in) :: ASPAR(PDLIB_NNZ)
962 REAL(rkind),
intent(in) :: TheIn(npa)
963 REAL(rkind),
intent(out) :: TheOut(npa)
964 INTEGER,
intent(IN) :: ACTIVE(npa), ACTIVESEC(npa)
965 integer IP, J1, J, JP, J2
966 REAL(rkind) :: eCoeff
967 INTEGER :: ThePrecond = 2
969 CALL strace (ient,
'VA_SETUP_IOBPD')
971 IF (theprecond .eq. 0)
THEN
974 IF (theprecond .eq. 1)
THEN
977 IF (active(ip) .eq. 1)
THEN
979 DO j=pdlib_ia(ip),pdlib_ia(ip+1)-1
981 IF (activesec(jp) .eq. 1)
THEN
986 ecoeff=-aspar(j) /(aspar(j1)*aspar(j2))
988 theout(ip)=theout(ip) + ecoeff*thein(jp)
994 IF (theprecond .eq. 2)
THEN
996 IF (activesec(ip) .eq. 1)
THEN
998 theout(ip)=thein(ip)/aspar(j)
1000 theout(ip)=thein(ip)
References w3odatmd::iaproc, yownodepool::iplg, yownodepool::npa, yowexchangemodule::pdlib_exchange1dreal(), yownodepool::pdlib_i_diag, yownodepool::pdlib_ia, yownodepool::pdlib_ja, yownodepool::pdlib_nnz, and w3servmd::strace().
Referenced by trig_wave_setup_solve_poisson_neumann_dir().
◆ trig_wave_setup_computation()
| subroutine w3wavset::trig_wave_setup_computation |
Setup computation.
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 1598 of file w3wavset.F90.
1664 INTEGER,
SAVE :: IENT = 0
1671 REAL(rkind) :: ZETA_WORK(npa)
1672 REAL(rkind) :: ZETA_WORK_ALL(NX)
1673 REAL(rkind) :: F_X(npa), F_Y(npa), DWNX(npa)
1674 REAL(rkind) :: ASPAR(PDLIB_NNZ), B(npa)
1675 INTEGER I, ISEA, JSEA, IX, IP, IP_glob
1676 INTEGER :: ACTIVE(npa), ACTIVESEC(npa)
1677 REAL(rkind) max_val, min_val
1679 CALL strace (ient,
'VA_SETUP_IOBPD')
1693 IF (isea .gt. 0)
THEN
1698 WRITE(740+
iaproc,*)
'Before TRIG_COMPUTE_LH_STRESS'
1702 CALL trig_compute_lh_stress(f_x, f_y, dwnx)
1704 WRITE(740+
iaproc,*)
'After TRIG_COMPUTE_LH_STRESS'
1707 CALL compute_active_node(dwnx, active)
1709 WRITE(740+
iaproc,*)
'After COMPUTE_ACTIVE_NODE'
1712 CALL trig_wave_setup_compute_system(aspar, b, f_x, f_y, dwnx, active, activesec)
1714 WRITE(740+
iaproc,*)
'Before,B,min=', minval(b),
' max=', maxval(b)
1721 WRITE(740+
iaproc,*)
'After,B,min=', minval(b),
' max=', maxval(b)
1726 CALL trig_wave_setup_solve_poisson_neumann_dir(aspar, b, zeta_work, active, activesec)
1728 CALL trig_set_meanvalue_to_zero(zeta_work)
1730 WRITE(740+
iaproc,*)
'After SET_MEAN ZETA_WORK(min/max)=', minval(zeta_work), maxval(zeta_work)
1734 max_val = -100000000
1735 min_val = -100000000
1739 IF (isea .gt. 0)
THEN
1741 max_val = max(max_val, zeta_work(ip))
1742 min_val = max(min_val, zeta_work(ip))
1746 WRITE(740+
iaproc,*)
'TRIG_WAVE_SETUP_COMPUTATION, max/min=', max_val, min_val
1752 zeta_work_all(isea) = zeta_work(ip)
1754 CALL synchronize_global_array(zeta_work_all)
1760 write(6666) (zeta_work_all(ix), zeta_work_all(ix), zeta_work_all(ix), ix = 1,
nx)
1763 WRITE(740+
iaproc,*)
'Now exiting TRIG_WAVE_SETUP_COMPUTATION'
References compute_active_node(), w3adatmd::dw, w3odatmd::iaproc, w3parall::init_get_isea(), yownodepool::iplg, w3gdatmd::mapfs, w3odatmd::naproc, yownodepool::np, yownodepool::npa, w3gdatmd::nsea, w3gdatmd::nseal, w3odatmd::ntproc, w3gdatmd::nx, yowexchangemodule::pdlib_exchange1dreal(), yownodepool::pdlib_ia, yownodepool::pdlib_ja, yownodepool::pdlib_nnz, w3servmd::strace(), w3parall::synchronize_global_array(), trig_compute_lh_stress(), trig_set_meanvalue_to_zero(), trig_wave_setup_compute_system(), trig_wave_setup_solve_poisson_neumann_dir(), and w3wdatmd::zeta_setup.
Referenced by wave_setup_computation().
◆ trig_wave_setup_compute_system()
| subroutine w3wavset::trig_wave_setup_compute_system |
( |
real(rkind), dimension(pdlib_nnz), intent(out) |
ASPAR, |
|
|
real(rkind), dimension(npa), intent(out) |
B, |
|
|
real(rkind), dimension(npa), intent(in) |
FX, |
|
|
real(rkind), dimension(npa), intent(in) |
FY, |
|
|
real(rkind), dimension(npa), intent(in) |
DWNX, |
|
|
integer, dimension(npa), intent(in) |
ACTIVE, |
|
|
integer, dimension(npa), intent(out) |
ACTIVESEC |
|
) |
| |
Setup system matrix for solutions of wave setup eq.
- Parameters
-
| [in] | FX | |
| [in] | FY | |
| [in] | DWNX | |
| [out] | ASPAR | |
| [out] | B | |
| [in] | ACTIVE | |
| [out] | ACTIVESEC | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 703 of file w3wavset.F90.
765 INTEGER,
SAVE :: IENT = 0
770 real(rkind),
intent(in) :: FX(npa), FY(npa), DWNX(npa)
771 real(rkind),
intent(out) :: ASPAR(PDLIB_NNZ)
772 real(rkind),
intent(out) :: B(npa)
773 integer,
intent(in) :: ACTIVE(npa)
774 integer,
intent(out) :: ACTIVESEC(npa)
775 INTEGER :: POS_TRICK(3,2), POS_SHIFT(3,3)
776 integer I1, I2, I3, IP1, IP2, IP3
777 integer IDX, IDX1, IDX2, IDX3
778 INTEGER IE, IP, I, J, K, IPp, JPp
779 real(rkind) :: eDep, eFX, eFY, eScal, eFact, eArea
780 real(rkind) :: UGRAD, VGRAD, UGRAD1, VGRAD1
784 INTEGER LIDX(2), KIDX(2), jdx
785 INTEGER IPglob1, IPglob2, IPglob3
787 REAL(rkind) :: ListDiag(npa)
790 CALL strace (ient,
'VA_SETUP_IOBPD')
822 pos_shift(i,lidx(1))=kidx(2)
823 pos_shift(i,lidx(2))=kidx(1)
830 efx =(fx(ip1) + fx(ip2) + fx(ip3))/3
831 efy =(fy(ip1) + fy(ip2) + fy(ip3))/3
832 sumactive=active(ip1) + active(ip2) + active(ip3)
833 IF (sumactive .eq. 3)
THEN
837 edep=(dwnx(ip1) + dwnx(ip2) + dwnx(ip3))/3.0
846 idx1=pdlib_ja_ie(i1,1,ie)
847 idx2=pdlib_ja_ie(i1,2,ie)
848 idx3=pdlib_ja_ie(i1,3,ie)
849 CALL trig_compute_diff(ie, i1, ugrad1, vgrad1)
850 escal=ugrad1*efx + vgrad1*efy
851 b(ip1) = b(ip1) + escal*earea
855 CALL trig_compute_diff(ie, k, ugrad, vgrad)
856 escal=ugrad*ugrad1 + vgrad*vgrad1
857 j=pdlib_ja_ie(i1,idx,ie)
858 aspar(j)=aspar(j) + efact*escal
864 IF (doprintout .eqv. .true.)
THEN
872 listdiag(ip)=aspar(j)
874 WRITE(740+
iaproc,*)
'Diag, min=', minval(listdiag),
' max=', maxval(listdiag)
875 WRITE(740+
iaproc,*)
'Diag, quot=', maxval(listdiag)/minval(listdiag)
References w3odatmd::iaproc, yowelementpool::ine, yownodepool::iplg, yowelementpool::ne, yownodepool::np, yownodepool::npa, yownodepool::pdlib_i_diag, yownodepool::pdlib_ja_ie, yownodepool::pdlib_nnz, yownodepool::pdlib_tria, w3servmd::strace(), and trig_compute_diff().
Referenced by trig_wave_setup_computation().
◆ trig_wave_setup_scalar_prod()
| subroutine w3wavset::trig_wave_setup_scalar_prod |
( |
real(rkind), dimension(npa), intent(in) |
V1, |
|
|
real(rkind), dimension(npa), intent(in) |
V2, |
|
|
real(rkind), intent(inout) |
eScal |
|
) |
| |
Scalar product plus exchange.
- Parameters
-
| [in] | V1 | |
| [in] | V2 | |
| [in,out] | eScal | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 1121 of file w3wavset.F90.
1175 USE mpi,
only : mpi_sum
1185 INTEGER,
SAVE :: IENT = 0
1190 real(rkind),
intent(in) :: V1(npa), V2(npa)
1191 real(rkind),
intent(inout) :: eScal
1193 real(rkind) :: lScal_loc(1), lScal_gl(1)
1196 CALL strace (ient,
'VA_SETUP_IOBPD')
1200 lscal_loc(1) = lscal_loc(1) + v1(ip)*v2(ip)
References w3odatmd::iaproc, yowdatapool::istatus, w3adatmd::mpi_comm_wcmp, w3odatmd::naproc, yownodepool::np, yownodepool::npa, w3gdatmd::nseal, w3odatmd::ntproc, w3gdatmd::nx, yowdatapool::rtype, and w3servmd::strace().
Referenced by trig_wave_setup_solve_poisson_neumann_dir().
◆ trig_wave_setup_solve_poisson_neumann_dir()
| subroutine w3wavset::trig_wave_setup_solve_poisson_neumann_dir |
( |
real(rkind), dimension(pdlib_nnz), intent(in) |
ASPAR, |
|
|
real(rkind), dimension(npa), intent(in) |
B, |
|
|
real(rkind), dimension(npa), intent(out) |
TheOut, |
|
|
integer, dimension(npa), intent(in) |
ACTIVE, |
|
|
integer, dimension(npa), intent(in) |
ACTIVESEC |
|
) |
| |
Poisson equation solver.
- Parameters
-
| [in] | ASPAR | |
| [in] | B | |
| [out] | TheOut | |
| [in] | ACTIVE | |
| [in] | ACTIVESEC | |
- Author
- Mathieu Dutour-Sikiric
-
Aron Roland
- Date
- 1-May-2018
Definition at line 1220 of file w3wavset.F90.
1281 INTEGER,
SAVE :: IENT = 0
1286 real(rkind),
intent(in) :: ASPAR(PDLIB_NNZ)
1287 real(rkind),
intent(in) :: B(npa)
1288 real(rkind),
intent(out) :: TheOut(npa)
1289 integer,
intent(in) :: ACTIVE(npa), ACTIVESEC(npa)
1290 real(rkind) :: V_X(npa), V_R(npa), V_Z(npa), V_P(npa), V_Y(npa)
1291 real(rkind) :: uO, uN, alphaV, h1, h2
1292 real(rkind) :: eNorm, beta
1293 real(rkind) :: SOLVERTHR
1296 CALL strace (ient,
'VA_SETUP_IOBPD')
1301 WRITE(740+
iaproc,*)
'Begin TRIG_WAVE_SETUP_SOLVE ....'
1307 CALL trig_wave_setup_apply_precond(aspar, v_r, v_z, active, activesec)
1309 CALL trig_wave_setup_scalar_prod(v_z, v_r, uo)
1311 WRITE(740+
iaproc,*)
'uO=', uo
1314 CALL trig_wave_setup_scalar_prod(b, b, enorm)
1316 WRITE(740+
iaproc,*)
'eNorm(B)=', enorm
1317 WRITE(740+
iaproc,*)
'SOLVERTHR=', solverthr
1318 WRITE(740+
iaproc,*)
'SOLVERTHR=', solverthr,
' eNorm(B)=', enorm
1321 IF (enorm .le. solverthr)
THEN
1323 WRITE(740+
iaproc,*)
'Leaving here, zero solution'
1331 CALL trig_wave_setup_apply_fct(aspar, v_p, v_y, active, activesec)
1332 CALL trig_wave_setup_scalar_prod(v_p, v_y, h2)
1336 v_x(ip) = v_x(ip) + alphav * v_p(ip)
1337 v_r(ip) = v_r(ip) - alphav * v_y(ip)
1340 CALL trig_wave_setup_scalar_prod(v_r, v_r, enorm)
1342 WRITE(740+
iaproc,*)
'nbIter=', nbiter,
' eNorm(res)=', enorm
1345 IF (enorm .le. solverthr)
THEN
1349 CALL trig_wave_setup_apply_precond(aspar, v_r, v_z, active, activesec)
1350 CALL trig_wave_setup_scalar_prod(v_z, v_r, un)
1355 WRITE(740+
iaproc,*)
' beta=', beta,
' uN=', un,
' alphaV=', alphav,
' h2=', h2
1360 v_p(ip)=v_z(ip) + beta * v_p(ip)
1365 WRITE(740+
iaproc,*)
'TRIG_WAVE_SETUP_SOLVE_POISSON_NEUMANN_DIR, max/min=', maxval(theout), minval(theout)
References w3odatmd::iaproc, yownodepool::np, yownodepool::npa, w3gdatmd::nseal, yownodepool::pdlib_nnz, w3gdatmd::solverthr_stp, w3servmd::strace(), trig_wave_setup_apply_fct(), trig_wave_setup_apply_precond(), and trig_wave_setup_scalar_prod().
Referenced by trig_wave_setup_computation().
◆ wave_setup_computation()
| subroutine w3wavset::wave_setup_computation |
General driver.
- Author
- Aron Roland
-
Mathieu Dutour-Sikiric
- Date
- 1-May-2018
Definition at line 3075 of file w3wavset.F90.
3135 INTEGER,
SAVE :: IENT = 0
3141 REAL(rkind),
allocatable :: ZETA_WORK(:)
3143 CALL strace (ient,
'VA_SETUP_IOBPD')
3152 WRITE(740+
iaproc,*)
'Begin WAVE_SETUP_COMPUTATION'
3155 IF (do_wave_setup)
THEN
3157 CALL trig_wave_setup_computation
3159 CALL fd_wave_setup_computation
3164 WRITE(740+
iaproc,*)
'End WAVE_SETUP_COMPUTATION'
References do_wave_setup, fd_wave_setup_computation(), w3gdatmd::gtype, w3odatmd::iaproc, w3odatmd::naproc, w3gdatmd::nsea, w3gdatmd::nseal, w3odatmd::ntproc, w3servmd::strace(), trig_wave_setup_computation(), and w3gdatmd::ungtype.
Referenced by w3wavemd::w3wave().
◆ do_wave_setup
| logical w3wavset::do_wave_setup = .TRUE. |
◆ ient
| integer, save w3wavset::ient = 0 |
Definition at line 85 of file w3wavset.F90.
85 INTEGER,
SAVE :: IENT = 0
integer, dimension(:), pointer iaa
integer, dimension(:), allocatable, target, public pdlib_ia
subroutine, public pdlib_exchange1dreal(U)
exchange values in U.
double precision, dimension(:,:), pointer ygrd
Define data structures to set up wave model auxiliary data for several models simultaneously.
integer, parameter ungtype
Define data structures to set up wave model dynamic data for several models simultaneously.
real, dimension(:,:), pointer cg
integer, dimension(:,:), pointer neigh
integer, dimension(:), allocatable, target, public pdlib_i_diag
integer, dimension(:,:), pointer edges
real, dimension(:), pointer dw
double precision, dimension(:,:), pointer xgrd
type(grid), dimension(:), allocatable, target grids
integer, dimension(:), allocatable, public iplg
Node local to global mapping.
integer, public npa
number of ghost + resident nodes this partition holds
real(8), pointer crit_dep_stp
real(8), pointer solverthr_stp
real(rkind), dimension(:), allocatable, target, public pdlib_si
integer, public ne
number of local elements
integer, dimension(:,:), pointer mapfs
real(rkind), dimension(:), allocatable, target, public y
integer, dimension(:,:,:), allocatable, target, public pdlib_ja_ie
Has data that belong to nodes.
real(rkind), dimension(:), allocatable, target, public x
coordinates of the local + ghost nodes.
integer, dimension(:), allocatable, target, public pdlib_ja
subroutine synchronize_global_array(TheVar)
Sync global array in context of PDLIB.
real, dimension(:), pointer sxy
real, parameter dwat
DWAT Density of water (kg/m3).
integer, dimension(:,:), pointer mapsf
integer, public np
number of nodes, local
integer, dimension(mpi_status_size) istatus
MPI Real Type Shpuld be MPI_REAL8.
Has only the ghost nodes assign to a neighbor domain.
real, dimension(:,:), pointer wn
integer, dimension(:), pointer jaa
integer, dimension(:,:), allocatable, target, public ine
number of elements of the augmented domain
subroutine strace(IENT, SNAME)
real, dimension(:), pointer zeta_setup
real(rkind), dimension(:), allocatable, target, public pdlib_tria
real(8), dimension(:), pointer si
Define some much-used constants for global use (all defined as PARAMETER).
real(rkind), dimension(:,:), allocatable, target, public pdlib_ien
Parallel routines for implicit solver.
integer, dimension(:,:), pointer mapsta
real, parameter grav
GRAV Acc.
integer, public pdlib_nnz
subroutine init_get_isea(ISEA, JSEA)
Set ISEA for all schemes.
real, dimension(:), pointer syy
real, dimension(:), pointer sxx
integer, pointer mpi_comm_wcmp