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

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

#include <users_modules/tutorials/cor-0to1/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 pressure rate and get inital essential boundary conditions.

Definition at line 1330 of file UnsaturatedFlow.hpp.

Constructor & Destructor Documentation

◆ preProcessVol()

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

Definition at line 1335 of file UnsaturatedFlow.hpp.

1339  : cTx(ctx), fePtr(fe_ptr) /*,mArk(mark)*/ {}

Member Function Documentation

◆ operator()()

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

Definition at line 1340 of file UnsaturatedFlow.hpp.

1340  {
1342  // Update pressure rates
1343  CHKERR fePtr->mField.getInterface<VecManager>()->setOtherLocalGhostVector(
1344  fePtr->problemPtr, "VALUES", string("VALUES") + "_t", ROW,
1345  fePtr->ts_u_t, INSERT_VALUES, SCATTER_REVERSE);
1346  switch (fePtr->ts_ctx) {
1347  case TSMethod::CTX_TSSETIFUNCTION:
1348  CHKERR VecSetOption(fePtr->ts_F, VEC_IGNORE_NEGATIVE_INDICES,
1349  PETSC_TRUE);
1350  if (!cTx.bcIndices.empty()) {
1351  double scale;
1352  CHKERR cTx.scaleMethodFlux->getForceScale(fePtr->ts_t, scale);
1353  if (cTx.bcVecIds.size() != cTx.bcIndices.size()) {
1354  cTx.bcVecIds.insert(cTx.bcVecIds.begin(), cTx.bcIndices.begin(),
1355  cTx.bcIndices.end());
1356  cTx.bcVecVals.resize(cTx.bcVecIds.size(), false);
1357  cTx.vecValsOnBc.resize(cTx.bcVecIds.size(), false);
1358  }
1359  CHKERR VecGetValues(cTx.D0, cTx.bcVecIds.size(),
1360  &*cTx.bcVecIds.begin(), &*cTx.bcVecVals.begin());
1361  CHKERR VecGetValues(fePtr->ts_u, cTx.bcVecIds.size(),
1362  &*cTx.bcVecIds.begin(),
1363  &*cTx.vecValsOnBc.begin());
1364  cTx.bcVecVals *= scale;
1365  VectorDouble::iterator vit = cTx.bcVecVals.begin();
1366  const NumeredDofEntity *dof_ptr;
1367  for (std::vector<int>::iterator it = cTx.bcVecIds.begin();
1368  it != cTx.bcVecIds.end(); it++, vit++) {
1369  if (auto dof_ptr =
1370  fePtr->problemPtr->getColDofsByPetscGlobalDofIdx(*it)
1371  .lock())
1372  dof_ptr->getFieldData() = *vit;
1373  }
1374  } else {
1375  cTx.bcVecIds.resize(0);
1376  cTx.bcVecVals.resize(0);
1377  cTx.vecValsOnBc.resize(0);
1378  }
1379  break;
1380  default:
1381  // don nothing
1382  break;
1383  }
1385  }

Member Data Documentation

◆ cTx

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

Definition at line 1331 of file UnsaturatedFlow.hpp.

◆ fePtr

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

Definition at line 1332 of file UnsaturatedFlow.hpp.


The documentation for this struct was generated from the following file:
MixTransport::UnsaturatedFlowElement::vecValsOnBc
VectorDouble vecValsOnBc
Definition: UnsaturatedFlow.hpp:1324
ROW
@ ROW
Definition: definitions.h:123
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
ContactOps::scale
double scale
Definition: EshelbianContact.hpp:22
MixTransport::UnsaturatedFlowElement::preProcessVol::cTx
UnsaturatedFlowElement & cTx
Definition: UnsaturatedFlow.hpp:1331
MixTransport::UnsaturatedFlowElement::scaleMethodFlux
boost::shared_ptr< MethodForForceScaling > scaleMethodFlux
Method scaling fluxes.
Definition: UnsaturatedFlow.hpp:1296
MixTransport::MixTransportElement::D0
Vec D0
Definition: MixTransportElement.hpp:470
MixTransport::MixTransportElement::bcIndices
set< int > bcIndices
Definition: MixTransportElement.hpp:80
MixTransport::UnsaturatedFlowElement::bcVecIds
std::vector< int > bcVecIds
Definition: UnsaturatedFlow.hpp:1323
MixTransport::UnsaturatedFlowElement::bcVecVals
VectorDouble bcVecVals
Definition: UnsaturatedFlow.hpp:1324
MixTransport::UnsaturatedFlowElement::preProcessVol::fePtr
boost::shared_ptr< ForcesAndSourcesCore > fePtr
Definition: UnsaturatedFlow.hpp:1332
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346