Plugins
ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain > Class Template Reference

FV Discretization for the Convection-Diffusion Equation. More...

#include <convection_diffusion_fv1.h>

+ Inheritance diagram for ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >:

Classes

struct  RegisterLocalDiscr
 
struct  ShapeValues
 struct holding values of shape functions in IPs More...
 

Public Member Functions

bool condensed_FV ()
 returns the 'condensed scvf ip' flag More...
 
 ConvectionDiffusionFV1 (const char *functions, const char *subsets)
 Constructor. More...
 
virtual void prepare_setting (const std::vector< LFEID > &vLfeID, bool bNonRegularGrid)
 type of trial space for each function used More...
 
void set_condensed_FV (bool condensed)
 activates/deactivates the condensed scvf ip's for the FV scheme More...
 
void set_sss_manager (SmartPtr< CDSingularSourcesAndSinks< dim > > sss_mngr)
 set singular sources and sinks More...
 
void set_upwind (SmartPtr< IConvectionShapes< dim > > shapes)
 set the upwind method More...
 
SmartPtr< CDSingularSourcesAndSinks< dim > > sss_manager ()
 get singular sources and sinks More...
 
virtual bool use_hanging () const
 returns if hanging nodes are needed More...
 
- Public Member Functions inherited from ug::ConvectionDiffusionPlugin::ConvectionDiffusionBase< TDomain >
 ConvectionDiffusionBase (const char *functions, const char *subsets)
 Constructor. More...
 
virtual SmartPtr< CplUserData< MathVector< dim >, dim > > gradient ()
 returns the export of the gradient of associated unknown function More...
 
void set_reaction_explicit (number val)
 
void set_reaction_explicit (SmartPtr< CplUserData< number, dim > > user)
 
void set_reaction_rate_explicit (number val)
 
void set_reaction_rate_explicit (SmartPtr< CplUserData< number, dim > > user)
 
void set_source_explicit (number val)
 
void set_source_explicit (SmartPtr< CplUserData< number, dim > > user)
 
virtual SmartPtr< CplUserData< number, dim > > value ()
 returns the export of the value of associated unknown function More...
 
void set_diffusion (SmartPtr< CplUserData< MathMatrix< dim, dim >, dim > > user)
 sets the diffusion tensor More...
 
void set_diffusion (number val)
 sets the diffusion tensor More...
 
void set_velocity (SmartPtr< CplUserData< MathVector< dim >, dim > > user)
 sets the velocity field More...
 
void set_velocity (const std::vector< number > &vVel)
 sets the velocity field More...
 
void set_flux (SmartPtr< CplUserData< MathVector< dim >, dim > > user)
 sets the flux More...
 
void set_flux (const std::vector< number > &vVel)
 sets the flux More...
 
void set_reaction_rate (SmartPtr< CplUserData< number, dim > > user)
 sets the reaction rate More...
 
void set_reaction_rate (number val)
 sets the reaction rate More...
 
void set_reaction (SmartPtr< CplUserData< number, dim > > user)
 sets the reaction More...
 
void set_reaction (number val)
 sets the reaction More...
 
void set_source (SmartPtr< CplUserData< number, dim > > user)
 sets the source / sink term More...
 
void set_source (number val)
 sets the source / sink term More...
 
void set_vector_source (SmartPtr< CplUserData< MathVector< dim >, dim > > user)
 sets the vector source term More...
 
void set_vector_source (const std::vector< number > &vVel)
 sets the vector source term More...
 
void set_mass_scale (SmartPtr< CplUserData< number, dim > > user)
 sets mass scale More...
 
void set_mass_scale (number val)
 sets mass scale More...
 
void set_mass (SmartPtr< CplUserData< number, dim > > user)
 sets mass More...
 
void set_mass (number val)
 sets mass More...
 
- Public Member Functions inherited from ug::IElemDisc< TDomain >
void add_elem_modifier (SmartPtr< IElemDiscModifier< TDomain > > elemModifier)
 
std::vector< SmartPtr< IElemDiscModifier< TDomain > > > & get_elem_modifier ()
 
 IElemDisc (const char *functions, const char *subsets)
 
 IElemDisc (const std::vector< std::string > &vFct, const std::vector< std::string > &vSubset)
 
