v0.13.1
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 
)

Member Function Documentation

◆ postProcess()

MoFEMErrorCode ConvectiveMassElement::UpdateAndControl::postProcess ( )

Definition at line 1757 of file ConvectiveMassElement.cpp.

1757 {
1759 //
1760 // SNES snes;
1761 // CHKERR TSGetSNES(tS,&snes);
1762 // CHKERR SNESSetLagJacobian(snes,jacobianLag);
1764}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440

◆ preProcess()

MoFEMErrorCode ConvectiveMassElement::UpdateAndControl::preProcess ( )

Scatter values from t_u_dt on the fields.

Returns
MoFEMErrorCode

Definition at line 1727 of file ConvectiveMassElement.cpp.

1727 {
1729
1730 switch (ts_ctx) {
1731 case CTX_TSSETIFUNCTION: {
1732 snes_f = ts_F;
1733 // FIXME: This global scattering because Kuu problem and Dynamic problem
1734 // not share partitions. Both problem should use the same partitioning to
1735 // resolve this problem.
1736 CHKERR mField.getInterface<VecManager>()->setGlobalGhostVector(
1737 problemPtr, COL, ts_u, INSERT_VALUES, SCATTER_REVERSE);
1738 CHKERR mField.getInterface<VecManager>()->setOtherGlobalGhostVector(
1739 problemPtr, velocityField, "DOT_" + velocityField, COL, ts_u_t,
1740 INSERT_VALUES, SCATTER_REVERSE);
1741 CHKERR mField.getInterface<VecManager>()->setOtherGlobalGhostVector(
1742 problemPtr, spatialPositionField, "DOT_" + spatialPositionField, COL,
1743 ts_u_t, INSERT_VALUES, SCATTER_REVERSE);
1744 break;
1745 }
1746 case CTX_TSSETIJACOBIAN: {
1747 snes_B = ts_B;
1748 break;
1749 }
1750 default:
1751 break;
1752 }
1753
1755}
@ COL
Definition: definitions.h:123
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
Vector manager is used to create vectors \mofem_vectors.
Definition: VecManager.hpp:23

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: