| 1 | #cxx . . $ `<file>/artsynth/Delta.h`/ifndef _Delta_h_ |
| 2 | #define _Delta_h_cxx . . $ `artsynth/Delta.h:2:9`! |
| 3 | /* Delta.h |
| 4 | * |
| 5 | * Copyright (C) 1992-2005,2007,2011,2015-2017,2019 Paul Boersma |
| 6 | * |
| 7 | * This code is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or (at |
| 10 | * your option) any later version. |
| 11 | * |
| 12 | * This code is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 15 | * See the GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | #include "Thing.h"cxx . . $ `<file>/sys/Thing.h`/ |
| 22 | |
| 23 | typedef struct structDelta_Tubecxx . . $ structDelta_Tube# *Delta_Tubecxx . . $ Delta_Tube#; |
| 24 | struct structDelta_Tubecxx . . $ structDelta_Tube# |
| 25 | { |
| 26 | /* Structure: static. */ |
| 27 | |
| 28 | Delta_Tubecxx . . $ Delta_Tube# left1cxx . . $ structDelta_Tube#left1.; // if null: closed at left edge |
| 29 | Delta_Tubecxx . . $ Delta_Tube# left2cxx . . $ structDelta_Tube#left2.; // if not null: two merging streams |
| 30 | Delta_Tubecxx . . $ Delta_Tube# right1cxx . . $ structDelta_Tube#right1.; // if null: radiation at right edge |
| 31 | Delta_Tubecxx . . $ Delta_Tube# right2cxx . . $ structDelta_Tube#right2.; // if not null: a stream splitting into two |
| 32 | integercxx . . $ integer# parallelcxx . . $ structDelta_Tube#parallel.; // parallel subdivision |
| 33 | |
| 34 | /* Controlled by articulation: quasistatic. */ |
| 35 | |
| 36 | double Dxeqcxx . . $ structDelta_Tube#Dxeq., Dyeqcxx . . $ structDelta_Tube#Dyeq., Dzeqcxx . . $ structDelta_Tube#Dzeq.; |
| 37 | double masscxx . . $ structDelta_Tube#mass., k1cxx . . $ structDelta_Tube#k1., k3cxx . . $ structDelta_Tube#k3., Brelcxx . . $ structDelta_Tube#Brel., s1cxx . . $ structDelta_Tube#s1., s3cxx . . $ structDelta_Tube#s3., dycxx . . $ structDelta_Tube#dy.; |
| 38 | double k1left1cxx . . $ structDelta_Tube#k1left1., k1left2cxx . . $ structDelta_Tube#k1left2., k1right1cxx . . $ structDelta_Tube#k1right1., k1right2cxx . . $ structDelta_Tube#k1right2.; // linear coupling factors |
| 39 | double k3left1cxx . . $ structDelta_Tube#k3left1., k3left2cxx . . $ structDelta_Tube#k3left2., k3right1cxx . . $ structDelta_Tube#k3right1., k3right2cxx . . $ structDelta_Tube#k3right2.; // cubic coupling factors |
| 40 | |
| 41 | /* Dynamic. */ |
| 42 | |
| 43 | double Jhalfcxx . . $ structDelta_Tube#Jhalf., Jleftcxx . . $ structDelta_Tube#Jleft., Jleftnewcxx . . $ structDelta_Tube#Jleftnew., Jrightcxx . . $ structDelta_Tube#Jright., Jrightnewcxx . . $ structDelta_Tube#Jrightnew.; |
| 44 | double Qhalfcxx . . $ structDelta_Tube#Qhalf., Qleftcxx . . $ structDelta_Tube#Qleft., Qleftnewcxx . . $ structDelta_Tube#Qleftnew., Qrightcxx . . $ structDelta_Tube#Qright., Qrightnewcxx . . $ structDelta_Tube#Qrightnew.; |
| 45 | double Dxcxx . . $ structDelta_Tube#Dx., Dxnewcxx . . $ structDelta_Tube#Dxnew., dDxdtcxx . . $ structDelta_Tube#dDxdt., dDxdtnewcxx . . $ structDelta_Tube#dDxdtnew., Dxhalfcxx . . $ structDelta_Tube#Dxhalf.; |
| 46 | double Dycxx . . $ structDelta_Tube#Dy., Dynewcxx . . $ structDelta_Tube#Dynew., dDydtcxx . . $ structDelta_Tube#dDydt., dDydtnewcxx . . $ structDelta_Tube#dDydtnew.; |
| 47 | double Dzcxx . . $ structDelta_Tube#Dz.; |
| 48 | double Acxx . . $ structDelta_Tube#A., Ahalfcxx . . $ structDelta_Tube#Ahalf., Anewcxx . . $ structDelta_Tube#Anew., Vcxx . . $ structDelta_Tube#V., Vnewcxx . . $ structDelta_Tube#Vnew.; |
| 49 | double ecxx . . $ structDelta_Tube#e., ehalfcxx . . $ structDelta_Tube#ehalf., eleftcxx . . $ structDelta_Tube#eleft., eleftnewcxx . . $ structDelta_Tube#eleftnew., erightcxx . . $ structDelta_Tube#eright., erightnewcxx . . $ structDelta_Tube#erightnew., ehalfoldcxx . . $ structDelta_Tube#ehalfold.; |
| 50 | double pcxx . . $ structDelta_Tube#p., phalfcxx . . $ structDelta_Tube#phalf., pleftcxx . . $ structDelta_Tube#pleft., pleftnewcxx . . $ structDelta_Tube#pleftnew., prightcxx . . $ structDelta_Tube#pright., prightnewcxx . . $ structDelta_Tube#prightnew.; |
| 51 | double Kleftcxx . . $ structDelta_Tube#Kleft., Kleftnewcxx . . $ structDelta_Tube#Kleftnew., Krightcxx . . $ structDelta_Tube#Kright., Krightnewcxx . . $ structDelta_Tube#Krightnew., Pturbrightcxx . . $ structDelta_Tube#Pturbright., Pturbrightnewcxx . . $ structDelta_Tube#Pturbrightnew.; |
| 52 | double Bcxx . . $ structDelta_Tube#B., rcxx . . $ structDelta_Tube#r., Rcxx . . $ structDelta_Tube#R., DeltaPcxx . . $ structDelta_Tube#DeltaP., vcxx . . $ structDelta_Tube#v.; |
| 53 | }; |
| 54 | |
| 55 | Thing_definecxx . . $ `sys/Thing.h:60:9`! (Delta, Thing) { |
| 56 | integercxx . . $ integer# numberOfTubescxx . . $ structDelta#numberOfTubes.; // >= 1 |
| 57 | autovectorcxx . . $ autovector# <structDelta_Tubecxx . . $ structDelta_Tube#> tubescxx . . $ structDelta#tubes.; |
| 58 | }; |
| 59 | |
| 60 | void Delta_initcxx . . $ Delta_init(dd9d2f7f47697cd2). (Deltacxx . . $ Delta# me, integercxx . . $ integer# numberOfTubes); |
| 61 | |
| 62 | autoDeltacxx . . $ autoDelta# Delta_createcxx . . $ Delta_create(42b4abae2ec5400). (integercxx . . $ integer# numberOfTubes); |
| 63 | /* |
| 64 | Function: |
| 65 | return a new Delta. |
| 66 | Preconditions: |
| 67 | numberOfTubes >= 1; |
| 68 | Postconditions: |
| 69 | result -> numberOfTubes = numberOfTubes; |
| 70 | all members of result -> tube [1..numberOfTubes] are zero or null, |
| 71 | except 'parallel', which is 1. |
| 72 | */ |
| 73 | |
| 74 | /* End of file Delta.h */ |
| 75 | #endif |