v0.14.0
Public Member Functions | List of all members
ConvectiveMassElement::OpVelocityLhs_dV_dx Struct Reference

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

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

Public Member Functions

 OpVelocityLhs_dV_dx (const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data)
 
virtual MoFEMErrorCode getJac (EntitiesFieldData::EntData &col_data, int gg)
 
- Public Member Functions inherited from ConvectiveMassElement::OpVelocityLhs_dV_dv
 OpVelocityLhs_dV_dv (const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data)
 
- 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)
 
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 327 of file ConvectiveMassElement.hpp.

Constructor & Destructor Documentation

◆ OpVelocityLhs_dV_dx()

ConvectiveMassElement::OpVelocityLhs_dV_dx::OpVelocityLhs_dV_dx ( const std::string  vel_field,
const std::string  field_name,
BlockData data,
CommonData common_data 
)

Definition at line 1093 of file ConvectiveMassElement.cpp.

1096  : OpVelocityLhs_dV_dv(vel_field, field_name, data, common_data) {}

Member Function Documentation

◆ getJac()

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

Reimplemented from ConvectiveMassElement::OpVelocityLhs_dV_dv.

Definition at line 1098 of file ConvectiveMassElement.cpp.

1099  {
1101  int nb_col = col_data.getIndices().size();
1102  jac.clear();
1103  if (!nb_col)
1105  double *base_ptr = const_cast<double *>(&col_data.getN(gg)[0]);
1106  FTensor::Tensor0<double *> base(base_ptr, 1);
1107  FTensor::Tensor2<double *, 3, 3> t_jac(&jac(0, 0), &jac(0, 1), &jac(0, 2),
1108  &jac(1, 0), &jac(1, 1), &jac(1, 2),
1109  &jac(2, 0), &jac(2, 1), &jac(2, 2), 3);
1110  const int u = 3;
1112  &commonData.jacVel[gg](0, u + 0), &commonData.jacVel[gg](0, u + 1),
1113  &commonData.jacVel[gg](0, u + 2), &commonData.jacVel[gg](1, u + 0),
1114  &commonData.jacVel[gg](1, u + 1), &commonData.jacVel[gg](1, u + 2),
1115  &commonData.jacVel[gg](2, u + 0), &commonData.jacVel[gg](2, u + 1),
1116  &commonData.jacVel[gg](2, u + 2));
1120  if (commonData.dataAtGaussPts["DOT_" + commonData.meshPositions].size() ==
1121  0) {
1122 
1123  for (int dd = 0; dd < nb_col / 3; dd++) {
1124  t_jac(i, j) += t_mass1(i, j) * base * getFEMethod()->ts_a;
1125  ++base_ptr;
1126  ++t_jac;
1127  }
1128  } else {
1129  double *diff_ptr =
1130  const_cast<double *>(&(col_data.getDiffN(gg, nb_col / 3)(0, 0)));
1131  FTensor::Tensor1<double *, 3> diff(diff_ptr, &diff_ptr[1], &diff_ptr[2], 3);
1132  const int s = 3 + 3;
1134  // T* d000, T* d001, T* d002,
1135  // T* d010, T* d011, T* d012,
1136  // T* d020, T* d021, T* d022,
1137  // T* d100, T* d101, T* d102,
1138  // T* d110, T* d111, T* d112,
1139  // T* d120, T* d121, T* d122,
1140  // T* d200, T* d201, T* d202,
1141  // T* d210, T* d211, T* d212,
1142  // T* d220, T* d221, T* d222,
1143  &commonData.jacVel[gg](0, s + 0), &commonData.jacVel[gg](0, s + 1),
1144  &commonData.jacVel[gg](0, s + 2), &commonData.jacVel[gg](0, s + 3),
1145  &commonData.jacVel[gg](0, s + 4), &commonData.jacVel[gg](0, s + 5),
1146  &commonData.jacVel[gg](0, s + 6), &commonData.jacVel[gg](0, s + 7),
1147  &commonData.jacVel[gg](0, s + 8), &commonData.jacVel[gg](1, s + 0),
1148  &commonData.jacVel[gg](1, s + 1), &commonData.jacVel[gg](1, s + 2),
1149  &commonData.jacVel[gg](1, s + 3), &commonData.jacVel[gg](1, s + 4),
1150  &commonData.jacVel[gg](1, s + 5), &commonData.jacVel[gg](1, s + 6),
1151  &commonData.jacVel[gg](1, s + 7), &commonData.jacVel[gg](1, s + 8),
1152  &commonData.jacVel[gg](2, s + 0), &commonData.jacVel[gg](2, s + 1),
1153  &commonData.jacVel[gg](2, s + 2), &commonData.jacVel[gg](2, s + 3),
1154  &commonData.jacVel[gg](2, s + 4), &commonData.jacVel[gg](2, s + 5),
1155  &commonData.jacVel[gg](2, s + 6), &commonData.jacVel[gg](2, s + 7),
1156  &commonData.jacVel[gg](2, s + 8));
1157  for (int dd = 0; dd < nb_col / 3; dd++) {
1158  t_jac(i, j) += t_mass1(i, j) * base * getFEMethod()->ts_a;
1159  t_jac(i, j) += t_mass3(i, j, k) * diff(k);
1160  ++base_ptr;
1161  ++diff_ptr;
1162  ++t_jac;
1163  }
1164  }
1166 }

The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
ConvectiveMassElement::OpMassLhs_dM_dv::jac
MatrixDouble jac
Definition: ConvectiveMassElement.hpp:234
MoFEM::EntitiesFieldData::EntData::getDiffN
MatrixDouble & getDiffN(const FieldApproximationBase base)
get derivatives of base functions
Definition: EntitiesFieldData.hpp:1329
ConvectiveMassElement::OpMassLhs_dM_dv::k
MatrixDouble k
Definition: ConvectiveMassElement.hpp:234
ConvectiveMassElement::CommonData::dataAtGaussPts
std::map< std::string, std::vector< VectorDouble > > dataAtGaussPts
Definition: ConvectiveMassElement.hpp:133
FTensor::Tensor2< double *, 3, 3 >
FTensor::Tensor3
Definition: Tensor3_value.hpp:12
MoFEM::EntitiesFieldData::EntData::getIndices
const VectorInt & getIndices() const
Get global indices of dofs on entity.
Definition: EntitiesFieldData.hpp:1214
ConvectiveMassElement::CommonData::jacVel
std::vector< MatrixDouble > jacVel
Definition: ConvectiveMassElement.hpp:140
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', 3 >
ConvectiveMassElement::OpMassLhs_dM_dv::commonData
CommonData & commonData
Definition: ConvectiveMassElement.hpp:227
FTensor::dd
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
FTensor::Tensor0
Definition: Tensor0.hpp:16
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
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
ConvectiveMassElement::CommonData::meshPositions
string meshPositions
Definition: ConvectiveMassElement.hpp:136
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
ConvectiveMassElement::OpVelocityLhs_dV_dv::OpVelocityLhs_dV_dv
OpVelocityLhs_dV_dv(const std::string vel_field, const std::string field_name, BlockData &data, CommonData &common_data)
Definition: ConvectiveMassElement.cpp:1059