OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
c_h3d_create_displacement_datatype.cpp
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#include <stdio.h>
25#include <string.h>
26#include <stdlib.h>
27#include <math.h>
28#include <fcntl.h>
29
30
31
32#ifdef _WIN32
33/* Windows includes */
34#include <windows.h>
35#include <process.h>
36#include <io.h>
37#include <sys\types.h>
38#include <sys/stat.h>
39
40
41#elif 1
42
43/* Linux includes */
44#include <sys/resource.h>
45#include <sys/types.h>
46#include <time.h>
47#include <sys/stat.h>
48#include <unistd.h>
49#include <dlfcn.h>
50#define _FCALL
51#include <math.h>
52#include <stdbool.h>
53
54#endif
55
56#include "h3dpublic_defs.h"
57#include "h3dpublic_export.h"
58
59#define _FCALL
60
61#include "h3d_values.h"
62
63extern "C"
64/*=================================================================*/
65{
66
67/*=================================================================*/
68/* C_H3D_CREATE_DISPLACEMENT_DATATYPE */
69/*=================================================================*/
70
72{
73 try {
74 // create result data types
75
76
78 if( !rc ) throw rc;
79
80 pool_count = 1;
81 dt_id = 1; // the displacement data type
82
83 rc = Hyper3DDatatypeWrite(h3d_file, "Animation", dt_id, H3D_DS_NONE,
84 H3D_DS_UNKNOWN, pool_count);
85 if( !rc ) throw rc;
86
87 dt_id ++;
88 pool_count = 1;
89 rc = Hyper3DDatatypeWrite(h3d_file, "Displacement", dt_id, H3D_DS_VECTOR,
90 H3D_DS_NODE, pool_count);
91 if( !rc ) throw rc;
94 if( !rc ) throw rc;
95
97 if( !rc ) throw rc;
98/*
99 // create Simulations
100 H3D_SIM_IDX sim_idx;
101 rc = Hyper3DSimulationBegin(h3d_file, max_sims, subcase_id);
102 if( !rc ) throw rc;
103
104 for( sim_idx=0; sim_idx < max_sims; sim_idx++ ) {
105 char name[32];
106 snprintf(name, sizeof(name), "Increment = %ld", sim_idx);
107 rc = Hyper3DSimulationWrite(h3d_file, sim_idx, name, (float)sim_idx);
108 if( !rc ) throw rc;
109 }
110 rc = Hyper3DSimulationEnd(h3d_file);
111 if( !rc ) throw rc;
112*/
113
114 } // end of try
115
116 catch(...) {
118 }
119
120}
121
122
123
124
127
130
133
134}
void c_h3d_create_displacement_datatype()
void c_h3d_create_displacement_datatype_()
void c_h3d_create_displacement_datatype__()
void _FCALL C_H3D_CREATE_DISPLACEMENT_DATATYPE()
H3DFileInfo * h3d_file
unsigned int pool_count
unsigned int dt_count
bool has_corners
H3D_ID node_poolname_id
bool rc
float poisson
H3D_ID * layername_ids
unsigned int layer_count
H3D_ID dt_id
H3D_TENSOR_TYPE tensor_type
bool Hyper3DDatatypePools(H3DFileInfo *h3d_file, H3D_ID dt_id, H3D_ID poolname_id, unsigned int num_layers, H3D_ID *layername_ids, bool corners, H3D_TENSOR_TYPE tensor_type, float poisson)
Definition h3d_dl.c:1331
bool Hyper3DDatatypeEnd(H3DFileInfo *h3d_file)
Definition h3d_dl.c:1341
bool Hyper3DExportClearError(H3DFileInfo *h3d_file)
Definition h3d_dl.c:939
bool Hyper3DDatatypeWrite(H3DFileInfo *h3d_file, const char *label, H3D_ID dt_id, H3D_DS_FORMAT format, H3D_DS_TYPE type, unsigned int num_pools)
Definition h3d_dl.c:1316
bool Hyper3DDatatypeBegin(H3DFileInfo *h3d_file, unsigned int count)
Definition h3d_dl.c:1310
#define _FCALL