MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
fake_modena.c
Go to the documentation of this file.
1 /*
2 
3  ooo ooooo oooooooooo. ooooo ooo
4  `88. .888' `888' `Y8b `888b. `8'
5  888b d'888 .ooooo. 888 888 .ooooo. 8 `88b. 8 .oooo.
6  8 Y88. .P 888 d88' `88b 888 888 d88' `88b 8 `88b. 8 `P )88b
7  8 `888' 888 888 888 888 888 888ooo888 8 `88b.8 .oP"888
8  8 Y 888 888 888 888 d88' 888 .o 8 `888 d8( 888
9  o8o o888o `Y8bod8P' o888bood8P' `Y8bod8P' o8o `8 `Y888""8o
10 
11 Copyright
12  2014-2016 MoDeNa Consortium, All rights reserved.
13 
14 License
15  This file is part of Modena.
16 
17  The Modena interface library is free software; you can redistribute it
18  and/or modify it under the terms of the GNU Lesser General Public License
19  as published by the Free Software Foundation, either version 3 of the
20  License, or (at your option) any later version.
21 
22  Modena is distributed in the hope that it will be useful, but WITHOUT ANY
23  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
24  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
25  details.
26 
27  You should have received a copy of the GNU General Public License along
28  with Modena. If not, see <http://www.gnu.org/licenses/>.
29 
30  This file should help to compile models on systems, where MoDeNa is not
31  installed.
32 */
43 #include <stddef.h>
44 #include <stdbool.h>
45 int *modena_inputs_new(int *self);
46 int *modena_inputs_new(int *self)
47 {
48  int *i;
49  return i;
50 }
51 int *modena_outputs_new(int *self);
52 int *modena_outputs_new(int *self)
53 {
54  int *i;
55  return i;
56 }
57 size_t modena_model_inputs_argPos(int *self, const char *name);
58 size_t modena_model_inputs_argPos(int *self, const char *name)
59 {
60  size_t argPos;
61  return argPos;
62 }
63 size_t modena_model_outputs_argPos(int *self, const char *name);
64 size_t modena_model_outputs_argPos(int *self, const char *name)
65 {
66  size_t argPos;
67  return argPos;
68 }
69 void modena_model_argPos_check(int *self);
70 void modena_model_argPos_check(int *self)
71 {
72 
73 }
74 void modena_inputs_set(int *self, const size_t i, double x);
75 void modena_inputs_set(int *self, const size_t i, double x)
76 {
77 
78 }
79 void modena_inputs_destroy(int *inputs);
80 void modena_inputs_destroy(int *self)
81 {
82 
83 }
84 void modena_outputs_destroy(int *inputs);
85 void modena_outputs_destroy(int *self)
86 {
87 
88 }
89 void modena_model_destroy(int *inputs);
90 void modena_model_destroy(int *self)
91 {
92 
93 }
94 double modena_outputs_get(int *self, const size_t i);
95 double modena_outputs_get(int *self, const size_t i)
96 {
97  double d;
98  return d;
99 }
100 int *modena_model_new(const char *modelId);
101 int *modena_model_new(const char *modelId)
102 {
103  int *i;
104  return i;
105 }
106 int modena_model_call(int *model, int *inputs, int *outputs);
107 int modena_model_call(int *model, int *inputs, int *outputs)
108 {
109  int i;
110  return i;
111 }
112 bool modena_error_occurred();
113 bool modena_error_occurred()
114 {
115  bool b;
116  return b;
117 }
118 int modena_error();
119 int modena_error()
120 {
121  int i;
122  return i;
123 }
size_t modena_model_inputs_argPos(const modena_model_t *self, const char *name)
Function determining position of an argument in the input vector.
Definition: model.c:366
int * modena_model_new(const char *modelId)
Function fetching a surrogate model from MongoDB.
Definition: fake_modena.c:101
int modena_model_call(modena_model_t *self, modena_inputs_t *inputs, modena_outputs_t *outputs)
Function calling the surrogate model and checking for errors.
Definition: model.c:553
real(dp), dimension(:), allocatable d
diffusion coefficients (for each dissolved gas)
Definition: globals.f90:106
void modena_model_destroy(modena_model_t *self)
Function deallocating the memory allocated for the surrogate model.
Definition: model.c:665
Definition: model.f90:7
size_t modena_model_outputs_argPos(const modena_model_t *self, const char *name)
Function determining position of a result in the output vector.
Definition: model.c:392
void modena_model_argPos_check(const modena_model_t *self)
Function checking that the user has queried all input positions.
Definition: model.c:408