World Builder  1.1.0-pre
A geodynamic initial conditions generator
wrapper_c.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2018-2024 by the authors of the World Builder code.
3 
4  This file is part of the World Builder.
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef WORLD_BUILDER_WRAPPER_C_H
21 #define WORLD_BUILDER_WRAPPER_C_H
22 
23 #include <stdbool.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
34 void create_world(void **ptr_ptr_world, const char *world_builder_file, const bool *has_output_dir, const char *output_dir, const unsigned long random_number_seed);
35 
36 
37 
46 unsigned int properties_output_size(void *ptr_ptr_world,
47  const unsigned int properties[][3],
48  const unsigned int n_properties);
49 
86 void properties_2d(void *ptr_ptr_world,
87  const double x,
88  const double z,
89  const double depth,
90  const unsigned int properties[][3],
91  const unsigned int n_properties,
92  double values[]);
93 
94 
132 void properties_3d(void *ptr_ptr_world,
133  const double x,
134  const double y,
135  const double z,
136  const double depth,
137  const unsigned int properties[][3],
138  const unsigned int n_properties,
139  double values[]);
140 
146 void temperature_2d(void *ptr_ptr_world, double x, double z, double depth, double *temperature);
147 
152 void temperature_3d(void *ptr_ptr_world, double x, double y, double z, double depth, double *temperature);
153 
158 void composition_2d(void *ptr_ptr_world, double x, double z, double depth, unsigned int composition_number, double *composition);
159 
164 void composition_3d(void *ptr_ptr_world, double x, double y, double z, double depth, unsigned int composition_number, double *composition);
165 
170 void release_world(void *ptr_ptr_world);
171 
172 #ifdef __cplusplus
173 }
174 #endif
175 
176 #endif
void composition_3d(void *ptr_ptr_world, double x, double y, double z, double depth, unsigned int composition_number, double *composition)
Definition: wrapper_c.cc:160
void temperature_3d(void *ptr_ptr_world, double x, double y, double z, double depth, double *temperature)
Definition: wrapper_c.cc:134
void properties_3d(void *ptr_ptr_world, const double x, const double y, const double z, const double depth, const unsigned int properties[][3], const unsigned int n_properties, double values[])
This function returns 3D properties.
Definition: wrapper_c.cc:92
void create_world(void **ptr_ptr_world, const char *world_builder_file, const bool *has_output_dir, const char *output_dir, const unsigned long random_number_seed)
Definition: wrapper_c.cc:32
void temperature_2d(void *ptr_ptr_world, double x, double z, double depth, double *temperature)
Definition: wrapper_c.cc:121
void release_world(void *ptr_ptr_world)
Definition: wrapper_c.cc:174
void properties_2d(void *ptr_ptr_world, const double x, const double z, const double depth, const unsigned int properties[][3], const unsigned int n_properties, double values[])
This function returns 2D properties.
Definition: wrapper_c.cc:71
void composition_2d(void *ptr_ptr_world, double x, double z, double depth, unsigned int composition_number, double *composition)
Definition: wrapper_c.cc:147
unsigned int properties_output_size(void *ptr_ptr_world, const unsigned int properties[][3], const unsigned int n_properties)
Definition: wrapper_c.cc:56