15#include "arcane/utils/ArcanePrecomp.h"
17#include "arcane/utils/Array.h"
18#include "arcane/utils/Iostream.h"
20#include "arcane/expr/Expression.h"
21#include "arcane/expr/ExpressionImpl.h"
22#include "arcane/expr/ExpressionResult.h"
23#include "arcane/expr/BinaryExpressionImpl.h"
24#include "arcane/expr/UnaryExpressionImpl.h"
25#include "arcane/expr/LitteralExpressionImpl.h"
26#include "arcane/expr/WhereExpressionImpl.h"
46 m_expression->addRef();
54 m_expression->addRef();
59: m_expression(
expr.m_expression)
62 m_expression->addRef();
72 m_expression->removeRef();
80 m_expression->removeRef();
84assign(
const Expression& expr)
86 m_expression->assign(expr.m_expression);
90assign(
const Expression& expr,
const Array<Integer>& indices)
92 m_expression->assign(expr.m_expression, indices);
99 m_expression->assign(expr.m_expression);
103apply(ExpressionResult* result)
105 m_expression->apply(result);
109dumpIf(
const Expression& test_expr,Array<Expression>& exprs)
111 m_expression->dumpIf(test_expr.m_expression,exprs);
115dumpIf(
const Expression& test_expr)
117 UniqueArray<Expression> exprs;
118 m_expression->dumpIf(test_expr.m_expression,exprs);
121IExpressionImpl* Expression::
122operator->()
const {
return m_expression;}
127Expression Expression::
130 return new UnaryExpressionImpl(m_expression,
131 UnaryExpressionImpl::UnarySubstract);
134Expression Expression::
137 return new UnaryExpressionImpl(m_expression,
138 UnaryExpressionImpl::Inverse);
144Expression Expression::
147 return new UnaryExpressionImpl(m_expression,
148 UnaryExpressionImpl::Acos);
151Expression Expression::
154 return new UnaryExpressionImpl(m_expression,
155 UnaryExpressionImpl::Asin);
158Expression Expression::
161 return new UnaryExpressionImpl(m_expression,
162 UnaryExpressionImpl::Atan);
165Expression Expression::
168 return new UnaryExpressionImpl(m_expression,
169 UnaryExpressionImpl::Ceil);
172Expression Expression::
175 return new UnaryExpressionImpl(m_expression,
176 UnaryExpressionImpl::Cos);
179Expression Expression::
182 return new UnaryExpressionImpl(m_expression,
183 UnaryExpressionImpl::Cosh);
186Expression Expression::
189 return new UnaryExpressionImpl(m_expression,
190 UnaryExpressionImpl::Exp);
193Expression Expression::
196 return new UnaryExpressionImpl(m_expression,
197 UnaryExpressionImpl::Fabs);
200Expression Expression::
203 return new UnaryExpressionImpl(m_expression,
204 UnaryExpressionImpl::Floor);
207Expression Expression::
210 return new UnaryExpressionImpl(m_expression,
211 UnaryExpressionImpl::Log);
214Expression Expression::
217 return new UnaryExpressionImpl(m_expression,
218 UnaryExpressionImpl::Log10);
221Expression Expression::
224 return new UnaryExpressionImpl(m_expression,
225 UnaryExpressionImpl::Sin);
228Expression Expression::
231 return new UnaryExpressionImpl(m_expression,
232 UnaryExpressionImpl::Sinh);
235Expression Expression::
238 return new UnaryExpressionImpl(m_expression,
239 UnaryExpressionImpl::Sqrt);
242Expression Expression::
245 return new UnaryExpressionImpl(m_expression,
246 UnaryExpressionImpl::Tan);
249Expression Expression::
252 return new UnaryExpressionImpl(m_expression,
253 UnaryExpressionImpl::Tanh);
259Expression Expression::
260operator+(Expression ex1)
262 return new BinaryExpressionImpl(m_expression,ex1. m_expression,
263 BinaryExpressionImpl::Add);
266Expression Expression::
267operator-(Expression ex1)
269 return new BinaryExpressionImpl(m_expression,ex1. m_expression,
270 BinaryExpressionImpl::Substract);
273Expression Expression::
274operator*(Expression ex1)
276 return new BinaryExpressionImpl(m_expression,ex1. m_expression,
277 BinaryExpressionImpl::Multiply);
280Expression Expression::
281operator/(Expression ex1)
283 return new BinaryExpressionImpl(m_expression,ex1. m_expression,
284 BinaryExpressionImpl::Divide);
287Expression Expression::
290 return new BinaryExpressionImpl(m_expression,ex1. m_expression,
291 BinaryExpressionImpl::Equal);
294Expression Expression::
297 return new BinaryExpressionImpl(m_expression,ex1. m_expression,
298 BinaryExpressionImpl::LessThan);
301Expression Expression::
304 return new BinaryExpressionImpl(m_expression, ex1.m_expression,
305 BinaryExpressionImpl::GreaterThan);
308Expression Expression::
311 return new BinaryExpressionImpl(m_expression, ex1.m_expression,
312 BinaryExpressionImpl::LessOrEqualThan);
315Expression Expression::
318 return new BinaryExpressionImpl(m_expression, ex1.m_expression,
319 BinaryExpressionImpl::GreaterOrEqualThan);
321Expression Expression::
324 return new BinaryExpressionImpl(m_expression, ex1.m_expression,
325 BinaryExpressionImpl::And);
327Expression Expression::
330 return new BinaryExpressionImpl(m_expression, ex1.m_expression,
331 BinaryExpressionImpl::Or);
337Expression Expression::
338minimum(Expression ex1)
340 return new BinaryExpressionImpl(m_expression,
342 BinaryExpressionImpl::Minimum);
345Expression Expression::
346maximum(Expression ex1)
348 return new BinaryExpressionImpl(m_expression,
350 BinaryExpressionImpl::Maximum);
353Expression Expression::
356 return new BinaryExpressionImpl(m_expression,
358 BinaryExpressionImpl::Pow);
364Expression Expression::
365ifelse(Expression ex1,Expression ex2)
367 return new WhereExpressionImpl(m_expression,
375Expression Expression::
378 return new LitteralExpressionImpl(v);
387 m_expression->setTrace(v);
390unsigned long Expression::
Référence à une expression.
Expression()
Constructeur par défaut.
Interface pour les différentes implémentations d'une expression.
virtual Integer vectorSize() const =0
Nombre d'éléments du vecteur.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Implementation d'une expression litterale contenant un scalaire.