14#ifndef __POISSON_2D_HOMOGENEOUS_HPP__
15#define __POISSON_2D_HOMOGENEOUS_HPP__
19using EntData = EntitiesFieldData::EntData;
27 FormsIntegrators<DomainEleOp>::Assembly<PETSC>
::OpBase;
44 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &row_data,
45 EntitiesFieldData::EntData &col_data) {
48 const int nb_row_dofs = row_data.getIndices().size();
49 const int nb_col_dofs = col_data.getIndices().size();
51 this->
locMat.resize(nb_row_dofs, nb_col_dofs,
false);
55 const double area = getMeasure();
58 const int nb_integration_points = getGaussPts().size2();
60 auto t_w = getFTensor0IntegrationWeight();
63 auto t_row_diff_base = row_data.getFTensor1DiffN<
SPACE_DIM>();
66 for (
int gg = 0; gg != nb_integration_points; gg++) {
67 const double a = t_w * area;
69 for (
int rr = 0; rr != nb_row_dofs; ++rr) {
71 auto t_col_diff_base = col_data.getFTensor1DiffN<
SPACE_DIM>(gg, 0);
73 for (
int cc = 0; cc != nb_col_dofs; cc++) {
74 this->
locMat(rr, cc) += t_row_diff_base(
i) * t_col_diff_base(
i) *
a;
97 MoFEMErrorCode
iNtegrate(EntitiesFieldData::EntData &data) {
100 const int nb_dofs = data.getIndices().size();
102 this->
locF.resize(nb_dofs,
false);
106 const double area = getMeasure();
109 const int nb_integration_points = getGaussPts().size2();
111 auto t_w = getFTensor0IntegrationWeight();
114 auto t_base = data.getFTensor0N();
117 for (
int gg = 0; gg != nb_integration_points; gg++) {
118 const double a = t_w * area;
120 for (
int rr = 0; rr != nb_dofs; rr++) {
ElementsAndOps< SPACE_DIM >::DomainEle DomainEle
#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
constexpr auto field_name
OpBaseImpl< PETSC, EdgeEleOp > OpBase
Data on single entity (This is passed as argument to DataOperator::doWork)
VectorDouble locF
local entity vector
MatrixDouble locMat
local entity block matrix
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
OpDomainLhsMatrixK(std::string row_field_name, std::string col_field_name)
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &data)
OpDomainRhsVectorF(std::string field_name)