OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
create_line_from_element.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine create_line_from_element (ixt, ixp, ixr, clause, delbuf, go_in_array)

Function/Subroutine Documentation

◆ create_line_from_element()

subroutine create_line_from_element ( integer, dimension(nixt,*), intent(in) ixt,
integer, dimension(nixp,*), intent(in) ixp,
integer, dimension(nixr,*), intent(in) ixr,
type (set_) clause,
type (set_scratch) delbuf,
logical go_in_array )

Definition at line 34 of file create_line_from_element.F.

36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE my_alloc_mod
40 USE setdef_mod
41 USE message_mod
43C-----------------------------------------------
44C I m p l i c i t T y p e s
45C-----------------------------------------------
46#include "implicit_f.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER, INTENT(IN) :: IXT(NIXT,*),IXP(NIXP,*),IXR(NIXR,*)
51!
52 TYPE (SET_) :: CLAUSE
53 TYPE (set_scratch) :: delbuf
54 LOGICAL GO_IN_ARRAY
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER IEXT,I,NIX,SZELMAX,IAD_LINE,NSEG,LINE_NENTITY
59 INTEGER IWORK(70000)
60!
61 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ITRI
62 INTEGER, ALLOCATABLE, DIMENSION(:) :: INDEX, BUFTMPLINE
63C=======================================================================
64 delbuf%SZ_LINE = 0
65!
66!! SZELMAX = MAX(CLAUSE%NB_TRUSS,CLAUSE%NB_BEAM,CLAUSE%NB_SPRING)
67 szelmax = clause%NB_TRUSS + clause%NB_BEAM + clause%NB_SPRING
68 IF (szelmax == 0) RETURN
69!
70 line_nentity = 4 ! NOD1, NOD2, ELTYP, ELEM
71 ALLOCATE(buftmpline(szelmax*line_nentity))
72 ALLOCATE(itri(3,szelmax))
73 ALLOCATE(index(2*szelmax))
74!
75 iad_line = 1
76!------------------
77!----
78! ! temporary line segments got from elements
79 nseg = 0
80 CALL line_buffer(
81 . ixt ,ixp ,ixr ,buftmpline , nseg,
82 . iad_line ,clause )
83!----
84!
85 nix = line_nentity
86!
87 DO i=1,nseg
88 index(i)=i
89 itri(1,i) = buftmpline((i-1)*nix+1)
90 itri(2,i) = buftmpline((i-1)*nix+2)
91 itri(3,i) = buftmpline((i-1)*nix+4)
92 ENDDO
93 iwork(1:70000) = 0
94 CALL my_orders(0,iwork,itri,index,nseg,3)
95!---
96! clause surf allocation
97!---
98!------------------
99!
100! Decide whether the result is stored in an array or in the clause.
101! in certain cases it is useful to store in array.
102! Example : Clause with delete clause. Lines must be recreated & merged...
103! ----------------------------------------------------------------------------
104 IF (go_in_array .EQV. .true.) THEN
105 delbuf%SZ_LINE = nseg
106 ALLOCATE(delbuf%LINE(nseg,4))
107 DO i=1,nseg
108 delbuf%LINE(i,1) = buftmpline((index(i)-1)*nix+1)
109 delbuf%LINE(i,2) = buftmpline((index(i)-1)*nix+2)
110 delbuf%LINE(i,3) = buftmpline((index(i)-1)*nix+3)
111 delbuf%LINE(i,4) = buftmpline((index(i)-1)*nix+4)
112 ENDDO
113 ELSE
114 IF(ALLOCATED( clause%LINE_NODES )) DEALLOCATE( clause%LINE_NODES )
115 IF(ALLOCATED( clause%LINE_ELTYP )) DEALLOCATE( clause%LINE_ELTYP )
116 IF(ALLOCATED( clause%LINE_ELEM )) DEALLOCATE( clause%LINE_ELEM )
117!
118 clause%NB_LINE_SEG = nseg
119 CALL my_alloc(clause%LINE_NODES,nseg,2)
120 CALL my_alloc(clause%LINE_ELTYP,nseg)
121 CALL my_alloc(clause%LINE_ELEM,nseg)
122!
123 DO i=1,nseg
124 clause%LINE_NODES(i,1) = buftmpline((index(i)-1)*nix+1)
125 clause%LINE_NODES(i,2) = buftmpline((index(i)-1)*nix+2)
126 clause%LINE_ELTYP(i) = buftmpline((index(i)-1)*nix+3)
127 clause%LINE_ELEM(i) = buftmpline((index(i)-1)*nix+4)
128 ENDDO
129 ENDIF ! IF (GO_IN_ARRAY .EQV. .TRUE.)
130!------------------
131 IF(ALLOCATED(itri)) DEALLOCATE(itri)
132 IF(ALLOCATED(index)) DEALLOCATE(index)
133 IF(ALLOCATED(buftmpline)) DEALLOCATE(buftmpline)
134!------------------
135!-----------
136 RETURN
subroutine line_buffer(ixt, ixp, ixr, buftmpline, nseg, iad_line, clause)
Definition line_buffer.F:34
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82