OpenRadioss
2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
userlib.h
Go to the documentation of this file.
1
//Copyright> OpenRadioss
2
//Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3
//Copyright>
4
//Copyright> This program is free software: you can redistribute it and/or modify
5
//Copyright> it under the terms of the GNU Affero General Public License as published by
6
//Copyright> the Free Software Foundation, either version 3 of the License, or
7
//Copyright> (at your option) any later version.
8
//Copyright>
9
//Copyright> This program is distributed in the hope that it will be useful,
10
//Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11
//Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
//Copyright> GNU Affero General Public License for more details.
13
//Copyright>
14
//Copyright> You should have received a copy of the GNU Affero General Public License
15
//Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16
//Copyright>
17
//Copyright>
18
//Copyright> Commercial Alternative: Altair Radioss Software
19
//Copyright>
20
//Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21
//Copyright> software under a commercial license. Contact Altair to discuss further if the
22
//Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23
/* ---------------
24
Global Headers
25
--------------- */
26
27
#include <hardware.inc>
28
#include <stdio.h>
29
#include <string.h>
30
#include <stdlib.h>
31
#include <math.h>
32
#include <fcntl.h>
33
34
#define _FCALL
35
36
37
#ifdef _WIN64
38
39
#include <windows.h>
40
#include <process.h>
41
#include <io.h>
42
#include <sys\types.h>
43
#include <sys/stat.h>
44
45
#elif 1
46
47
#include <sys/resource.h>
48
#include <sys/types.h>
49
#include <time.h>
50
#include <sys/stat.h>
51
#include <unistd.h>
52
#include <dlfcn.h>
53
54
#endif
55
56
57
/* ----------------------------------------------------------
58
include containing the routine pointers from userlibrary
59
---------------------------------------------------------- */
60
61
#ifdef MYREAL4
62
#define my_real float
63
#endif
64
65
#ifdef MYREAL8
66
#define my_real double
67
#endif
68
69
70
/*
71
------------------------------------------------
72
Set libname / extension according to Arch name
73
------------------------------------------------
74
*/
75
76
77
/* ------------ */
78
/* WIN64 Macros */
79
/* ------------ */
80
#ifdef _WIN64
81
82
#define ULIB_ARCH "_win64"
83
#define ULIB_EXT ".dll"
84
85
86
87
HINSTANCE mds_userlibhandler;
88
89
#endif
90
91
92
/* ------------ */
93
/* Linux Macros */
94
/* ------------ */
95
96
#if CPP_mach==CPP_p4linux964
97
98
#define ULIB_EXT ".so"
99
100
#if CPP_rel==70
101
#define ULIB_ARCH "_linuxa64"
102
#elif 1
103
#define ULIB_ARCH "_linux64"
104
#endif
105
106
#endif
107
108
109
110
#define ULIB_SP "_sp"
111
112
char
*
mds_userlib_name
;
113
114
/*
115
-------------------------------
116
Current user library routines
117
-------------------------------
118
*/
119
120
121
void
*
mds_userlibhandle
;
122
123
//void (*st_get_userbuf_variable)(int * id, char * title);
124
125
void (*
mds_userlib_id
)(
int
* info);
126
127
/* NEW MDS Starter Routine */
128
void (*
st_mds_lecm
) (
my_real
* uparam ,
int
* maxuparam,
int
* nuparam,
129
int
* nuvar,
int
* ifunc,
int
* maxfunc,
int
* nfunc,
130
my_real
* stifint,
my_real
* young,
my_real
* nu,
my_real
* rho0,
131
char
* files,
char
* label,
int
* ndepvar );
132
133
void
mds_array_init_
(){
134
int
i;
135
st_mds_lecm
= NULL;
136
mds_userlibhandle
= NULL;
137
mds_userlib_id
= NULL;
138
}
139
140
#ifdef _WIN64
141
#define mds_userlib_name_get_ MDS_USERLIB_NAME_GET
142
#endif
143
void
_FCALL
mds_userlib_name_get_
(
char
* libname,
int
* length);
144
145
void
mds_userlib_name_set
(
char
* libname);
146
147
148
#ifdef _WIN64
149
void
mds_init_callback();
150
void (*set_mds_callback) (
void
* callback_array[200]);
151
#endif
152
153
my_real
#define my_real
Definition
cppsort.cpp:32
_FCALL
#define _FCALL
Definition
memory_use_c.c:25
mds_userlib_name_set
void mds_userlib_name_set(char *libname)
mds_userlib_id
void(* mds_userlib_id)(int *info)
Definition
userlib.h:125
mds_userlib_name
char * mds_userlib_name
Definition
userlib.h:112
mds_array_init_
void mds_array_init_()
Definition
userlib.h:133
st_mds_lecm
void(* st_mds_lecm)(my_real *uparam, int *maxuparam, int *nuparam, int *nuvar, int *ifunc, int *maxfunc, int *nfunc, my_real *stifint, my_real *young, my_real *nu, my_real *rho0, char *files, char *label, int *ndepvar)
Definition
userlib.h:128
mds_userlibhandle
void * mds_userlibhandle
Definition
userlib.h:121
mds_userlib_name_get_
void _FCALL mds_userlib_name_get_(char *libname, int *length)
starter
share
c_inc
userlib.h
Generated by
1.15.0