12#ifndef __EDGEELEMENTFORCESANDSURCESCORE_HPP__
13#define __EDGEELEMENTFORCESANDSURCESCORE_HPP__
15using namespace boost::numeric;
19struct FaceElementForcesAndSourcesCoreOnSide;
71 using ForcesAndSourcesCore::UserDataOperator::UserDataOperator;
172 template <
int DIM = 3>
185EdgeElementForcesAndSourcesCore::UserDataOperator::getConn() {
189double EdgeElementForcesAndSourcesCore::UserDataOperator::getLength() {
194EdgeElementForcesAndSourcesCore::UserDataOperator::getDirection() {
199EdgeElementForcesAndSourcesCore::UserDataOperator::getCoords() {
204EdgeElementForcesAndSourcesCore::UserDataOperator::getTangentAtGaussPts() {
210EdgeElementForcesAndSourcesCore::UserDataOperator::getEdgeFE() {
215EdgeElementForcesAndSourcesCore::UserDataOperator::getFTensor1Direction() {
221EdgeElementForcesAndSourcesCore::UserDataOperator::getFTensor1Coords() {
222 double *ptr = &*getCoords().
data().begin();
229EdgeElementForcesAndSourcesCore::UserDataOperator::getFTensor1TangentAtGaussPts<
231 double *ptr = &*getTangentAtGaussPts().
data().begin();
238EdgeElementForcesAndSourcesCore::UserDataOperator::getFTensor1TangentAtGaussPts<
240 double *ptr = &*getTangentAtGaussPts().data().begin();
244auto EdgeElementForcesAndSourcesCore::UserDataOperator::getFTensor1Normal(
250 auto t_dir = getFTensor1Direction();
255auto EdgeElementForcesAndSourcesCore::UserDataOperator::
256 getFTensor1Normal() {
260auto EdgeElementForcesAndSourcesCore::UserDataOperator::
266 auto &normals_at_gauss_pts =
268 normals_at_gauss_pts.resize(3, getGaussPts().size2(),
false);
269 auto t_normal = getFTensor1FromMat<3>(normals_at_gauss_pts);
270 auto t_dir = getFTensor1TangentAtGaussPts<3>();
271 for(
auto gg = 0; gg!=getGaussPts().size2(); ++gg) {
277 return getFTensor1FromMat<3>(normals_at_gauss_pts);
280auto EdgeElementForcesAndSourcesCore::UserDataOperator::
281 getFTensor1NormalsAtGaussPts() {
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 > >::typ 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.
implementation of Data Operators for Forces and Sources
DEPRECATED typedef EdgeElementForcesAndSourcesCore EdgeElementForcesAndSourcesCoreBase
Deprecated interface functions.
default operator for EDGE element
const EntityHandle * getConn()
get element connectivity
VectorDouble & getCoords()
get edge node coordinates
DEPRECATED FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getTensor1Coords()
auto getFTensor1Normal()
get edge normal NOTE: it should be used only in 2D analysis
FTensor::Tensor1< double, 3 > getFTensor1Direction()
MatrixDouble & getTangentAtGaussPts()
get tangent vector to edge curve at integration points
double getLength()
get edge length
VectorDouble & getDirection()
get edge direction
MoFEMErrorCode loopSideFaces(const string fe_name, FaceElementForcesAndSourcesCoreOnSide &fe_side)
auto getFTensor1NormalsAtGaussPts()
get normal at integration points
const EdgeElementForcesAndSourcesCore * getEdgeFE()
get pointer to this finite element
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, DIM > getFTensor1TangentAtGaussPts()
Get tangent vector at integration points.
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1Coords()
get get coords at gauss points
MoFEMErrorCode setPtrFE(ForcesAndSourcesCore *ptr)
DEPRECATED MatrixDouble & getTangetAtGaussPts()
MatrixDouble tangentAtGaussPts
MatrixDouble normalsAtGaussPts
MoFEMErrorCode calculateEdgeDirection()
std::string meshPositionsFieldName
const EntityHandle * cOnn
EdgeElementForcesAndSourcesCore(Interface &m_field)
static FTensor::Tensor1< double, 3 > tFaceOrientation
MoFEMErrorCode setIntegrationPts()
MoFEMErrorCode calculateCoordsAtIntegrationPts()
MoFEMErrorCode operator()()
function is run for every finite element
Base face element used to integrate on skeleton.
ForcesAndSourcesCore * ptrFE
structure to get information form mofem into EntitiesFieldData