![]() |
v0.13.0 |
Mix transport problem. More...
#include <users_modules/tutorials/cor-0to1/src/MixTransportElement.hpp>
Classes | |
struct | BlockData |
data for evaluation of het conductivity and heat capacity elements More... | |
struct | MyTriFE |
definition of surface element More... | |
struct | MyVolumeFE |
definition of volume element More... | |
struct | OpDivTauU_HdivL2 |
Assemble \( \int_\mathcal{T} u \textrm{div}[\boldsymbol\tau] \textrm{d}\mathcal{T} \). More... | |
struct | OpError |
calculate error evaluator More... | |
struct | OpEvaluateBcOnFluxes |
Evaluate boundary conditions on fluxes. More... | |
struct | OpFluxDivergenceAtGaussPts |
calculate flux at integration point More... | |
struct | OpL2Source |
Calculate source therms, i.e. \(\int_\mathcal{T} f v \textrm{d}\mathcal{T}\). More... | |
struct | OpPostProc |
struct | OpRhsBcOnValues |
calculate \( \int_\mathcal{S} {\boldsymbol\tau} \cdot \mathbf{n}u \textrm{d}\mathcal{S} \) More... | |
struct | OpSkeleton |
calculate jump on entities More... | |
struct | OpTauDotSigma_HdivHdiv |
Assemble \(\int_\mathcal{T} \mathbf{A} \boldsymbol\sigma \cdot \boldsymbol\tau \textrm{d}\mathcal{T}\). More... | |
struct | OpValuesAtGaussPts |
Calculate values at integration points. More... | |
struct | OpValuesGradientAtGaussPts |
Calculate gradients of values at integration points. More... | |
struct | OpVDivSigma_L2Hdiv |
\( \int_\mathcal{T} \textrm{div}[\boldsymbol\sigma] v \textrm{d}\mathcal{T} \) More... | |
Public Member Functions | |
MixTransportElement (MoFEM::Interface &m_field) | |
construction of this data structure More... | |
virtual | ~MixTransportElement () |
destructor More... | |
MoFEMErrorCode | getDirichletBCIndices (IS *is) |
get dof indices where essential boundary conditions are applied More... | |
virtual MoFEMErrorCode | getSource (const EntityHandle ent, const double x, const double y, const double z, double &flux) |
set source term More... | |
virtual MoFEMErrorCode | getResistivity (const EntityHandle ent, const double x, const double y, const double z, MatrixDouble3by3 &inv_k) |
natural (Dirichlet) boundary conditions (set values) More... | |
virtual MoFEMErrorCode | getBcOnValues (const EntityHandle ent, const int gg, const double x, const double y, const double z, double &value) |
evaluate natural (Dirichlet) boundary conditions More... | |
virtual MoFEMErrorCode | getBcOnFluxes (const EntityHandle ent, const double x, const double y, const double z, double &flux) |
essential (Neumann) boundary condition (set fluxes) More... | |
MoFEMErrorCode | addFields (const std::string &values, const std::string &fluxes, const int order) |
Add fields to database. More... | |
MoFEMErrorCode | addFiniteElements (const std::string &fluxes_name, const std::string &values_name) |
add finite elements More... | |
MoFEMErrorCode | buildProblem (BitRefLevel &ref_level) |
Build problem. More... | |
MoFEMErrorCode | postProc (const string out_file) |
Post process results. More... | |
MoFEMErrorCode | createMatrices () |
create matrices More... | |
MoFEMErrorCode | solveLinearProblem () |
solve problem More... | |
MoFEMErrorCode | calculateResidual () |
calculate residual More... | |
MoFEMErrorCode | evaluateError () |
Calculate error on elements. More... | |
MoFEMErrorCode | destroyMatrices () |
destroy matrices More... | |
Public Attributes | |
MoFEM::Interface & | mField |
MyVolumeFE | feVol |
Instance of volume element. More... | |
MyTriFE | feTri |
Instance of surface element. More... | |
VectorDouble | valuesAtGaussPts |
values at integration points on element More... | |
MatrixDouble | valuesGradientAtGaussPts |
gradients at integration points on element More... | |
VectorDouble | divergenceAtGaussPts |
divergence at integration points on element More... | |
MatrixDouble | fluxesAtGaussPts |
fluxes at integration points on element More... | |
set< int > | bcIndices |
std::map< int, BlockData > | setOfBlocks |
maps block set id with appropriate BlockData More... | |
Vec | D |
Vec | D0 |
Vec | F |
Mat | Aij |
map< double, EntityHandle > | errorMap |
double | sumErrorFlux |
double | sumErrorDiv |
double | sumErrorJump |
Mix transport problem.
Note to solve this system you need to use direct solver or proper preconditioner for saddle problem.
It is based on [6] [7] [reviartthomas1996] https://www.researchgate.net/profile/Richard_Falk/publication/226454406_Differential_Complexes_and_Stability_of_Finite_Element_Methods_I._The_de_Rham_Complex/links/02e7e5214f0426ff77000000.pdf
General problem have form,
\[ \mathbf{A} \boldsymbol\sigma + \textrm{grad}[u] = \mathbf{0} \; \textrm{on} \; \Omega \\ \textrm{div}[\boldsymbol\sigma] = f \; \textrm{on} \; \Omega \]
Definition at line 44 of file MixTransportElement.hpp.
MixTransport::MixTransportElement::MixTransportElement | ( | MoFEM::Interface & | m_field | ) |
construction of this data structure
Definition at line 80 of file MixTransportElement.hpp.
|
virtual |
MoFEMErrorCode MixTransport::MixTransportElement::addFields | ( | const std::string & | values, |
const std::string & | fluxes, | ||
const int | order | ||
) |
Add fields to database.
values | name of the fields |
fluxes | name of filed for fluxes |
order | order of approximation |
Definition at line 204 of file MixTransportElement.hpp.
MoFEMErrorCode MixTransport::MixTransportElement::addFiniteElements | ( | const std::string & | fluxes_name, |
const std::string & | values_name | ||
) |
add finite elements
Definition at line 223 of file MixTransportElement.hpp.
MoFEMErrorCode MixTransport::MixTransportElement::buildProblem | ( | BitRefLevel & | ref_level | ) |
Build problem.
ref_level | mesh refinement on which mesh problem you like to built. |
Definition at line 306 of file MixTransportElement.hpp.
MoFEMErrorCode MixTransport::MixTransportElement::calculateResidual | ( | ) |
calculate residual
Definition at line 601 of file MixTransportElement.hpp.
MoFEMErrorCode MixTransport::MixTransportElement::createMatrices | ( | ) |
MoFEMErrorCode MixTransport::MixTransportElement::destroyMatrices | ( | ) |
MoFEMErrorCode MixTransport::MixTransportElement::evaluateError | ( | ) |
Calculate error on elements.
Definition at line 658 of file MixTransportElement.hpp.
|
virtual |
essential (Neumann) boundary condition (set fluxes)
ent | handle to finite element entity |
x | coord |
y | coord |
z | coord |
flux | reference to flux which is set by function |
Reimplemented in MixTransport::UnsaturatedFlowElement, MyTransport, and MyTransport.
Definition at line 178 of file MixTransportElement.hpp.
|
virtual |
evaluate natural (Dirichlet) boundary conditions
ent | entity on which bc is evaluated |
x | coordinate |
y | coordinate |
z | coordinate |
value | vale |
Reimplemented in MixTransport::UnsaturatedFlowElement.
Definition at line 161 of file MixTransportElement.hpp.
MoFEMErrorCode MixTransport::MixTransportElement::getDirichletBCIndices | ( | IS * | is | ) |
get dof indices where essential boundary conditions are applied
is | indices |
Definition at line 102 of file MixTransportElement.hpp.
|
virtual |
natural (Dirichlet) boundary conditions (set values)
ent | handle to finite element entity |
x | coord |
y | coord |
z | coord |
value | reference to value set by function |
Definition at line 141 of file MixTransportElement.hpp.
|
virtual |
set source term
ent | handle to entity on which function is evaluated |
x | coord |
y | coord |
z | coord |
flux | reference to source term set by function |
Reimplemented in MyTransport, and MyTransport.
Definition at line 124 of file MixTransportElement.hpp.
MoFEMErrorCode MixTransport::MixTransportElement::postProc | ( | const string | out_file | ) |
MoFEMErrorCode MixTransport::MixTransportElement::solveLinearProblem | ( | ) |
solve problem
Definition at line 476 of file MixTransportElement.hpp.
Mat MixTransport::MixTransportElement::Aij |
Definition at line 459 of file MixTransportElement.hpp.
set<int> MixTransport::MixTransportElement::bcIndices |
Definition at line 95 of file MixTransportElement.hpp.
Vec MixTransport::MixTransportElement::D |
Definition at line 458 of file MixTransportElement.hpp.
Vec MixTransport::MixTransportElement::D0 |
Definition at line 458 of file MixTransportElement.hpp.
VectorDouble MixTransport::MixTransportElement::divergenceAtGaussPts |
divergence at integration points on element
Definition at line 92 of file MixTransportElement.hpp.
map<double, EntityHandle> MixTransport::MixTransportElement::errorMap |
Definition at line 1347 of file MixTransportElement.hpp.
Vec MixTransport::MixTransportElement::F |
Definition at line 458 of file MixTransportElement.hpp.
MyTriFE MixTransport::MixTransportElement::feTri |
Instance of surface element.
Definition at line 75 of file MixTransportElement.hpp.
MyVolumeFE MixTransport::MixTransportElement::feVol |
Instance of volume element.
Definition at line 61 of file MixTransportElement.hpp.
MatrixDouble MixTransport::MixTransportElement::fluxesAtGaussPts |
fluxes at integration points on element
Definition at line 93 of file MixTransportElement.hpp.
MoFEM::Interface& MixTransport::MixTransportElement::mField |
Definition at line 46 of file MixTransportElement.hpp.
std::map<int, BlockData> MixTransport::MixTransportElement::setOfBlocks |
maps block set id with appropriate BlockData
Definition at line 195 of file MixTransportElement.hpp.
double MixTransport::MixTransportElement::sumErrorDiv |
Definition at line 1349 of file MixTransportElement.hpp.
double MixTransport::MixTransportElement::sumErrorFlux |
Definition at line 1348 of file MixTransportElement.hpp.
double MixTransport::MixTransportElement::sumErrorJump |
Definition at line 1350 of file MixTransportElement.hpp.
VectorDouble MixTransport::MixTransportElement::valuesAtGaussPts |
values at integration points on element
Definition at line 88 of file MixTransportElement.hpp.
MatrixDouble MixTransport::MixTransportElement::valuesGradientAtGaussPts |
gradients at integration points on element
Definition at line 90 of file MixTransportElement.hpp.