24 #ifndef __EDGEELEMENTFORCESANDSURCESCORE_HPP__
25 #define __EDGEELEMENTFORCESANDSURCESCORE_HPP__
27 using namespace boost::numeric;
31 template <
int SWITCH>
struct FaceElementForcesAndSourcesCoreOnSideSwitch;
33 struct FaceElementForcesAndSourcesCoreOnSideBase;
91 inline double getLength();
97 inline double getMeasure();
108 inline auto getFTensor1Normal();
154 getFTensor1TangentAtGaussPts();
156 template <
int SWITCH>
158 loopSideFaces(
const string &fe_name,
174 template <
int SWITCH>
191 template <
int SWITCH>
195 if (numeredEntFiniteElementPtr->getEntType() != MBEDGE)
198 CHKERR calculateEdgeDirection();
199 CHKERR getSpacesAndBaseOnEntities(dataH1);
200 CHKERR getEntityDataOrder<MBEDGE>(dataH1,
H1);
201 dataH1.dataOnEntities[MBEDGE][0].getSense() =
205 if (dataH1.spacesOnEntities[MBEDGE].test(
L2)) {
206 auto &data_l2 = *dataOnElement[
L2];
207 CHKERR getEntityDataOrder<MBEDGE>(data_l2,
L2);
208 data_l2.dataOnEntities[MBEDGE][0].getSense() =
210 data_l2.spacesOnEntities[MBEDGE].set(
L2);
214 if (dataH1.spacesOnEntities[MBEDGE].test(
HCURL)) {
215 auto &data_curl = *dataOnElement[
HCURL];
216 CHKERR getEntityDataOrder<MBEDGE>(data_curl,
HCURL);
217 data_curl.dataOnEntities[MBEDGE][0].getSense() =
219 data_curl.spacesOnEntities[MBEDGE].set(
HCURL);
222 CHKERR setIntegrationPts();
223 CHKERR calculateCoordsAtIntegrationPts();
224 CHKERR calHierarchicalBaseFunctionsOnElement();
225 CHKERR calBernsteinBezierBaseFunctionsOnElement();
228 CHKERR loopOverOperators();
233 template <
int SWITCH>
235 return opSwitch<SWITCH>();
239 EdgeElementForcesAndSourcesCoreBase::UserDataOperator::getConn() {
243 double EdgeElementForcesAndSourcesCoreBase::UserDataOperator::getLength() {
247 double EdgeElementForcesAndSourcesCoreBase::UserDataOperator::getMeasure() {
252 EdgeElementForcesAndSourcesCoreBase::UserDataOperator::getDirection() {
257 EdgeElementForcesAndSourcesCoreBase::UserDataOperator::getCoords() {
262 EdgeElementForcesAndSourcesCoreBase::UserDataOperator::getTangetAtGaussPts() {
268 EdgeElementForcesAndSourcesCoreBase::UserDataOperator::getEdgeFE() {
273 EdgeElementForcesAndSourcesCoreBase::UserDataOperator::getFTensor1Direction() {
279 EdgeElementForcesAndSourcesCoreBase::UserDataOperator::getTensor1Coords() {
280 double *ptr = &*getCoords().
data().begin();
286 EdgeElementForcesAndSourcesCoreBase::UserDataOperator::
287 getFTensor1TangentAtGaussPts() {
288 double *ptr = &*getTangetAtGaussPts().
data().begin();
293 auto EdgeElementForcesAndSourcesCoreBase::UserDataOperator::getFTensor1Normal(
299 auto t_dir = getFTensor1Direction();
304 auto EdgeElementForcesAndSourcesCoreBase::UserDataOperator::
305 getFTensor1Normal() {
307 return getFTensor1Normal(t_normal);
310 template <
int SWITCH>
312 EdgeElementForcesAndSourcesCoreBase::UserDataOperator::loopSideFaces(
313 const string &fe_name,
315 return loopSide(fe_name, &fe_side, 2);
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ L2
field with C-1 continuity
@ HCURL
field with continuous tangents
#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()
#define CHKERR
Inline error check.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasMatrix< double > MatrixDouble
UBlasVector< double > VectorDouble
implementation of Data Operators for Forces and Sources
Deprecated interface functions.
default operator for EDGE element
std::string meshPositionsFieldName
const EntityHandle * cOnn
MatrixDouble tangentAtGaussPts
EdgeElementForcesAndSourcesCoreSwitch(Interface &m_field)
Base face element used to integrate on skeleton.
Face side finite element with switches.
structure to get information form mofem into EntitiesFieldData