LMCAS
Lamina Computer Algebra System
载入中...
搜索中...
未找到
vector_calculus_support.hpp
浏览该文件的文档.
1#pragma once
2
6
8
9std::vector<std::string> vector_calculus_coord_vars(std::size_t dimension);
10
13 const std::string& u, const std::string& v,
14 detail::RewriteBudget& transform_budget);
15
16std::shared_ptr<SymbolicExpr> vector_calculus_integrate_with_fallback(
17 const std::shared_ptr<SymbolicExpr>& integrand,
18 const std::string& variable,
19 const std::shared_ptr<SymbolicExpr>& lower,
20 const std::shared_ptr<SymbolicExpr>& upper,
22 detail::RewriteBudget& transform_budget);
23
25 const std::shared_ptr<SymbolicExpr>& function,
27 const std::string& parameter,
28 const std::shared_ptr<SymbolicExpr>& lower,
29 const std::shared_ptr<SymbolicExpr>& upper,
31 const std::string& operation,
32 detail::RewriteBudget& transform_budget);
33
35 const VectorField& field,
37 const std::string& parameter,
38 const std::shared_ptr<SymbolicExpr>& lower,
39 const std::shared_ptr<SymbolicExpr>& upper,
41 const std::string& operation,
42 detail::RewriteBudget& transform_budget);
43
45 const std::shared_ptr<SymbolicExpr>& function,
47 const std::string& u,
48 const std::string& v,
49 const std::shared_ptr<SymbolicExpr>& u_lower,
50 const std::shared_ptr<SymbolicExpr>& u_upper,
51 const std::shared_ptr<SymbolicExpr>& v_lower,
52 const std::shared_ptr<SymbolicExpr>& v_upper,
54 const std::string& operation,
55 detail::RewriteBudget& transform_budget);
56
58 const VectorField& field,
60 const std::string& u,
61 const std::string& v,
62 const std::shared_ptr<SymbolicExpr>& u_lower,
63 const std::shared_ptr<SymbolicExpr>& u_upper,
64 const std::shared_ptr<SymbolicExpr>& v_lower,
65 const std::shared_ptr<SymbolicExpr>& v_upper,
67 const std::string& operation,
68 detail::RewriteBudget& transform_budget);
69
71 const std::shared_ptr<SymbolicExpr>& p,
72 const std::shared_ptr<SymbolicExpr>& q,
73 const std::vector<std::string>& variables,
74 const std::pair<std::shared_ptr<SymbolicExpr>,
75 std::shared_ptr<SymbolicExpr>>& x_bounds,
76 const std::pair<std::shared_ptr<SymbolicExpr>,
77 std::shared_ptr<SymbolicExpr>>& y_bounds,
79 const std::string& operation,
80 detail::RewriteBudget& transform_budget);
81
84 const std::string& parameter,
85 const std::shared_ptr<SymbolicExpr>& lower,
86 const std::shared_ptr<SymbolicExpr>& upper,
88 const std::string& operation,
89 detail::RewriteBudget& transform_budget);
90
92 const VectorField& field,
93 const std::vector<std::string>& variables,
94 const std::pair<std::shared_ptr<SymbolicExpr>,
95 std::shared_ptr<SymbolicExpr>>& x_bounds,
96 const std::pair<std::shared_ptr<SymbolicExpr>,
97 std::shared_ptr<SymbolicExpr>>& y_bounds,
98 const std::pair<std::shared_ptr<SymbolicExpr>,
99 std::shared_ptr<SymbolicExpr>>& z_bounds,
101 const std::string& operation,
102 detail::RewriteBudget& transform_budget);
103
105 const VectorField& field,
106 const std::vector<std::string>& variables,
108 const std::string& u,
109 const std::string& v,
110 const std::pair<std::shared_ptr<SymbolicExpr>,
111 std::shared_ptr<SymbolicExpr>>& u_bounds,
112 const std::pair<std::shared_ptr<SymbolicExpr>,
113 std::shared_ptr<SymbolicExpr>>& v_bounds,
115 const std::string& operation,
116 detail::RewriteBudget& transform_budget);
117
119 const std::shared_ptr<SymbolicExpr>& expr,
120 double& value,
122
123
125 const std::shared_ptr<SymbolicExpr>& f,
126 const std::vector<std::string>& vars,
128 const std::string& operation);
129
131 const VectorField& field,
132 const std::vector<std::string>& vars,
134 const std::string& operation);
135
137 const std::vector<std::shared_ptr<SymbolicExpr>>& functions,
138 const std::vector<std::string>& vars,
140 const std::string& operation);
141
144 const std::string& t,
145 const std::shared_ptr<SymbolicExpr>& a,
146 const std::shared_ptr<SymbolicExpr>& b,
148 const std::string& operation);
149
151 const std::shared_ptr<SymbolicExpr>& f,
153 const std::string& t,
154 const std::shared_ptr<SymbolicExpr>& a,
155 const std::shared_ptr<SymbolicExpr>& b,
157 const std::string& operation);
158
160 const VectorField& F,
162 const std::string& t,
163 const std::shared_ptr<SymbolicExpr>& a,
164 const std::shared_ptr<SymbolicExpr>& b,
166 const std::string& operation);
167
170 const std::string& u,
171 const std::string& v,
172 const std::shared_ptr<SymbolicExpr>& u_lower,
173 const std::shared_ptr<SymbolicExpr>& u_upper,
174 const std::shared_ptr<SymbolicExpr>& v_lower,
175 const std::shared_ptr<SymbolicExpr>& v_upper,
177 const std::string& operation);
178
180 const std::shared_ptr<SymbolicExpr>& f,
182 const std::string& u,
183 const std::string& v,
184 const std::shared_ptr<SymbolicExpr>& u_lower,
185 const std::shared_ptr<SymbolicExpr>& u_upper,
186 const std::shared_ptr<SymbolicExpr>& v_lower,
187 const std::shared_ptr<SymbolicExpr>& v_upper,
189 const std::string& operation);
190
192 const VectorField& F,
194 const std::string& u,
195 const std::string& v,
196 const std::shared_ptr<SymbolicExpr>& u_lower,
197 const std::shared_ptr<SymbolicExpr>& u_upper,
198 const std::shared_ptr<SymbolicExpr>& v_lower,
199 const std::shared_ptr<SymbolicExpr>& v_upper,
201 const std::string& operation);
202
204 const std::pair<std::shared_ptr<SymbolicExpr>, std::shared_ptr<SymbolicExpr>>& bounds,
206 const std::string& operation,
207 const std::string& label);
208
210 const std::vector<std::string>& vars,
211 std::size_t expected,
213 const std::string& operation);
214
216 const std::shared_ptr<SymbolicExpr>& expr,
217 const std::map<std::string, std::shared_ptr<SymbolicExpr>>& point,
219 detail::RewriteBudget& transform_budget);
220
222 const std::map<std::string, std::shared_ptr<SymbolicExpr>>& point,
223 const std::vector<std::string>& vars);
224
226 std::shared_ptr<SymbolicExpr> expr,
227 const std::string& operation);
228
230 VectorField field,
231 const std::string& operation);
232
233std::shared_ptr<SymbolicExpr> vector_calculus_cross_component(
234 const VectorField& left, const VectorField& right, std::size_t index);
235
237 const std::shared_ptr<SymbolicExpr>& expr,
238 const std::string& operation,
239 const std::string& message,
240 detail::RewriteBudget& transform_budget);
241
243 const std::shared_ptr<SymbolicExpr>& expr,
244 const std::string& variable,
245 const std::string& operation,
246 detail::RewriteBudget& transform_budget);
247
248VectorField gradient_impl(const std::shared_ptr<SymbolicExpr>& f,
249 const std::vector<std::string>& vars,
250 detail::RewriteBudget& transform_budget);
251std::shared_ptr<SymbolicExpr> divergence_impl(const VectorField& F,
252 const std::vector<std::string>& vars,
253 detail::RewriteBudget& transform_budget);
255 const std::vector<std::string>& vars,
256 detail::RewriteBudget& transform_budget);
257std::shared_ptr<SymbolicExpr> laplacian_impl(const std::shared_ptr<SymbolicExpr>& f,
258 const std::vector<std::string>& vars,
259 detail::RewriteBudget& transform_budget);
260std::shared_ptr<SymbolicExpr> directional_derivative_impl(
261 const std::shared_ptr<SymbolicExpr>& f, const std::vector<std::string>& vars,
262 const VectorField& direction, int order,
263 detail::RewriteBudget& transform_budget);
264std::shared_ptr<SymbolicExpr> jacobian_impl(
265 const std::vector<std::shared_ptr<SymbolicExpr>>& functions,
266 const std::vector<std::string>& vars,
267 detail::RewriteBudget& transform_budget);
268std::shared_ptr<SymbolicExpr> hessian_impl(
269 const std::shared_ptr<SymbolicExpr>& f, const std::vector<std::string>& vars,
270 detail::RewriteBudget& transform_budget);
271
272
273} // namespace LMCAS::vector_calculus_detail
Result< void > vector_calculus_validate_curve_scalar_inputs(const std::shared_ptr< SymbolicExpr > &f, const VectorField &parametrization, const std::string &t, const std::shared_ptr< SymbolicExpr > &a, const std::shared_ptr< SymbolicExpr > &b, ComputationContext &context, const std::string &operation)
bool vector_calculus_point_has_vars(const std::map< std::string, std::shared_ptr< SymbolicExpr > > &point, const std::vector< std::string > &vars)
VectorField vector_calculus_cross_product_partials(const VectorField &parametrization, const std::string &u, const std::string &v, detail::RewriteBudget &transform_budget)
Result< void > vector_calculus_validate_distinct_vars(const std::vector< std::string > &vars, std::size_t expected, ComputationContext &context, const std::string &operation)
Result< void > vector_calculus_validate_surface_parametrization(const VectorField &parametrization, const std::string &u, const std::string &v, const std::shared_ptr< SymbolicExpr > &u_lower, const std::shared_ptr< SymbolicExpr > &u_upper, const std::shared_ptr< SymbolicExpr > &v_lower, const std::shared_ptr< SymbolicExpr > &v_upper, ComputationContext &context, const std::string &operation)
VectorCalculusExprResult surface_integral_scalar_strict(const std::shared_ptr< SymbolicExpr > &function, const VectorField &parametrization, const std::string &u, const std::string &v, const std::shared_ptr< SymbolicExpr > &u_lower, const std::shared_ptr< SymbolicExpr > &u_upper, const std::shared_ptr< SymbolicExpr > &v_lower, const std::shared_ptr< SymbolicExpr > &v_upper, ComputationContext &context, const std::string &operation, detail::RewriteBudget &transform_budget)
Result< void > vector_calculus_validate_expr_vars(const std::shared_ptr< SymbolicExpr > &f, const std::vector< std::string > &vars, ComputationContext &context, const std::string &operation)
VectorCalculusExprResult vector_calculus_differentiate_strict(const std::shared_ptr< SymbolicExpr > &expr, const std::string &variable, const std::string &operation, detail::RewriteBudget &transform_budget)
Result< void > vector_calculus_validate_surface_vector_inputs(const VectorField &F, const VectorField &parametrization, const std::string &u, const std::string &v, const std::shared_ptr< SymbolicExpr > &u_lower, const std::shared_ptr< SymbolicExpr > &u_upper, const std::shared_ptr< SymbolicExpr > &v_lower, const std::shared_ptr< SymbolicExpr > &v_upper, ComputationContext &context, const std::string &operation)
bool vector_calculus_expr_zero_after_substitution(const std::shared_ptr< SymbolicExpr > &expr, const std::map< std::string, std::shared_ptr< SymbolicExpr > > &point, ComputationContext &context, detail::RewriteBudget &transform_budget)
std::shared_ptr< SymbolicExpr > directional_derivative_impl(const std::shared_ptr< SymbolicExpr > &f, const std::vector< std::string > &vars, const VectorField &direction, int order, detail::RewriteBudget &transform_budget)
std::vector< std::string > vector_calculus_coord_vars(std::size_t dimension)
std::shared_ptr< SymbolicExpr > jacobian_impl(const std::vector< std::shared_ptr< SymbolicExpr > > &functions, const std::vector< std::string > &vars, detail::RewriteBudget &transform_budget)
Result< void > vector_calculus_validate_surface_scalar_inputs(const std::shared_ptr< SymbolicExpr > &f, const VectorField &parametrization, const std::string &u, const std::string &v, const std::shared_ptr< SymbolicExpr > &u_lower, const std::shared_ptr< SymbolicExpr > &u_upper, const std::shared_ptr< SymbolicExpr > &v_lower, const std::shared_ptr< SymbolicExpr > &v_upper, ComputationContext &context, const std::string &operation)
VectorCalculusExprResult surface_integral_vector_strict(const VectorField &field, const VectorField &parametrization, const std::string &u, const std::string &v, const std::shared_ptr< SymbolicExpr > &u_lower, const std::shared_ptr< SymbolicExpr > &u_upper, const std::shared_ptr< SymbolicExpr > &v_lower, const std::shared_ptr< SymbolicExpr > &v_upper, ComputationContext &context, const std::string &operation, detail::RewriteBudget &transform_budget)
VectorCalculusExprResult curve_integral_scalar_strict(const std::shared_ptr< SymbolicExpr > &function, const VectorField &parametrization, const std::string &parameter, const std::shared_ptr< SymbolicExpr > &lower, const std::shared_ptr< SymbolicExpr > &upper, ComputationContext &context, const std::string &operation, detail::RewriteBudget &transform_budget)
VectorCalculusExprResult greens_theorem_area_strict(const VectorField &parametrization, const std::string &parameter, const std::shared_ptr< SymbolicExpr > &lower, const std::shared_ptr< SymbolicExpr > &upper, ComputationContext &context, const std::string &operation, detail::RewriteBudget &transform_budget)
std::shared_ptr< SymbolicExpr > vector_calculus_cross_component(const VectorField &left, const VectorField &right, std::size_t index)
VectorField gradient_impl(const std::shared_ptr< SymbolicExpr > &f, const std::vector< std::string > &vars, detail::RewriteBudget &transform_budget)
VectorCalculusExprResult vector_calculus_simplify_strict(const std::shared_ptr< SymbolicExpr > &expr, const std::string &operation, const std::string &message, detail::RewriteBudget &transform_budget)
std::shared_ptr< SymbolicExpr > divergence_impl(const VectorField &F, const std::vector< std::string > &vars, detail::RewriteBudget &transform_budget)
Result< void > vector_calculus_validate_curve_parametrization(const VectorField &parametrization, const std::string &t, const std::shared_ptr< SymbolicExpr > &a, const std::shared_ptr< SymbolicExpr > &b, ComputationContext &context, const std::string &operation)
std::shared_ptr< SymbolicExpr > vector_calculus_integrate_with_fallback(const std::shared_ptr< SymbolicExpr > &integrand, const std::string &variable, const std::shared_ptr< SymbolicExpr > &lower, const std::shared_ptr< SymbolicExpr > &upper, ComputationContext &context, detail::RewriteBudget &transform_budget)
VectorCalculusExprResult stokes_theorem_strict(const VectorField &field, const std::vector< std::string > &variables, const VectorField &parametrization, const std::string &u, const std::string &v, const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > &u_bounds, const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > &v_bounds, ComputationContext &context, const std::string &operation, detail::RewriteBudget &transform_budget)
Result< void > vector_calculus_validate_functions_vars(const std::vector< std::shared_ptr< SymbolicExpr > > &functions, const std::vector< std::string > &vars, ComputationContext &context, const std::string &operation)
std::shared_ptr< SymbolicExpr > laplacian_impl(const std::shared_ptr< SymbolicExpr > &f, const std::vector< std::string > &vars, detail::RewriteBudget &transform_budget)
bool vector_calculus_checked_finite_numeric(const std::shared_ptr< SymbolicExpr > &expr, double &value, ComputationContext &context)
VectorCalculusExprResult greens_theorem_strict(const std::shared_ptr< SymbolicExpr > &p, const std::shared_ptr< SymbolicExpr > &q, const std::vector< std::string > &variables, const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > &x_bounds, const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > &y_bounds, ComputationContext &context, const std::string &operation, detail::RewriteBudget &transform_budget)
Result< void > vector_calculus_validate_curve_vector_inputs(const VectorField &F, const VectorField &parametrization, const std::string &t, const std::shared_ptr< SymbolicExpr > &a, const std::shared_ptr< SymbolicExpr > &b, ComputationContext &context, const std::string &operation)
VectorCalculusFieldResult vector_calculus_wrap_field(VectorField field, const std::string &operation)
Result< void > vector_calculus_validate_bound_pair(const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > &bounds, ComputationContext &context, const std::string &operation, const std::string &label)
VectorCalculusExprResult vector_calculus_wrap_expr(std::shared_ptr< SymbolicExpr > expr, const std::string &operation)
std::shared_ptr< SymbolicExpr > hessian_impl(const std::shared_ptr< SymbolicExpr > &f, const std::vector< std::string > &vars, detail::RewriteBudget &transform_budget)
Result< void > vector_calculus_validate_field_vars(const VectorField &field, const std::vector< std::string > &vars, ComputationContext &context, const std::string &operation)
VectorField curl_impl(const VectorField &F, const std::vector< std::string > &vars, detail::RewriteBudget &transform_budget)
VectorCalculusExprResult curve_integral_vector_strict(const VectorField &field, const VectorField &parametrization, const std::string &parameter, const std::shared_ptr< SymbolicExpr > &lower, const std::shared_ptr< SymbolicExpr > &upper, ComputationContext &context, const std::string &operation, detail::RewriteBudget &transform_budget)
VectorCalculusExprResult divergence_theorem_strict(const VectorField &field, const std::vector< std::string > &variables, const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > &x_bounds, const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > &y_bounds, const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > &z_bounds, ComputationContext &context, const std::string &operation, detail::RewriteBudget &transform_budget)
const std::string const LimitExprPtr & point
const std::string & variable
__attribute__((visibility("default"))) ExprResult function(const std __attribute__((visibility("default"))) ExprResult finite_set(std ExprPtr upper
__attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) std const VectorField const std::string const std::string & v
const std::vector< Polynomial< BigInt > > const BigInt ComputationContext & context
__attribute__((visibility("default"))) VectorCalculusFieldResult gradient_checked(const std __attribute__((visibility("default"))) VectorCalculusFieldResult gradient_checked(const std __attribute__((visibility("default"))) VectorField gradient(const std const std::vector< std::string > & vars
const ExprPtr & lower
const std::vector< FGLMPoly > const MonomialOrder & order
const std::string const LimitExprPtr LimitDirection direction
__attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) std const VectorField const std::string const std::string const std::shared_ptr< SymbolicExpr > const std::shared_ptr< SymbolicExpr > const std::shared_ptr< SymbolicExpr > & v_lower
__attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) std const VectorField const std::string const std::string const std::shared_ptr< SymbolicExpr > & u_lower
const MultiPoly & b
__attribute__((visibility("default"))) std const std::vector< std::string > const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > & z_bounds
__attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) std const VectorField const std::string const std::string const std::shared_ptr< SymbolicExpr > const std::shared_ptr< SymbolicExpr > const std::shared_ptr< SymbolicExpr > const std::shared_ptr< SymbolicExpr > & v_upper
__attribute__((visibility("default"))) std const std::vector< std::string > const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > & x_bounds
__attribute__((visibility("default"))) VectorCalculusExprResult curve_integral_scalar_checked(const std __attribute__((visibility("default"))) VectorCalculusExprResult curve_integral_scalar_checked(const std __attribute__((visibility("default"))) std const VectorField const std::string const std::shared_ptr< SymbolicExpr > & a
std::vector< std::shared_ptr< SymbolicExpr > > VectorField
向量场由标量表达式组成。
Result< VectorField > VectorCalculusFieldResult
__attribute__((visibility("default"))) std const std::vector< std::string > const VectorField const std::string const std::string const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > & u_bounds
__attribute__((visibility("default"))) std const std::vector< std::string > const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > & y_bounds
__attribute__((visibility("default"))) VectorCalculusExprResult curve_integral_scalar_checked(const std __attribute__((visibility("default"))) VectorCalculusExprResult curve_integral_scalar_checked(const std __attribute__((visibility("default"))) std const VectorField & parametrization
Result< std::shared_ptr< SymbolicExpr > > VectorCalculusExprResult
const ExprPtr & right
__attribute__((visibility("default"))) std const std::vector< std::string > const VectorField const std::string const std::string const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > const std::pair< std::shared_ptr< SymbolicExpr >, std::shared_ptr< SymbolicExpr > > & v_bounds
const std::string const ExprPtr & value
__attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) std const VectorField const std::string const std::string const std::shared_ptr< SymbolicExpr > const std::shared_ptr< SymbolicExpr > & u_upper
ExprResult function(const std::string &name, std::vector< ExprPtr > arguments)
__attribute__((visibility("default"))) VectorCalculusExprResult curve_integral_scalar_checked(const std __attribute__((visibility("default"))) VectorCalculusExprResult curve_integral_scalar_checked(const std __attribute__((visibility("default"))) std const VectorField const std::string & t
__attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) VectorCalculusExprResult surface_integral_scalar_checked(const std __attribute__((visibility("default"))) std const VectorField const std::string & u
内部 AST 定义。