v0.12.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/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 pressute rate and get inital essential boundary conditions.

Definition at line 1342 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 1347 of file UnsaturatedFlow.hpp.

1351  : 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 1352 of file UnsaturatedFlow.hpp.

1352  {
1354  // Update pressure rates
1355  CHKERR fePtr->mField.getInterface<VecManager>()->setOtherLocalGhostVector(
1356  fePtr->problemPtr, "VALUES", string("VALUES") + "_t", ROW,
1357  fePtr->ts_u_t, INSERT_VALUES, SCATTER_REVERSE);
1358  switch (fePtr->ts_ctx) {
1359  case TSMethod::CTX_TSSETIFUNCTION:
1360  CHKERR VecSetOption(fePtr->ts_F, VEC_IGNORE_NEGATIVE_INDICES,
1361  PETSC_TRUE);
1362  if (!cTx.bcIndices.empty()) {
1363  double scale;
1364  CHKERR cTx.scaleMethodFlux->getForceScale(fePtr->ts_t, scale);
1365  if (cTx.bcVecIds.size() != cTx.bcIndices.size()) {
1366  cTx.bcVecIds.insert(cTx.bcVecIds.begin(), cTx.bcIndices.begin(),
1367  cTx.bcIndices.end());
1368  cTx.bcVecVals.resize(cTx.bcVecIds.size(), false);
1369  cTx.vecValsOnBc.resize(cTx.bcVecIds.size(), false);
1370  }
1371  CHKERR VecGetValues(cTx.D0, cTx.bcVecIds.size(),
1372  &*cTx.bcVecIds.begin(), &*cTx.bcVecVals.begin());
1373  CHKERR VecGetValues(fePtr->ts_u, cTx.bcVecIds.size(),
1374  &*cTx.bcVecIds.begin(),
1375  &*cTx.vecValsOnBc.begin());
1376  cTx.bcVecVals *= scale;
1377  VectorDouble::iterator vit = cTx.bcVecVals.begin();
1378  const NumeredDofEntity *dof_ptr;
1379  for (std::vector<int>::iterator it = cTx.bcVecIds.begin();
1380  it != cTx.bcVecIds.end(); it++, vit++) {
1381  if (auto dof_ptr =
1382  fePtr->problemPtr->getColDofsByPetscGlobalDofIdx(*it)
1383  .lock())
1384  dof_ptr->getFieldData() = *vit;
1385  }
1386  } else {
1387  cTx.bcVecIds.resize(0);
1388  cTx.bcVecVals.resize(0);
1389  cTx.vecValsOnBc.resize(0);
1390  }
1391  break;
1392  default:
1393  // don nothing
1394  break;
1395  }
1397  }
@ ROW
Definition: definitions.h:136
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
#define CHKERR
Inline error check.
Definition: definitions.h:548
double scale
Definition: plastic.cpp:103
boost::shared_ptr< MethodForForceScaling > scaleMethodFlux
Method scaling fluxes.

Member Data Documentation

◆ cTx

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

Definition at line 1343 of file UnsaturatedFlow.hpp.

◆ fePtr

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

Definition at line 1344 of file UnsaturatedFlow.hpp.


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