#include "tutorials/cor-2to5/src/PoissonOperators.hpp"
Definition at line 662 of file PoissonOperators.hpp.
◆ OpResF_Domain()
PoissonExample::OpResF_Domain::OpResF_Domain |
( |
FSource |
f_source, |
|
|
boost::function< double(const double)> |
a, |
|
|
boost::shared_ptr< VectorDouble > & |
field_vals, |
|
|
boost::shared_ptr< MatrixDouble > & |
grad_vals |
|
) |
| |
|
inline |
Definition at line 664 of file PoissonOperators.hpp.
boost::shared_ptr< MatrixDouble > gradVals
boost::shared_ptr< VectorDouble > fieldVals
boost::function< double(const double)> A
◆ iNtegrate()
Integrate local entity vector.
- Parameters
-
data | entity data on element row |
- Returns
- error code
- Examples
- mofem/tutorials/cor-2to5/src/PoissonOperators.hpp.
Definition at line 677 of file PoissonOperators.hpp.
677 {
679
681
683
684 double vol = getVolume();
685
686 auto t_w = getFTensor0IntegrationWeight();
687
689
690 auto t_grad = getFTensor1FromMat<3>(*
gradVals);
691
693
695
696 auto t_coords = getFTensor1CoordsAtGaussPts();
697
699
700 const double alpha = vol * t_w;
701 const double source_term =
704 grad_term(
i) = (alpha *
A(t_u)) * t_grad(
i);
705
708
709 for (
int rr = 0; rr !=
nbRows; rr++) {
710
711 t_a += t_v_grad(
i) * grad_term(
i) + t_v * source_term;
712 ++t_a;
713 ++t_v;
714 ++t_v_grad;
715 }
716 ++t_w;
717 ++t_u;
718 ++t_grad;
719 ++t_coords;
720 }
722 }
#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()
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
int nbIntegrationPts
number of integration points
FTensor::Index< 'i', 3 > i
boost::function<double(const double)> PoissonExample::OpResF_Domain::A |
|
protected |
◆ fieldVals
boost::shared_ptr<VectorDouble> PoissonExample::OpResF_Domain::fieldVals |
|
protected |
◆ gradVals
boost::shared_ptr<MatrixDouble> PoissonExample::OpResF_Domain::gradVals |
|
protected |
The documentation for this struct was generated from the following file: