![]() |
v0.13.2 |
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 29 of file MixTransportElement.hpp.
|
inline |
construction of this data structure
Definition at line 65 of file MixTransportElement.hpp.
|
inlinevirtual |
|
inline |
Add fields to database.
values | name of the fields |
fluxes | name of filed for fluxes |
order | order of approximation |
Definition at line 189 of file MixTransportElement.hpp.
|
inline |
add finite elements
Definition at line 208 of file MixTransportElement.hpp.
|
inline |
Build problem.
ref_level | mesh refinement on which mesh problem you like to built. |
Definition at line 291 of file MixTransportElement.hpp.
|
inline |
calculate residual
Definition at line 612 of file MixTransportElement.hpp.
|
inline |
create matrices
Definition at line 474 of file MixTransportElement.hpp.
|
inline |
destroy matrices
Definition at line 700 of file MixTransportElement.hpp.
|
inline |
Calculate error on elements.
Definition at line 670 of file MixTransportElement.hpp.
|
inlinevirtual |
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 MyTransport, MyTransport, and MixTransport::UnsaturatedFlowElement.
Definition at line 163 of file MixTransportElement.hpp.
|
inlinevirtual |
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 146 of file MixTransportElement.hpp.
|
inline |
get dof indices where essential boundary conditions are applied
is | indices |
Definition at line 87 of file MixTransportElement.hpp.
|
inlinevirtual |
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 126 of file MixTransportElement.hpp.
|
inlinevirtual |
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 109 of file MixTransportElement.hpp.
|
inline |
Post process results.
Definition at line 428 of file MixTransportElement.hpp.
|
inline |
solve problem
Definition at line 488 of file MixTransportElement.hpp.
Mat MixTransport::MixTransportElement::Aij |
Definition at line 471 of file MixTransportElement.hpp.
set<int> MixTransport::MixTransportElement::bcIndices |
Definition at line 80 of file MixTransportElement.hpp.
Vec MixTransport::MixTransportElement::D |
Definition at line 470 of file MixTransportElement.hpp.
Vec MixTransport::MixTransportElement::D0 |
Definition at line 470 of file MixTransportElement.hpp.
VectorDouble MixTransport::MixTransportElement::divergenceAtGaussPts |
divergence at integration points on element
Definition at line 77 of file MixTransportElement.hpp.
map<double, EntityHandle> MixTransport::MixTransportElement::errorMap |
Definition at line 1360 of file MixTransportElement.hpp.
Vec MixTransport::MixTransportElement::F |
Definition at line 470 of file MixTransportElement.hpp.
MyTriFE MixTransport::MixTransportElement::feTri |
Instance of surface element.
Definition at line 60 of file MixTransportElement.hpp.
MyVolumeFE MixTransport::MixTransportElement::feVol |
Instance of volume element.
Definition at line 46 of file MixTransportElement.hpp.
MatrixDouble MixTransport::MixTransportElement::fluxesAtGaussPts |
fluxes at integration points on element
Definition at line 78 of file MixTransportElement.hpp.
MoFEM::Interface& MixTransport::MixTransportElement::mField |
Definition at line 31 of file MixTransportElement.hpp.
std::map<int, BlockData> MixTransport::MixTransportElement::setOfBlocks |
maps block set id with appropriate BlockData
Definition at line 180 of file MixTransportElement.hpp.
double MixTransport::MixTransportElement::sumErrorDiv |
Definition at line 1362 of file MixTransportElement.hpp.
double MixTransport::MixTransportElement::sumErrorFlux |
Definition at line 1361 of file MixTransportElement.hpp.
double MixTransport::MixTransportElement::sumErrorJump |
Definition at line 1363 of file MixTransportElement.hpp.
VectorDouble MixTransport::MixTransportElement::valuesAtGaussPts |
values at integration points on element
Definition at line 73 of file MixTransportElement.hpp.
MatrixDouble MixTransport::MixTransportElement::valuesGradientAtGaussPts |
gradients at integration points on element
Definition at line 75 of file MixTransportElement.hpp.