@@ -199,10 +199,16 @@ PYBIND11_MODULE(polyfempy, m) {
199
199
Eigen::MatrixXd discr;
200
200
Eigen::MatrixXd fun;
201
201
202
+ const bool tmp = s.args [" export" ][" vis_boundary_only" ];
203
+ s.args [" export" ][" vis_boundary_only" ] = boundary_only;
204
+
202
205
s.build_vis_mesh (points, tets, discr);
203
206
204
207
205
208
s.interpolate_function (points.rows (), s.sol , fun, boundary_only);
209
+
210
+ s.args [" export" ][" vis_boundary_only" ] = tmp;
211
+
206
212
return py::make_tuple (points, tets, fun);
207
213
},
208
214
" returns the solution on a densly sampled mesh, use 'vismesh_rel_area' to control density" ,
@@ -214,9 +220,14 @@ PYBIND11_MODULE(polyfempy, m) {
214
220
Eigen::MatrixXd discr;
215
221
Eigen::MatrixXd fun;
216
222
223
+ const bool tmp = s.args [" export" ][" vis_boundary_only" ];
224
+ s.args [" export" ][" vis_boundary_only" ] = boundary_only;
225
+
217
226
s.build_vis_mesh (points, tets, discr);
218
227
s.compute_tensor_value (points.rows (), s.sol , fun, boundary_only);
219
228
229
+ s.args [" export" ][" vis_boundary_only" ] = tmp;
230
+
220
231
return fun;
221
232
},
222
233
" returns the stress tensor on a densly sampled mesh, use 'vismesh_rel_area' to control density" ,
@@ -228,9 +239,14 @@ PYBIND11_MODULE(polyfempy, m) {
228
239
Eigen::MatrixXd discr;
229
240
Eigen::MatrixXd fun;
230
241
242
+ const bool tmp = s.args [" export" ][" vis_boundary_only" ];
243
+ s.args [" export" ][" vis_boundary_only" ] = boundary_only;
244
+
231
245
s.build_vis_mesh (points, tets, discr);
232
246
s.compute_scalar_value (points.rows (), s.sol , fun, boundary_only);
233
247
248
+ s.args [" export" ][" vis_boundary_only" ] = tmp;
249
+
234
250
return fun;
235
251
},
236
252
" returns the von mises stresses on a densly sampled mesh, use 'vismesh_rel_area' to control density" ,
@@ -242,9 +258,14 @@ PYBIND11_MODULE(polyfempy, m) {
242
258
Eigen::MatrixXd discr;
243
259
Eigen::MatrixXd fun, tfun;
244
260
261
+ const bool tmp = s.args [" export" ][" vis_boundary_only" ];
262
+ s.args [" export" ][" vis_boundary_only" ] = boundary_only;
263
+
245
264
s.build_vis_mesh (points, tets, discr);
246
265
s.average_grad_based_function (points.rows (), s.sol , fun, tfun, boundary_only);
247
266
267
+ s.args [" export" ][" vis_boundary_only" ] = tmp;
268
+
248
269
return py::make_tuple (fun, tfun);
249
270
},
250
271
" returns the von mises stresses and stress tensor averaged around a vertex on a densly sampled mesh, use 'vismesh_rel_area' to control density" ,
0 commit comments