39 use,
intrinsic :: iso_c_binding
57 type(
coef_t),
target,
intent(in) :: coef
60 real(kind=
rp) :: sx, sy, sz
61 real(kind=
rp),
parameter :: tol = 1d-3
68 call this%bc_x%init_base(this%coef)
69 call this%bc_y%init_base(this%coef)
70 call this%bc_z%init_base(this%coef)
72 associate(c => this%coef, nx => this%coef%nx, ny => this%coef%ny, &
74 bfp => this%marked_facet%array()
75 do i = 1, this%marked_facet%size()
86 sx = sx + abs(abs(nx(l, j, facet, el)) - 1d0)
87 sy = sy + abs(abs(ny(l, j, facet, el)) - 1d0)
88 sz = sz + abs(abs(nz(l, j, facet, el)) - 1d0)
94 sx = sx + abs(abs(nx(l, j, facet, el)) - 1d0)
95 sy = sy + abs(abs(ny(l, j, facet, el)) - 1d0)
96 sz = sz + abs(abs(nz(l, j, facet, el)) - 1d0)
100 do l = 2, c%Xh%lx - 1
101 do j = 2, c%Xh%lx - 1
102 sx = sx + abs(abs(nx(l, j, facet, el)) - 1d0)
103 sy = sy + abs(abs(ny(l, j, facet, el)) - 1d0)
104 sz = sz + abs(abs(nz(l, j, facet, el)) - 1d0)
108 sx = sx / (c%Xh%lx - 2)**2
109 sy = sy / (c%Xh%lx - 2)**2
110 sz = sz / (c%Xh%lx - 2)**2
112 if (sx .lt. tol)
then
113 call this%bc_y%mark_facet(facet, el)
114 call this%bc_z%mark_facet(facet, el)
117 if (sy .lt. tol)
then
118 call this%bc_x%mark_facet(facet, el)
119 call this%bc_z%mark_facet(facet, el)
122 if (sz .lt. tol)
then
123 call this%bc_y%mark_facet(facet, el)
124 call this%bc_x%mark_facet(facet, el)
128 call this%bc_x%finalize()
129 call this%bc_x%set_g(0.0_rp)
130 call this%bc_y%finalize()
131 call this%bc_y%set_g(0.0_rp)
132 call this%bc_z%finalize()
133 call this%bc_z%set_g(0.0_rp)
140 call this%symmetry_t%free()
Dirichlet condition on axis aligned plane in the non normal direction.
subroutine non_normal_init(this, coef)
Constructor.
subroutine non_normal_free(this)
Destructor.
integer, parameter, public rp
Global precision used in computations.
Mixed Dirichlet-Neumann axis aligned symmetry plane.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Dirichlet condition in non normal direction of a plane.
Mixed Dirichlet-Neumann symmetry plane condition.