16-mol_surf_crash.mdl 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /****************************************************************************
  2. * Regression test 16: Volume molecule + surface reactions, such as those used
  3. * in absorptive or concentration clamped surfaces, were not properly
  4. * checking whether any ENCLOSED (or other waypoint-requiring) counts had
  5. * been requested. This leads to a seg fault if no other waypoint-requiring
  6. * features are needed, and some unnecessary computation otherwise.
  7. * Also here we are testing keywords CLAMP_CONC, ESTIMATE_CONC,
  8. * DIFFUSION_CONSTANT
  9. *
  10. * Failure: crash
  11. * Success: run exits successfully
  12. *
  13. * Author: Jed Wing <[email protected]>
  14. * Date: 2009-06-15
  15. ****************************************************************************/
  16. TIME_STEP_MAX = 1e-5
  17. TIME_STEP = 1e-5
  18. ITERATIONS = 10
  19. INTERACTION_RADIUS = 0.0002
  20. PARTITION_X = [[-0.01 TO 0.01 STEP 0.002]]
  21. PARTITION_Y = [[-0.01 TO 0.01 STEP 0.002]]
  22. PARTITION_Z = [[-0.01 TO 0.01 STEP 0.002]]
  23. DEFINE_MOLECULES {
  24. Ca { DIFFUSION_CONSTANT_3D = 2.5e-8 }
  25. B { DIFFUSION_CONSTANT = 2.5e-8 }
  26. }
  27. DEFINE_SURFACE_CLASSES {
  28. trans { TRANSPARENT = Ca }
  29. reflect { REFLECTIVE = Ca }
  30. clamp { CLAMP_CONCENTRATION Ca, = 10
  31. CLAMP_CONC B, = 20
  32. }
  33. }
  34. INSTANTIATE world OBJECT
  35. {
  36. container BOX {
  37. CORNERS = [-0.01, -0.01, -0.01], [0.01, 0.01, 0.01]
  38. DEFINE_SURFACE_REGIONS {
  39. sides {
  40. ELEMENT_LIST = [ALL_ELEMENTS]
  41. SURFACE_CLASS = clamp
  42. }
  43. }
  44. }
  45. sample POLYGON_LIST {
  46. VERTEX_LIST {
  47. [-0.01, -0.01, -0.01 ]
  48. [-0.01, 0.01, -0.01 ]
  49. [-0.01, -0.01, 0.01 ]
  50. [-0.01, 0.01, 0.01 ]
  51. }
  52. ELEMENT_CONNECTIONS {
  53. [0,3,1]
  54. [0,2,3]
  55. }
  56. DEFINE_SURFACE_REGIONS {
  57. reg {
  58. ELEMENT_LIST = [ALL_ELEMENTS]
  59. SURFACE_CLASS = trans
  60. }
  61. }
  62. }
  63. }
  64. /* NOTE: COUNT statement is required in order to enable counting for Ca, and it
  65. * must be a type of counting other than simple WORLD counting, and it
  66. * must not trigger waypoint placement at program initialization time.
  67. * Thus, ESTIMATE_CONCENTRATION.
  68. */
  69. REACTION_DATA_OUTPUT {
  70. STEP = 1e-5
  71. {COUNT [Ca,world.sample[reg],ESTIMATE_CONCENTRATION]} => "./conc_Ca.dat"
  72. {COUNT [B,world.sample[reg],ESTIMATE_CONC]} => "./conc_B.dat"
  73. }