46 |
: public Problem |
: public Problem |
47 |
{ |
{ |
48 |
private: |
private: |
49 |
typedef std::list <ReferenceCounting<VariationalBilinearOperator> > |
typedef std::list <ConstReferenceCounting<VariationalBilinearOperator> > |
50 |
BilinearOperatorListType; |
BilinearOperatorListType; |
51 |
|
|
52 |
BilinearOperatorListType __bilinearOperatorList; /**< list of bilinear operators */ |
BilinearOperatorListType __bilinearOperatorList; /**< list of bilinear operators */ |
53 |
|
|
54 |
typedef std::list <ReferenceCounting<VariationalLinearOperator> > |
typedef std::list <ConstReferenceCounting<VariationalLinearOperator> > |
55 |
LinearOperatorListType; |
LinearOperatorListType; |
56 |
|
|
57 |
LinearOperatorListType __linearOperatorList; /**< list of linear operators */ |
LinearOperatorListType __linearOperatorList; /**< list of linear operators */ |
58 |
|
|
59 |
|
|
60 |
typedef std::list <ReferenceCounting<VariationalBilinearBorderOperator> > |
typedef std::list <ConstReferenceCounting<VariationalBilinearBorderOperator> > |
61 |
BilinearBorderOperatorListType; |
BilinearBorderOperatorListType; |
62 |
|
|
63 |
BilinearBorderOperatorListType |
BilinearBorderOperatorListType |
65 |
operators living on the border for |
operators living on the border for |
66 |
natural BC as an example */ |
natural BC as an example */ |
67 |
|
|
68 |
typedef std::list <ReferenceCounting<VariationalLinearBorderOperator> > |
typedef std::list <ConstReferenceCounting<VariationalLinearBorderOperator> > |
69 |
LinearBorderOperatorListType; |
LinearBorderOperatorListType; |
70 |
|
|
71 |
LinearBorderOperatorListType |
LinearBorderOperatorListType |
73 |
ie operators living on the border for |
ie operators living on the border for |
74 |
natural BC for example */ |
natural BC for example */ |
75 |
|
|
76 |
std::vector<ReferenceCounting<BoundaryConditionSet> > |
std::vector<ConstReferenceCounting<BoundaryConditionSet> > |
77 |
__bc; /**< list of dirichlet conditions */ |
__bc; /**< list of dirichlet conditions */ |
78 |
|
|
79 |
public: |
public: |
209 |
return __linearBorderOperatorList.end(); |
return __linearBorderOperatorList.end(); |
210 |
} |
} |
211 |
|
|
212 |
|
/** |
213 |
|
* Returns the problem given by the "product" of a function u in the |
214 |
|
* variational forms |
215 |
|
* |
216 |
|
* @param u the given function |
217 |
|
* |
218 |
|
* @return the modified problem |
219 |
|
*/ |
220 |
ReferenceCounting<Problem> operator * (ConstReferenceCounting<UserFunction> u) const |
ReferenceCounting<Problem> operator * (ConstReferenceCounting<UserFunction> u) const |
221 |
{ |
{ |
222 |
fferr(0) << __FILE__ << ':' << __LINE__ << ": Not implemented\n"; |
VariationalProblem* newVariationalProblem = new VariationalProblem(*this); |
223 |
std::exit(1); |
|
224 |
return const_cast<VariationalProblem*>(this); |
for (BilinearOperatorListType::const_iterator i = __bilinearOperatorList.begin(); |
225 |
|
i != __bilinearOperatorList.end(); ++i) { |
226 |
|
newVariationalProblem->__bilinearOperatorList.push_back((*(*i))* u); |
227 |
|
} |
228 |
|
|
229 |
|
for (LinearOperatorListType::const_iterator i = __linearOperatorList.begin(); |
230 |
|
i != __linearOperatorList.end(); ++i) { |
231 |
|
newVariationalProblem->__linearOperatorList.push_back((*(*i))* u); |
232 |
|
} |
233 |
|
|
234 |
|
return newVariationalProblem; |
235 |
} |
} |
236 |
|
|
237 |
/** |
/** |
303 |
* |
* |
304 |
* @param v Boundary condition sets |
* @param v Boundary condition sets |
305 |
*/ |
*/ |
306 |
VariationalProblem(std::vector<ReferenceCounting<BoundaryConditionSet> > bc) |
VariationalProblem(std::vector<ConstReferenceCounting<BoundaryConditionSet> > bc) |
307 |
: Problem(Problem::variationalProblem, 0), |
: Problem(Problem::variationalProblem, 0), |
308 |
__bc(bc) |
__bc(bc) |
309 |
{ |
{ |