v0.13.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 1328 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 1333 of file UnsaturatedFlow.hpp.

1337 : 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 1338 of file UnsaturatedFlow.hpp.

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

Member Data Documentation

◆ cTx

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

Definition at line 1329 of file UnsaturatedFlow.hpp.

◆ fePtr

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

Definition at line 1330 of file UnsaturatedFlow.hpp.


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