MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Boundary.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment.
4 ** Copyright (C) 2003-2010 Upinder S. Bhalla. and NCBS
5 ** It is made available under the terms of the
6 ** GNU Lesser General Public License version 2.1
7 ** See the file COPYING.LIB for the full notice.
8 **********************************************************************/
9 
10 #include "header.h"
11 #include "Boundary.h"
12 #include "MeshEntry.h"
13 // #include "Stencil.h"
14 #include "ChemCompt.h"
15 
17 {
18  static ValueFinfo< Boundary, double > reflectivity(
19  "reflectivity",
20  "What happens to a molecule hitting it: bounces, absorbed, diffused?",
23  );
24 
25  /*
26  static DestFinfo geometry( "geometry",
27  "Size message coming from geometry object for this Boundary"
28  "The three arguments are volume, area, and perimeter. The"
29  "receiving function decides which it cares about."
30  "The originating geometry may return zero on some of the"
31  "dimensions if they do not apply",
32  new UpFunc3< ChemCompt, double, double, double >( &ChemCompt::extent ) );
33  */
34 
35  static DestFinfo adjacent( "adjacent",
36  "Dummy message coming from adjacent compartment to current one"
37  "Implies that compts are peers: do not surround each other",
38  new OpFuncDummy() );
39 
40  static DestFinfo outside( "outside",
41  "Dummy message coming from surrounding compartment to this one."
42  "Implies that the originating compartment surrounds this one",
43  new OpFuncDummy() );
44 
45  static SrcFinfo0 toAdjacent( "toAdjacent",
46  "Dummy message going to adjacent compartment."
47  );
48 
49  static SrcFinfo0 toInside( "toInside",
50  "Dummy message going to surrounded compartment."
51  );
52 
53 
54  static Finfo* boundaryFinfos[] = {
55  &reflectivity, // Field
56  // &geometry, // DestFinfo
57  &adjacent, // DestFinfo
58  &outside, // DestFinfo
59  &toAdjacent, // SrcFinfo
60  &toInside, // SrcFinfo
61  };
62 
63  static Dinfo< Boundary > dinfo;
64  static Cinfo boundaryCinfo (
65  "Boundary",
66  // No base class, but eventually I guess it will be neutral.
68  boundaryFinfos,
69  sizeof( boundaryFinfos ) / sizeof ( Finfo* ),
70  &dinfo
71  );
72 
73  return &boundaryCinfo;
74 }
75 
77 
79  : reflectivity_( 1.0 )
80 {
81  ;
82 }
83 
84 void Boundary::setReflectivity( const double v )
85 {
86  reflectivity_ = v;
87 }
88 
90 {
91  return reflectivity_;
92 }
93 
Definition: Dinfo.h:60
Boundary()
Definition: Boundary.cpp:78
double reflectivity_
Definition: Boundary.h:32
static const Cinfo * initCinfo()
Definition: Boundary.cpp:16
double getReflectivity() const
Definition: Boundary.cpp:89
void setReflectivity(const double v)
Definition: Boundary.cpp:84
static const Cinfo * initCinfo()
Definition: Neutral.cpp:16
Definition: Cinfo.h:18
static const Cinfo * boundaryCinfo
Definition: Boundary.cpp:76
Definition: Finfo.h:12