OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
create_node_from_element.F File Reference
#include "implicit_f.inc"
#include "com04_c.inc"
#include "param_c.inc"
#include "sphcom.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine create_node_from_element (ixs, ixs10, ixs20, ixs16, ixq, ixc, ixtg, ixt, ixp, ixr, ixx, kxx, kxsp, clause, geo, array, sz, go_in_array)

Function/Subroutine Documentation

◆ create_node_from_element()

subroutine create_node_from_element ( integer, dimension(nixs,*) ixs,
integer, dimension(6,*) ixs10,
integer, dimension(12,*) ixs20,
integer, dimension(8,*) ixs16,
integer, dimension(nixq,*) ixq,
integer, dimension(nixc,*) ixc,
integer, dimension(nixtg,*) ixtg,
integer, dimension(nixt,*) ixt,
integer, dimension(nixp,*) ixp,
integer, dimension(nixr,*) ixr,
integer, dimension(*) ixx,
integer, dimension(*) kxx,
integer, dimension(nisp,*) kxsp,
type (set_) clause,
geo,
integer, dimension(*) array,
integer sz,
logical go_in_array )

Definition at line 36 of file create_node_from_element.F.

41C-----------------------------------------------
42C M o d u l e s
43C-----------------------------------------------
44 USE message_mod
45 USE setdef_mod
46 USE tag_node_from_part_sphcel_mod
47 use element_mod , only : nixs,nixq,nixc,nixt,nixp,nixr,nixtg
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C C o m m o n B l o c k s
54C-----------------------------------------------
55#include "com04_c.inc"
56#include "param_c.inc"
57#include "sphcom.inc"
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 INTEGER IXS(NIXS,*),IXS10(6,*),IXS16(8,*),IXS20(12,*),
62 . IXQ(NIXQ,*),IXC(NIXC,*),IXTG(NIXTG,*),IXT(NIXT,*),
63 . IXP(NIXP,*),IXR(NIXR,*),IXX(*),KXX(*),KXSP(NISP,*)
65 . geo(npropg,*)
66!
67 TYPE (SET_) :: CLAUSE
68 INTEGER ARRAY(*),SZ
69 LOGICAL GO_IN_ARRAY
70C-----------------------------------------------
71C L o c a l V a r i a b l e s
72C-----------------------------------------------
73 INTEGER I,IND,LIMIT
74 INTEGER, ALLOCATABLE, DIMENSION(:) :: TAGNOD,CLAUSE_NODE
75 INTEGER IWORK(70000)
76 INTEGER, DIMENSION(:),ALLOCATABLE:: IDX,SORT
77C=======================================================================
78!
79 ALLOCATE(tagnod(numnod))
80 tagnod(:) = 0
81 ALLOCATE(clause_node(numnod))
82
83 ind=0
84!
85 ! SOLID
86 IF ( clause%NB_SOLID > 0 )
88 . ixs ,ixs10 ,ixs20 ,ixs16 ,clause%NB_SOLID ,
89 . clause%SOLID ,tagnod ,clause_node,ind )
90 ! QUAD
91 IF ( clause%NB_QUAD > 0 )
93 . ixq ,nixq ,2 ,5 ,clause%NB_QUAD,
94 . clause%QUAD ,tagnod,clause_node,ind )
95 ! SH4N
96 IF ( clause%NB_SH4N > 0 )
98 . ixc ,nixc ,2 ,5 ,clause%NB_SH4N,
99 . clause%SH4N ,tagnod,clause_node,ind )
100 ! SH3N
101 IF ( clause%NB_SH3N > 0 .AND. clause%NB_TRIA == 0 )
103 . ixtg ,nixtg ,2 ,4 ,clause%NB_SH3N,
104 . clause%SH3N ,tagnod,clause_node,ind )
105 ! TRIA
106 IF ( clause%NB_TRIA > 0 )
108 . ixtg ,nixtg ,2 ,4 ,clause%NB_TRIA,
109 . clause%TRIA ,tagnod,clause_node,ind )
110 ! TRUSS
111 IF ( clause%NB_TRUSS > 0 )
113 . ixt ,nixt ,2 ,3 ,clause%NB_TRUSS,
114 . clause%TRUSS,tagnod,clause_node,ind )
115 ! beam
116 IF ( clause%NB_BEAM > 0 )
118 . ixp ,nixp ,2 ,3 ,clause%NB_BEAM,
119 . clause%BEAM ,tagnod,clause_node,ind )
120 ! SPRING
121 IF ( clause%NB_SPRING > 0 )
123 . ixr ,geo ,clause%NB_SPRING ,clause%SPRING ,tagnod,clause_node,ind)
124!
125!
126! ATTENTION --- PARTS SPH are not inverted
127!
128!
129 ! SPH
130 IF ( clause%NB_SPHCEL > 0 )
131 . CALL tag_node_from_part_sphcel(
132 . clause%NB_SPHCEL ,clause%SPHCEL ,tagnod,clause_node,ind,numnod)
133! IF (NUMSPH > 0)
134! . CALL TAGNOD_PART(KXSP,NISP,3,3,NUMSPH,IPARTSP,TAGPART,TAGNOD)
135C-----------
136 limit = numnod/2
137 IF (ind < limit)THEN ! cheaper to use Order on small node groups
138 ALLOCATE(idx(2*ind))
139 ALLOCATE(sort(ind))
140 sort(1:ind) = clause_node(1:ind)
141 CALL my_orders(0,iwork,sort,idx,ind,1)
142
143 DO i=1,ind
144 clause_node(i) = sort(idx(i))
145 ENDDO
146 DEALLOCATE(idx)
147 DEALLOCATE(sort)
148 ELSE
149 ind = 0
150 DO i=1,numnod
151 IF (tagnod(i) == 1) THEN
152 ind = ind + 1
153 clause_node(ind) = i
154 ENDIF
155 ENDDO
156 ENDIF
157!
158! Decide whether the result is stored in an array or in the clause.
159! In certain cases it is useful to store in ARRAY.
160! Example : Clause with delete clause. Nodes must be recreated & merged...
161! ----------------------------------------------------------------------------
162 IF (go_in_array .EQV. .true.) THEN
163 sz = ind
164 array(1:ind) = clause_node(1:ind)
165 ELSE
166 ! clause node allocation
167 sz=0
168 clause%NB_NODE = ind
169 IF(ALLOCATED( clause%NODE )) DEALLOCATE( clause%NODE )
170 ALLOCATE( clause%NODE(ind) )
171 clause%NODE(1:ind) = clause_node(1:ind)
172 ENDIF
173C-----------
174 DEALLOCATE(tagnod)
175 DEALLOCATE(clause_node)
176C-----------
177 RETURN
#define my_real
Definition cppsort.cpp:32
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82
subroutine tag_node_from_1d_2d_elem(ix, nix, nix1, nix2, numel, elem, tagnod, clause_node, ind)
subroutine tag_node_from_solid(ixs, ixs10, ixs20, ixs16, numel, elem, tagnod, clause_node, ind)
subroutine tag_node_from_spring(ixr, geo, numelr, elem, tagnod, clause_node, ind)
subroutine tagnod(ix, nix, nix1, nix2, numel, iparte, tagbuf, npart)
Definition tagnod.F:29