14#ifndef __POISSON_2D_HOMOGENEOUS_HPP__
15#define __POISSON_2D_HOMOGENEOUS_HPP__
37typedef boost::function<
double(
const double,
const double,
const double)>
50 const int nb_row_dofs = row_data.
getIndices().size();
51 const int nb_col_dofs = col_data.
getIndices().size();
53 this->locMat.resize(nb_row_dofs, nb_col_dofs,
false);
57 const double area = getMeasure();
60 const int nb_integration_points = getGaussPts().size2();
62 auto t_w = getFTensor0IntegrationWeight();
68 for (
int gg = 0; gg != nb_integration_points; gg++) {
69 const double a = t_w * area;
71 for (
int rr = 0; rr != nb_row_dofs; ++rr) {
75 for (
int cc = 0; cc != nb_col_dofs; cc++) {
76 this->locMat(rr, cc) += t_row_diff_base(
i) * t_col_diff_base(
i) *
a;
105 this->locF.resize(nb_dofs,
false);
109 const double area = getMeasure();
112 const int nb_integration_points = getGaussPts().size2();
114 auto t_w = getFTensor0IntegrationWeight();
115 auto t_coords = getFTensor1CoordsAtGaussPts();
121 for (
int gg = 0; gg != nb_integration_points; gg++) {
122 const double a = t_w * area;
127 for (
int rr = 0; rr != nb_dofs; rr++) {
128 this->locF[rr] += t_base * body_source *
a;
ElementsAndOps< SPACE_DIM >::DomainEle DomainEle
[Define dimension]
#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()
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
boost::function< double(const double, const double, const double)> ScalarFunc
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)
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.
const VectorInt & getIndices() const
Get global indices of dofs on entity.
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)
ScalarFunc sourceTermFunc
OpDomainRhsVectorF(std::string field_name, ScalarFunc source_term_function)
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp