v0.14.0
FormsIntegrators.hpp
Go to the documentation of this file.
1 /** \file FormsIntegrators.hpp
2  * \brief Forms integrators
3  * \ingroup mofem_form
4 
5 */
6 
7 #ifndef __FORMS_INTEGRATORS_HPP__
8 #define __FORMS_INTEGRATORS_HPP__
9 
10 namespace MoFEM {
11 
12 //! [Storage and set boundary conditions]
13 
15  EssentialBcStorage(VectorInt &indices) : entityIndices(indices) {}
17  /**
18  * @brief Store modifed indices by field
19  *
20  * Hash map, key is field name, value is storage.
21  *
22  */
23  using HashVectorStorage =
24  map<std::string, std::vector<boost::shared_ptr<EssentialBcStorage>>>;
26 };
27 
28 /**
29  * @brief Set indices on entities on finite element
30  * @ingroup mofem_forms
31  *
32  * If index is marked, its value is set to -1. DOF with such index is not
33  * assembled into the system.
34  *
35  * Indices are stored on the entity.
36  *
37  */
39  OpSetBc(std::string field_name, bool yes_set,
40  boost::shared_ptr<std::vector<unsigned char>> boundary_marker);
41  MoFEMErrorCode doWork(int side, EntityType type,
43 
44 public:
45  bool yesSet;
46  boost::shared_ptr<std::vector<unsigned char>> boundaryMarker;
47 };
48 
50  OpUnSetBc(std::string field_name);
51  MoFEMErrorCode doWork(int side, EntityType type,
53 };
54 
55 /**
56  * @brief Set values to vector in operator
57  * @ingroup mofem_forms
58  *
59  * MoFEM::FieldEntity provides MoFEM::FieldEntity::getWeakStoragePtr() storage
60  * function which allows to transfer data between FEs or operators processing
61  * the same entities.
62  *
63  * When MoFEM::OpSetBc is pushed in weak storage indices taking in account
64  * indices which are skip to take boundary conditions are stored. Those entities
65  * are used by VecSetValues.
66  *
67  * @param V
68  * @param data
69  * @param ptr
70  * @param iora
71  * @return MoFEMErrorCode
72  */
73 template <>
76  const double *ptr, InsertMode iora);
77 
78 /**
79  * @brief Set values to matrix in operator
80  *
81  * See MoFEM::VecSetValues<EssentialBcStorage> for explanation.
82  *
83  * @param M
84  * @param row_data
85  * @param col_data
86  * @param ptr
87  * @param iora
88  * @return MoFEMErrorCode
89  */
90 template <>
93  const EntitiesFieldData::EntData &row_data,
94  const EntitiesFieldData::EntData &col_data,
95  const double *ptr, InsertMode iora);
96 
97 //! [Storage and set boundary conditions]
98 
99 /**
100  * @brief Form integrator assembly types
101  * @ingroup mofem_forms
102  *
103  */
112 };
113 
114 template <int A> struct AssemblyTypeSelector {};
115 
116 template <>
117 inline MoFEMErrorCode MatSetValues<AssemblyTypeSelector<PETSC>>(
118  Mat M, const EntitiesFieldData::EntData &row_data,
119  const EntitiesFieldData::EntData &col_data, const double *ptr,
120  InsertMode iora) {
121  return MatSetValues<EssentialBcStorage>(M, row_data, col_data, ptr, iora);
122 }
123 
124 template <>
125 inline MoFEMErrorCode VecSetValues<AssemblyTypeSelector<PETSC>>(
126  Vec V, const EntitiesFieldData::EntData &data, const double *ptr,
127  InsertMode iora) {
128  return VecSetValues<EssentialBcStorage>(V, data, ptr, iora);
129 }
130 
131 /**
132  * @brief Form integrator integration types
133  * @ingroup mofem_forms
134  *
135  */
137 
138 /**
139  * @brief Scalar function type
140  * @ingroup mofem_forms
141  *
142  */
143 using ScalarFun =
144  boost::function<double(const double, const double, const double)>;
145 
146 inline double scalar_fun_one(const double, const double, const double) {
147  return 1;
148 }
149 
150 /**
151  * @brief Lambda function used to scale with time
152  *
153  */
154 using TimeFun = boost::function<double(double)>;
155 
156 /**
157  * @brief Lambda function used to scale with time
158  *
159  */
160 using FEFun = boost::function<double(const FEMethod *fe_ptr)>;
161 
162 /**
163  * @brief Constant function type
164  *
165  */
166 using ConstantFun = boost::function<double()>;
167 
168 /**
169  * @brief Vector function type
170  * @ingroup mofem_forms
171  *
172  * @tparam DIM dimension of the return
173  */
174 template <int DIM>
175 using VectorFun = boost::function<FTensor::Tensor1<double, DIM>(
176  const double, const double, const double)>;
177 
178 template <AssemblyType A, typename EleOp> struct OpBaseImpl : public EleOp {
179  using OpType = typename EleOp::OpType;
181 
182  OpBaseImpl(const std::string row_field_name, const std::string col_field_name,
183  const OpType type, boost::shared_ptr<Range> ents_ptr = nullptr)
184  : EleOp(row_field_name, col_field_name, type, false),
185  assembleTranspose(false), onlyTranspose(false), entsPtr(ents_ptr) {}
186 
187  /**
188  * \brief Do calculations for the left hand side
189  * @param row_side row side number (local number) of entity on element
190  * @param col_side column side number (local number) of entity on element
191  * @param row_type type of row entity
192  * @param col_type type of column entity
193  * @param row_data data for row
194  * @param col_data data for column
195  * @return error code
196  */
197  MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type,
198  EntityType col_type, EntData &row_data,
199  EntData &col_data);
200 
201  /**
202  * @brief Do calculations for the right hand side
203  *
204  * @param row_side
205  * @param row_type
206  * @param row_data
207  * @return MoFEMErrorCode
208  */
209  MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data);
210 
211  TimeFun timeScalingFun; ///< assumes that time variable is set
212  FEFun feScalingFun; ///< assumes that time variable is set
213  boost::shared_ptr<Range> entsPtr; ///< Entities on which element is run
214 
215  using MatSetValuesHook = boost::function<MoFEMErrorCode(
217  const EntitiesFieldData::EntData &row_data,
219 
221 
222 protected:
223  using EleOp::EleOp;
224 
225  template <int DIM>
227  return getFTensor1FromArray<DIM, DIM>(locF);
228  }
229 
230  template <int DIM>
232  getLocMat(const int rr) {
233  return getFTensor2FromArray<DIM, DIM, DIM>(locMat, rr);
234  }
235 
236  int nbRows; ///< number of dofs on rows
237  int nbCols; ///< number if dof on column
238  int nbIntegrationPts; ///< number of integration points
239  int nbRowBaseFunctions; ///< number or row base functions
240 
241  int rowSide; ///< row side number
242  int colSide; ///< column side number
243  EntityType rowType; ///< row type
244  EntityType colType; ///< column type
245 
248 
249  MatrixDouble locMat; ///< local entity block matrix
250  MatrixDouble locMatTranspose; ///< local entity block matrix
251  VectorDouble locF; ///< local entity vector
252 
253  /**
254  * \brief Integrate grad-grad operator
255  * @param row_data row data (consist base functions on row entity)
256  * @param col_data column data (consist base functions on column entity)
257  * @return error code
258  */
259  virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) {
260  return MOFEM_NOT_IMPLEMENTED;
261  }
262 
263  virtual MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data,
264  const bool trans);
265 
266  /**
267  * \brief Class dedicated to integrate operator
268  * @param data entity data on element row
269  * @return error code
270  */
272  return MOFEM_NOT_IMPLEMENTED;
273  }
274 
275  virtual MoFEMErrorCode aSsemble(EntData &data);
276 
277  /** \brief Get number of base functions
278  *
279  * @param data
280  * @return number of base functions
281  */
282  virtual size_t getNbOfBaseFunctions(EntitiesFieldData::EntData &data);
283 };
284 
285 template <AssemblyType A, typename EleOp>
289  const EntitiesFieldData::EntData &row_data,
290  const EntitiesFieldData::EntData &col_data, MatrixDouble &m) {
291  return MatSetValues<AssemblyTypeSelector<A>>(
292  op_ptr->getKSPB(), row_data, col_data, m, ADD_VALUES);
293  };
294 
295 template <typename OpBase>
296 struct OpBrokenBaseImpl; //< This is base operator for broken spaces.
297  //Implementation is in
298  //FormsBrokenSpaceConstraintImpl.hpp
299 
300 /**
301  * @brief Integrator forms
302  * @ingroup mofem_forms
303  *
304  * @tparam EleOp
305  */
306 template <typename EleOp> struct FormsIntegrators {
307 
309  using OpType = typename EleOp::OpType;
310 
311  /**
312  * @brief Assembly methods
313  * @ingroup mofem_forms
314  *
315  * @tparam A
316  */
317  template <AssemblyType A> struct Assembly {
318 
321 
322  /**
323  * @brief Linear form
324  * @ingroup mofem_forms
325  *
326  * @tparam I
327  */
328  template <IntegrationType I> struct LinearForm;
329 
330  /**
331  * @brief Bi linear form
332  * @ingroup mofem_forms
333  *
334  * @tparam I
335  */
336  template <IntegrationType I> struct BiLinearForm;
337 
338  /**
339  * @brief Tri linear form
340  * @ingroup mofem_forms
341  *
342  * @tparam I
343  */
344  template <IntegrationType I> struct TriLinearForm;
345 
346  }; // Assembly
347 }; // namespace MoFEM
348 
349 template <AssemblyType A, typename EleOp>
350 size_t
352  auto nb_base_functions = data.getN().size2();
353  if (data.getBase() != USER_BASE) {
354  switch (data.getSpace()) {
355  case NOSPACE:
356  break;
357  case NOFIELD:
358  break;
359  case H1:
360  break;
361  case HCURL:
362  case HDIV:
363  nb_base_functions /= 3;
364 #ifndef NDEBUG
365  if (data.getN().size2() % 3) {
366  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
367  "Number of base functions is not divisible by 3");
368  }
369 #endif
370  break;
371  case L2:
372  break;
373  default:
374  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
375  "Space %s not implemented", FieldSpaceNames[data.getSpace()]);
376  }
377  }
378  return nb_base_functions;
379 }
380 
381 template <AssemblyType A, typename EleOp>
383 OpBaseImpl<A, EleOp>::doWork(int row_side, int col_side, EntityType row_type,
384  EntityType col_type,
385  EntitiesFieldData::EntData &row_data,
386  EntitiesFieldData::EntData &col_data) {
388 
389  if (entsPtr) {
390  if (entsPtr->find(this->getFEEntityHandle()) == entsPtr->end())
392  }
393 
394  // get number of dofs on row
395  nbRows = row_data.getIndices().size();
396  // if no dofs on row, exit that work, nothing to do here
397  if (!nbRows)
399  rowSide = row_side;
400  rowType = row_type;
401  // get number of dofs on column
402  nbCols = col_data.getIndices().size();
403  // if no dofs on column, exit nothing to do here
404  if (!nbCols)
406  colSide = col_side;
407  colType = col_type;
408  // get number of integration points
409  nbIntegrationPts = EleOp::getGaussPts().size2();
410  // get row base functions
411  nbRowBaseFunctions = getNbOfBaseFunctions(row_data);
412 
413  // set size of local entity bock
414  locMat.resize(nbRows, nbCols, false);
415  // clear matrix
416  locMat.clear();
417  // integrate local matrix for entity block
418  CHKERR this->iNtegrate(row_data, col_data);
419 
420  // assemble local matrix
421  auto check_if_assemble_transpose = [&] {
422  if (this->sYmm) {
423  if (row_side != col_side || row_type != col_type)
424  return true;
425  else
426  return false;
427  } else if (assembleTranspose) {
428  return true;
429  }
430 
431  return false;
432  };
433  CHKERR aSsemble(row_data, col_data, check_if_assemble_transpose());
435 }
436 
437 template <AssemblyType A, typename EleOp>
438 MoFEMErrorCode OpBaseImpl<A, EleOp>::doWork(int row_side, EntityType row_type,
439  EntData &row_data) {
441 
442  if (entsPtr) {
443  if (entsPtr->find(this->getFEEntityHandle()) == entsPtr->end())
445  }
446 
447  // get number of dofs on row
448  nbRows = row_data.getIndices().size();
449  rowSide = row_side;
450  rowType = row_type;
451 
452  if (!nbRows)
454  // get number of integration points
455  nbIntegrationPts = EleOp::getGaussPts().size2();
456  // get row base functions
457  nbRowBaseFunctions = getNbOfBaseFunctions(row_data);
458  // resize and clear the right hand side vector
459  locF.resize(nbRows);
460  locF.clear();
461  // integrate local vector
462  CHKERR this->iNtegrate(row_data);
463  // assemble local vector
464  CHKERR this->aSsemble(row_data);
466 }
467 
468 template <AssemblyType A, typename EleOp>
470  EntData &col_data,
471  const bool transpose) {
473 
474  if (!this->timeScalingFun.empty())
475  this->locMat *= this->timeScalingFun(this->getFEMethod()->ts_t);
476  if (!this->feScalingFun.empty())
477  this->locMat *= this->feScalingFun(this->getFEMethod());
478 
479  // Assemble transpose
480  if (transpose) {
481  this->locMatTranspose.resize(this->locMat.size2(), this->locMat.size1(),
482  false);
483  noalias(this->locMatTranspose) = trans(this->locMat);
484  CHKERR matSetValuesHook(this, col_data, row_data, this->locMatTranspose);
485  }
486 
487  if (!this->onlyTranspose) {
488  // assemble local matrix
489  CHKERR matSetValuesHook(this, row_data, col_data, this->locMat);
490  }
491 
493 }
494 
495 template <AssemblyType A, typename EleOp>
497  if (!this->timeScalingFun.empty())
498  this->locF *= this->timeScalingFun(this->getFEMethod()->ts_t);
499  if (!this->feScalingFun.empty())
500  this->locF *= this->feScalingFun(this->getFEMethod());
501 
502  return VecSetValues<AssemblyTypeSelector<A>>(this->getKSPf(), data,
503  this->locF, ADD_VALUES);
504 }
505 
506 } // namespace MoFEM
507 
508 /**
509  * \defgroup mofem_forms Forms Integrators
510  *
511  * \brief Classes and functions used to evaluate fields at integration pts,
512  *jacobians, etc..
513  *
514  * \ingroup mofem_forces_and_sources
515  **/
516 
517 #endif //__FORMS_INTEGRATORS_HPP__
UBlasMatrix< double >
MoFEM::OpBaseImpl::feScalingFun
FEFun feScalingFun
assumes that time variable is set
Definition: FormsIntegrators.hpp:212
NOSPACE
@ NOSPACE
Definition: definitions.h:83
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
MoFEM::OpSetBc::OpSetBc
OpSetBc(std::string field_name, bool yes_set, boost::shared_ptr< std::vector< unsigned char >> boundary_marker)
Definition: FormsIntegrators.cpp:16
MoFEM::OpBaseImpl::nbIntegrationPts
int nbIntegrationPts
number of integration points
Definition: FormsIntegrators.hpp:238
MoFEM::EntitiesFieldData::EntData
Data on single entity (This is passed as argument to DataOperator::doWork)
Definition: EntitiesFieldData.hpp:128
MoFEM::OpBaseImpl::iNtegrate
virtual MoFEMErrorCode iNtegrate(EntData &data)
Class dedicated to integrate operator.
Definition: FormsIntegrators.hpp:271
H1
@ H1
continuous field
Definition: definitions.h:85
MoFEM::OpBaseImpl::locMat
MatrixDouble locMat
local entity block matrix
Definition: FormsIntegrators.hpp:249
MoFEM::FormsIntegrators::Assembly::LinearForm
Linear form.
Definition: FormsIntegrators.hpp:328
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
MoFEM::FEMethod
structure for User Loop Methods on finite elements
Definition: LoopMethods.hpp:369
MoFEM::BLOCK_PRECONDITIONER_SCHUR
@ BLOCK_PRECONDITIONER_SCHUR
Definition: FormsIntegrators.hpp:109
L2
@ L2
field with C-1 continuity
Definition: definitions.h:88
MoFEM::BLOCK_MAT
@ BLOCK_MAT
Definition: FormsIntegrators.hpp:107
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
MoFEM::EssentialBcStorage::HashVectorStorage
map< std::string, std::vector< boost::shared_ptr< EssentialBcStorage > >> HashVectorStorage
Store modifed indices by field.
Definition: FormsIntegrators.hpp:24
MoFEM::PETSC
@ PETSC
Definition: FormsIntegrators.hpp:105
MoFEM::ConstantFun
boost::function< double()> ConstantFun
Constant function type.
Definition: FormsIntegrators.hpp:166
MoFEM::OpBaseImpl::assembleTranspose
bool assembleTranspose
Definition: FormsIntegrators.hpp:246
MoFEM::OpUnSetBc::OpUnSetBc
OpUnSetBc(std::string field_name)
Definition: FormsIntegrators.cpp:54
FTensor::Tensor2
Definition: Tensor2_value.hpp:16
USER_BASE
@ USER_BASE
user implemented approximation base
Definition: definitions.h:68
MoFEM::OpSetBc::boundaryMarker
boost::shared_ptr< std::vector< unsigned char > > boundaryMarker
Definition: FormsIntegrators.hpp:46
MoFEM::scalar_fun_one
double scalar_fun_one(const double, const double, const double)
Definition: FormsIntegrators.hpp:146
EleOp
MoFEM::OpBaseImpl::locF
VectorDouble locF
local entity vector
Definition: FormsIntegrators.hpp:251
PlasticOps::M
FTensor::Index< 'M', 3 > M
Definition: PlasticOps.hpp:117
MoFEM::OpBaseImpl
Definition: FormsIntegrators.hpp:178
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::TimeFun
boost::function< double(double)> TimeFun
Lambda function used to scale with time.
Definition: FormsIntegrators.hpp:154
MoFEM::OpBaseImpl::getLocMat
FTensor::Tensor2< FTensor::PackPtr< double *, DIM >, DIM, DIM > getLocMat(const int rr)
Definition: FormsIntegrators.hpp:232
MoFEM::OpBaseImpl::timeScalingFun
TimeFun timeScalingFun
assumes that time variable is set
Definition: FormsIntegrators.hpp:211
MoFEM::OpUnSetBc::doWork
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator for linear form, usually to calculate values on right hand side.
Definition: FormsIntegrators.cpp:58
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::VectorFun
boost::function< FTensor::Tensor1< double, DIM >(const double, const double, const double)> VectorFun
Vector function type.
Definition: FormsIntegrators.hpp:176
EleOp
Ele::UserDataOperator EleOp
Definition: hdiv_check_approx_in_3d.cpp:19
MoFEM::OpBrokenBaseImpl
Definition: FormsBrokenSpaceConstraintImpl.hpp:171
MoFEM::EntityStorage
Definition: FieldEntsMultiIndices.hpp:16
MoFEM::MatSetValues< EssentialBcStorage >
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.
Definition: FormsIntegrators.cpp:112
MoFEM::ForcesAndSourcesCore::UserDataOperator
Definition: ForcesAndSourcesCore.hpp:549
MoFEM::OpBaseImpl::getNf
FTensor::Tensor1< FTensor::PackPtr< double *, DIM >, DIM > getNf()
Definition: FormsIntegrators.hpp:226
double
convert.type
type
Definition: convert.py:64
MoFEM::OpBaseImpl::iNtegrate
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Integrate grad-grad operator.
Definition: FormsIntegrators.hpp:259
MoFEM::FormsIntegrators::Assembly
Assembly methods.
Definition: FormsIntegrators.hpp:317
MoFEM::OpBaseImpl::doWork
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.
Definition: FormsIntegrators.hpp:383
MoFEM::EntitiesFieldData::EntData::getIndices
const VectorInt & getIndices() const
Get global indices of dofs on entity.
Definition: EntitiesFieldData.hpp:1214
MoFEM::FormsIntegrators::Assembly::BiLinearForm
Bi linear form.
Definition: FormsIntegrators.hpp:336
MoFEM::EntitiesFieldData::EntData::getBase
FieldApproximationBase & getBase()
Get approximation base.
Definition: EntitiesFieldData.hpp:1313
MoFEM::GAUSS
@ GAUSS
Definition: FormsIntegrators.hpp:136
MoFEM::EssentialBcStorage::feStorage
static HashVectorStorage feStorage
[Storage and set boundary conditions]
Definition: FormsIntegrators.hpp:25
MoFEM::OpBaseImpl::colSide
int colSide
column side number
Definition: FormsIntegrators.hpp:242
MoFEM::EssentialBcStorage::EssentialBcStorage
EssentialBcStorage(VectorInt &indices)
Definition: FormsIntegrators.hpp:15
MoFEM::OpBaseImpl::OpType
typename EleOp::OpType OpType
Definition: FormsIntegrators.hpp:179
MoFEM::ScalarFun
boost::function< double(const double, const double, const double)> ScalarFun
Scalar function type.
Definition: FormsIntegrators.hpp:144
MoFEM::USER_INTEGRATION
@ USER_INTEGRATION
Definition: FormsIntegrators.hpp:136
MoFEM::OpBaseImpl::locMatTranspose
MatrixDouble locMatTranspose
local entity block matrix
Definition: FormsIntegrators.hpp:250
MoFEM::OpBaseImpl::onlyTranspose
bool onlyTranspose
Definition: FormsIntegrators.hpp:247
MoFEM::FormsIntegrators::Assembly::TriLinearForm
Tri linear form.
Definition: FormsIntegrators.hpp:344
MoFEM::ForcesAndSourcesCore::UserDataOperator
friend class UserDataOperator
Definition: ForcesAndSourcesCore.hpp:482
MoFEM::OpBaseImpl::MatSetValuesHook
boost::function< MoFEMErrorCode(ForcesAndSourcesCore::UserDataOperator *op_ptr, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, MatrixDouble &m)> MatSetValuesHook
Definition: FormsIntegrators.hpp:218
MoFEM::AssemblyTypeSelector
Definition: FormsIntegrators.hpp:114
EntData
EntitiesFieldData::EntData EntData
Definition: child_and_parent.cpp:37
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
MoFEM::OpSetBc::doWork
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator for linear form, usually to calculate values on right hand side.
Definition: FormsIntegrators.cpp:22
MoFEM::IntegrationType
IntegrationType
Form integrator integration types.
Definition: FormsIntegrators.hpp:136
MoFEM::FormsIntegrators::OpType
typename EleOp::OpType OpType
Definition: FormsIntegrators.hpp:309
MoFEM::OpBaseImpl::nbRowBaseFunctions
int nbRowBaseFunctions
number or row base functions
Definition: FormsIntegrators.hpp:239
MoFEM::FEFun
boost::function< double(const FEMethod *fe_ptr)> FEFun
Lambda function used to scale with time.
Definition: FormsIntegrators.hpp:160
MoFEM::OpBaseImpl::rowSide
int rowSide
row side number
Definition: FormsIntegrators.hpp:241
MoFEM::OpUnSetBc
Definition: FormsIntegrators.hpp:49
MoFEM::OpBaseImpl::nbCols
int nbCols
number if dof on column
Definition: FormsIntegrators.hpp:237
MoFEM::EssentialBcStorage
[Storage and set boundary conditions]
Definition: FormsIntegrators.hpp:14
MoFEM::LAST_INTEGRATION
@ LAST_INTEGRATION
Definition: FormsIntegrators.hpp:136
FieldSpaceNames
const static char *const FieldSpaceNames[]
Definition: definitions.h:92
MoFEM::OpBaseImpl::nbRows
int nbRows
number of dofs on rows
Definition: FormsIntegrators.hpp:236
MoFEM::AssemblyType
AssemblyType
[Storage and set boundary conditions]
Definition: FormsIntegrators.hpp:104
MoFEM::OpBaseImpl::entsPtr
boost::shared_ptr< Range > entsPtr
Entities on which element is run.
Definition: FormsIntegrators.hpp:213
MoFEM::EntitiesFieldData::EntData::getN
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
Definition: EntitiesFieldData.hpp:1318
MoFEM::LAST_ASSEMBLE
@ LAST_ASSEMBLE
Definition: FormsIntegrators.hpp:111
MoFEM::OpBaseImpl::matSetValuesHook
static MatSetValuesHook matSetValuesHook
Definition: FormsIntegrators.hpp:220
MoFEM::USER_ASSEMBLE
@ USER_ASSEMBLE
Definition: FormsIntegrators.hpp:110
MoFEM::Types::VectorInt
UBlasVector< int > VectorInt
Definition: Types.hpp:67
MoFEM::OpSetBc::yesSet
bool yesSet
Definition: FormsIntegrators.hpp:45
UBlasVector< double >
MoFEM::OpSetBc
Set indices on entities on finite element.
Definition: FormsIntegrators.hpp:38
MoFEM::EntitiesFieldData::EntData::getSpace
FieldSpace & getSpace()
Get field space.
Definition: EntitiesFieldData.hpp:1315
OpBaseImpl
HCURL
@ HCURL
field with continuous tangents
Definition: definitions.h:86
EigenMatrix::Vec
const FTensor::Tensor2< T, Dim, Dim > Vec
Definition: MatrixFunction.hpp:66
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MoFEM::OpBaseImpl::aSsemble
virtual MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data, const bool trans)
Definition: FormsIntegrators.hpp:469
MoFEM::FormsIntegrators
Integrator forms.
Definition: FormsIntegrators.hpp:306
MoFEM::BLOCK_SCHUR
@ BLOCK_SCHUR
Definition: FormsIntegrators.hpp:108
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
MoFEM::OpBaseImpl::getNbOfBaseFunctions
virtual size_t getNbOfBaseFunctions(EntitiesFieldData::EntData &data)
Get number of base functions.
Definition: FormsIntegrators.hpp:351
MoFEM::OpBaseImpl::rowType
EntityType rowType
row type
Definition: FormsIntegrators.hpp:243
MoFEM::EssentialBcStorage::entityIndices
VectorInt entityIndices
Definition: FormsIntegrators.hpp:16
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
HDIV
@ HDIV
field with continuous normal traction
Definition: definitions.h:87
MOFEM_NOT_IMPLEMENTED
@ MOFEM_NOT_IMPLEMENTED
Definition: definitions.h:32
MoFEM::SCHUR
@ SCHUR
Definition: FormsIntegrators.hpp:106
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
MoFEM::OpBaseImpl::colType
EntityType colType
column type
Definition: FormsIntegrators.hpp:244
MoFEM::VecSetValues< EssentialBcStorage >
MoFEMErrorCode VecSetValues< EssentialBcStorage >(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Set values to vector in operator.
Definition: FormsIntegrators.cpp:76
MoFEM::OpBaseImpl::OpBaseImpl
OpBaseImpl(const std::string row_field_name, const std::string col_field_name, const OpType type, boost::shared_ptr< Range > ents_ptr=nullptr)
Definition: FormsIntegrators.hpp:182
NOFIELD
@ NOFIELD
scalar or vector of scalars describe (no true field)
Definition: definitions.h:84