117 |
} |
} |
118 |
|
|
119 |
//! Constructor. |
//! Constructor. |
120 |
OneMeshUserFunction::OneMeshUserFunction(ConstReferenceCounting<Structured3DMesh> Mesh) |
OneMeshUserFunction::OneMeshUserFunction(ConstReferenceCounting<Structured3DMesh> givenMesh) |
121 |
: mesh(Mesh) |
: __mesh(givenMesh) |
122 |
{ |
{ |
123 |
; |
; |
124 |
} |
} |
129 |
; |
; |
130 |
} |
} |
131 |
|
|
132 |
|
real_t OneDomainUserFunction::operator()(const TinyVector<3>& x) const |
133 |
|
{ |
134 |
|
return (*__domain).inside(x); |
135 |
|
} |
136 |
|
|
137 |
|
OneDomainUserFunction:: |
138 |
|
OneDomainUserFunction(ConstReferenceCounting<Domain> domain) |
139 |
|
: __domain(domain) |
140 |
|
{ |
141 |
|
; |
142 |
|
} |
143 |
|
|
144 |
|
OneDomainUserFunction::~OneDomainUserFunction() |
145 |
|
{ |
146 |
|
; |
147 |
|
} |
148 |
|
|
149 |
|
|
150 |
//! Evalutes the characteristic function of the \a mesh at point \a X |
//! Evalutes the characteristic function of the \a mesh at point \a X |
151 |
real_t OneMeshUserFunction::operator()(const TinyVector<3>& X) const |
real_t OneMeshUserFunction::operator()(const TinyVector<3>& X) const |
152 |
{ |
{ |
153 |
if ((*mesh).inside(X)) |
return ((*__mesh).inside(X)); |
|
return 1; |
|
|
else |
|
|
return 0; |
|
154 |
} |
} |
155 |
|
|
156 |
//! Constructs a FEMUserFunction using a pointer on a Structured3DMesh and a UserFunction |
//! Constructs a FEMUserFunction using a pointer on a Structured3DMesh and a UserFunction |