v0.16.3
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), entsPtr(ents_ptr),
306 assembleTranspose(false), onlyTranspose(false) {}
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; ///< set by fe entity handle
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>
352 inline auto getNf() {
353 return getFTensor1FromArray<DIM, DIM>(locF);
354 }
355
356 /**
357 * @brief Get local matrix tensor for assembly
358 * @tparam ROW_DIM Number of row-field components
359 * @tparam COL_DIM Number of column-field components
360 * @param rr Row offset in the local matrix
361 * @return FTensor wrapper around local matrix
362 */
363 template <int ROW_DIM, int COL_DIM = ROW_DIM>
365 getLocMat(const int rr) {
366 return getFTensor2FromArray<ROW_DIM, COL_DIM, COL_DIM>(locMat, rr);
367 }
368
369 int nbRows; ///< number of dofs on rows
370 int nbCols; ///< number if dof on column
371 int nbIntegrationPts; ///< number of integration points
372 int nbRowBaseFunctions; ///< number or row base functions
373
374 int rowSide; ///< row side number
375 int colSide; ///< column side number
376 EntityType rowType; ///< row type
377 EntityType colType; ///< column type
378
381
382 MatrixDouble locMat; ///< local entity block matrix
383 MatrixDouble locMatTranspose; ///< local entity block matrix
384 VectorDouble locF; ///< local entity vector
385
386 /**
387 * \brief Integrate grad-grad operator
388 * @param row_data row data (consist base functions on row entity)
389 * @param col_data column data (consist base functions on column entity)
390 * @return error code
391 */
395
396 /**
397 * @brief Assemble local matrix into global matrix
398 * @param row_data Row entity data
399 * @param col_data Column entity data
400 * @param trans Whether to assemble transpose
401 * @return Error code
402 */
403 virtual MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data,
404 const bool trans);
405
406 /**
407 * \brief Class dedicated to integrate operator
408 * @param data entity data on element row
409 * @return error code
410 */
414
415 /**
416 * @brief Assemble local vector into global vector
417 * @param data Entity data
418 * @return Error code
419 */
420 virtual MoFEMErrorCode aSsemble(EntData &data);
421
422 /** \brief Get number of base functions
423 *
424 * @param data
425 * @return number of base functions
426 */
428};
429
430template <AssemblyType A, typename EleOp>
433 [](ForcesAndSourcesCore::UserDataOperator *op_ptr,
434 const EntitiesFieldData::EntData &row_data,
435 const EntitiesFieldData::EntData &col_data, MatrixDouble &m) {
436 return MatSetValues<AssemblyTypeSelector<A>>(
437 op_ptr->getKSPB(), row_data, col_data, m, ADD_VALUES);
438 };
439
440template <typename OpBase>
441struct OpBrokenBaseImpl; //< This is base operator for broken spaces.
442 //Implementation is in
443 //FormsBrokenSpaceConstraintImpl.hpp
444
445/**
446 * @brief Integrator forms
447 * @ingroup mofem_forms
448 *
449 * @tparam EleOp
450 */
451template <typename EleOp> struct FormsIntegrators {
452
454 using OpType = typename EleOp::OpType;
455
456 /**
457 * @brief Assembly methods
458 * @ingroup mofem_forms
459 *
460 * @tparam A
461 */
462 template <AssemblyType A> struct Assembly {
463
466
467 /**
468 * @brief Linear form
469 * @ingroup mofem_forms
470 *
471 * @tparam I
472 */
473 template <IntegrationType I> struct LinearForm;
474
475 /**
476 * @brief Bi linear form
477 * @ingroup mofem_forms
478 *
479 * @tparam I
480 */
481 template <IntegrationType I> struct BiLinearForm;
482
483 /**
484 * @brief Tri linear form
485 * @ingroup mofem_forms
486 *
487 * @tparam I
488 */
489 template <IntegrationType I> struct TriLinearForm;
490
491 }; // Assembly
492}; // namespace MoFEM
493
494template <AssemblyType A, typename EleOp>
495size_t
497 if (!data.getNSharedPtr(data.getBase())) {
498 #ifndef NDEBUG
499 MOFEM_LOG("SELF", Sev::warning)
500 << "Ptr to base " << ApproximationBaseNames[data.getBase()]
501 << " functions is null, returning 0";
502 #endif // NDEBUG
503 return 0;
504 }
505 auto nb_base_functions = data.getN().size2();
506 if (data.getBase() != USER_BASE) {
507 switch (data.getSpace()) {
508 case NOSPACE:
509 break;
510 case NOFIELD:
511 break;
512 case H1:
513 break;
514 case HCURL:
515 case HDIV:
516 nb_base_functions /= 3;
517#ifndef NDEBUG
518 if (data.getN().size2() % 3) {
519 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
520 "Number of base functions is not divisible by 3");
521 }
522#endif
523 break;
524 case L2:
525 break;
526 default:
527 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
528 "Space %s not implemented", FieldSpaceNames[data.getSpace()]);
529 }
530 }
531 return nb_base_functions;
532}
533
534template <AssemblyType A, typename EleOp>
536OpBaseImpl<A, EleOp>::doWork(int row_side, int col_side, EntityType row_type,
537 EntityType col_type,
539 EntitiesFieldData::EntData &col_data) {
541
542 if (entsPtr) {
543 if (entsPtr->find(this->getFEEntityHandle()) == entsPtr->end())
545 }
546
547 // get number of dofs on row
548 nbRows = row_data.getIndices().size();
549 // if no dofs on row, exit that work, nothing to do here
550 if (!nbRows)
552 rowSide = row_side;
553 rowType = row_type;
554 // get number of dofs on column
555 nbCols = col_data.getIndices().size();
556 // if no dofs on column, exit nothing to do here
557 if (!nbCols)
559 colSide = col_side;
560 colType = col_type;
561 // get number of integration points
562 nbIntegrationPts = EleOp::getGaussPts().size2();
563 // get row base functions
564 nbRowBaseFunctions = getNbOfBaseFunctions(row_data);
565
566 // set size of local entity bock
567 locMat.resize(nbRows, nbCols, false);
568 // clear matrix
569 locMat.clear();
570 // integrate local matrix for entity block
571 CHKERR this->iNtegrate(row_data, col_data);
572
573 // assemble local matrix
574 auto check_if_assemble_transpose = [&] {
575 if (this->sYmm) {
576 if (row_side != col_side || row_type != col_type)
577 return true;
578 else
579 return false;
580 } else if (assembleTranspose) {
581 return true;
582 }
583
584 return false;
585 };
586 CHKERR aSsemble(row_data, col_data, check_if_assemble_transpose());
588}
589
590template <AssemblyType A, typename EleOp>
591MoFEMErrorCode OpBaseImpl<A, EleOp>::doWork(int row_side, EntityType row_type,
592 EntData &row_data) {
594
595 if (entsPtr) {
596 if (entsPtr->find(this->getFEEntityHandle()) == entsPtr->end())
598 }
599
600 // get number of dofs on row
601 nbRows = row_data.getIndices().size();
602 rowSide = row_side;
603 rowType = row_type;
604
605 if (!nbRows)
607 // get number of integration points
608 nbIntegrationPts = EleOp::getGaussPts().size2();
609 // get row base functions
610 nbRowBaseFunctions = getNbOfBaseFunctions(row_data);
611 // resize and clear the right hand side vector
612 locF.resize(nbRows);
613 locF.clear();
614 // integrate local vector
615 CHKERR this->iNtegrate(row_data);
616 // assemble local vector
617 CHKERR this->aSsemble(row_data);
619}
620
621template <AssemblyType A, typename EleOp>
623 EntData &col_data,
624 const bool transpose) {
626
627 if (!this->timeScalingFun.empty())
628 this->locMat *= this->timeScalingFun(this->getFEMethod()->ts_t);
629 if (!this->feScalingFun.empty())
630 this->locMat *= this->feScalingFun(this->getFEMethod());
631
632 // Assemble transpose
633 if (transpose) {
634 this->locMatTranspose.resize(this->locMat.size2(), this->locMat.size1(),
635 false);
636 noalias(this->locMatTranspose) = trans(this->locMat);
637 CHKERR matSetValuesHook(this, col_data, row_data, this->locMatTranspose);
638 }
639
640 if (!this->onlyTranspose) {
641 // assemble local matrix
642 CHKERR matSetValuesHook(this, row_data, col_data, this->locMat);
643 }
644
646}
647
648template <AssemblyType A, typename EleOp>
650 if (!this->timeScalingFun.empty())
651 this->locF *= this->timeScalingFun(this->getFEMethod()->ts_t);
652 if (!this->feScalingFun.empty())
653 this->locF *= this->feScalingFun(this->getFEMethod());
654
655 return VecSetValues<AssemblyTypeSelector<A>>(this->getKSPf(), data,
656 this->locF, ADD_VALUES);
657}
658
659} // namespace MoFEM
660
661/**
662 * \defgroup mofem_forms Forms Integrators
663 *
664 * \brief Classes and functions used to evaluate fields at integration pts,
665 *jacobians, etc..
666 *
667 * \ingroup mofem_forces_and_sources
668 **/
669
670#endif //__FORMS_INTEGRATORS_HPP__
std::string type
@ 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.
auto getNf()
Get local vector tensor for assembly.
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.
MatrixDouble locMat
local entity block matrix
virtual size_t getNbOfBaseFunctions(EntitiesFieldData::EntData &data)
Get number of base functions.
FEFun feScalingFun
set by fe entity handle
virtual MoFEMErrorCode iNtegrate(EntData &, EntData &)
Integrate grad-grad operator.
FTensor::Tensor2< FTensor::PackPtr< double *, COL_DIM >, ROW_DIM, COL_DIM > getLocMat(const int rr)
Get local matrix tensor for assembly.
int nbCols
number if dof on column
virtual MoFEMErrorCode iNtegrate(EntData &)
Class dedicated to integrate operator.
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.