36 integer(kind=kint),
intent(in) :: ndof
37 real(kind=
kreal),
intent(out) :: rbm(*)
38 integer(kind=kint),
allocatable :: mark(:)
39 integer(kind=kint) :: nint, vl, nmode, node, base
40 integer(kind=kint) :: itype, ic_type, nn, is, ie, icel, iis, j, nod
41 real(kind=
kreal) :: cx, cy, cz, x, y, z, csum(4)
43 nint = hecmesh%nn_internal
48 case default; nmode = 6
52 allocate(mark(hecmesh%n_node)); mark = 0
54 do itype = 1, hecmesh%n_elem_type
55 ic_type = hecmesh%elem_type_item(itype)
58 is = hecmesh%elem_type_index(itype-1)+1
59 ie = hecmesh%elem_type_index(itype)
61 iis = hecmesh%elem_node_index(icel-1)
63 nod = hecmesh%elem_node_item(iis+j); mark(nod) = 1
74 csum(1) = csum(1) + hecmesh%node(3*node-2)
75 csum(2) = csum(2) + hecmesh%node(3*node-1)
76 csum(3) = csum(3) + hecmesh%node(3*node)
78 csum(4) = real(nint,
kreal)
80 cx = 0.0d0; cy = 0.0d0; cz = 0.0d0
81 if (csum(4) > 0.0d0)
then
82 cx = csum(1)/csum(4); cy = csum(2)/csum(4); cz = csum(3)/csum(4)
85 rbm(1:vl*nmode) = 0.0d0
90 else if (ndof == 2)
then
92 x = hecmesh%node(3*node-2) - cx; y = hecmesh%node(3*node-1) - cy
95 rbm( vl + base+2) = 1.0d0
96 rbm( 2*vl + base+1) = -y
97 rbm( 2*vl + base+2) = x
102 if (ndof == 3 .and. mark(node) == 1)
then
104 rbm( 3*vl + base+1) = 1.0d0
105 rbm( 4*vl + base+2) = 1.0d0
106 rbm( 5*vl + base+3) = 1.0d0
108 x = hecmesh%node(3*node-2) - cx
109 y = hecmesh%node(3*node-1) - cy
110 z = hecmesh%node(3*node) - cz
112 rbm( vl + base+2) = 1.0d0
113 rbm( 2*vl + base+3) = 1.0d0
114 rbm( 3*vl + base+2) = -z
115 rbm( 3*vl + base+3) = y
116 rbm( 4*vl + base+1) = z
117 rbm( 4*vl + base+3) = -x
118 rbm( 5*vl + base+1) = -y
119 rbm( 5*vl + base+2) = x
121 rbm( 3*vl + base+4) = 1.0d0
122 rbm( 4*vl + base+5) = 1.0d0
123 rbm( 5*vl + base+6) = 1.0d0
integer(kind=kint) function hecmw_get_max_node(etype)
logical function hecmw_is_etype_33struct(etype)
Rigid-body / near-kernel modes from mesh coordinates.
subroutine, public hecmw_precond_rbm_from_mesh(hecMESH, ndof, rbm)
integer(kind=kint), parameter hecmw_sum
integer(kind=4), parameter kreal
subroutine hecmw_allreduce_r(hecMESH, val, n, ntag)