v0.9.1
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 1320 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 1325 of file UnsaturatedFlow.hpp.

1329  : 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 1330 of file UnsaturatedFlow.hpp.

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

Member Data Documentation

◆ cTx

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

Definition at line 1321 of file UnsaturatedFlow.hpp.

◆ fePtr

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

Definition at line 1322 of file UnsaturatedFlow.hpp.


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