v0.14.0
Public Member Functions | Public Attributes | List of all members
ConvectiveMassElement::UpdateAndControl Struct Reference

Set fields DOT_. More...

#include <users_modules/basic_finite_elements/src/ConvectiveMassElement.hpp>

Inheritance diagram for ConvectiveMassElement::UpdateAndControl:
[legend]
Collaboration diagram for ConvectiveMassElement::UpdateAndControl:
[legend]

Public Member Functions

 UpdateAndControl (MoFEM::Interface &m_field, TS _ts, const std::string velocity_field, const std::string spatial_position_field)
 
MoFEMErrorCode preProcess ()
 Scatter values from t_u_dt on the fields. More...
 
MoFEMErrorCode postProcess ()
 

Public Attributes

MoFEM::InterfacemField
 
TS tS
 
const std::string velocityField
 
const std::string spatialPositionField
 
int jacobianLag
 

Detailed Description

Set fields DOT_.

Note
This is old solution, to keep rates calculate by TS as a fields. This is not memory efficient solution.
Examples
nonlinear_dynamics.cpp.

Definition at line 434 of file ConvectiveMassElement.hpp.

Constructor & Destructor Documentation

◆ UpdateAndControl()

ConvectiveMassElement::UpdateAndControl::UpdateAndControl ( MoFEM::Interface m_field,
TS  _ts,
const std::string  velocity_field,
const std::string  spatial_position_field 
)

Definition at line 1716 of file ConvectiveMassElement.cpp.

1719  : mField(m_field), tS(_ts), velocityField(velocity_field),
1720  spatialPositionField(spatial_position_field), jacobianLag(-1) {}

Member Function Documentation

◆ postProcess()

MoFEMErrorCode ConvectiveMassElement::UpdateAndControl::postProcess ( )

Definition at line 1752 of file ConvectiveMassElement.cpp.

1752  {
1754  //
1755  // SNES snes;
1756  // CHKERR TSGetSNES(tS,&snes);
1757  // CHKERR SNESSetLagJacobian(snes,jacobianLag);
1759 }

◆ preProcess()

MoFEMErrorCode ConvectiveMassElement::UpdateAndControl::preProcess ( )

Scatter values from t_u_dt on the fields.

Returns
MoFEMErrorCode

Definition at line 1722 of file ConvectiveMassElement.cpp.

1722  {
1724 
1725  switch (ts_ctx) {
1726  case CTX_TSSETIFUNCTION: {
1727  snes_f = ts_F;
1728  // FIXME: This global scattering because Kuu problem and Dynamic problem
1729  // not share partitions. Both problem should use the same partitioning to
1730  // resolve this problem.
1731  CHKERR mField.getInterface<VecManager>()->setGlobalGhostVector(
1732  problemPtr, COL, ts_u, INSERT_VALUES, SCATTER_REVERSE);
1733  CHKERR mField.getInterface<VecManager>()->setOtherGlobalGhostVector(
1734  problemPtr, velocityField, "DOT_" + velocityField, COL, ts_u_t,
1735  INSERT_VALUES, SCATTER_REVERSE);
1736  CHKERR mField.getInterface<VecManager>()->setOtherGlobalGhostVector(
1737  problemPtr, spatialPositionField, "DOT_" + spatialPositionField, COL,
1738  ts_u_t, INSERT_VALUES, SCATTER_REVERSE);
1739  break;
1740  }
1741  case CTX_TSSETIJACOBIAN: {
1742  snes_B = ts_B;
1743  break;
1744  }
1745  default:
1746  break;
1747  }
1748 
1750 }

Member Data Documentation

◆ jacobianLag

int ConvectiveMassElement::UpdateAndControl::jacobianLag

Definition at line 441 of file ConvectiveMassElement.hpp.

◆ mField

MoFEM::Interface& ConvectiveMassElement::UpdateAndControl::mField

Definition at line 436 of file ConvectiveMassElement.hpp.

◆ spatialPositionField

const std::string ConvectiveMassElement::UpdateAndControl::spatialPositionField

Definition at line 439 of file ConvectiveMassElement.hpp.

◆ tS

TS ConvectiveMassElement::UpdateAndControl::tS

Definition at line 437 of file ConvectiveMassElement.hpp.

◆ velocityField

const std::string ConvectiveMassElement::UpdateAndControl::velocityField

Definition at line 438 of file ConvectiveMassElement.hpp.


The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Definition: UnknownInterface.hpp:93
ConvectiveMassElement::UpdateAndControl::tS
TS tS
Definition: ConvectiveMassElement.hpp:437
ConvectiveMassElement::UpdateAndControl::jacobianLag
int jacobianLag
Definition: ConvectiveMassElement.hpp:441
ts_ctx
MoFEM::TsCtx * ts_ctx
Definition: level_set.cpp:1932
ConvectiveMassElement::UpdateAndControl::velocityField
const std::string velocityField
Definition: ConvectiveMassElement.hpp:438
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
ConvectiveMassElement::UpdateAndControl::spatialPositionField
const std::string spatialPositionField
Definition: ConvectiveMassElement.hpp:439
COL
@ COL
Definition: definitions.h:136
MoFEM::VecManager
Vector manager is used to create vectors \mofem_vectors.
Definition: VecManager.hpp:23
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
ConvectiveMassElement::UpdateAndControl::mField
MoFEM::Interface & mField
Definition: ConvectiveMassElement.hpp:436