DRESP3 – Design Response via external user-supplied functions
When a desired response is not available from OptiStruct, either directly or via equations, it may be calculated through external user-supplied functions implemented in shared/dynamic libraries. The DRESP3 card identifies the external function to be called, and defines the parameters to be transferred to that function. The LOADLIB card identifies the library to be loaded.
|
(1) |
(2) |
(3) |
(4) |
(5) |
(6) |
(7) |
(8) |
(9) |
(10) |
|
DRESP3 |
ID |
LABEL |
GROUP |
FUNC |
REGION |
RESP |
MAXRESP |
|
|
|
+ |
DESVAR |
DVID1 |
DVID2 |
DVID3 |
DVID4 |
DVID5 |
DVID6 |
DVID7 |
|
|
+ |
|
DVID8 |
… |
|
|
|
|
|
|
|
+ |
DTABLE |
LABL1 |
LABL2 |
LABL3 |
LABL4 |
LABL5 |
LABL6 |
LABL7 |
|
|
+ |
|
LABL8 |
… |
|
|
|
|
|
|
|
+ |
DGRID |
G1 |
C1 |
G2 |
C2 |
G3 |
C3 |
|
|
|
+ |
|
G4 |
C4 |
… |
|
|
|
|
|
|
+ |
DEIGV |
EIGV1 |
LID1 |
G1 |
C1 |
|
|
|
|
|
+ |
|
EIGV2 |
LID2 |
G2 |
C2 |
|
|
|
|
|
+ |
DRESP1 |
NR1 |
NR2 |
NR3 |
NR4 |
NR5 |
NR6 |
NR7 |
|
|
+ |
|
NR8 |
… |
|
|
|
|
|
|
|
+ |
DRESP1L |
NR1 |
LIDR1 |
NR2 |
LIDR2 |
NR3 |
LIDR3 |
|
|
|
+ |
|
NR4 |
LIDR4 |
… |
|
|
|
|
|
|
+ |
DVPREL1 |
DPIP1 |
DPIP2 |
DPIP3 |
DPIP4 |
DPIP5 |
DPIP6 |
DPIP7 |
|
|
+ |
|
DPIP8 |
… |
|
|
|
|
|
|
|
+ |
DVPREL2 |
DPI2P1 |
DPI2P2 |
DPI2P3 |
DPI2P4 |
DPI2P5 |
DPI2P6 |
DPI2P7 |
|
|
+ |
|
DPI2P8 |
… |
|
|
|
|
|
|
|
+ |
USRDATA |
STRNG |
| ||||||
|
+ |
|
… |
| ||||||
|
+ |
SLAVE |
MDID |
|
|
|
|
|
|
|
|
Field |
Contents |
|
ID |
Response identification number. Each DRESP3 must have a unique ID. No default (Integer > 0) |
|
LABEL |
User-defined name for the response. No Default (Character) |
|
GROUP |
GROUP identifier that defines the shared/dynamic library to be used. It references an existing LOADLIB card in the input deck. No default (Character) |
|
FUNC |
FUNC identifier that defines the external function to be used. No default (Character) |
|
REGION |
Region identifier. See comment 4. Default = blank (Integer > 0 or blank) |
|
RESP |
RESP identifier that defines the response to be returned by the external function. No default (Integer > 0) |
|
MAXRESP |
MAXRESP identifier that defines the number of responses available in the external function. No default (Integer > 0) |
|
DESVAR |
DESVAR flag indicating DESVAR ID numbers follow. |
|
DVIDi |
DESVAR IDs. No default (Integer > 0) |
|
DTABLE |
DTABLE flag indicating DTABLE label numbers follow. |
|
LABLi |
Constant label in DTABLE data. No default (Character) |
|
DGRID |
DGRID flag indicating Grid ID numbers and components follow. |
|
Gi |
Grid IDs. No default (Integer > 0) |
|
Ci |
Component IDs. No default (1, 2, or 3) |
|
DEIGV |
DEIGV flag indicating eigenvector information to follow. |
|
EIGVi |
Eigenvector numbers. No default (Integer > 0) |
|
LIDi |
Subcase IDs. No default (Integer > 0) |
|
Gi |
Grid IDs. No default (Integer > 0) |
|
Ci |
Component IDs. No defaults (1, 2, 3, 4, 5, or 6) |
|
DRESP1 |
DRESP1 flag indicating DRESP1 ID numbers follow. |
|
NRi |
DRESP1 IDs. See comment 11. No default (Integer > 0) |
|
DRESP1L |
DRESP1L flag indicating DRESP1 ID numbers and SUBCASE IDs follow. |
|
LIDRi |
SUBCASE IDs. No default (Integer > 0) |
|
DVPREL1 |
DVPREL1 flag indicating DVPREL1 ID numbers follow. |
|
DPIPi |
DVPREL1 IDs. No default (Integer > 0) |
|
DVPREL2 |
DVPREL2 flag indicating DVPREL2 ID numbers follow. |
|
DPIPi |
DVPREL2 IDs. No default (Integer > 0) |
|
USRDATA |
USRDATA flag indicating that an user-defined string is to follow. |
|
STRNG |
User-defined string to be passed to the external function. No default (Character string < 32000 characters) |
|
SLAVE |
SLAVE flag indicating that data should be copied from another DRESP3 card identified by MDID. |
|
MDID |
Response ID of a DRESP3 entry. No default (Integer > 0) |
DRESP1 entries reference responses in the subcase defined by the associated DESOBJ, DESSUB, or DESGBL.
DRESP3 entries must have unique identification numbers with respect to DRESP2 and DRESP1 entries.
DRESP1L defines a response defined with a DRESP1 and a SUBCASE. The SUBCASE number 0 should be used for global responses.
Responses with the same region identifier are grouped together into the same region. If the region identifier is blank or 0, then a separate region is formed for each DRESP3 definition. The RTYPE EXTERNAL on the DSCREEN definition refers to DRESP3 responses. It is important to ensure that responses with the same region identifier reference similar external responses. Please read the User's Guide section Constraint Screening for a more detailed explanation.
The order in which the DESVAR, DTABLE, DGRID, DRESP1, DRESP1L, DRESP2L, DVPREL1, and DVPREL2 continuation lines appear on the DRESP3 card is not prescribed. Each of these continuation lines can be repeated any number of times, in any position, on the card.
The entries on the DRESP3 card are assigned to the parameters passed to the external function in the order that they occur.
DRESP1 and DRESP1L cards cannot both exist in one DRESP3 definition.
If DRESP1L is used for a constrained DRESP3, DESGLB must be used to identify the DRESP3.
If DRESP1L is used in a DRESP3 objective function, then the DESOBJ that references the DRESP3 must be defined before the first subcase.
If the DRESP3 data is referenced by DESOBJ data, the DESOBJ data must be above the first SUBCASE if:
- the DRESP3 contains DRESP1L data.
- the DRESP3 contains no DRESP1 or DRESP1L data.
- the DRESP3 contains DRESP1 global responses.
The DESOBJ data must be in the correct static or eigenvalue SUBCASE if the DRESP3 contains static or eigenvalue DRESP1 responses.
DRESP1 of RTYPE = WCOMB, WFREQ, and COMP cannot be referenced by DRESP3 data.
LABEL must begin with an alphabetical character.
The RESP field may be used to request a specific response from the external function, while MAXRESP defines the maximum number of responses available in that function. External functions can be implemented to compute any number of responses and to return any subset of these responses. This approach has two main benefits :
- There is no need to write a specific external function for each response that you want computed. One general function may be written instead. In many cases, this allows for easier code maintenance and better code reusability.
- OptiStruct will automatically group responses which point to the same external function, and which use the same set of input data. The external function will only be called once for that group of responses, which may save computational time in the library.
The SLAVE continuation line indicates that the input data (DESVAR, etc.) for the current DRESP3 card is identical to the input data of the master DRESP3 card. There cannot be any other continuation line when SLAVE is used.
This simplifies the DRESP3 definition and reduces potential errors when modifying input decks, either via the HyperMesh interface or manually. Also, as explained above, OptiStruct will group responses that share the same input data.
The data in the STRNG field is character string based. It provides a convenient way to pass constants to the external response server routines. The maximum number of characters allowed in 32000.
The eigenvector values provided on the DEIGV continuation are normalized against the mass matrix. No sensitivities are calculated for these values.
Go To
Guidelines for Bulk Data Entries
Alphabetical List of Bulk Data Entries