![]() |
v0.15.0 |
Mix transport problem. More...
#include "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 | |
virtual | ~MixTransportElement () |
destructor | |
MoFEMErrorCode | getDirichletBCIndices (IS *is) |
get dof indices where essential boundary conditions are applied | |
virtual MoFEMErrorCode | getSource (const EntityHandle ent, const double x, const double y, const double z, double &flux) |
set source term | |
virtual MoFEMErrorCode | getResistivity (const EntityHandle ent, const double x, const double y, const double z, MatrixDouble3by3 &inv_k) |
natural (Dirichlet) boundary conditions (set values) | |
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 | |
virtual MoFEMErrorCode | getBcOnFluxes (const EntityHandle ent, const double x, const double y, const double z, double &flux) |
essential (Neumann) boundary condition (set fluxes) | |
MoFEMErrorCode | addFields (const std::string &values, const std::string &fluxes, const int order) |
Add fields to database. | |
MoFEMErrorCode | addFiniteElements (const std::string &fluxes_name, const std::string &values_name) |
add finite elements | |
MoFEMErrorCode | buildProblem (BitRefLevel &ref_level) |
Build problem. | |
MoFEMErrorCode | postProc (const string out_file) |
Post process results. | |
MoFEMErrorCode | createMatrices () |
create matrices | |
MoFEMErrorCode | solveLinearProblem () |
solve problem | |
MoFEMErrorCode | calculateResidual () |
calculate residual | |
MoFEMErrorCode | evaluateError () |
Calculate error on elements. | |
MoFEMErrorCode | destroyMatrices () |
destroy matrices | |
Public Attributes | |
MoFEM::Interface & | mField |
MyVolumeFE | feVol |
Instance of volume element. | |
MyTriFE | feTri |
Instance of surface element. | |
VectorDouble | valuesAtGaussPts |
values at integration points on element | |
MatrixDouble | valuesGradientAtGaussPts |
gradients at integration points on element | |
VectorDouble | divergenceAtGaussPts |
divergence at integration points on element | |
MatrixDouble | fluxesAtGaussPts |
fluxes at integration points on element | |
set< int > | bcIndices |
std::map< int, BlockData > | setOfBlocks |
maps block set id with appropriate BlockData | |
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 34 of file MixTransportElement.hpp.
|
inline |
construction of this data structure
Definition at line 70 of file MixTransportElement.hpp.
|
inlinevirtual |
|
inline |
Add fields to database.
values | name of the fields |
fluxes | name of field for fluxes |
order | order of approximation |
Definition at line 194 of file MixTransportElement.hpp.
|
inline |
add finite elements
Definition at line 213 of file MixTransportElement.hpp.
|
inline |
Build problem.
ref_level | mesh refinement on which mesh problem you like to built. |
Definition at line 296 of file MixTransportElement.hpp.
|
inline |
calculate residual
Definition at line 617 of file MixTransportElement.hpp.
|
inline |
create matrices
Definition at line 479 of file MixTransportElement.hpp.
|
inline |
destroy matrices
Definition at line 705 of file MixTransportElement.hpp.
|
inline |
Calculate error on elements.
Definition at line 675 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 MixTransport::UnsaturatedFlowElement, MyTransport, and MyTransport.
Definition at line 168 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 151 of file MixTransportElement.hpp.
|
inline |
get dof indices where essential boundary conditions are applied
is | indices |
Definition at line 92 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 131 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 114 of file MixTransportElement.hpp.
|
inline |
Post process results.
Definition at line 433 of file MixTransportElement.hpp.
|
inline |
solve problem
Definition at line 493 of file MixTransportElement.hpp.
Mat MixTransport::MixTransportElement::Aij |
Definition at line 476 of file MixTransportElement.hpp.
set<int> MixTransport::MixTransportElement::bcIndices |
Definition at line 85 of file MixTransportElement.hpp.
Vec MixTransport::MixTransportElement::D |
Definition at line 475 of file MixTransportElement.hpp.
Vec MixTransport::MixTransportElement::D0 |
Definition at line 475 of file MixTransportElement.hpp.
VectorDouble MixTransport::MixTransportElement::divergenceAtGaussPts |
divergence at integration points on element
Definition at line 82 of file MixTransportElement.hpp.
map<double, EntityHandle> MixTransport::MixTransportElement::errorMap |
Definition at line 1365 of file MixTransportElement.hpp.
Vec MixTransport::MixTransportElement::F |
Definition at line 475 of file MixTransportElement.hpp.
MyTriFE MixTransport::MixTransportElement::feTri |
Instance of surface element.
Definition at line 65 of file MixTransportElement.hpp.
MyVolumeFE MixTransport::MixTransportElement::feVol |
Instance of volume element.
Definition at line 51 of file MixTransportElement.hpp.
MatrixDouble MixTransport::MixTransportElement::fluxesAtGaussPts |
fluxes at integration points on element
Definition at line 83 of file MixTransportElement.hpp.
MoFEM::Interface& MixTransport::MixTransportElement::mField |
Definition at line 36 of file MixTransportElement.hpp.
std::map<int, BlockData> MixTransport::MixTransportElement::setOfBlocks |
maps block set id with appropriate BlockData
Definition at line 185 of file MixTransportElement.hpp.
double MixTransport::MixTransportElement::sumErrorDiv |
Definition at line 1367 of file MixTransportElement.hpp.
double MixTransport::MixTransportElement::sumErrorFlux |
Definition at line 1366 of file MixTransportElement.hpp.
double MixTransport::MixTransportElement::sumErrorJump |
Definition at line 1368 of file MixTransportElement.hpp.
VectorDouble MixTransport::MixTransportElement::valuesAtGaussPts |
values at integration points on element
Definition at line 78 of file MixTransportElement.hpp.
MatrixDouble MixTransport::MixTransportElement::valuesGradientAtGaussPts |
gradients at integration points on element
Definition at line 80 of file MixTransportElement.hpp.