v0.9.0
Public Member Functions | Public Attributes | List of all members
MixTransport::UnsaturatedFlowElement::OpIntegrateFluxes Struct Reference

#include <users_modules/basic_finite_elements/mix_transport/src/UnsaturatedFlow.hpp>

Inheritance diagram for MixTransport::UnsaturatedFlowElement::OpIntegrateFluxes:
[legend]
Collaboration diagram for MixTransport::UnsaturatedFlowElement::OpIntegrateFluxes:
[legend]

Public Member Functions

 OpIntegrateFluxes (UnsaturatedFlowElement &ctx, const std::string fluxes_name)
 Constructor. More...
 
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 Integrate boundary condition. More...
 

Public Attributes

UnsaturatedFlowElementcTx
 
FTensor::Index< 'i', 3 > i
 

Detailed Description

Definition at line 899 of file UnsaturatedFlow.hpp.

Constructor & Destructor Documentation

◆ OpIntegrateFluxes()

MixTransport::UnsaturatedFlowElement::OpIntegrateFluxes::OpIntegrateFluxes ( UnsaturatedFlowElement ctx,
const std::string  fluxes_name 
)

Constructor.

Examples
UnsaturatedFlow.hpp.

Definition at line 906 of file UnsaturatedFlow.hpp.

909  fluxes_name, UserDataOperator::OPROW),
910  cTx(ctx) {}
ForcesAndSourcesCore::UserDataOperator UserDataOperator

Member Function Documentation

◆ doWork()

MoFEMErrorCode MixTransport::UnsaturatedFlowElement::OpIntegrateFluxes::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData data 
)

Integrate boundary condition.

Parameters
sidelocal index of entity
typetype of entity
datadata on entity
Returns
error code
Examples
UnsaturatedFlow.hpp.

Definition at line 921 of file UnsaturatedFlow.hpp.

922  {
924  int nb_dofs = data.getFieldData().size();
925  if (nb_dofs == 0)
927  // Get base function
928  auto t_n_hdiv = data.getFTensor1N<3>();
929  // get normal of face
930  auto t_normal = getFTensor1Normal();
931  // Integration weight
932  auto t_w = getFTensor0IntegrationWeight();
933  double flux_on_entity = 0;
934  int nb_gauss_pts = data.getN().size1();
935  for (int gg = 0; gg < nb_gauss_pts; gg++) {
936  auto t_data = data.getFTensor0FieldData();
937  for (int rr = 0; rr != nb_dofs; rr++) {
938  flux_on_entity -= (0.5 * t_data * t_w) * (t_n_hdiv(i) * t_normal(i));
939  ++t_n_hdiv;
940  ++t_data;
941  }
942  ++t_w;
943  }
944  CHKERR VecSetValue(cTx.ghostFlux, 0, flux_on_entity, ADD_VALUES);
946  }
Vec ghostFlux
Ghost Vector of integrated fluxes.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

Member Data Documentation

◆ cTx

UnsaturatedFlowElement& MixTransport::UnsaturatedFlowElement::OpIntegrateFluxes::cTx
Examples
UnsaturatedFlow.hpp.

Definition at line 901 of file UnsaturatedFlow.hpp.

◆ i

FTensor::Index<'i', 3> MixTransport::UnsaturatedFlowElement::OpIntegrateFluxes::i
Examples
UnsaturatedFlow.hpp.

Definition at line 912 of file UnsaturatedFlow.hpp.


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