v0.14.0
Loading...
Searching...
No Matches
NormsOperators.hpp
Go to the documentation of this file.
1/** \file NormsOperators.hpp
2 * \brief User data Operators for calculating norms
3
4*/
5
6#ifndef __NORM_OPERATORS_HPP__
7#define __NORM_OPERATORS_HPP__
8
9namespace MoFEM {
10
11/** \brief Get norm of input VectorDouble for Tensor0
12 *
13 */
14
16
17 OpCalcNormL2Tensor0(boost::shared_ptr<VectorDouble> data_ptr,
18 SmartPetscObj<Vec> data_vec, const int index,
19 boost::shared_ptr<VectorDouble> diff_data_ptr = nullptr);
20
21 /**
22 * \brief calculate values of scalar field at integration points
23 * @param side side entity number
24 * @param type side entity type
25 * @param data entity data
26 * @return error code
27 */
28 MoFEMErrorCode doWork(int side, EntityType type,
30
31protected:
32 boost::shared_ptr<VectorDouble> dataPtr;
33 boost::shared_ptr<VectorDouble> diffDataPtr;
35 const int iNdex;
36};
37
38/** \brief Get norm of input MatrixDouble for Tensor1
39 *
40 */
41template <int DIM>
43
44 OpCalcNormL2Tensor1(boost::shared_ptr<MatrixDouble> data_ptr,
45 SmartPetscObj<Vec> data_vec, const int index,
46 boost::shared_ptr<MatrixDouble> diff_data_ptr = nullptr);
47
48 /**
49 * \brief calculate values of scalar field at integration points
50 * @param side side entity number
51 * @param type side entity type
52 * @param data entity data
53 * @return error code
54 */
55 MoFEMErrorCode doWork(int side, EntityType type,
57
58protected:
59 boost::shared_ptr<MatrixDouble> dataPtr;
60 boost::shared_ptr<MatrixDouble> diffDataPtr;
62 const int iNdex;
63};
64
65/** \brief Get norm of input MatrixDouble for Tensor2
66 *
67 */
68template <int DIM_1, int DIM_2>
70
71 OpCalcNormL2Tensor2(boost::shared_ptr<MatrixDouble> data_ptr,
72 SmartPetscObj<Vec> data_vec, const int index,
73 boost::shared_ptr<MatrixDouble> diff_data_ptr = nullptr);
74
75 /**
76 * \brief calculate values of scalar field at integration points
77 * @param side side entity number
78 * @param type side entity type
79 * @param data entity data
80 * @return error code
81 */
82 MoFEMErrorCode doWork(int side, EntityType type,
84
85protected:
86 boost::shared_ptr<MatrixDouble> dataPtr;
87 boost::shared_ptr<MatrixDouble> diffDataPtr;
89 const int iNdex;
90};
91
92} // namespace MoFEM
93
94#endif // __NORM_OPERATORS_HPP__
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
Data on single entity (This is passed as argument to DataOperator::doWork)
Get norm of input VectorDouble for Tensor0.
boost::shared_ptr< VectorDouble > dataPtr
boost::shared_ptr< VectorDouble > diffDataPtr
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
calculate values of scalar field at integration points
SmartPetscObj< Vec > dataVec
Get norm of input MatrixDouble for Tensor1.
boost::shared_ptr< MatrixDouble > diffDataPtr
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
calculate values of scalar field at integration points
SmartPetscObj< Vec > dataVec
boost::shared_ptr< MatrixDouble > dataPtr
Get norm of input MatrixDouble for Tensor2.
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
calculate values of scalar field at integration points
boost::shared_ptr< MatrixDouble > diffDataPtr
boost::shared_ptr< MatrixDouble > dataPtr
SmartPetscObj< Vec > dataVec
intrusive_ptr for managing petsc objects