45 use,
intrinsic :: iso_c_binding
62 real(kind=
rp) :: sx,sy,sz
63 real(kind=
rp),
parameter :: tol = 1d-3
70 call this%bc_x%init(this%coef)
71 call this%bc_y%init(this%coef)
72 call this%bc_z%init(this%coef)
74 associate(c=>this%coef, nx => this%coef%nx, ny => this%coef%ny, &
76 bfp => this%marked_facet%array()
77 do i = 1, this%marked_facet%size()
88 sx = sx + abs(abs(nx(l, j, facet, el)) - 1d0)
89 sy = sy + abs(abs(ny(l, j, facet, el)) - 1d0)
90 sz = sz + abs(abs(nz(l, j, facet, el)) - 1d0)
96 sx = sx + abs(abs(nx(l, j, facet, el)) - 1d0)
97 sy = sy + abs(abs(ny(l, j, facet, el)) - 1d0)
98 sz = sz + abs(abs(nz(l, j, facet, el)) - 1d0)
102 do l = 2, c%Xh%lx - 1
103 do j = 2, c%Xh%lx - 1
104 sx = sx + abs(abs(nx(l, j, facet, el)) - 1d0)
105 sy = sy + abs(abs(ny(l, j, facet, el)) - 1d0)
106 sz = sz + abs(abs(nz(l, j, facet, el)) - 1d0)
110 sx = sx / (c%Xh%lx - 2)**2
111 sy = sy / (c%Xh%lx - 2)**2
112 sz = sz / (c%Xh%lx - 2)**2
114 if (sx .lt. tol)
then
115 call this%bc_y%mark_facet(facet, el)
116 call this%bc_z%mark_facet(facet, el)
119 if (sy .lt. tol)
then
120 call this%bc_x%mark_facet(facet, el)
121 call this%bc_z%mark_facet(facet, el)
124 if (sz .lt. tol)
then
125 call this%bc_y%mark_facet(facet, el)
126 call this%bc_x%mark_facet(facet, el)
130 call this%bc_x%finalize()
131 call this%bc_x%set_g(0.0_rp)
132 call this%bc_y%finalize()
133 call this%bc_y%set_g(0.0_rp)
134 call this%bc_z%finalize()
135 call this%bc_z%set_g(0.0_rp)
142 call this%bc_x%free()
143 call this%bc_y%free()
144 call this%bc_z%free()
Device abstraction, common interface for various accelerators.
Defines a dirichlet boundary condition.
Dirichlet condition on axis aligned plane in the non normal direction.
subroutine non_normal_init_msk(this)
Initialize symmetry mask for each axis.
subroutine non_normal_free(this)
integer, parameter, public rp
Global precision used in computations.
Implements a dynamic stack ADT.
Mixed Dirichlet-Neumann axis aligned symmetry plane.
Dirichlet condition in non normal direction of a plane.
Mixed Dirichlet-Neumann symmetry plane condition.