v0.13.1
Public Member Functions | List of all members
ConvectiveMassElement::OpMassLhs_dM_dx Struct Reference

#include <users_modules/basic_finite_elements/src/ConvectiveMassElement.hpp>

Inheritance diagram for ConvectiveMassElement::OpMassLhs_dM_dx:
[legend]
Collaboration diagram for ConvectiveMassElement::OpMassLhs_dM_dx:
[legend]

Public Member Functions

 OpMassLhs_dM_dx (const std::string field_name, const std::string col_field, BlockData &data, CommonData &common_data)
 
MoFEMErrorCode getJac (EntitiesFieldData::EntData &col_data, int gg)
 
- Public Member Functions inherited from ConvectiveMassElement::OpMassLhs_dM_dv
 OpMassLhs_dM_dv (const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data, Range *forcesonlyonentities_ptr=NULL)
 
virtual MoFEMErrorCode getJac (EntitiesFieldData::EntData &col_data, int gg)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Additional Inherited Members

- Public Attributes inherited from ConvectiveMassElement::OpMassLhs_dM_dv
BlockDatadAta
 
CommonDatacommonData
 
Range forcesOnlyOnEntities
 
MatrixDouble k
 
MatrixDouble jac
 

Detailed Description

Definition at line 245 of file ConvectiveMassElement.hpp.

Constructor & Destructor Documentation

◆ OpMassLhs_dM_dx()

ConvectiveMassElement::OpMassLhs_dM_dx::OpMassLhs_dM_dx ( const std::string  field_name,
const std::string  col_field,
BlockData data,
CommonData common_data 
)

Definition at line 613 of file ConvectiveMassElement.cpp.

616 : OpMassLhs_dM_dv(field_name, col_field, data, common_data) {}
constexpr auto field_name
OpMassLhs_dM_dv(const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data, Range *forcesonlyonentities_ptr=NULL)

Member Function Documentation

◆ getJac()

MoFEMErrorCode ConvectiveMassElement::OpMassLhs_dM_dx::getJac ( EntitiesFieldData::EntData col_data,
int  gg 
)
virtual

Reimplemented from ConvectiveMassElement::OpMassLhs_dM_dv.

Definition at line 618 of file ConvectiveMassElement.cpp.

619 {
624 int nb_col = col_data.getIndices().size();
625 jac.clear();
626 FTensor::Tensor2<double *, 3, 3> t_jac(&jac(0, 0), &jac(0, 1), &jac(0, 2),
627 &jac(1, 0), &jac(1, 1), &jac(1, 2),
628 &jac(2, 0), &jac(2, 1), &jac(2, 2), 3);
629 const int s = 3;
631 // T* d000, T* d001, T* d002,
632 // T* d010, T* d011, T* d012,
633 // T* d020, T* d021, T* d022,
634 // T* d100, T* d101, T* d102,
635 // T* d110, T* d111, T* d112,
636 // T* d120, T* d121, T* d122,
637 // T* d200, T* d201, T* d202,
638 // T* d210, T* d211, T* d212,
639 // T* d220, T* d221, T* d222,
640 &commonData.jacMass[gg](0, s + 0), &commonData.jacMass[gg](0, s + 1),
641 &commonData.jacMass[gg](0, s + 2), &commonData.jacMass[gg](0, s + 3),
642 &commonData.jacMass[gg](0, s + 4), &commonData.jacMass[gg](0, s + 5),
643 &commonData.jacMass[gg](0, s + 6), &commonData.jacMass[gg](0, s + 7),
644 &commonData.jacMass[gg](0, s + 8), &commonData.jacMass[gg](1, s + 0),
645 &commonData.jacMass[gg](1, s + 1), &commonData.jacMass[gg](1, s + 2),
646 &commonData.jacMass[gg](1, s + 3), &commonData.jacMass[gg](1, s + 4),
647 &commonData.jacMass[gg](1, s + 5), &commonData.jacMass[gg](1, s + 6),
648 &commonData.jacMass[gg](1, s + 7), &commonData.jacMass[gg](1, s + 8),
649 &commonData.jacMass[gg](2, s + 0), &commonData.jacMass[gg](2, s + 1),
650 &commonData.jacMass[gg](2, s + 2), &commonData.jacMass[gg](2, s + 3),
651 &commonData.jacMass[gg](2, s + 4), &commonData.jacMass[gg](2, s + 5),
652 &commonData.jacMass[gg](2, s + 6), &commonData.jacMass[gg](2, s + 7),
653 &commonData.jacMass[gg](2, s + 8));
654 double *diff_ptr =
655 const_cast<double *>(&(col_data.getDiffN(gg, nb_col / 3)(0, 0)));
656 FTensor::Tensor1<double *, 3> diff(diff_ptr, &diff_ptr[1], &diff_ptr[2], 3);
657 for (int dd = 0; dd < nb_col / 3; dd++) {
658 t_jac(i, j) += t_mass3(i, j, k) * diff(k);
659 ++diff;
660 ++t_jac;
661 }
663}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
MatrixDouble & getDiffN(const FieldApproximationBase base)
get derivatives of base functions
const VectorInt & getIndices() const
Get global indices of dofs on entity.

The documentation for this struct was generated from the following files: