Tissue Forge C 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfCFlux.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of Tissue Forge.
3 * Copyright (c) 2022-2024 T.J. Sego
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 published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) 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 General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 ******************************************************************************/
19
24
25#ifndef _WRAPS_C_TFCFLUX_H_
26#define _WRAPS_C_TFCFLUX_H_
27
28#include "tf_port_c.h"
29
30#include "tfCParticle.h"
31
32// Handles
33
34struct CAPI_EXPORT tfFluxKindHandle {
35 unsigned int FLUX_FICK;
36 unsigned int FLUX_SECRETE;
37 unsigned int FLUX_UPTAKE;
38};
39
44struct CAPI_EXPORT tfFluxHandle {
45 void *tfObj;
46};
47
52struct CAPI_EXPORT tfFluxesHandle {
53 void *tfObj;
54};
55
56
58// FluxKind //
60
61
68CAPI_FUNC(HRESULT) tfFluxKindHandle_init(struct tfFluxKindHandle *handle);
69
70
72// Flux //
74
75
83CAPI_FUNC(HRESULT) tfFlux_getSize(struct tfFluxHandle *handle, unsigned int *size);
84
93CAPI_FUNC(HRESULT) tfFlux_getKind(struct tfFluxHandle *handle, unsigned int index, unsigned int *kind);
94
104CAPI_FUNC(HRESULT) tfFlux_getTypeIds(struct tfFluxHandle *handle, unsigned int index, unsigned int *typeid_a, unsigned int *typeid_b);
105
114CAPI_FUNC(HRESULT) tfFlux_getCoef(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t *coef);
115
124CAPI_FUNC(HRESULT) tfFlux_setCoef(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t coef);
125
134CAPI_FUNC(HRESULT) tfFlux_getDecayCoef(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t *decay_coef);
135
144CAPI_FUNC(HRESULT) tfFlux_setDecayCoef(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t decay_coef);
145
154CAPI_FUNC(HRESULT) tfFlux_getTarget(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t *target);
155
164CAPI_FUNC(HRESULT) tfFlux_setTarget(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t target);
165
174CAPI_FUNC(HRESULT) tfFlux_getCutoff(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t *cutoff);
175
184CAPI_FUNC(HRESULT) tfFlux_setCutoff(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t cutoff);
185
186
188// Fluxes //
190
191
199CAPI_FUNC(HRESULT) tfFluxes_getSize(struct tfFluxesHandle *handle, int *size);
200
209CAPI_FUNC(HRESULT) tfFluxes_getFlux(struct tfFluxesHandle *handle, unsigned int index, struct tfFluxHandle *flux);
210
211
213// Module functions //
215
216
248CAPI_FUNC(HRESULT) tfFluxes_fluxFick(
249 struct tfFluxesHandle *handle,
250 struct tfParticleTypeHandle *A,
251 struct tfParticleTypeHandle *B,
252 const char *name,
253 tfFloatP_t k,
254 tfFloatP_t decay,
255 tfFloatP_t cutoff
256);
257
290CAPI_FUNC(HRESULT) tfFluxes_secrete(
291 struct tfFluxesHandle *handle,
292 struct tfParticleTypeHandle *A,
293 struct tfParticleTypeHandle *B,
294 const char *name,
295 tfFloatP_t k,
296 tfFloatP_t target,
297 tfFloatP_t decay,
298 tfFloatP_t cutoff
299);
300
333CAPI_FUNC(HRESULT) tfFluxes_uptake(
334 struct tfFluxesHandle *handle,
335 struct tfParticleTypeHandle *A,
336 struct tfParticleTypeHandle *B,
337 const char *name,
338 tfFloatP_t k,
339 tfFloatP_t target,
340 tfFloatP_t decay,
341 tfFloatP_t cutoff
342);
343
344#endif // _WRAPS_C_TFCFLUX_H_
Handle to a Flux instance.
Definition tfCFlux.h:44
Definition tfCFlux.h:34
Handle to a Fluxes instance.
Definition tfCFlux.h:52
Handle to a ParticleType instance.
Definition tfCParticle.h:119
HRESULT tfFluxes_uptake(struct tfFluxesHandle *handle, struct tfParticleTypeHandle *A, struct tfParticleTypeHandle *B, const char *name, tfFloatP_t k, tfFloatP_t target, tfFloatP_t decay, tfFloatP_t cutoff)
Creates an uptake flux by active pumping.
HRESULT tfFluxes_getSize(struct tfFluxesHandle *handle, int *size)
Get the number of individual flux objects.
HRESULT tfFluxes_secrete(struct tfFluxesHandle *handle, struct tfParticleTypeHandle *A, struct tfParticleTypeHandle *B, const char *name, tfFloatP_t k, tfFloatP_t target, tfFloatP_t decay, tfFloatP_t cutoff)
Creates a secretion flux by active pumping.
HRESULT tfFluxes_getFlux(struct tfFluxesHandle *handle, unsigned int index, struct tfFluxHandle *flux)
Get a flux.
HRESULT tfFlux_getSize(struct tfFluxHandle *handle, unsigned int *size)
Get the size of the fluxes.
HRESULT tfFluxKindHandle_init(struct tfFluxKindHandle *handle)
Initialize an instance.
HRESULT tfFlux_getDecayCoef(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t *decay_coef)
Get the decay coefficient of a flux.
HRESULT tfFluxes_fluxFick(struct tfFluxesHandle *handle, struct tfParticleTypeHandle *A, struct tfParticleTypeHandle *B, const char *name, tfFloatP_t k, tfFloatP_t decay, tfFloatP_t cutoff)
Creates and binds a Fickian diffusion flux.
HRESULT tfFlux_setCoef(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t coef)
Set the coefficient of a flux.
HRESULT tfFlux_getTarget(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t *target)
Get the target of a flux.
HRESULT tfFlux_setCutoff(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t cutoff)
Set the cutoff of a flux.
HRESULT tfFlux_getKind(struct tfFluxHandle *handle, unsigned int index, unsigned int *kind)
Get the kind of a flux.
HRESULT tfFlux_getCutoff(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t *cutoff)
Set the cutoff of a flux.
HRESULT tfFlux_setTarget(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t target)
Set the target of a flux.
HRESULT tfFlux_getTypeIds(struct tfFluxHandle *handle, unsigned int index, unsigned int *typeid_a, unsigned int *typeid_b)
Get the type ids of a flux.
HRESULT tfFlux_getCoef(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t *coef)
Get the coefficient of a flux.
HRESULT tfFlux_setDecayCoef(struct tfFluxHandle *handle, unsigned int index, tfFloatP_t decay_coef)
Set the decay coefficient of a flux.