1 | /* pyOASIS - A Python wrapper for OASIS |
---|
2 | Authors: Philippe Gambron, Rupert Ford |
---|
3 | Copyright (C) 2019 UKRI - STFC |
---|
4 | |
---|
5 | This program is free software: you can redistribute it and/or modify |
---|
6 | it under the terms of the GNU Lesser General Public License as |
---|
7 | published by the Free Software Foundation, either version 3 of the |
---|
8 | License, or any later version. |
---|
9 | |
---|
10 | This program is distributed in the hope that it will be useful, |
---|
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | GNU Lesser General Public License for more details. |
---|
14 | |
---|
15 | A copy of the GNU Lesser General Public License, version 3, is supplied |
---|
16 | with this program, in the file lgpl-3.0.txt. It is also available at |
---|
17 | <https://www.gnu.org/licenses/lgpl-3.0.html>. */ |
---|
18 | |
---|
19 | |
---|
20 | #include "oasis_c.h" |
---|
21 | #include "oasis_c_iso.h" |
---|
22 | |
---|
23 | int oasis_c_init_comp_with_comm_iso2c(int* comp_id, const char* comp_name, const bool coupled, int commworld){ |
---|
24 | int commworld_f=commworld; |
---|
25 | int kinfo; |
---|
26 | oasis_init_comp_with_comm_iso(comp_id, &comp_name, &kinfo, &coupled, &commworld_f); |
---|
27 | return kinfo; |
---|
28 | } |
---|
29 | |
---|
30 | int oasis_c_init_comp_iso2c(int* comp_id, const char* comp_name, const bool coupled){ |
---|
31 | int kinfo; |
---|
32 | oasis_init_comp_iso(comp_id, &comp_name, &kinfo, &coupled); |
---|
33 | return kinfo; |
---|
34 | } |
---|
35 | |
---|
36 | |
---|
37 | int oasis_c_init_comp_with_comm(int* comp_id, const char* comp_name, const bool coupled, const MPI_Comm commworld){ |
---|
38 | int kinfo; |
---|
39 | MPI_Fint commworld_f = MPI_Comm_c2f(commworld); |
---|
40 | oasis_init_comp_with_comm_iso(comp_id, &comp_name, &kinfo, &coupled, &commworld_f); |
---|
41 | return kinfo; |
---|
42 | } |
---|
43 | |
---|
44 | int oasis_c_init_comp(int* comp_id, const char* comp_name, const bool coupled){ |
---|
45 | int kinfo; |
---|
46 | oasis_init_comp_iso(comp_id, &comp_name, &kinfo, &coupled); |
---|
47 | return kinfo; |
---|
48 | } |
---|
49 | |
---|
50 | int oasis_c_enddef(){ |
---|
51 | int kinfo; |
---|
52 | oasis_enddef_iso(&kinfo); |
---|
53 | return kinfo; |
---|
54 | } |
---|
55 | |
---|
56 | int oasis_c_terminate(){ |
---|
57 | int kinfo; |
---|
58 | oasis_terminate_iso(&kinfo); |
---|
59 | return kinfo; |
---|
60 | } |
---|
61 | |
---|