v0.15.0
Loading...
Searching...
No Matches
FormsIntegrators.hpp
Go to the documentation of this file.
1/** \file FormsIntegrators.hpp
2 * \brief Forms integrators
3 * \ingroup mofem_form
4
5 This file provides a higher-level abstraction layer over MoFEM's generic
6 UserDataOperator system for finite element computations. It implements
7 structured approaches to linear and bilinear form integration within
8 finite element operator pipelines.
9
10 \section forms_abstraction Forms as Operator Abstractions
11
12 Forms integrators represent one level of abstraction above generic user data
13 operators, providing structured interfaces for common finite element operations:
14
15 - **LinearForm**: Operators that integrate over single fields to produce vectors
16 (load vectors, source terms, boundary conditions)
17 - **BiLinearForm**: Operators that integrate over field pairs to produce matrices
18 (stiffness matrices, mass matrices, coupling terms)
19 - **TriLinearForm**: Operators for nonlinear terms involving multiple fields
20
21 These forms encapsulate the integration logic while maintaining compatibility
22 with MoFEM's finite element pipeline architecture.
23
24 \section forms_pipeline Integration with Finite Element Pipelines
25
26 Forms integrators work within MoFEM's operator pipeline system:
27
28 1. **Finite Element Context**: Forms operate within specific finite elements
29 that define geometry, connectivity, and field definitions
30 2. **Operator Sequencing**: Forms are added to finite element operator pipelines
31 alongside preprocessing, integration, and postprocessing operators
32 3. **Data Flow**: Forms access field data, geometry, and integration points
33 through the standard ForcesAndSourcesCore infrastructure
34 4. **Assembly**: Computed local contributions are assembled into global
35 algebraic structures (vectors, matrices)
36
37 \section assembly_types Assembly Type Abstraction
38
39 Assembly types control how local finite element contributions are assembled
40 into global algebraic structures:
41
42 - **PETSC**: Standard assembly into PETSc Vec/Mat objects
43 - **SCHUR**: Assembly for Schur complement methods
44 - **BLOCK_MAT**: Assembly into block-structured matrices
45 - **BLOCK_SCHUR**: Block-based Schur complement assembly
46 - **BLOCK_PRECONDITIONER_SCHUR**: Specialized preconditioner assembly
47 - **USER_ASSEMBLE**: Custom assembly controlled by user functions
48
49 Assembly types are compile-time template parameters, enabling optimized
50 code generation for different algebraic backends and solution strategies.
51
52 \section integration_methods Integration Method Selection
53
54 Integration methods determine how numerical integration is performed:
55
56 - **GAUSS**: Gaussian quadrature integration using standard rules
57 - **USER_INTEGRATION**: Custom integration schemes defined by user functions
58
59 Integration methods are template parameters that work with assembly types
60 to provide flexible, efficient integration strategies for different
61 physics and discretization requirements.
62
63 Note: Specialized methods can be introduced for specific cases, such as
64 fast integration exploiting Bernstein–Bézier basis with Duffy transforms
65 on simplex elements, or dedicated GPU backends for element-wise integration
66 and assembly. These can be expressed as additional integration tags and
67 paired with corresponding assembly strategies.
68
69 \section forms_workflow Typical Workflow
70
71 1. Select assembly type based on algebraic solution strategy
72 2. Choose integration method appropriate for physics and accuracy requirements
73 3. Instantiate specific form type (Linear/BiLinear/TriLinear)
74 4. Configure field operations and boundary conditions
75 5. Add form operators to finite element pipeline
76 6. Execute pipeline to assemble global algebraic system
77
78 This abstraction enables systematic construction of finite element methods
79 while maintaining performance and flexibility for advanced solution techniques.
80
81*/
82
83#ifndef __FORMS_INTEGRATORS_HPP__
84#define __FORMS_INTEGRATORS_HPP__
85
86namespace MoFEM {
87
88//! [Storage and set boundary conditions]
89
93 /**
94 * @brief Store modified indices by field
95 *
96 * Hash map, key is field name, value is storage.
97 *
98 */
100 map<std::string, std::vector<boost::shared_ptr<EssentialBcStorage>>>;
102};
103
104/**
105 * @brief Set indices on entities on finite element
106 * @ingroup mofem_forms
107 *
108 * If index is marked, its value is set to -1. DOF with such index is not
109 * assembled into the system.
110 *
111 * Indices are stored on the entity.
112 *
113 */
115 OpSetBc(std::string field_name, bool yes_set,
116 boost::shared_ptr<std::vector<unsigned char>> boundary_marker);
117 MoFEMErrorCode doWork(int side, EntityType type,
119
120public:
121 bool yesSet;
122 boost::shared_ptr<std::vector<unsigned char>> boundaryMarker;
123};
124
125/**
126 * @brief Unset indices on entities on finite element
127 * @ingroup mofem_forms
128 *
129 * Removes boundary condition markings from DOF indices, allowing them to be
130 * assembled into the system. This operator reverses the effect of OpSetBc.
131 *
132 */
134 /**
135 * @brief Constructor
136 * @param field_name Name of field to unset boundary conditions on
137 */
138 OpUnSetBc(std::string field_name);
139
140 /**
141 * @brief Perform unset operation on entity data
142 * @param side Entity side number
143 * @param type Entity type
144 * @param data Entity field data
145 * @return Error code
146 */
147 MoFEMErrorCode doWork(int side, EntityType type,
149};
150
151/**
152 * @brief Set values to vector in operator
153 * @ingroup mofem_forms
154 *
155 * MoFEM::FieldEntity provides MoFEM::FieldEntity::getWeakStoragePtr() storage
156 * function which allows to transfer data between FEs or operators processing
157 * the same entities.
158 *
159 * When MoFEM::OpSetBc is pushed in weak storage indices taking in account
160 * indices which are skip to take boundary conditions are stored. Those entities
161 * are used by VecSetValues.
162 *
163 * @param V
164 * @param data
165 * @param ptr
166 * @param iora
167 * @return MoFEMErrorCode
168 */
169template <>
172 const double *ptr, InsertMode iora);
173
174/**
175 * @brief Set values to matrix in operator
176 *
177 * See MoFEM::VecSetValues<EssentialBcStorage> for explanation.
178 *
179 * @param M
180 * @param row_data
181 * @param col_data
182 * @param ptr
183 * @param iora
184 * @return MoFEMErrorCode
185 */
186template <>
189 const EntitiesFieldData::EntData &row_data,
190 const EntitiesFieldData::EntData &col_data,
191 const double *ptr, InsertMode iora);
192
193//! [Storage and set boundary conditions]
194
195/**
196 * @brief Form integrator assembly types
197 * @ingroup mofem_forms
198 *
199 */
201 PETSC, ///< Standard PETSc assembly
202 SCHUR, ///< Schur complement assembly
203 BLOCK_MAT, ///< Block matrix assembly
204 BLOCK_SCHUR, ///< Block Schur assembly
205 BLOCK_PRECONDITIONER_SCHUR, ///< Block preconditioner Schur assembly
206 USER_ASSEMBLE, ///< User-defined assembly
207 LAST_ASSEMBLE ///< Sentinel value
209
210/**
211 * @brief Template selector for assembly type
212 * @ingroup mofem_forms
213 * @tparam A Assembly type value
214 */
215template <int A> struct AssemblyTypeSelector {};
216
217template <>
218inline MoFEMErrorCode MatSetValues<AssemblyTypeSelector<PETSC>>(
219 Mat M, const EntitiesFieldData::EntData &row_data,
220 const EntitiesFieldData::EntData &col_data, const double *ptr,
221 InsertMode iora) {
222 return MatSetValues<EssentialBcStorage>(M, row_data, col_data, ptr, iora);
223}
224
225template <>
226inline MoFEMErrorCode VecSetValues<AssemblyTypeSelector<PETSC>>(
227 Vec V, const EntitiesFieldData::EntData &data, const double *ptr,
228 InsertMode iora) {
229 return VecSetValues<EssentialBcStorage>(V, data, ptr, iora);
230}
231
232/**
233 * @brief Form integrator integration types
234 * @ingroup mofem_forms
235 *
236 */
238 GAUSS, ///< Gaussian quadrature integration
239 USER_INTEGRATION, ///< User-defined integration rules
240 LAST_INTEGRATION ///< Sentinel value
242
243/**
244 * @brief Scalar function type
245 * @ingroup mofem_forms
246 *
247 */
249 boost::function<double(const double, const double, const double)>;
250
251/**
252 * @brief Default scalar function returning 1
253 * @ingroup mofem_forms
254 *
255 * @param x coordinate
256 * @param y coordinate
257 * @param z coordinate
258 * @return 1.0
259 */
260inline double scalar_fun_one(const double, const double, const double) {
261 return 1;
262}
263
264/**
265 * @brief Lambda function used to scale with time
266 *
267 */
268using TimeFun = boost::function<double(double)>;
269
270/**
271 * @brief Lambda function used to scale with time
272 *
273 */
274using FEFun = boost::function<double(const FEMethod *fe_ptr)>;
275
276/**
277 * @brief Constant function type
278 *
279 */
280using ConstantFun = boost::function<double()>;
281
282/**
283 * @brief Vector function type
284 * @ingroup mofem_forms
285 *
286 * @tparam DIM dimension of the return
287 */
288template <int DIM>
289using VectorFun = boost::function<FTensor::Tensor1<double, DIM>(
290 const double, const double, const double)>;
291
292template <AssemblyType A, typename EleOp> struct OpBaseImpl : public EleOp {
293 using OpType = typename EleOp::OpType;
295
296 /**
297 * @brief Constructor for base operator implementation
298 * @param row_field_name Name of field for row entities
299 * @param col_field_name Name of field for column entities
300 * @param type Operator type
301 * @param ents_ptr Optional pointer to range of entities to operate on
302 */
303 OpBaseImpl(const std::string row_field_name, const std::string col_field_name,
304 const OpType type, boost::shared_ptr<Range> ents_ptr = nullptr)
305 : EleOp(row_field_name, col_field_name, type, false),
306 assembleTranspose(false), onlyTranspose(false), entsPtr(ents_ptr) {}
307
308 /**
309 * \brief Do calculations for the left hand side
310 * @param row_side row side number (local number) of entity on element
311 * @param col_side column side number (local number) of entity on element
312 * @param row_type type of row entity
313 * @param col_type type of column entity
314 * @param row_data data for row
315 * @param col_data data for column
316 * @return error code
317 */
318 MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
319 EntityType col_type, EntData &row_data,
320 EntData &col_data);
321
322 /**
323 * @brief Do calculations for the right hand side
324 *
325 * @param row_side
326 * @param row_type
327 * @param row_data
328 * @return MoFEMErrorCode
329 */
330 MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data);
331
332 TimeFun timeScalingFun; ///< assumes that time variable is set
333 FEFun feScalingFun; ///< assumes that time variable is set
334 boost::shared_ptr<Range> entsPtr; ///< Entities on which element is run
335
336 using MatSetValuesHook = boost::function<MoFEMErrorCode(
338 const EntitiesFieldData::EntData &row_data,
339 const EntitiesFieldData::EntData &col_data, MatrixDouble &m)>;
340
342
343protected:
344 using EleOp::EleOp;
345
346 /**
347 * @brief Get local vector tensor for assembly
348 * @tparam DIM Dimension of the tensor
349 * @return FTensor wrapper around local vector
350 */
351 template <int DIM>
353 return getFTensor1FromArray<DIM, DIM>(locF);
354 }
355
356 /**
357 * @brief Get local matrix tensor for assembly
358 * @tparam DIM Dimension of the tensor
359 * @param rr Row offset in the local matrix
360 * @return FTensor wrapper around local matrix
361 */
362 template <int DIM>
364 getLocMat(const int rr) {
365 return getFTensor2FromArray<DIM, DIM, DIM>(locMat, rr);
366 }
367
368 int nbRows; ///< number of dofs on rows
369 int nbCols; ///< number if dof on column
370 int nbIntegrationPts; ///< number of integration points
371 int nbRowBaseFunctions; ///< number or row base functions
372
373 int rowSide; ///< row side number
374 int colSide; ///< column side number
375 EntityType rowType; ///< row type
376 EntityType colType; ///< column type
377
380
381 MatrixDouble locMat; ///< local entity block matrix
382 MatrixDouble locMatTranspose; ///< local entity block matrix
383 VectorDouble locF; ///< local entity vector
384
385 /**
386 * \brief Integrate grad-grad operator
387 * @param row_data row data (consist base functions on row entity)
388 * @param col_data column data (consist base functions on column entity)
389 * @return error code
390 */
391 virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) {
393 }
394
395 /**
396 * @brief Assemble local matrix into global matrix
397 * @param row_data Row entity data
398 * @param col_data Column entity data
399 * @param trans Whether to assemble transpose
400 * @return Error code
401 */
402 virtual MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data,
403 const bool trans);
404
405 /**
406 * \brief Class dedicated to integrate operator
407 * @param data entity data on element row
408 * @return error code
409 */
412 }
413
414 /**
415 * @brief Assemble local vector into global vector
416 * @param data Entity data
417 * @return Error code
418 */
419 virtual MoFEMErrorCode aSsemble(EntData &data);
420
421 /** \brief Get number of base functions
422 *
423 * @param data
424 * @return number of base functions
425 */
427};
428
429template <AssemblyType A, typename EleOp>
432 [](ForcesAndSourcesCore::UserDataOperator *op_ptr,
433 const EntitiesFieldData::EntData &row_data,
434 const EntitiesFieldData::EntData &col_data, MatrixDouble &m) {
435 return MatSetValues<AssemblyTypeSelector<A>>(
436 op_ptr->getKSPB(), row_data, col_data, m, ADD_VALUES);
437 };
438
439template <typename OpBase>
440struct OpBrokenBaseImpl; //< This is base operator for broken spaces.
441 //Implementation is in
442 //FormsBrokenSpaceConstraintImpl.hpp
443
444/**
445 * @brief Integrator forms
446 * @ingroup mofem_forms
447 *
448 * @tparam EleOp
449 */
450template <typename EleOp> struct FormsIntegrators {
451
453 using OpType = typename EleOp::OpType;
454
455 /**
456 * @brief Assembly methods
457 * @ingroup mofem_forms
458 *
459 * @tparam A
460 */
461 template <AssemblyType A> struct Assembly {
462
465
466 /**
467 * @brief Linear form
468 * @ingroup mofem_forms
469 *
470 * @tparam I
471 */
472 template <IntegrationType I> struct LinearForm;
473
474 /**
475 * @brief Bi linear form
476 * @ingroup mofem_forms
477 *
478 * @tparam I
479 */
480 template <IntegrationType I> struct BiLinearForm;
481
482 /**
483 * @brief Tri linear form
484 * @ingroup mofem_forms
485 *
486 * @tparam I
487 */
488 template <IntegrationType I> struct TriLinearForm;
489
490 }; // Assembly
491}; // namespace MoFEM
492
493template <AssemblyType A, typename EleOp>
494size_t
496 if (!data.getNSharedPtr(data.getBase())) {
497 #ifndef NDEBUG
498 MOFEM_LOG("SELF", Sev::warning)
499 << "Ptr to base " << ApproximationBaseNames[data.getBase()]
500 << " functions is null, returning 0";
501 #endif // NDEBUG
502 return 0;
503 }
504 auto nb_base_functions = data.getN().size2();
505 if (data.getBase() != USER_BASE) {
506 switch (data.getSpace()) {
507 case NOSPACE:
508 break;
509 case NOFIELD:
510 break;
511 case H1:
512 break;
513 case HCURL:
514 case HDIV:
515 nb_base_functions /= 3;
516#ifndef NDEBUG
517 if (data.getN().size2() % 3) {
518 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
519 "Number of base functions is not divisible by 3");
520 }
521#endif
522 break;
523 case L2:
524 break;
525 default:
526 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
527 "Space %s not implemented", FieldSpaceNames[data.getSpace()]);
528 }
529 }
530 return nb_base_functions;
531}
532
533template <AssemblyType A, typename EleOp>
535OpBaseImpl<A, EleOp>::doWork(int row_side, int col_side, EntityType row_type,
536 EntityType col_type,
538 EntitiesFieldData::EntData &col_data) {
540
541 if (entsPtr) {
542 if (entsPtr->find(this->getFEEntityHandle()) == entsPtr->end())
544 }
545
546 // get number of dofs on row
547 nbRows = row_data.getIndices().size();
548 // if no dofs on row, exit that work, nothing to do here
549 if (!nbRows)
551 rowSide = row_side;
552 rowType = row_type;
553 // get number of dofs on column
554 nbCols = col_data.getIndices().size();
555 // if no dofs on column, exit nothing to do here
556 if (!nbCols)
558 colSide = col_side;
559 colType = col_type;
560 // get number of integration points
561 nbIntegrationPts = EleOp::getGaussPts().size2();
562 // get row base functions
563 nbRowBaseFunctions = getNbOfBaseFunctions(row_data);
564
565 // set size of local entity bock
566 locMat.resize(nbRows, nbCols, false);
567 // clear matrix
568 locMat.clear();
569 // integrate local matrix for entity block
570 CHKERR this->iNtegrate(row_data, col_data);
571
572 // assemble local matrix
573 auto check_if_assemble_transpose = [&] {
574 if (this->sYmm) {
575 if (row_side != col_side || row_type != col_type)
576 return true;
577 else
578 return false;
579 } else if (assembleTranspose) {
580 return true;
581 }
582
583 return false;
584 };
585 CHKERR aSsemble(row_data, col_data, check_if_assemble_transpose());
587}
588
589template <AssemblyType A, typename EleOp>
590MoFEMErrorCode OpBaseImpl<A, EleOp>::doWork(int row_side, EntityType row_type,
591 EntData &row_data) {
593
594 if (entsPtr) {
595 if (entsPtr->find(this->getFEEntityHandle()) == entsPtr->end())
597 }
598
599 // get number of dofs on row
600 nbRows = row_data.getIndices().size();
601 rowSide = row_side;
602 rowType = row_type;
603
604 if (!nbRows)
606 // get number of integration points
607 nbIntegrationPts = EleOp::getGaussPts().size2();
608 // get row base functions
609 nbRowBaseFunctions = getNbOfBaseFunctions(row_data);
610 // resize and clear the right hand side vector
611 locF.resize(nbRows);
612 locF.clear();
613 // integrate local vector
614 CHKERR this->iNtegrate(row_data);
615 // assemble local vector
616 CHKERR this->aSsemble(row_data);
618}
619
620template <AssemblyType A, typename EleOp>
622 EntData &col_data,
623 const bool transpose) {
625
626 if (!this->timeScalingFun.empty())
627 this->locMat *= this->timeScalingFun(this->getFEMethod()->ts_t);
628 if (!this->feScalingFun.empty())
629 this->locMat *= this->feScalingFun(this->getFEMethod());
630
631 // Assemble transpose
632 if (transpose) {
633 this->locMatTranspose.resize(this->locMat.size2(), this->locMat.size1(),
634 false);
635 noalias(this->locMatTranspose) = trans(this->locMat);
636 CHKERR matSetValuesHook(this, col_data, row_data, this->locMatTranspose);
637 }
638
639 if (!this->onlyTranspose) {
640 // assemble local matrix
641 CHKERR matSetValuesHook(this, row_data, col_data, this->locMat);
642 }
643
645}
646
647template <AssemblyType A, typename EleOp>
649 if (!this->timeScalingFun.empty())
650 this->locF *= this->timeScalingFun(this->getFEMethod()->ts_t);
651 if (!this->feScalingFun.empty())
652 this->locF *= this->feScalingFun(this->getFEMethod());
653
654 return VecSetValues<AssemblyTypeSelector<A>>(this->getKSPf(), data,
655 this->locF, ADD_VALUES);
656}
657
658} // namespace MoFEM
659
660/**
661 * \defgroup mofem_forms Forms Integrators
662 *
663 * \brief Classes and functions used to evaluate fields at integration pts,
664 *jacobians, etc..
665 *
666 * \ingroup mofem_forces_and_sources
667 **/
668
669#endif //__FORMS_INTEGRATORS_HPP__
@ USER_BASE
user implemented approximation base
Definition definitions.h:68
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ L2
field with C-1 continuity
Definition definitions.h:88
@ NOFIELD
scalar or vector of scalars describe (no true field)
Definition definitions.h:84
@ H1
continuous field
Definition definitions.h:85
@ NOSPACE
Definition definitions.h:83
@ HCURL
field with continuous tangents
Definition definitions.h:86
@ HDIV
field with continuous normal traction
Definition definitions.h:87
static const char *const FieldSpaceNames[]
Definition definitions.h:92
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
static const char *const ApproximationBaseNames[]
Definition definitions.h:72
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
IntegrationType
Form integrator integration types.
MoFEMErrorCode VecSetValues< EssentialBcStorage >(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Set values to vector in operator.
boost::function< double(const double, const double, const double)> ScalarFun
Scalar function type.
double scalar_fun_one(const double, const double, const double)
Default scalar function returning 1.
AssemblyType
[Storage and set boundary conditions]
boost::function< FTensor::Tensor1< double, DIM >(const double, const double, const double)> VectorFun
Vector function type.
@ USER_INTEGRATION
User-defined integration rules.
@ LAST_INTEGRATION
Sentinel value.
@ GAUSS
Gaussian quadrature integration.
@ PETSC
Standard PETSc assembly.
@ BLOCK_PRECONDITIONER_SCHUR
Block preconditioner Schur assembly.
@ LAST_ASSEMBLE
Sentinel value.
@ BLOCK_MAT
Block matrix assembly.
@ USER_ASSEMBLE
User-defined assembly.
@ SCHUR
Schur complement assembly.
@ BLOCK_SCHUR
Block Schur assembly.
#define MOFEM_LOG(channel, severity)
Log.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasMatrix< double > MatrixDouble
Definition Types.hpp:77
UBlasVector< int > VectorInt
Definition Types.hpp:67
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
boost::function< double(const FEMethod *fe_ptr)> FEFun
Lambda function used to scale with time.
boost::function< double(double)> TimeFun
Lambda function used to scale with time.
MoFEMErrorCode MatSetValues< EssentialBcStorage >(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Set values to matrix in operator.
boost::function< double()> ConstantFun
Constant function type.
constexpr auto field_name
FTensor::Index< 'm', 3 > m
Template selector for assembly type.
Data on single entity (This is passed as argument to DataOperator::doWork)
FieldApproximationBase & getBase()
Get approximation base.
virtual boost::shared_ptr< MatrixDouble > & getNSharedPtr(const FieldApproximationBase base, const BaseDerivatives derivative)
Get shared pointer to base functions with derivatives.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FieldSpace & getSpace()
Get field space.
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.
[Storage and set boundary conditions]
static HashVectorStorage feStorage
[Storage and set boundary conditions]
map< std::string, std::vector< boost::shared_ptr< EssentialBcStorage > > > HashVectorStorage
Store modified indices by field.
EssentialBcStorage(VectorInt &indices)
Structure for user loop methods on finite elements.
typename EleOp::OpType OpType
OpBaseImpl(const std::string row_field_name, const std::string col_field_name, const OpType type, boost::shared_ptr< Range > ents_ptr=nullptr)
Constructor for base operator implementation.
VectorDouble locF
local entity vector
typename EleOp::OpType OpType
TimeFun timeScalingFun
assumes that time variable is set
MatrixDouble locMatTranspose
local entity block matrix
int rowSide
row side number
int colSide
column side number
boost::shared_ptr< Range > entsPtr
Entities on which element is run.
static MatSetValuesHook matSetValuesHook
int nbRows
number of dofs on rows
EntityType colType
column type
int nbIntegrationPts
number of integration points
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
Do calculations for the left hand side.
virtual MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data, const bool trans)
Assemble local matrix into global matrix.
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Integrate grad-grad operator.
virtual MoFEMErrorCode iNtegrate(EntData &data)
Class dedicated to integrate operator.
MatrixDouble locMat
local entity block matrix
virtual size_t getNbOfBaseFunctions(EntitiesFieldData::EntData &data)
Get number of base functions.
FTensor::Tensor2< FTensor::PackPtr< double *, DIM >, DIM, DIM > getLocMat(const int rr)
Get local matrix tensor for assembly.
FEFun feScalingFun
assumes that time variable is set
FTensor::Tensor1< FTensor::PackPtr< double *, DIM >, DIM > getNf()
Get local vector tensor for assembly.
int nbCols
number if dof on column
int nbRowBaseFunctions
number or row base functions
EntityType rowType
row type
boost::function< MoFEMErrorCode(ForcesAndSourcesCore::UserDataOperator *op_ptr, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, MatrixDouble &m)> MatSetValuesHook
Set indices on entities on finite element.
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator for linear form, usually to calculate values on right hand side.
boost::shared_ptr< std::vector< unsigned char > > boundaryMarker
Unset indices on entities on finite element.
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Perform unset operation on entity data.