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

Pre-peprocessing Set head pressute rate and get inital essential boundary conditions. More...

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

Collaboration diagram for MixTransport::UnsaturatedFlowElement::preProcessVol:
[legend]

Public Member Functions

 preProcessVol (UnsaturatedFlowElement &ctx, boost::shared_ptr< ForcesAndSourcesCore > &fe_ptr)
 
MoFEMErrorCode operator() ()
 

Public Attributes

UnsaturatedFlowElementcTx
 
boost::shared_ptr< ForcesAndSourcesCore > fePtr
 

Detailed Description

Pre-peprocessing Set head pressute rate and get inital essential boundary conditions.

Definition at line 1313 of file UnsaturatedFlow.hpp.

Constructor & Destructor Documentation

◆ preProcessVol()

MixTransport::UnsaturatedFlowElement::preProcessVol::preProcessVol ( UnsaturatedFlowElement ctx,
boost::shared_ptr< ForcesAndSourcesCore > &  fe_ptr 
)
Examples
UnsaturatedFlow.hpp.

Definition at line 1318 of file UnsaturatedFlow.hpp.

1322  : cTx(ctx), fePtr(fe_ptr) /*,mArk(mark)*/ {}
boost::shared_ptr< ForcesAndSourcesCore > fePtr

Member Function Documentation

◆ operator()()

MoFEMErrorCode MixTransport::UnsaturatedFlowElement::preProcessVol::operator() ( )
Examples
UnsaturatedFlow.hpp.

Definition at line 1323 of file UnsaturatedFlow.hpp.

1323  {
1325  // Update pressure rates
1326  CHKERR fePtr->mField.getInterface<VecManager>()->setOtherLocalGhostVector(
1327  fePtr->problemPtr, "VALUES", string("VALUES") + "_t", ROW,
1328  fePtr->ts_u_t, INSERT_VALUES, SCATTER_REVERSE);
1329  switch (fePtr->ts_ctx) {
1330  case TSMethod::CTX_TSSETIFUNCTION:
1331  if (!cTx.bcIndices.empty()) {
1332  double scale;
1333  CHKERR cTx.scaleMethodFlux->getForceScale(fePtr->ts_t, scale);
1334  if (cTx.bcVecIds.size() != cTx.bcIndices.size()) {
1335  cTx.bcVecIds.insert(cTx.bcVecIds.begin(), cTx.bcIndices.begin(),
1336  cTx.bcIndices.end());
1337  cTx.bcVecVals.resize(cTx.bcVecIds.size(), false);
1338  cTx.vecValsOnBc.resize(cTx.bcVecIds.size(), false);
1339  }
1340  CHKERR VecGetValues(cTx.D0, cTx.bcVecIds.size(),
1341  &*cTx.bcVecIds.begin(), &*cTx.bcVecVals.begin());
1342  CHKERR VecGetValues(fePtr->ts_u, cTx.bcVecIds.size(),
1343  &*cTx.bcVecIds.begin(),
1344  &*cTx.vecValsOnBc.begin());
1345  cTx.bcVecVals *= scale;
1346  VectorDouble::iterator vit = cTx.bcVecVals.begin();
1347  const NumeredDofEntity *dof_ptr;
1348  for (std::vector<int>::iterator it = cTx.bcVecIds.begin();
1349  it != cTx.bcVecIds.end(); it++, vit++) {
1350  CHKERR fePtr->problemPtr->getColDofsByPetscGlobalDofIdx(*it,
1351  &dof_ptr);
1352  dof_ptr->getFieldData() = *vit;
1353  }
1354  } else {
1355  cTx.bcVecIds.resize(0);
1356  cTx.bcVecVals.resize(0);
1357  cTx.vecValsOnBc.resize(0);
1358  }
1359  break;
1360  default:
1361  // don nothing
1362  break;
1363  }
1365  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
boost::shared_ptr< MethodForForceScaling > scaleMethodFlux
Method scaling fluxes.
#define CHKERR
Inline error check.
Definition: definitions.h:596
boost::shared_ptr< ForcesAndSourcesCore > fePtr
#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::preProcessVol::cTx
Examples
UnsaturatedFlow.hpp.

Definition at line 1314 of file UnsaturatedFlow.hpp.

◆ fePtr

boost::shared_ptr<ForcesAndSourcesCore> MixTransport::UnsaturatedFlowElement::preProcessVol::fePtr
Examples
UnsaturatedFlow.hpp.

Definition at line 1315 of file UnsaturatedFlow.hpp.


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