- Public Member Functions inherited from IElemAssembleFuncs< IElemDisc< TDomain >, TDomain >
virtual void add_def_A_elem (LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
virtual void add_def_A_expl_elem (LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
virtual void add_def_M_elem (LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
virtual void add_jac_A_elem (LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
virtual void add_jac_M_elem (LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
virtual void add_rhs_elem (LocalVector &rhs, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
IElemDisc< TDomain > & asLeaf ()
 
void check_roid (ReferenceObjectID roid, int discType)
 
void do_add_def_A_elem (LocalVector &d, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
void do_add_def_A_expl_elem (LocalVector &d, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
void do_add_def_M_elem (LocalVector &d, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
void do_add_jac_A_elem (LocalMatrix &J, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
void do_add_jac_M_elem (LocalMatrix &J, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
void do_add_rhs_elem (LocalVector &rhs, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
void do_fsh_elem_loop ()
 
void do_fsh_timestep (const number time, VectorProxyBase *u, size_t algebra_id)
 
void do_fsh_timestep_elem (const number time, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
void do_prep_elem (LocalVector &u, GridObject *elem, const ReferenceObjectID roid, const MathVector< dim > vCornerCoords[])
 
void do_prep_elem_loop (const ReferenceObjectID roid, const int si)
 
void do_prep_timestep (number future_time, const number time, VectorProxyBase *u, size_t algebra_id)
 
void do_prep_timestep_elem (const number time, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
virtual void fsh_timestep (number time, VectorProxyBase *u)
 
virtual void fsh_timestep_elem (const number time, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
 IElemAssembleFuncs ()
 
virtual void post_assemble_loop ()
 
virtual void prep_elem (const LocalVector &u, GridObject *elem, const ReferenceObjectID roid, const MathVector< dim > vCornerCoords[])
 
virtual void prep_elem_loop (const ReferenceObjectID roid, const int si)
 
virtual void prep_timestep (number future_time, number time, VectorProxyBase *u)
 
virtual void prep_timestep_elem (const number time, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
void set_roid (ReferenceObjectID id, int discType)
 
virtual ~IElemAssembleFuncs ()
 
- Public Member Functions inherited from ug::IElemError< class >
 IElemError (const char *functions, const char *subsets)
 
 IElemError (const std::vector< std::string > &vFct, const std::vector< std::string > &vSubset)
 
- Public Member Functions inherited from ug::IElemDiscBase< class >
SmartPtr< ApproximationSpace< TDomain > > approx_space ()
 
ConstSmartPtr< ApproximationSpace< TDomain > > approx_space () const
 
void check_setup (bool bNonRegularGrid)
 
void clear_imports ()
 
SmartPtr< TDomain > domain ()
 
ConstSmartPtr< TDomain > domain () const
 
const FunctionGroupfunction_group () const
 
ConstSmartPtr< FunctionPatternfunction_pattern () const
 
IDataImport< dim > & get_import (size_t i)
 
 IElemDiscBase (const char *functions="", const char *subsets="")
 
 IElemDiscBase (const std::vector< std::string > &vFct, const std::vector< std::string > &vSubset)
 
bool is_time_dependent () const
 
bool local_time_series_needed ()
 
const LocalVectorTimeSerieslocal_time_solutions () const
 
const FunctionIndexMappingmap () const
 
number mass_scale () const
 
number mass_scale () const
 
number mass_scale (const size_t timePoint) const
 
number mass_scale (const size_t timePoint) const
 
const std::vector< number > & mass_scales () const
 
const std::vector< number > & mass_scales () const
 
size_t num_fct () const
 
size_t num_imports () const
 
size_t num_subsets () const
 
void register_import (IDataImport< dim > &Imp)
 
void set_approximation_space (SmartPtr< ApproximationSpace< TDomain > > approxSpace)
 
void set_functions (const std::string &functions)
 
void set_functions (const std::vector< std::string > &functions)
 
void set_stationary ()
 
void set_stationary (bool bStationaryForced=true)
 
void set_subsets (const std::string &subsets)
 
void set_subsets (const std::vector< std::string > &subsets)
 
void set_time_dependent (LocalVectorTimeSeries &locTimeSeries, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
 
void set_time_independent ()
 
void set_time_point (const size_t timePoint)
 
number stiff_scale () const
 
number stiff_scale () const
 
number stiff_scale (const size_t timePoint) const
 
number stiff_scale (const size_t timePoint) const
 
const std::vector< number > & stiff_scales () const
 
const std::vector< number > & stiff_scales () const
 
TDomain::subset_handler_typesubset_handler ()
 
const TDomain::subset_handler_typesubset_handler () const
 
const std::vector< std::string > & symb_fcts () const
 
const std::vector< std::string > & symb_subsets () const
 
number time () const
 
size_t time_point () const
 
virtual int type () const
 
virtual ~IElemDiscBase ()
 
- Public Member Functions inherited from IElemEstimatorFuncs< IElemDisc< TDomain >, TDomain >
IElemDisc< TDomain > & asLeaf ()
 
void check_roid (ReferenceObjectID roid, int discType)
 
virtual void compute_err_est_A_elem (const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
 
virtual void compute_err_est_M_elem (const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
 
virtual void compute_err_est_rhs_elem (GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
 
void do_compute_err_est_A_elem (LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
 
void do_compute_err_est_M_elem (LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
 
void do_compute_err_est_rhs_elem (GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
 
void do_fsh_err_est_elem_loop ()
 
void do_prep_err_est_elem (LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
void do_prep_err_est_elem_loop (const ReferenceObjectID roid, const int si)
 
virtual SmartPtr< IErrEstData< TDomain > > err_est_data ()
 
bool err_est_enabled () const
 
 IElemEstimatorFuncs ()
 
virtual void prep_err_est_elem (const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 
virtual void prep_err_est_elem_loop (const ReferenceObjectID roid, const int si)
 
void set_error_estimator (SmartPtr< IErrEstData< TDomain > > ee)
 
void set_roid (ReferenceObjectID id, int discType)
 
virtual ~IElemEstimatorFuncs ()
 

Static Public Attributes

static const int dim = base_type::dim
 World dimension. More...
 
- Static Public Attributes inherited from ug::ConvectionDiffusionPlugin::ConvectionDiffusionBase< TDomain >
static const int dim = base_type::dim
 World dimension. More...
 
- Static Public Attributes inherited from ug::IElemDisc< TDomain >
static const int dim
 
- Static Public Attributes inherited from IElemAssembleFuncs< IElemDisc< TDomain >, TDomain >
static const int dim
 
- Static Public Attributes inherited from ug::IElemError< class >
static const int dim
 
- Static Public Attributes inherited from ug::IElemDiscBase< class >
static const int dim
 
- Static Public Attributes inherited from IElemEstimatorFuncs< IElemDisc< TDomain >, TDomain >
static const int dim
 

Protected Types

typedef IConvectionShapes< dimconv_shape_type
 returns the updated convection shapes More...
 

Protected Member Functions

template<typename TElem , typename TFVGeom >
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< TFVGeom::dim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< MathVector< dim > > > vvvDeriv[])
 computes the gradient of the concentration More...
 
template<typename TElem , typename TFVGeom >
void ex_value (number vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< TFVGeom::dim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< number > > vvvDeriv[])
 computes the concentration More...
 
const IConvectionShapes< dim > & get_updated_conv_shapes (const FVGeometryBase &geo, bool compute_deriv)
 
template<typename TElem , typename TFVGeom >
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 diffusion More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
void register_all_funcs (bool bHang)
 
template<typename TElem >
void register_func_for_ (bool bHang)
 
template<typename TElem , typename TFVGeom >
void register_func ()
 
- Protected Member Functions inherited from ug::ConvectionDiffusionPlugin::ConvectionDiffusionBase< TDomain >
void init_imports ()
 
- Protected Member Functions inherited from ug::IElemDisc< TDomain >
void clear_add_fct ()
 
void clear_add_fct (ReferenceObjectID id)
 
void set_default_add_fct ()
 
- Protected Member Functions inherited from IElemAssembleFuncs< IElemDisc< TDomain >, TDomain >
void clear_add_fct ()
 
void clear_add_fct (ReferenceObjectID id)
 
void remove_add_def_A_elem_fct (ReferenceObjectID id)
 
void remove_add_def_A_expl_elem_fct (ReferenceObjectID id)
 
void remove_add_def_M_elem_fct (ReferenceObjectID id)
 
void remove_add_jac_A_elem_fct (ReferenceObjectID id)
 
void remove_add_jac_M_elem_fct (ReferenceObjectID id)
 
void remove_add_rhs_elem_fct (ReferenceObjectID id)
 
void remove_fsh_elem_loop_fct (ReferenceObjectID id)
 
void remove_fsh_timestep_elem_fct (ReferenceObjectID id)
 
void remove_fsh_timestep_fct (size_t algebra_id)
 
void remove_prep_elem_fct (ReferenceObjectID id)
 
void remove_prep_elem_loop_fct (ReferenceObjectID id)
 
void remove_prep_timestep_elem_fct (ReferenceObjectID id)
 
void remove_prep_timestep_fct (size_t algebra_id)
 
void set_add_def_A_elem_fct (ReferenceObjectID id, TAssFunc func)
 
void set_add_def_A_expl_elem_fct (ReferenceObjectID id, TAssFunc func)
 
void set_add_def_M_elem_fct (ReferenceObjectID id, TAssFunc func)
 
void set_add_jac_A_elem_fct (ReferenceObjectID id, TAssFunc func)
 
void set_add_jac_M_elem_fct (ReferenceObjectID id, TAssFunc func)
 
void set_add_rhs_elem_fct (ReferenceObjectID id, TAssFunc func)
 
void set_default_add_fct ()
 
void set_fsh_elem_loop_fct (ReferenceObjectID id, TAssFunc func)
 
void set_fsh_timestep_elem_fct (ReferenceObjectID id, TAssFunc func)
 
void set_fsh_timestep_fct (size_t algebra_id, TAssFunc func)
 
void set_prep_elem_fct (ReferenceObjectID id, TAssFunc func)
 
void set_prep_elem_loop_fct (ReferenceObjectID id, TAssFunc func)
 
void set_prep_timestep_elem_fct (ReferenceObjectID id, TAssFunc func)
 
void set_prep_timestep_fct (size_t algebra_id, TAssFunc func)
 
- Protected Member Functions inherited from ug::IElemError< class >
void clear_add_fct ()
 
void clear_add_fct (ReferenceObjectID id)
 
- Protected Member Functions inherited from ug::IElemDiscBase< class >
virtual void approximation_space_changed ()
 
void set_function_pattern (ConstSmartPtr< FunctionPattern > fctPatt)
 
void update_function_index_mapping ()
 
- Protected Member Functions inherited from IElemEstimatorFuncs< IElemDisc< TDomain >, TDomain >
void clear_add_fct ()
 
void clear_add_fct (ReferenceObjectID id)
 
void remove_compute_err_est_A_elem (ReferenceObjectID id)
 
void remove_compute_err_est_M_elem (ReferenceObjectID id)
 
void remove_compute_err_est_rhs_elem (ReferenceObjectID id)
 
void remove_fsh_err_est_elem_loop (ReferenceObjectID id)
 
void remove_prep_err_est_elem (ReferenceObjectID id)
 
void remove_prep_err_est_elem_loop (ReferenceObjectID id)
 
void set_compute_err_est_A_elem (ReferenceObjectID id, TAssFunc func)
 
void set_compute_err_est_M_elem (ReferenceObjectID id, TAssFunc func)
 
void set_compute_err_est_rhs_elem (ReferenceObjectID id, TAssFunc func)
 
void set_default_add_fct ()
 
void set_fsh_err_est_elem_loop (ReferenceObjectID id, TAssFunc func)
 
void set_prep_err_est_elem (ReferenceObjectID id, TAssFunc func)
 
void set_prep_err_est_elem_loop (ReferenceObjectID id, TAssFunc func)
 

Protected Attributes

bool m_bCondensedFV
 if to use the 'condensed' FV scvf ip's More...
 
bool m_bNonRegularGrid
 current regular grid flag More...
 
SmartPtr< IConvectionShapes< dim > > m_spConvShape
 method to compute the upwind shapes More...
 
- Protected Attributes inherited from ug::ConvectionDiffusionPlugin::ConvectionDiffusionBase< TDomain >
SmartPtr< DataExport< MathVector< dim >, dim > > m_exGrad
 Export for the gradient of concentration. More...
 
SmartPtr< DataExport< number, dim > > m_exValue
 Export for the concentration. More...
 
DataImport< MathMatrix< dim, dim >, dimm_imDiffusion
 Data import for Diffusion. More...
 
DataImport< MathVector< dim >, dimm_imFlux
 Data import for the Flux. More...
 
DataImport< number, dimm_imMass
 Data import for the mass scale. More...
 
DataImport< number, dimm_imMassScale
 Data import for the mass scale. More...
 
DataImport< number, dimm_imReaction
 Data import for the reaction term. More...
 
DataImport< number, dimm_imReactionExpl
 Data import for the reaction term explicit. More...
 
DataImport< number, dimm_imReactionRate
 Data import for the reaction term. More...
 
DataImport< number, dimm_imReactionRateExpl
 Data import for the reaction_rate term explicit. More...
 
DataImport< number, dimm_imSource
 Data import for the right-hand side (volume) More...
 
DataImport< number, dimm_imSourceExpl
 Data import for the source term explicit. More...
 
DataImport< MathVector< dim >, dimm_imVectorSource
 Data import for the right-hand side (vector) More...
 
DataImport< MathVector< dim >, dimm_imVelocity
 Data import for the Velocity field. More...
 
- Protected Attributes inherited from ug::IElemDisc< TDomain >
std::vector< SmartPtr< IElemDiscModifier< TDomain > > > m_spElemModifier
 
- Protected Attributes inherited from IElemAssembleFuncs< IElemDisc< TDomain >, TDomain >
ReferenceObjectID m_roid
 
- Protected Attributes inherited from ug::IElemDiscBase< class >
bool m_bStationaryForced
 
FunctionGroup m_fctGrp
 
FunctionIndexMapping m_fctIndexMap
 
LocalVectorTimeSeriesm_pLocalVectorTimeSeries
 
SmartPtr< ApproximationSpace< TDomain > > m_spApproxSpace
 
ConstSmartPtr< FunctionPatternm_spFctPattern
 
size_t m_timePoint
 
std::vector< std::string > m_vFct
 
std::vector< IDataImport< dim > * > m_vIImport
 
std::vector< numberm_vScaleMass
 
std::vector< numberm_vScaleStiff
 
std::vector< std::string > m_vSubset
 
- Protected Attributes inherited from IElemEstimatorFuncs< IElemDisc< TDomain >, TDomain >
ReferenceObjectID m_roid
 
SmartPtr< IErrEstData< TDomain > > m_spErrEstData
 

Private Types

typedef ConvectionDiffusionBase< TDomain > base_type
 Base class type. More...
 
typedef SideAndElemErrEstData< TDomain > err_est_type
 error estimator type More...
 
typedef ConvectionDiffusionFV1< TDomain > this_type
 Own type. More...
 

Private Member Functions

template<typename TElem , typename TFVGeom >
void add_def_A_elem (LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 assembles the stiffness part of the local defect More...
 
template<typename TElem , typename TFVGeom >
void add_def_A_expl_elem (LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 assembles the stiffness part of the local defect explicit reaction, reaction_rate and source More...
 
template<typename TElem , typename TFVGeom >
void add_def_M_elem (LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 assembles the mass part of the local defect More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
void add_rhs_elem (LocalVector &d, GridObject *elem, const MathVector< dim > vCornerCoords[])
 assembles the local right hand side More...
 
template<typename TElem , typename TFVGeom >
void add_sss_def_elem (LocalVector &d, const LocalVector &u, GridObject *elem, const TFVGeom &geo, size_t i, number flux)
 adds contributions of a singular source or sink to the defect More...
 
template<typename TElem , typename TFVGeom >
void add_sss_jac_elem (LocalMatrix &J, const LocalVector &u, GridObject *elem, const TFVGeom &geo, size_t i, number flux)
 adds contributions of a singular source or sink to the matrix More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
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 More...
 
template<typename TElem , typename TFVGeom >
void compute_err_est_rhs_elem (GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
 computes the error estimator contribution for one element More...
 
template<typename TElem , typename TFVGeom >
void fsh_elem_loop ()
 finishes the loop over all elements More...
 
template<typename TElem , typename TFVGeom >
void fsh_err_est_elem_loop ()
 postprocesses the loop over all elements of one type in the computation of the error estimator More...
 
virtual void prep_assemble_loop ()
 prepares assembling More...
 
template<typename TElem , typename TFVGeom >
void prep_elem (const LocalVector &u, GridObject *elem, const ReferenceObjectID roid, const MathVector< dim > vCornerCoords[])
 prepares the element for assembling More...
 
template<typename TElem , typename TFVGeom >
void prep_elem_loop (const ReferenceObjectID roid, const int si)
 prepares the loop over all elements More...
 
template<typename TElem , typename TFVGeom >
void prep_err_est_elem (const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
 prepares the element for assembling the error estimator More...
 
template<typename TElem , typename TFVGeom >
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 More...
 

Private Attributes

struct ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1::ShapeValues m_shapeValues
 
SmartPtr< CDSingularSourcesAndSinks< dim > > m_sss_mngr
 singular sources and sinks manager More...
 

Static Private Attributes

static const size_t _C_ = 0
 abbreviation for the local solution More...
 

Additional Inherited Members

- Public Types inherited from ug::ConvectionDiffusionPlugin::ConvectionDiffusionBase< TDomain >
typedef SmartPtr< CplUserData< MathVector< dim >, dim > > GradExport
 
typedef SmartPtr< CplUserData< number, dim > > NumberExport
 
- Public Types inherited from ug::IElemDisc< TDomain >
typedef IElemAssembleFuncs< IElemDisc< TDomain >, TDomain > assemble_base_type
 
typedef IElemError< TDomain > base_type
 
typedef TDomain domain_type
 
typedef IElemEstimatorFuncs< IElemDisc< TDomain >, TDomain > estimator_base_type
 
- Public Types inherited from IElemAssembleFuncs< IElemDisc< TDomain >, TDomain >
typedef TDomain domain_type
 
typedef IElemDisc< TDomain > leaf_type
 
- Public Types inherited from ug::IElemError< class >
typedef TDomain domain_type
 
typedef IElemEstimatorFuncs< IElemDisc< TDomain >, TDomain > estimator_base_type
 
- Public Types inherited from ug::IElemDiscBase< class >
typedef TDomain domain_type
 
typedef TDomain::position_type position_type
 
- Public Types inherited from IElemEstimatorFuncs< IElemDisc< TDomain >, TDomain >
typedef TDomain domain_type
 
typedef IElemDisc< TDomain > leaf_type
 

Detailed Description

template<typename TDomain>
class ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >

FV Discretization for the Convection-Diffusion Equation.

This is the simple (upwinded) FV discretization of the convection-diffusion equation. Cf. ConvectionDiffusionBase base class for the problem setting.

See also
ConvectionDiffusionBase for the problem settings
Template Parameters
TDomainDomain

Member Typedef Documentation

◆ base_type

template<typename TDomain >
typedef ConvectionDiffusionBase<TDomain> ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::base_type
private

Base class type.

◆ conv_shape_type

template<typename TDomain >
typedef IConvectionShapes<dim> ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::conv_shape_type
protected

returns the updated convection shapes

◆ err_est_type

template<typename TDomain >
typedef SideAndElemErrEstData<TDomain> ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::err_est_type
private

error estimator type

◆ this_type

template<typename TDomain >
typedef ConvectionDiffusionFV1<TDomain> ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::this_type
private

Own type.

Constructor & Destructor Documentation

◆ ConvectionDiffusionFV1()

Member Function Documentation

◆ add_def_A_elem()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::add_def_A_elem ( LocalVector d,
const LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[] 
)
private

◆ add_def_A_expl_elem()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::add_def_A_expl_elem ( LocalVector d,
const LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[] 
)
private

assembles the stiffness part of the local defect explicit reaction, reaction_rate and source

References ug::GeomProvider< class >::get().

◆ add_def_M_elem()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::add_def_M_elem ( LocalVector d,
const LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[] 
)
private

assembles the mass part of the local defect

References ug::GeomProvider< class >::get().

◆ add_jac_A_elem()

◆ add_jac_M_elem()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::add_jac_M_elem ( LocalMatrix J,
const LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[] 
)
private

assembles the local mass matrix using a finite volume scheme

References ug::GeomProvider< class >::get().

◆ add_rhs_elem()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::add_rhs_elem ( LocalVector d,
GridObject elem,
const MathVector< dim vCornerCoords[] 
)
private

assembles the local right hand side

References ug::GeomProvider< class >::get(), and ug::VecDot().

◆ add_sss_def_elem()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::add_sss_def_elem ( LocalVector d,
const LocalVector u,
GridObject elem,
const TFVGeom &  geo,
size_t  i,
number  flux 
)
private

adds contributions of a singular source or sink to the defect

Parameters
dthe defect to update
ucurrent solution
elemthe element
geothe FV geometry for that element
iindex of the SCV
fluxflux through source/sink (premultiplied by the length for lines)

◆ add_sss_jac_elem()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::add_sss_jac_elem ( LocalMatrix J,
const LocalVector u,
GridObject elem,
const TFVGeom &  geo,
size_t  i,
number  flux 
)
private

adds contributions of a singular source or sink to the matrix

Parameters
Jthe matrix to update
ucurrent solution
elemthe element
geothe FV geometry for that element
iindex of the SCV
fluxflux through source/sink (premultiplied by the length for lines)

◆ compute_err_est_A_elem()

◆ compute_err_est_M_elem()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::compute_err_est_M_elem ( const LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[],
const number scale 
)
private

◆ compute_err_est_rhs_elem()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::compute_err_est_rhs_elem ( GridObject elem,
const MathVector< dim vCornerCoords[],
const number scale 
)
private

◆ condensed_FV()

template<typename TDomain >
bool ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::condensed_FV ( )
inline

◆ ex_grad()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::ex_grad ( MathVector< dim vValue[],
const MathVector< dim vGlobIP[],
number  time,
int  si,
const LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[],
const MathVector< TFVGeom::dim vLocIP[],
const size_t  nip,
bool  bDeriv,
std::vector< std::vector< MathVector< dim > > >  vvvDeriv[] 
)
protected

◆ ex_value()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::ex_value ( number  vValue[],
const MathVector< dim vGlobIP[],
number  time,
int  si,
const LocalVector u,
GridObject elem,
const MathVector< dim vCornerCoords[],
const MathVector< TFVGeom::dim vLocIP[],
const size_t  nip,
bool  bDeriv,
std::vector< std::vector< number > >  vvvDeriv[] 
)
protected

◆ fsh_elem_loop()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::fsh_elem_loop
privatevirtual

finishes the loop over all elements

Reimplemented from IElemAssembleFuncs< IElemDisc< TDomain >, TDomain >.

◆ fsh_err_est_elem_loop()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::fsh_err_est_elem_loop
privatevirtual

postprocesses the loop over all elements of one type in the computation of the error estimator

Reimplemented from IElemEstimatorFuncs< IElemDisc< TDomain >, TDomain >.

◆ get_updated_conv_shapes()

template<typename TDomain >
const ConvectionDiffusionFV1< TDomain >::conv_shape_type & ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::get_updated_conv_shapes ( const FVGeometryBase geo,
bool  compute_deriv 
)
protected

References UG_LOG.

◆ lin_def_diffusion()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::lin_def_diffusion ( const LocalVector u,
std::vector< std::vector< MathMatrix< dim, dim > > >  vvvLinDef[],
const size_t  nip 
)
protected

◆ lin_def_flux()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::lin_def_flux ( const LocalVector u,
std::vector< std::vector< MathVector< dim > > >  vvvLinDef[],
const size_t  nip 
)
protected

computes the linearized defect w.r.t to the flux

References ug::GeomProvider< class >::get().

◆ lin_def_mass()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::lin_def_mass ( const LocalVector u,
std::vector< std::vector< number > >  vvvLinDef[],
const size_t  nip 
)
protected

computes the linearized defect w.r.t to the mass scale term

References ug::GeomProvider< class >::get(), and UG_ASSERT.

◆ lin_def_mass_scale()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::lin_def_mass_scale ( const LocalVector u,
std::vector< std::vector< number > >  vvvLinDef[],
const size_t  nip 
)
protected

computes the linearized defect w.r.t to the mass scale term

References ug::GeomProvider< class >::get(), and UG_ASSERT.

◆ lin_def_reaction()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::lin_def_reaction ( const LocalVector u,
std::vector< std::vector< number > >  vvvLinDef[],
const size_t  nip 
)
protected

computes the linearized defect w.r.t to the reaction

References ug::GeomProvider< class >::get().

◆ lin_def_reaction_rate()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::lin_def_reaction_rate ( const LocalVector u,
std::vector< std::vector< number > >  vvvLinDef[],
const size_t  nip 
)
protected

computes the linearized defect w.r.t to the reaction

References ug::GeomProvider< class >::get().

◆ lin_def_source()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::lin_def_source ( const LocalVector u,
std::vector< std::vector< number > >  vvvLinDef[],
const size_t  nip 
)
protected

computes the linearized defect w.r.t to the source term

References ug::GeomProvider< class >::get().

◆ lin_def_vector_source()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::lin_def_vector_source ( const LocalVector u,
std::vector< std::vector< MathVector< dim > > >  vvvLinDef[],
const size_t  nip 
)
protected

computes the linearized defect w.r.t to the vector source term

References ug::GeomProvider< class >::get().

◆ lin_def_velocity()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::lin_def_velocity ( const LocalVector u,
std::vector< std::vector< MathVector< dim > > >  vvvLinDef[],
const size_t  nip 
)
protected

computes the linearized defect w.r.t to the velocity

References ug::IConvectionShapes< dim >::D_vel(), ug::GeomProvider< class >::get(), ug::VecScaleAppend(), and ug::VecSet().

◆ prep_assemble_loop()

template<typename TDomain >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::prep_assemble_loop
privatevirtual

prepares assembling

Reimplemented from IElemAssembleFuncs< IElemDisc< TDomain >, TDomain >.

◆ prep_elem()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::prep_elem ( const LocalVector u,
GridObject elem,
const ReferenceObjectID  roid,
const MathVector< dim vCornerCoords[] 
)
private

prepares the element for assembling

This methods prepares an element for the assembling. The Positions of the Element Corners are read and the Finite Volume Geometry is updated. The global ip positions are scheduled at the data imports.

References ug::ConvectionDiffusionPlugin::DID_CONV_DIFF_FV1, dim, ug::GeomProvider< class >::get(), subset_handler(), UG_CATCH_THROW, UG_DLOG, and UG_THROW.

◆ prep_elem_loop()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::prep_elem_loop ( const ReferenceObjectID  roid,
const int  si 
)
private

prepares the loop over all elements

This method prepares the loop over all elements. It resizes the Position array for the corner coordinates and schedules the local ip positions at the data imports.

References dim, ug::GeomProvider< class >::get(), and UG_THROW.

◆ prep_err_est_elem()

◆ prep_err_est_elem_loop()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::prep_err_est_elem_loop ( const ReferenceObjectID  roid,
const int  si 
)
private

◆ prepare_setting()

template<typename TDomain >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::prepare_setting ( const std::vector< LFEID > &  vLfeID,
bool  bNonRegularGrid 
)
virtual

type of trial space for each function used

Implements ug::IElemDiscBase< class >.

References ug::LFEID::LAGRANGE, type(), and UG_THROW.

◆ register_all_funcs()

template<typename TDomain >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::register_all_funcs ( bool  bHang)
protected

register utils

Registers the assembling functions for all the element types

Referenced by ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::ConvectionDiffusionFV1().

◆ register_func()

template<typename TDomain >
template<typename TElem , typename TFVGeom >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::register_func
protected

register utils

Registers the assembling functions for all the element types

◆ register_func_for_()

template<typename TDomain >
template<typename TElem >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::register_func_for_ ( bool  bHang)
protected

Registers the assembling functions for an element type.

References UG_THROW.

Referenced by ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::RegisterLocalDiscr::operator()().

◆ set_condensed_FV()

template<typename TDomain >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::set_condensed_FV ( bool  condensed)
inline

activates/deactivates the condensed scvf ip's for the FV scheme

References ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::m_bCondensedFV.

◆ set_sss_manager()

template<typename TDomain >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::set_sss_manager ( SmartPtr< CDSingularSourcesAndSinks< dim > >  sss_mngr)
inline

◆ set_upwind()

template<typename TDomain >
void ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::set_upwind ( SmartPtr< IConvectionShapes< dim > >  shapes)

set the upwind method

This method sets the upwind method used to upwind the convection.

Parameters
shapesupwind method

◆ sss_manager()

template<typename TDomain >
SmartPtr<CDSingularSourcesAndSinks<dim> > ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::sss_manager ( )
inline

◆ use_hanging()

template<typename TDomain >
bool ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::use_hanging
virtual

returns if hanging nodes are needed

Reimplemented from ug::IElemDiscBase< class >.

Member Data Documentation

◆ _C_

template<typename TDomain >
const size_t ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::_C_ = 0
staticprivate

abbreviation for the local solution

◆ dim

template<typename TDomain >
const int ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::dim = base_type::dim
static

World dimension.

◆ m_bCondensedFV

◆ m_bNonRegularGrid

template<typename TDomain >
bool ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::m_bNonRegularGrid
protected

◆ m_shapeValues

◆ m_spConvShape

template<typename TDomain >
SmartPtr<IConvectionShapes<dim> > ug::ConvectionDiffusionPlugin::ConvectionDiffusionFV1< TDomain >::m_spConvShape
protected

method to compute the upwind shapes

◆ m_sss_mngr


The documentation for this class was generated from the following files: