23 #ifndef PSEUDOINTEGRAL_H_INCLUDED 24 #define PSEUDOINTEGRAL_H_INCLUDED 42 const Expr& t_argument);
46 void addTerm(
const Expr& term);
48 Expr getExpression()
const;
52 Expr applyOn(
const Expr& expr)
const;
54 Expr const &getArgument()
const;
58 bool testBoundsInfinity(
const Expr& inf,
59 const Expr& sup)
const;
61 void testIntegralDep(
const Expr& term)
const;
63 void addSingleTerm(
const Expr& term);
65 void addSingleIntegral(
const Expr& integral);
67 void getRecursiveIntegralDependency(
70 std::vector<Expr*>& dependencies);
72 Expr getExponentialDependency(
73 std::vector<Expr*>
const& dep)
const;
75 void expandExponentials();
77 bool evaluateExpProduct(
int index,
79 std::vector<Expr*>& dependencies)
const;
81 bool evaluateDelta(
int index,
83 std::vector<Expr*>& dependencies)
const;
88 bool argumentUpdated =
true;
90 csl::vector_expr vectorIntegrals;
92 csl::vector_expr argumentVector;
124 Expr getOperand()
const override;
126 bool operatorAppliesOn(
Expr_info expr)
const override;
128 Expr getSupBoundary()
const override;
130 Expr getInfBoundary()
const override;
132 void setSupBoundary(
Expr const &t_inf)
override;
134 void setInfBoundary(
Expr const &t_sup)
override;
136 void setOperand(
const Expr& t_operand)
override;
140 std::optional<Expr> evaluate(
141 csl::eval::mode user_mode = csl::eval::base
144 std::optional<Expr> derive(
Expr_info expr)
const override;
146 bool dependsOn(
Expr_info var)
const override;
150 bool dependsExplicitlyOn(
Expr_info var)
const override;
169 const Expr& t_variable);
176 const Expr& t_variable,
181 const Expr& t_variable,
194 Expr getVariable()
const override;
196 void setVariable(
Expr const &variable)
override;
198 void print(
int mode=0,
199 std::ostream& out=std::cout,
200 bool lib =
false)
const override;
204 std::ostream &out = std::cout
207 std::string printLaTeX(
int mode=0)
const override;
209 unique_Expr copy_unique()
const override;
211 Expr deepCopy()
const override;
213 Expr refresh()
const override;
215 Expr deepRefresh()
const override;
236 const Tensor& t_variables);
266 Expr getVariable()
const override;
268 Parent getParent()
const override;
272 void setParent(
const Parent& t_variable)
override;
274 void print(
int mode=0,
275 std::ostream& out=std::cout,
276 bool lib =
false)
const override;
280 std::ostream &out = std::cout
283 std::string printLaTeX(
int mode=0)
const override;
285 unique_Expr copy_unique()
const override;
287 Expr deepCopy()
const override;
289 Expr refresh()
const override;
291 Expr deepRefresh()
const override;
293 bool isIndexed()
const override;
295 bool operatorAppliesOn(
Expr_info expr)
const override;
302 std::map<Index, Index>& constraints,
303 bool keepAllCosntraints =
false)
const override;
312 void MakeIntegral(
Expr& init);
314 template<
typename ...Args>
315 Expr scalarintegral_s(Args ...args) {
316 Expr res = csl::make_shared<ScalarIntegral>(args...);
321 Expr vectorintegral_s(
const Tensor& variables);
323 template<
typename ...Args>
324 Expr vectorintegral_s(
const Expr& operand,
327 Expr res = csl::make_shared<VectorIntegral>(operand, variables, args...);
332 template<
typename ...Args>
333 Expr vectorintegral_s(
const Tensor& variables,
335 Expr res = csl::make_shared<VectorIntegral>(variables, args...);
340 inline Expr vectorintegral_s(
const Parent& variables)
343 CSL_ASSERT_SPEC(tensor,
345 "Expected a tensor for vector integral, " 346 + toString(variables->getName()) +
" given.");
347 return vectorintegral_s(tensor);
350 template<
typename ...Args>
351 Expr vectorintegral_s(
const Expr& operand,
355 CSL_ASSERT_SPEC(tensor,
357 "Expected a tensor for vector integral, " 358 + toString(variables->getName()) +
" given.");
359 return vectorintegral_s(operand, tensor, std::forward<Args>(args)...);
362 template<
typename ...Args>
363 Expr vectorintegral_s(
const Parent& variables,
366 CSL_ASSERT_SPEC(tensor,
368 "Expected a tensor for vector integral, " 369 + toString(variables->getName()) +
" given.");
370 return vectorintegral_s(tensor, std::forward<Args>(args)...);
Namespace for csl library.
Definition: abreviation.h:34
Parent of an indicial object, allows to generate them (TensorElement).
Definition: indicial.h:245
csl::Type getType() const override
Gives the type of Abstract.
Definition: pseudoIntegral.h:190
Type
Enum of the different types of Abstract (i.e. list of all possible specializations).
Definition: enum.h:47
Objects handling multi-argument functions, primordial operations (+,*,/,etc)
csl::Type getType() const override
Gives the type of Abstract.
Definition: pseudoIntegral.h:262
Root class of the inheritance tree of abstracts.
Definition: abstract.h:76
~AbstractIntegral()
Destructor.
Definition: pseudoIntegral.h:122
Base class for all parents (indicial, fields etc). All parents derive from this class.
Definition: parent.h:81
bool operator==(const Expr &a, const Expr &b)
see Abstract::operator==()
Definition: abstract.cpp:1398
~ScalarIntegral()
Destructor.
Definition: pseudoIntegral.h:188
Definition: pseudoIntegral.h:99
Definition: pseudoIntegral.h:32
Objects handling indexed expressions in order to perform indicial tensor calculations.
Definition: pseudoIntegral.h:226
Objects handling mathematical functions.
Definition: pseudoIntegral.h:159
bool operator<(const Expr &a, const Expr &b)
see Abstract::operator<()
Definition: abstract.cpp:1423
Definition: indicial.h:675
Linear operator O(a*X+b*Y) = a*O(X) + b*O(Y)
Definition: operator.h:38
Manages a std::vector of Index, to be used by an TensorElement.
Definition: index.h:472
Expression type/.
Definition: abstract.h:1573
~VectorIntegral()
Destructor.
Definition: pseudoIntegral.h:260