SPEED
MAKE_BOUNDARY_CONDITIONS.f90
Go to the documentation of this file.
1! Copyright (C) 2012 The SPEED FOUNDATION
2! Author: Ilario Mazzieri
3!
4! This file is part of SPEED.
5!
6! SPEED is free software; you can redistribute it and/or modify it
7! under the terms of the GNU Affero General Public License as
8! published by the Free Software Foundation, either version 3 of the
9! License, or (at your option) any later version.
10!
11! SPEED is distributed in the hope that it will be useful, but
12! WITHOUT ANY WARRANTY; without even the implied warranty of
13! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14! Affero General Public License for more details.
15!
16! You should have received a copy of the GNU Affero General Public License
17! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
19
24
25 subroutine make_boundary_conditions()
26
27
28 use max_var
29 use speed_par
30
31
32 implicit none
33
34 include 'SPEED.MPI'
35
36!*****************************************************************************************
37! SETUP DIRICHELET BOUNDARY CONDITIONS
38!*****************************************************************************************
39
40 if (mpi_id.eq.0) write(*,'(A)')
41 if (mpi_id.eq.0) write(*,'(A)')'---------------Setup boundary conditions---------------'
42
43 allocate(i4count(nnod_loc))
44 i4count = 0
45 nnode_dirx = 0
46
49
50 if(nnode_dirx .gt. 0) then
51 allocate(inode_dirx(nnode_dirx))
52 i = 1
53 do in = 1, nnod_loc
54 if (i4count(in) .ne. 0) then
55 inode_dirx(i) = in
56 i = i + 1
57 endif
58 enddo
59 endif
60
61 i4count = 0
62 nnode_diry = 0
63
66
67 if(nnode_diry .gt. 0) then
68 allocate(inode_diry(nnode_diry))
69 i = 1
70 do in = 1, nnod_loc
71 if (i4count(in) .ne. 0) then
72 inode_diry(i) = in
73 i = i + 1
74 endif
75 enddo
76 endif
77
78
79 i4count = 0
80 nnode_dirz = 0
81
84
85 if(nnode_dirz .gt. 0) then
86 allocate(inode_dirz(nnode_dirz))
87 i = 1
88 do in = 1, nnod_loc
89 if (i4count(in) .ne. 0) then
90 inode_dirz(i) = in
91 i = i + 1
92 endif
93 enddo
94 endif
95
96 deallocate(i4count)
97
98
99!*****************************************************************************************
100! SETUP ABC BOUNDARY CONDITIONS
101!*****************************************************************************************
102
103 nelem_abc = 0
104 nnode_abc = 0
105 allocate(i4count(nnod_loc))
106 i4count = 0
107
108
111
112
116
117 if(nelem_abc .gt. 0) then
118 allocate(ielem_abc(nelem_abc,7))
119
123
124 endif
125
126
127 deallocate(i4count)
128
129 if (mpi_id.eq.0) write(*,'(A)')'Made.'
130 if (mpi_id.eq.0) write(*,'(A)')
131
132
133
134
135 end subroutine make_boundary_conditions
subroutine get_dime_abc(nm, sd, tag_mat, cs_nnz_loc, cs_loc, nn_loc, local_n_num, nel_abc, i4count)
Computes local number of quads where ABC conditions are imposed.
subroutine get_node_from_face(nb_nodes, nb_nz, con_spc, nb_load, l
Computes total number of boundary nodes and second derivative on a given point x.
subroutine setup_abc(nm, sd, tag_mat, cs_nnz_loc, cs_loc, nn_loc, local_n_num, ne_loc, local_el_num, nel_abc, ielem_abc, i4count)
Setup for ABC faces.
Definition SETUP_ABC.f90:54
Set maximal bounds.
Definition MODULES.f90:54
Contains SPEED PARAMETERS used in (SPEED, READ_INPUT_FILES, MAKE_PARTION_AND_MPI_FILES,...
Definition MODULES.f90:207
integer *4 nnode_abc
Definition MODULES.f90:269
integer *4 nload_dirz_el
Definition MODULES.f90:269
integer *4 nmat
Definition MODULES.f90:269
integer *4, dimension(:), allocatable tag_abc_el
Definition MODULES.f90:335
integer *4, dimension(:), allocatable local_el_num
Definition MODULES.f90:322
integer *4, dimension(:), allocatable i4count
Definition MODULES.f90:375
integer *4 con_nnz_bc_loc
Definition MODULES.f90:269
integer *4, dimension(:), allocatable inode_dirx
Definition MODULES.f90:322
integer *4 con_nnz_loc
Definition MODULES.f90:269
integer *4 in
Definition MODULES.f90:263
integer *4 nnode_dirz
Definition MODULES.f90:269
integer *4 nnode_diry
Definition MODULES.f90:269
integer *4 i
Definition MODULES.f90:263
integer *4 nnode_dirx
Definition MODULES.f90:269
integer *4, dimension(:), allocatable con_spx_bc_loc
Definition MODULES.f90:322
integer *4, dimension(:), allocatable tag_diry_el
Definition MODULES.f90:335
integer *4 nload_abc_el
Definition MODULES.f90:269
integer *4, dimension(:), allocatable tag_dirz_el
Definition MODULES.f90:335
integer *4, dimension(:), allocatable local_node_num
Definition MODULES.f90:322
integer *4 nload_dirx_el
Definition MODULES.f90:269
integer *4, dimension(:), allocatable inode_dirz
Definition MODULES.f90:322
integer *4, dimension(:), allocatable sdeg_mat
Definition MODULES.f90:335
integer *4 nelem_loc
Definition MODULES.f90:269
integer *4, dimension(:), allocatable con_spx_loc
Definition MODULES.f90:322
integer *4 nload_diry_el
Definition MODULES.f90:269
integer *4, dimension(:), allocatable tag_mat
Definition MODULES.f90:335
integer *4, dimension(:), allocatable inode_diry
Definition MODULES.f90:322
integer *4 mpi_id
Definition MODULES.f90:308
integer *4, dimension(:,:), allocatable ielem_abc
Definition MODULES.f90:383
integer *4 nelem_abc
Definition MODULES.f90:269
integer *4 nnod_loc
Definition MODULES.f90:269
integer *4, dimension(:), allocatable tag_dirx_el
Definition MODULES.f90:335