Lhs for U dG (Jacobian block ∂R_U/∂G)
More...
#include "tutorials/vec-5_free_surface/src/FreeSurfaceOps.hpp"
|
| | OpLhsU_dG (const std::string field_name_u, const std::string field_name_h, boost::shared_ptr< MatrixDouble > grad_h_ptr) |
| |
| MoFEMErrorCode | iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data) |
| |
|
| boost::shared_ptr< MatrixDouble > | gradHPtr |
| |
Lhs for U dG (Jacobian block ∂R_U/∂G)
- Parameters
-
| field_name_u | Name of the field associated with the row operator (U) |
| field_name_h | Name of the field associated with the column operator (H) |
| grad_h_ptr | Pointer to the free surface height gradient matrix (∇h) |
- Returns
- MoFEMErrorCode
This operator assembles the contribution of the chemical potential G into the momentum Jacobian. It corresponds to linearization of the surface tension term −κ g ∇h wrt g.
- Examples
- mofem/tutorials/vec-5_free_surface/free_surface.cpp.
Definition at line 882 of file FreeSurfaceOps.hpp.
◆ OpLhsU_dG()
| FreeSurfaceOps::OpLhsU_dG::OpLhsU_dG |
( |
const std::string |
field_name_u, |
|
|
const std::string |
field_name_h, |
|
|
boost::shared_ptr< MatrixDouble > |
grad_h_ptr |
|
) |
| |
|
inline |
Definition at line 884 of file FreeSurfaceOps.hpp.
887 AssemblyDomainEleOp::OPROWCOL),
889 sYmm = false;
890 assembleTranspose = false;
891 }
boost::shared_ptr< MatrixDouble > gradHPtr
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp
◆ iNtegrate()
| MoFEMErrorCode FreeSurfaceOps::OpLhsU_dG::iNtegrate |
( |
EntitiesFieldData::EntData & |
row_data, |
|
|
EntitiesFieldData::EntData & |
col_data |
|
) |
| |
|
inline |
Definition at line 893 of file FreeSurfaceOps.hpp.
894 {
896
897 const double vol = getMeasure();
898 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*
gradHPtr);
899 auto t_coords = getFTensor1CoordsAtGaussPts();
900
901 auto t_row_base = row_data.getFTensor0N();
902 auto t_w = getFTensor0IntegrationWeight();
903
904 for (int gg = 0; gg != nbIntegrationPts; gg++) {
905
906 const double r = t_coords(0);
908
910 t_phase_force_dg(
i) = -alpha *
kappa * t_grad_h(
i);
911
912 int rr = 0;
914 auto t_mat =
915 getFTensor1FromMat<U_FIELD_DIM, 1>(locMat, rr *
U_FIELD_DIM);
916 auto t_col_base = col_data.getFTensor0N(gg, 0);
917
918 for (int cc = 0; cc != nbCols; ++cc) {
919 const double bb = t_row_base * t_col_base;
920 t_mat(
i) += t_phase_force_dg(
i) * bb;
921
922 ++t_mat;
923 ++t_col_base;
924 }
925
926 ++t_row_base;
927 }
928
929 for (; rr < nbRowBaseFunctions; ++rr) {
930 ++t_row_base;
931 }
932
933 ++t_grad_h;
934 ++t_coords;
935 ++t_w;
936 }
937
939 }
#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()
auto cylindrical
[cylindrical]
constexpr int U_FIELD_DIM
FTensor::Index< 'i', SPACE_DIM > i
◆ gradHPtr
| boost::shared_ptr<MatrixDouble> FreeSurfaceOps::OpLhsU_dG::gradHPtr |
|
private |
The documentation for this struct was generated from the following file: