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