SPEED
GET_NODE_FROM_FACE.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
32
33 subroutine get_node_from_face(nb_nodes, nb_nz, con_spc, nb_load, lab_bc,&
34 nb_nodes_face_total, node_indicator, local_n_num)
35
36 implicit none
37
38 integer*4 :: nb_nodes,nb_nz,nb_load
39 integer*4 :: nb_nodes_face_total
40 integer*4 :: i,j,ie, nb_el, nb_nodes_face, cek_el
41
42 integer*4, dimension(0:nb_nz) :: con_spc
43 integer*4, dimension(nb_load) :: lab_bc
44 integer*4, dimension(nb_nodes) :: node_indicator, local_n_num
45
46
47 node_indicator = 0
48 nb_nodes_face_total = 0
49 nb_el = con_spc(0) - 1
50
51 if (nb_nz .gt. 0) then
52
53 do ie = 1,nb_el
54 nb_nodes_face = con_spc(ie) - con_spc(ie -1) -1
55
56 cek_el = 0
57 do j = 1,nb_load
58 if (con_spc(con_spc(ie -1)) .eq. lab_bc(j)) cek_el = 1
59 enddo
60
61 if (cek_el .ne. 0) then
62 do i = 1, nb_nodes_face
63 node_indicator(con_spc(con_spc(ie -1) +i)) = 1
64 enddo
65 endif
66 enddo
67
68 do i = 1,nb_nodes
69 if (node_indicator(i) .ne. 0) nb_nodes_face_total = nb_nodes_face_total + 1
70 enddo
71 endif
72
73 return
74
75 end subroutine get_node_from_face
76
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.