33 #ifndef __H__UG__LIB_DISC__CONVECTION_DIFFUSION__CONVECTION_DIFFUSION_FE__
34 #define __H__UG__LIB_DISC__CONVECTION_DIFFUSION__CONVECTION_DIFFUSION_FE__
37 #include "../convection_diffusion_base.h"
41 namespace ConvectionDiffusionPlugin{
56 template<
typename TDomain>
87 template <
typename TElem,
typename TFEGeom>
96 template <
typename TElem,
typename TFEGeom>
100 template <
typename TElem,
typename TFEGeom>
104 template <
typename TElem,
typename TFEGeom>
108 template <
typename TElem,
typename TFEGeom>
112 template <
typename TElem,
typename TFEGeom>
116 template <
typename TElem,
typename TFEGeom>
120 template <
typename TElem,
typename TFEGeom>
124 template <
typename TElem,
typename TFEGeom>
128 template <
typename TElem,
typename TFEGeom>
132 template <
typename TElem,
typename TFEGeom>
136 template <
typename TElem,
typename TFEGeom>
140 template <
typename TElem,
typename TFEGeom>
144 template <
typename TElem,
typename TFEGeom>
149 template <
typename TElem,
typename TFEGeom>
155 template <
typename TElem,
typename TFEGeom>
161 template <
typename TElem,
typename TFEGeom>
167 template <
typename TElem,
typename TFEGeom>
169 std::vector<std::vector<number> > vvvLinDef[],
173 template <
typename TElem,
typename TFEGeom>
175 std::vector<std::vector<number> > vvvLinDef[],
179 template <
typename TElem,
typename TFEGeom>
181 std::vector<std::vector<number> > vvvLinDef[],
185 template <
typename TElem,
typename TFEGeom>
191 template <
typename TElem,
typename TFEGeom>
193 std::vector<std::vector<number> > vvvLinDef[],
197 template <
typename TElem,
typename TFEGeom>
199 std::vector<std::vector<number> > vvvLinDef[],
204 static const size_t _C_ = 0;
224 template <
typename TElem,
typename TFEGeom>
234 std::vector<std::vector<number> > vvvDeriv[]);
237 template <
typename TElem,
typename TFEGeom>
251 virtual void prepare_setting(
const std::vector<LFEID>& vLfeID,
bool bNonRegularGrid);
267 template <
typename TElem,
typename TFEGeom>
void register_func();
275 void resize(std::size_t nEip, std::size_t nSip, std::size_t _nSh)
Discretization for the Convection-Diffusion Equation.
Definition: convection_diffusion_base.h:79
DataImport< number, dim > m_imReactionRate
Data import for the reaction term.
Definition: convection_diffusion_base.h:246
DataImport< number, dim > m_imSource
Data import for the right-hand side (volume)
Definition: convection_diffusion_base.h:261
DataImport< number, dim > m_imReactionExpl
Data import for the reaction term explicit.
Definition: convection_diffusion_base.h:255
DataImport< number, dim > m_imSourceExpl
Data import for the source term explicit.
Definition: convection_diffusion_base.h:258
DataImport< number, dim > m_imMass
Data import for the mass scale.
Definition: convection_diffusion_base.h:270
DataImport< MathVector< dim >, dim > m_imVectorSource
Data import for the right-hand side (vector)
Definition: convection_diffusion_base.h:264
SmartPtr< DataExport< number, dim > > m_exValue
Export for the concentration.
Definition: convection_diffusion_base.h:288
DataImport< MathVector< dim >, dim > m_imFlux
Data import for the Flux.
Definition: convection_diffusion_base.h:243
DataImport< MathMatrix< dim, dim >, dim > m_imDiffusion
Data import for Diffusion.
Definition: convection_diffusion_base.h:237
DataImport< MathVector< dim >, dim > m_imVelocity
Data import for the Velocity field.
Definition: convection_diffusion_base.h:240
DataImport< number, dim > m_imMassScale
Data import for the mass scale.
Definition: convection_diffusion_base.h:267
DataImport< number, dim > m_imReaction
Data import for the reaction term.
Definition: convection_diffusion_base.h:249
SmartPtr< DataExport< MathVector< dim >, dim > > m_exGrad
Export for the gradient of concentration.
Definition: convection_diffusion_base.h:291
DataImport< number, dim > m_imReactionRateExpl
Data import for the reaction_rate term explicit.
Definition: convection_diffusion_base.h:252
static const int dim
World dimension.
Definition: convection_diffusion_base.h:86
Discretization for the Convection-Diffusion Equation.
Definition: convection_diffusion_fe.h:58
static const size_t _C_
abbreviation for the local solution
Definition: convection_diffusion_fe.h:204
void add_rhs_elem(LocalVector &d, GridObject *elem, const MathVector< dim > vCornerCoords[])
assembles the local right hand side
Definition: convection_diffusion_fe.cpp:343
void prep_err_est_elem(const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
prepares the element for assembling the error estimator
Definition: convection_diffusion_fe.cpp:440
virtual bool use_hanging() const
returns if hanging nodes are needed
Definition: convection_diffusion_fe.cpp:85
void compute_err_est_rhs_elem(GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
computes the error estimator contribution for one element
Definition: convection_diffusion_fe.cpp:681
bool m_bQuadOrderUserDef
current integration order
Definition: convection_diffusion_fe.h:258
void prep_elem_loop(const ReferenceObjectID roid, const int si)
prepares the loop over all elements
Definition: convection_diffusion_fe.cpp:95
ConvectionDiffusionFE< TDomain > this_type
Own type.
Definition: convection_diffusion_fe.h:64
void lin_def_mass_scale(const LocalVector &u, std::vector< std::vector< number > > vvvLinDef[], const size_t nip)
computes the linearized defect w.r.t to the mass scale term
Definition: convection_diffusion_fe.cpp:953
void lin_def_vector_source(const LocalVector &u, std::vector< std::vector< MathVector< dim > > > vvvLinDef[], const size_t nip)
computes the linearized defect w.r.t to the vector source term
Definition: convection_diffusion_fe.cpp:929
ConvectionDiffusionBase< TDomain > base_type
Base class type.
Definition: convection_diffusion_fe.h:61
void lin_def_mass(const LocalVector &u, std::vector< std::vector< number > > vvvLinDef[], const size_t nip)
computes the linearized defect w.r.t to the mass scale term
Definition: convection_diffusion_fe.cpp:984
void fsh_elem_loop()
finishes the loop over all elements
Definition: convection_diffusion_fe.cpp:126
void lin_def_source(const LocalVector &u, std::vector< std::vector< number > > vvvLinDef[], const size_t nip)
computes the linearized defect w.r.t to the source term
Definition: convection_diffusion_fe.cpp:906
void prep_err_est_elem_loop(const ReferenceObjectID roid, const int si)
prepares the loop over all elements of one type for the computation of the error estimator
Definition: convection_diffusion_fe.cpp:383
void lin_def_flux(const LocalVector &u, std::vector< std::vector< MathVector< dim > > > vvvLinDef[], const size_t nip)
computes the linearized defect w.r.t to the flux
Definition: convection_diffusion_fe.cpp:792
SideAndElemErrEstData< TDomain > err_est_type
error estimator type
Definition: convection_diffusion_fe.h:67
int m_quadOrder
Definition: convection_diffusion_fe.h:259
void register_all_funcs(const LFEID &lfeid, const int quadOrder)
void add_def_A_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
assembles the stiffness part of the local defect
Definition: convection_diffusion_fe.cpp:239
void lin_def_velocity(const LocalVector &u, std::vector< std::vector< MathVector< dim > > > vvvLinDef[], const size_t nip)
computes the linearized defect w.r.t to the velocity
Definition: convection_diffusion_fe.cpp:763
void set_quad_order(size_t order)
sets the quad order
Definition: convection_diffusion_fe.cpp:58
void lin_def_reaction(const LocalVector &u, std::vector< std::vector< number > > vvvLinDef[], const size_t nip)
computes the linearized defect w.r.t to the reaction
Definition: convection_diffusion_fe.cpp:848
static const int dim
World dimension.
Definition: convection_diffusion_fe.h:71
struct ug::ConvectionDiffusionPlugin::ConvectionDiffusionFE::ShapeValues m_shapeValues
void ex_grad(MathVector< dim > vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< TFEGeom::dim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< MathVector< dim > > > vvvDeriv[])
computes the gradient of the concentration
Definition: convection_diffusion_fe.cpp:1091
void compute_err_est_M_elem(const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
computes the error estimator contribution for one element
Definition: convection_diffusion_fe.cpp:629
void lin_def_diffusion(const LocalVector &u, std::vector< std::vector< MathMatrix< dim, dim > > > vvvLinDef[], const size_t nip)
computes the linearized defect w.r.t to the velocity
Definition: convection_diffusion_fe.cpp:816
void ex_value(number vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< TFEGeom::dim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< number > > vvvDeriv[])
computes the concentration
Definition: convection_diffusion_fe.cpp:1010
void lin_def_reaction_rate(const LocalVector &u, std::vector< std::vector< number > > vvvLinDef[], const size_t nip)
computes the linearized defect w.r.t to the reaction
Definition: convection_diffusion_fe.cpp:874
void register_func()
Definition: convection_diffusion_fe.cpp:1297
void add_jac_A_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
assembles the local stiffness matrix using a finite volume scheme
Definition: convection_diffusion_fe.cpp:158
LFEID m_lfeID
current shape function set
Definition: convection_diffusion_fe.h:262
void add_def_M_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
assembles the mass part of the local defect
Definition: convection_diffusion_fe.cpp:301
void prep_elem(const LocalVector &u, GridObject *elem, const ReferenceObjectID roid, const MathVector< dim > vCornerCoords[])
prepares the element for assembling
Definition: convection_diffusion_fe.cpp:132
void compute_err_est_A_elem(const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
computes the error estimator contribution for one element
Definition: convection_diffusion_fe.cpp:486
void add_jac_M_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
assembles the local mass matrix using a finite volume scheme
Definition: convection_diffusion_fe.cpp:209
void fsh_err_est_elem_loop()
postprocesses the loop over all elements of one type in the computation of the error estimator
Definition: convection_diffusion_fe.cpp:749
virtual void prepare_setting(const std::vector< LFEID > &vLfeID, bool bNonRegularGrid)
type of trial space for each function used
Definition: convection_diffusion_fe.cpp:66
ConvectionDiffusionFE(const char *functions, const char *subsets)
Constructor.
Definition: convection_diffusion_fe.cpp:50
struct holding values of shape functions in IPs
Definition: convection_diffusion_fe.h:273
std::vector< std::vector< number > > elemVals
Definition: convection_diffusion_fe.h:290
std::vector< std::vector< number > > sideVals
Definition: convection_diffusion_fe.h:291
number * shapesAtSideIP(std::size_t ip)
Definition: convection_diffusion_fe.h:286
std::size_t num_sh()
Definition: convection_diffusion_fe.h:287
void resize(std::size_t nEip, std::size_t nSip, std::size_t _nSh)
Definition: convection_diffusion_fe.h:275
number & shapeAtSideIP(std::size_t sh, std::size_t ip)
Definition: convection_diffusion_fe.h:284
std::size_t nSh
Definition: convection_diffusion_fe.h:289
number & shapeAtElemIP(std::size_t sh, std::size_t ip)
Definition: convection_diffusion_fe.h:283
number * shapesAtElemIP(std::size_t ip)
Definition: convection_diffusion_fe.h:285