367 {
370 int index = 0;
371 auto fe_ent = getFEEntityHandle();
372 auto nb_gauss_pts = getGaussPts().size2();
373 double area = getMeasure();
376 auto t_normal = getFTensor1NormalsAtGaussPts();
377 auto t_w = getFTensor0IntegrationWeight();
379 double alphaPart = 0.0;
380 if (
m.second.electrodeEnts.find(fe_ent) !=
m.second.electrodeEnts.end()) {
381
382 for (int gg = 0; gg != nb_gauss_pts; gg++) {
384 t_r(
i) = t_normal(
i);
386 alphaPart += (t_jump(
i) * t_r(
i)) * t_w * area;
387 ++t_jump;
388 ++t_normal;
389 ++t_w;
390 }
391 CHKERR ::VecSetValues(
petscVec, 1, &index, &alphaPart,
392 ADD_VALUES);
393 }
394 ++index;
395 }
396
398 }
Tensor1< T, Tensor_Dim > normalize()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.
FTensor::Index< 'm', 3 > m