OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
coupling_c_interface.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#ifndef COUPLING_C_INTERFACE_H
24#define COUPLING_C_INTERFACE_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30// C interface for Fortran binding
31// Should be kept generic enough to work with any coupling adapter (CWIPI, preCICE, etc.)
32
33// Object management
35void coupling_adapter_destroy(void* adapter);
36
37// Configuration
38int coupling_adapter_configure(void* adapter, const char* filename);
39void coupling_adapter_set_nodes(void* adapter, const int* nodeIds, int numNodes);
40
41// Initialization
42int coupling_adapter_initialize(void* adapter, const double* coordinates,
43 int totalNodes, int mpiRank, int mpiSize);
44
45// Data exchange
46void coupling_adapter_write_data(void* adapter, const double* values,
47 int totalNodes, double dt, int dataType);
48void coupling_adapter_read_data(void* adapter, double* values,
49 int totalNodes, double dt, int dataType);
50
51// Simulation control
52void coupling_adapter_advance(void* adapter, double* dt);
56
57// Finalization
58void coupling_adapter_finalize(void* adapter);
59
60// Getters
61int coupling_adapter_is_active(void* adapter);
62double coupling_adapter_get_max_time_step_size(void* adapter);
64int coupling_adapter_get_group_node_id(void* adapter);
65int coupling_adapter_get_surface_id(void* adapter);
66int coupling_adapter_get_communicator(void* adapter);
67
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif
int coupling_adapter_initialize(void *adapter, const double *coordinates, int totalNodes, int mpiRank, int mpiSize)
int coupling_adapter_is_active(void *adapter)
void coupling_adapter_read_data(void *adapter, double *values, int totalNodes, double dt, int dataType)
void * coupling_adapter_create()
void coupling_adapter_finalize(void *adapter)
int coupling_adapter_get_num_coupling_nodes(void *adapter)
int coupling_adapter_get_surface_id(void *adapter)
int coupling_adapter_requires_writing_checkpoint(void *adapter)
void coupling_adapter_destroy(void *adapter)
void coupling_adapter_write_data(void *adapter, const double *values, int totalNodes, double dt, int dataType)
int coupling_adapter_is_coupling_ongoing(void *adapter)
int coupling_adapter_get_communicator(void *adapter)
int coupling_adapter_configure(void *adapter, const char *filename)
int coupling_adapter_requires_reading_checkpoint(void *adapter)
void coupling_adapter_set_nodes(void *adapter, const int *nodeIds, int numNodes)
double coupling_adapter_get_max_time_step_size(void *adapter)
int coupling_adapter_get_group_node_id(void *adapter)
void coupling_adapter_advance(void *adapter, double *dt)