Tissue Forge C 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfCBoundaryConditions.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
25#ifndef _WRAPS_C_TFCBOUNDARYCONDITIONS_H_
26#define _WRAPS_C_TFCBOUNDARYCONDITIONS_H_
27
28#include "tf_port_c.h"
29
30#include "tfCParticle.h"
31#include "tfCPotential.h"
32
33// Handles
34
40 unsigned int SPACE_PERIODIC_X;
41 unsigned int SPACE_PERIODIC_Y;
42 unsigned int SPACE_PERIODIC_Z;
43 unsigned int SPACE_PERIODIC_FULL;
44 unsigned int SPACE_FREESLIP_X;
45 unsigned int SPACE_FREESLIP_Y;
46 unsigned int SPACE_FREESLIP_Z;
47 unsigned int SPACE_FREESLIP_FULL;
48};
49
55 unsigned int BOUNDARY_PERIODIC;
56 unsigned int BOUNDARY_FREESLIP;
57 unsigned int BOUNDARY_RESETTING;
58};
59
64struct CAPI_EXPORT tfBoundaryConditionHandle {
65 void *tfObj;
66};
67
72struct CAPI_EXPORT tfBoundaryConditionsHandle {
73 void *tfObj;
74};
75
81 void *tfObj;
82};
83
84
86// BoundaryConditionSpaceKind //
88
89
97
98
100// BoundaryConditionKind //
102
103
111
112
114// BoundaryCondition //
116
117
125CAPI_FUNC(HRESULT) tfBoundaryCondition_getId(struct tfBoundaryConditionHandle *handle, int *bid);
126
134CAPI_FUNC(HRESULT) tfBoundaryCondition_getVelocity(struct tfBoundaryConditionHandle *handle, tfFloatP_t **velocity);
135
143CAPI_FUNC(HRESULT) tfBoundaryCondition_setVelocity(struct tfBoundaryConditionHandle *handle, tfFloatP_t *velocity);
144
152CAPI_FUNC(HRESULT) tfBoundaryCondition_getRestore(struct tfBoundaryConditionHandle *handle, tfFloatP_t *restore);
153
161CAPI_FUNC(HRESULT) tfBoundaryCondition_setRestore(struct tfBoundaryConditionHandle *handle, tfFloatP_t restore);
162
170CAPI_FUNC(HRESULT) tfBoundaryCondition_getNormal(struct tfBoundaryConditionHandle *handle, tfFloatP_t **normal);
171
179CAPI_FUNC(HRESULT) tfBoundaryCondition_getRadius(struct tfBoundaryConditionHandle *handle, tfFloatP_t *radius);
180
188CAPI_FUNC(HRESULT) tfBoundaryCondition_setRadius(struct tfBoundaryConditionHandle *handle, tfFloatP_t radius);
189
198CAPI_FUNC(HRESULT) tfBoundaryCondition_setPotential(struct tfBoundaryConditionHandle *handle, struct tfParticleTypeHandle *partHandle, struct tfPotentialHandle *potHandle);
199
200
202// BoundaryConditions //
204
205
213CAPI_FUNC(HRESULT) tfBoundaryConditions_getTop(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle);
214
223
231CAPI_FUNC(HRESULT) tfBoundaryConditions_getLeft(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle);
232
240CAPI_FUNC(HRESULT) tfBoundaryConditions_getRight(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle);
241
249CAPI_FUNC(HRESULT) tfBoundaryConditions_getFront(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle);
250
258CAPI_FUNC(HRESULT) tfBoundaryConditions_getBack(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle);
259
268CAPI_FUNC(HRESULT) tfBoundaryConditions_setPotential(struct tfBoundaryConditionsHandle *handle, struct tfParticleTypeHandle *partHandle, struct tfPotentialHandle *potHandle);
269
276CAPI_FUNC(HRESULT) tfBoundaryConditions_boundedPosition(tfFloatP_t* position);
277
278
280// BoundaryConditionsArgsContainer //
282
283
291
299
308
316CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_getValueAll(struct tfBoundaryConditionsArgsContainerHandle *handle, unsigned int *_bcValue);
317
325CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_setValueAll(struct tfBoundaryConditionsArgsContainerHandle *handle, unsigned int _bcValue);
326
335CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_hasValue(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, bool *has);
336
345CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_getValue(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, unsigned int *value);
346
355CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_setValue(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, unsigned int value);
356
365CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_hasVelocity(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, bool *has);
366
375CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_getVelocity(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, tfFloatP_t **velocity);
376
385CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_setVelocity(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, tfFloatP_t *velocity);
386
395CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_hasRestore(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, bool *has);
396
405CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_getRestore(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, tfFloatP_t *restore);
406
415CAPI_FUNC(HRESULT) tfBoundaryConditionsArgsContainer_setRestore(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, tfFloatP_t restore);
416
417#endif // _WRAPS_C_TFCBOUNDARYCONDITIONS_H_
Handle to a BoundaryCondition instance.
Definition tfCBoundaryConditions.h:64
Enums for kind of individual boundary condition.
Definition tfCBoundaryConditions.h:54
Enums for kind of boundary conditions along directions.
Definition tfCBoundaryConditions.h:39
Handle to a BoundaryConditionsArgsContainer instance.
Definition tfCBoundaryConditions.h:80
Handle to a BoundaryConditions instance.
Definition tfCBoundaryConditions.h:72
Handle to a ParticleType instance.
Definition tfCParticle.h:119
Handle to a Potential instance.
Definition tfCPotential.h:144
HRESULT tfBoundaryConditionsArgsContainer_setVelocity(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, tfFloatP_t *velocity)
Set the velocity of a boundary.
HRESULT tfBoundaryCondition_getVelocity(struct tfBoundaryConditionHandle *handle, tfFloatP_t **velocity)
Get the velocity of a boundary condition.
HRESULT tfBoundaryConditionsArgsContainer_init(struct tfBoundaryConditionsArgsContainerHandle *handle)
Initialize an instance.
HRESULT tfBoundaryConditions_getLeft(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle)
Get the left boundary condition.
HRESULT tfBoundaryCondition_setVelocity(struct tfBoundaryConditionHandle *handle, tfFloatP_t *velocity)
Set the velocity of a boundary condition.
HRESULT tfBoundaryConditionsArgsContainer_hasValue(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, bool *has)
Test whether a boundary has a boundary type value.
HRESULT tfBoundaryConditionsArgsContainer_getValue(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, unsigned int *value)
Get the boundary type value of a boundary.
HRESULT tfBoundaryConditionsArgsContainer_setValue(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, unsigned int value)
Set the boundary type value of a boundary.
HRESULT tfBoundaryConditions_getFront(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle)
Get the front boundary condition.
HRESULT tfBoundaryCondition_getRadius(struct tfBoundaryConditionHandle *handle, tfFloatP_t *radius)
Get the equivalent radius of a boundary condition.
HRESULT tfBoundaryCondition_getId(struct tfBoundaryConditionHandle *handle, int *bid)
Get the id of a boundary condition.
HRESULT tfBoundaryCondition_setPotential(struct tfBoundaryConditionHandle *handle, struct tfParticleTypeHandle *partHandle, struct tfPotentialHandle *potHandle)
Set the potential of a boundary condition for a particle type.
HRESULT tfBoundaryConditions_setPotential(struct tfBoundaryConditionsHandle *handle, struct tfParticleTypeHandle *partHandle, struct tfPotentialHandle *potHandle)
Set the potential on all boundaries for a particle type.
HRESULT tfBoundaryConditionsArgsContainer_setRestore(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, tfFloatP_t restore)
Set the restore coefficient of a boundary.
HRESULT tfBoundaryConditions_getTop(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle)
Get the top boundary condition.
HRESULT tfBoundaryConditionsArgsContainer_destroy(struct tfBoundaryConditionsArgsContainerHandle *handle)
Destroy an instance.
HRESULT tfBoundaryConditions_getBottom(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle)
Get the bottom boundary condition.
HRESULT tfBoundaryConditionsArgsContainer_hasVelocity(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, bool *has)
Test whether a boundary has a velocity.
HRESULT tfBoundaryConditionSpaceKind_init(struct tfBoundaryConditionSpaceKindHandle *handle)
Initialize an instance.
HRESULT tfBoundaryCondition_getRestore(struct tfBoundaryConditionHandle *handle, tfFloatP_t *restore)
Get the restore coefficient of a boundary condition.
HRESULT tfBoundaryConditionsArgsContainer_getRestore(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, tfFloatP_t *restore)
Get the restore coefficient of a boundary.
HRESULT tfBoundaryConditions_getBack(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle)
Get the back boundary condition.
HRESULT tfBoundaryConditionKind_init(struct tfBoundaryConditionKindHandle *handle)
Initialize an instance.
HRESULT tfBoundaryConditionsArgsContainer_getValueAll(struct tfBoundaryConditionsArgsContainerHandle *handle, unsigned int *_bcValue)
Get the boundary type value on all boundaries.
HRESULT tfBoundaryCondition_setRestore(struct tfBoundaryConditionHandle *handle, tfFloatP_t restore)
Set the restore coefficient of a boundary condition.
HRESULT tfBoundaryConditionsArgsContainer_getVelocity(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, tfFloatP_t **velocity)
Get the velocity of a boundary.
HRESULT tfBoundaryCondition_setRadius(struct tfBoundaryConditionHandle *handle, tfFloatP_t radius)
Set the equivalent radius of a boundary condition.
HRESULT tfBoundaryConditionsArgsContainer_hasRestore(struct tfBoundaryConditionsArgsContainerHandle *handle, const char *name, bool *has)
Test whether a boundary has a restore coefficient.
HRESULT tfBoundaryConditions_boundedPosition(tfFloatP_t *position)
Enforce boundary conditions on a position.
HRESULT tfBoundaryConditionsArgsContainer_hasValueAll(struct tfBoundaryConditionsArgsContainerHandle *handle, bool *has)
Test whether a value type is applied to all boundaries.
HRESULT tfBoundaryConditions_getRight(struct tfBoundaryConditionsHandle *handle, struct tfBoundaryConditionHandle *bchandle)
Get the right boundary condition.
HRESULT tfBoundaryConditionsArgsContainer_setValueAll(struct tfBoundaryConditionsArgsContainerHandle *handle, unsigned int _bcValue)
Set the boundary type value on all boundaries.
HRESULT tfBoundaryCondition_getNormal(struct tfBoundaryConditionHandle *handle, tfFloatP_t **normal)
Get the normal of a boundary condition.