| 6275 | }; |
| 6276 | |
| 6277 | extern |
| 6278 | shared_ptr<CoefficientFunction> IfPos (shared_ptr<CoefficientFunction> cf_if, |
| 6279 | shared_ptr<CoefficientFunction> cf_then, |
| 6280 | shared_ptr<CoefficientFunction> cf_else) |
| 6281 | { |
| 6282 | if(cf_if->Dimension() != 1) |
| 6283 | throw Exception("Dimension of first component in IfPos must be 1!"); |
| 6284 | if (cf_then->IsZeroCF() && cf_else->IsZeroCF()) |
| 6285 | return cf_then; |
| 6286 | return make_shared<IfPosCoefficientFunction> (cf_if, cf_then, cf_else); |
| 6287 | } |
| 6288 | |
| 6289 | |
| 6290 | class VectorialCoefficientFunction : public T_CoefficientFunction<VectorialCoefficientFunction> |