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

Go to the source code of this file.

Functions/Subroutines

subroutine nbfunct (nfunct, ntable, npts, lsubmodel)

Function/Subroutine Documentation

◆ nbfunct()

subroutine nbfunct ( integer nfunct,
integer ntable,
integer npts,
type(submodel_data), dimension(nsubmod), intent(in) lsubmodel )

Definition at line 36 of file nbfunc.F.

37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40 USE submodel_mod
42 USE python_funct_mod, ONLY : funct_python_nsamples
44C-----------------------------------------------
45C I m p l i c i t T y p e s
46C-----------------------------------------------
47#include "implicit_f.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER NFUNCT, NTABLE, NPTS
52 TYPE(SUBMODEL_DATA), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
53C-----------------------------------------------
54C C o m m o n B l o c k s
55C-----------------------------------------------
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER I,ID,NPARAM,NPT,NFUNCT0,NTABLE0,NTABLE1
60 CHARACTER(LEN=NCHARTITLE) :: TITR
61 CHARACTER :: KEY*20,MESS*40
62 DATA mess/' FUNCTION COUNTING '/
63 INTEGER :: IFUN,N1
64 INTEGER :: IPYTHON
65 LOGICAL :: IS_AVAILABLE
66C======================================================================|
67
68! Get number of functions, and total number of points
69 nfunct0 = 0
70 CALL hm_option_count('/FUNCT', nfunct0)
71 npts = 0
72 ntable = 0
73 IF (nfunct0 > 0) THEN
74 CALL hm_option_start('/FUNCT')
75 DO ifun = 1, nfunct0
76 CALL hm_option_read_key(lsubmodel,
77 . keyword1 = key)
78 ipython = 0
79 IF(key(6:12) == '_PYTHON') ipython = 1
80 IF( ipython == 0 ) THEN
81 ntable = ntable + 1
82 CALL hm_get_intv('numberofpoints', npt, is_available, lsubmodel)
83 npts = npts + npt
84 ELSE
85 ntable = ntable + 1
86 npts = npts + funct_python_nsamples
87 ENDIF
88 ENDDO
89 ENDIF
90
91! Read tables
92 nfunct = nfunct0
93c NTABLE = NFUNCT0
94
95
96 CALL hm_option_count('/TABLE/0', ntable0)
97 CALL hm_option_count('/TABLE/1', ntable1)
98
99
100
101
102 IF (ntable0 > 0) THEN
103 CALL hm_option_start('/TABLE/0')
104 DO i = 1, ntable0
105 CALL hm_option_read_key(lsubmodel,
106 . option_id = id,
107 . option_titr = titr)
108 CALL hm_get_intv('ORDER', nparam, is_available, lsubmodel) !dimension of table
109 IF (nparam == 1) THEN
110 CALL hm_get_intv('N1', n1, is_available, lsubmodel) !size of X
111 npts = npts + n1
112 nfunct=nfunct+1
113 ENDIF
114 ENDDO
115 ENDIF
116
117
118 IF (ntable1 > 0) THEN
119 CALL hm_option_start('/TABLE/1')
120 DO i = 1, ntable1
121 CALL hm_option_read_key(lsubmodel,
122 . option_id = id,
123 . option_titr = titr)
124 CALL hm_get_intv('ORDER', nparam, is_available, lsubmodel) !dimension of table
125 IF (nparam == 1) THEN
126 CALL hm_get_intv('curverows', n1, is_available, lsubmodel) !size of X
127 npts = npts + n1
128 nfunct=nfunct+1
129 ENDIF
130 ENDDO
131 ENDIF
132 ntable=ntable+ntable1 + ntable0
133
134C NFUNCT0 = 0
135C CALL HM_OPTION_COUNT('/PYTHON_FUNCT', NFUNCT0)
136C NFUNCT = NFUNCT0 + NFUNCT
137
138
139C
140 npts=2*npts
141C
142 RETURN
143C-------------------------------------
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_count(entity_type, hm_option_number)
subroutine hm_option_start(entity_type)
initmumps id
integer, parameter nchartitle