|
Plugins
|
#include <inout_bnd.h>
Inheritance diagram for ug::d3f::InOutFlowBC< TDomain, TAlgebra >:Classes | |
| struct | t_inDirichlet |
| auxiliary class for the Dirichlet values More... | |
Public Types | |
| typedef TAlgebra | algebra_type |
| type of algebra | |
| typedef IDomainConstraint< TDomain, TAlgebra > | base_type |
| base type | |
| typedef TDomain | domain_type |
| type of domain | |
| typedef algebra_type::matrix_type | matrix_type |
| type of algebra matrix | |
| typedef algebra_type::vector_type | vector_type |
| type of algebra vector | |
Public Types inherited from ug::IDomainConstraint< TDomain, TAlgebra > | |
| typedef TAlgebra | algebra_type |
| typedef TDomain | domain_type |
| typedef algebra_type::matrix_type | matrix_type |
| typedef algebra_type::vector_type | vector_type |
Public Types inherited from ug::IConstraint< typename TAlgebra > | |
| typedef TAlgebra | algebra_type |
| typedef algebra_type::matrix_type | matrix_type |
| typedef algebra_type::vector_type | vector_type |
Public Member Functions | |
| void | add (std::string ss_names, std::string fct_names, number value) |
| adds a combination of subsets, functions and a constant value to the condition | |
| void | add (std::string ss_names, std::string fct_names, SmartPtr< UserData< number, dim > > func) |
| adds a combination of subsets, functions and user data to the condition | |
| void | adjust_defect (vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=SPNULL, const std::vector< number > *vScaleMass=NULL, const std::vector< number > *vScaleStiff=NULL) |
| sets a zero value in the defect at the inflow vertices and apply the volume stabilization otherwise | |
| void | adjust_jacobian (matrix_type &J, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=SPNULL, const number s_a0=1.0) |
| sets a unity row at the inflow vertices and apply the volume stabilization otherwise | |
| void | adjust_linear (matrix_type &A, vector_type &b, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0) |
| sets unity rows in A and dirichlet values in right-hand side b | |
| void | adjust_rhs (vector_type &b, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0) |
| sets the dirichlet value in the right-hand side | |
| void | adjust_solution (vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0) |
| sets the dirichlet value in the solution at the inflow vertices | |
| InOutFlowBC () | |
| class constructor | |
| void | scale (std::string fct_names, number scaling) |
| sets scaling for a given functions | |
| void | set_volume_stabilization (SmartPtr< FlowVolStabData< domain_type > > spVolStabData) |
| sets the volume stabilization object | |
| int | type () const |
| returns the type of the constraints | |
Public Member Functions inherited from ug::IDomainConstraint< TDomain, TAlgebra > | |
| SmartPtr< ApproximationSpace< TDomain > > | approximation_space () |
| ConstSmartPtr< ApproximationSpace< TDomain > > | approximation_space () const |
| virtual SmartPtr< IErrEstData< TDomain > > | err_est_data () |
| bool | err_est_enabled () const |
| IDomainConstraint () | |
| virtual void | set_approximation_space (SmartPtr< ApproximationSpace< TDomain > > approxSpace) |
| void | set_ass_tuner (ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssemblingTuner=NULL) |
| void | set_error_estimator (SmartPtr< IErrEstData< TDomain > > ee) |
Public Member Functions inherited from ug::IConstraint< typename TAlgebra > | |
| virtual void | adjust_correction (vector_type &c, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0) |
| virtual void | adjust_error (const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=SPNULL, const std::vector< number > *vScaleMass=NULL, const std::vector< number > *vScaleStiff=NULL) |
| virtual void | adjust_linear_residual (vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0) |
| virtual void | adjust_prolongation (matrix_type &P, ConstSmartPtr< DoFDistribution > ddFine, ConstSmartPtr< DoFDistribution > ddCoarse, int type, number time=0.0) |
| virtual void | adjust_prolongation (vector_type &uFine, GridLevel fineLvl, const vector_type &uCoarse, GridLevel coarseLvl, int type) |
| virtual void | adjust_restriction (matrix_type &R, ConstSmartPtr< DoFDistribution > ddCoarse, ConstSmartPtr< DoFDistribution > ddFine, int type, number time=0.0) |
| virtual void | adjust_restriction (vector_type &uCoarse, GridLevel coarseLvl, const vector_type &uFine, GridLevel fineLvl, int type) |
| virtual void | modify_solution (SmartPtr< VectorTimeSeries< vector_type > > vSolMod, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd, int type) |
| virtual void | modify_solution (vector_type &uMod, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type) |
| virtual | ~IConstraint () |
Static Public Attributes | |
| static const int | dim = domain_type::dim |
| world dimension | |
Private Types | |
| typedef std::map< std::string, std::map< std::string, t_inDirichlet > > | bc_data_map_type |
| specification map | |
| typedef std::map< std::string, number > | fct_name_scaling_map_type |
| scaling specification map (for the names of the functions) | |
| typedef DoFDistribution::traits< Vertex >::const_iterator | t_vert_iterator |
| iterator over vertices | |
| typedef InOutFlowBC< TDomain, TAlgebra > | this_type |
Private Member Functions | |
| void | add_spec (std::string ss_names, std::string fct_names, number val, SmartPtr< UserData< number, dim > > func) |
| adds a boundary condition data specification | |
| void | names_to_ids_in_scaling (const FunctionPattern *fct_pattern, std::vector< number > &v_scaling) const |
| transform the scaling specification from the names to the id's | |
Private Attributes | |
| fct_name_scaling_map_type | m_mFtoM |
| specification of the scaling for the equations | |
| bc_data_map_type | m_mStoF |
| specification of the boundary faces and the corresponding functions | |
| SmartPtr< FlowVolStabData< domain_type > > | m_spVolStabData |
| accumulated defect of the flow equation | |
Additional Inherited Members | |
Protected Member Functions inherited from ug::IDomainConstraint< TDomain, TAlgebra > | |
| ConstSmartPtr< DoFDistribution > | dd (const GridLevel &gl) const |
Protected Attributes inherited from ug::IDomainConstraint< TDomain, TAlgebra > | |
| SmartPtr< ApproximationSpace< TDomain > > | m_spApproxSpace |
| ConstSmartPtr< AssemblingTuner< TAlgebra > > | m_spAssTuner |
| SmartPtr< IErrEstData< TDomain > > | m_spErrEstData |
Class of the in/outflow boundary condition: either outflow, or Dirichlet
This implementation is based on the "volume stabilization". The "volume extension" is computed by the discretization of the flow equation and stored in the volume stabilization data object. If the outflow flux is greater than 0 then the implementation is equivalent to the outflow boundary conditions. Otherwise, the Dirichlet values are set.
Remark: We use the 'flags' in the volume stabilization to mark the actual OUTFLOW boundary.
| typedef TAlgebra ug::d3f::InOutFlowBC< TDomain, TAlgebra >::algebra_type |
type of algebra
| typedef IDomainConstraint<TDomain, TAlgebra> ug::d3f::InOutFlowBC< TDomain, TAlgebra >::base_type |
base type
|
private |
specification map
| typedef TDomain ug::d3f::InOutFlowBC< TDomain, TAlgebra >::domain_type |
type of domain
|
private |
scaling specification map (for the names of the functions)
| typedef algebra_type::matrix_type ug::d3f::InOutFlowBC< TDomain, TAlgebra >::matrix_type |
type of algebra matrix
|
private |
iterator over vertices
|
private |
| typedef algebra_type::vector_type ug::d3f::InOutFlowBC< TDomain, TAlgebra >::vector_type |
type of algebra vector
|
inline |
class constructor
|
inline |
adds a combination of subsets, functions and a constant value to the condition
| ss_names | names of the subsets |
| fct_names | names of the functions |
| value | the Dirichlet value for these functions (if inflow) |
References ug::d3f::InOutFlowBC< TDomain, TAlgebra >::add_spec(), and SPNULL.
|
inline |
adds a combination of subsets, functions and user data to the condition
| ss_names | names of the subsets |
| fct_names | names of the functions |
| func | user data (if specified) |
References ug::d3f::InOutFlowBC< TDomain, TAlgebra >::add_spec().
|
private |
adds a boundary condition data specification
Adds a boundary face with functions and values to the boundary condition
| ss_names | names of the subsets |
| fct_names | names of the functions |
| val | value of the Dirichlet RB |
| func | user data (if specified) |
References ug::d3f::InOutFlowBC< TDomain, TAlgebra >::t_inDirichlet::func, ug::TokenizeTrimString(), and ug::d3f::InOutFlowBC< TDomain, TAlgebra >::t_inDirichlet::val.
Referenced by ug::d3f::InOutFlowBC< TDomain, TAlgebra >::add(), and ug::d3f::InOutFlowBC< TDomain, TAlgebra >::add().
|
virtual |
sets a zero value in the defect at the inflow vertices and apply the volume stabilization otherwise
Assembles the flux source in the defect of the given transport equations.
Implements ug::IConstraint< typename TAlgebra >.
References ug::FunctionGroup::add(), ug::SubsetGroup::add(), ug::FunctionGroup::clear(), ug::SubsetGroup::clear(), ug::DoFRef(), get(), ug::FunctionGroup::size(), ug::SubsetGroup::size(), subset_handler(), and UG_THROW.
|
virtual |
sets a unity row at the inflow vertices and apply the volume stabilization otherwise
Adds the defect of the flow equation to the diagonal of the given matrix.
Implements ug::IConstraint< typename TAlgebra >.
References ug::FunctionGroup::add(), ug::SubsetGroup::add(), ug::FunctionGroup::clear(), ug::SubsetGroup::clear(), ug::DoFRef(), get(), ug::SetDirichletRow(), ug::FunctionGroup::size(), ug::SubsetGroup::size(), subset_handler(), and UG_THROW.
Referenced by ug::d3f::InOutFlowBC< TDomain, TAlgebra >::adjust_linear().
|
inlinevirtual |
sets unity rows in A and dirichlet values in right-hand side b
Implements ug::IConstraint< typename TAlgebra >.
References ug::d3f::InOutFlowBC< TDomain, TAlgebra >::adjust_jacobian(), ug::d3f::InOutFlowBC< TDomain, TAlgebra >::adjust_solution(), and ug::IDomainConstraint< TDomain, TAlgebra >::dd().
|
inlinevirtual |
sets the dirichlet value in the right-hand side
Implements ug::IConstraint< typename TAlgebra >.
References ug::d3f::InOutFlowBC< TDomain, TAlgebra >::adjust_solution(), and ug::IDomainConstraint< TDomain, TAlgebra >::dd().
|
virtual |
sets the dirichlet value in the solution at the inflow vertices
Implements ug::IConstraint< typename TAlgebra >.
References ug::SubsetGroup::add(), ug::SubsetGroup::clear(), ug::DoFRef(), ug::d3f::InOutFlowBC< TDomain, TAlgebra >::t_inDirichlet::func, ug::SubsetGroup::size(), subset_handler(), UG_THROW, and ug::d3f::InOutFlowBC< TDomain, TAlgebra >::t_inDirichlet::val.
Referenced by ug::d3f::InOutFlowBC< TDomain, TAlgebra >::adjust_linear(), and ug::d3f::InOutFlowBC< TDomain, TAlgebra >::adjust_rhs().
|
private |
transform the scaling specification from the names to the id's
Transforms the scaling specification from the names to the id's
| fct_pattern | the function pattern |
| v_scaling | where to save the result |
References ug::FunctionPattern::name(), and ug::FunctionPattern::num_fct().
| void ug::d3f::InOutFlowBC< TDomain, TAlgebra >::scale | ( | std::string | fct_names, |
| number | scaling | ||
| ) |
sets scaling for a given functions
Sets scaling for a given functions
| fct_names | names of the functions |
| scaling | the scaling factor |
References ug::TokenizeTrimString().
|
inline |
sets the volume stabilization object
| spVolStabData | the volume stabilization data object |
References ug::d3f::InOutFlowBC< TDomain, TAlgebra >::m_spVolStabData.
|
inlinevirtual |
returns the type of the constraints
Implements ug::IDomainConstraint< TDomain, TAlgebra >.
References ug::CT_DIRICHLET.
|
static |
world dimension
|
private |
specification of the scaling for the equations
|
private |
specification of the boundary faces and the corresponding functions
|
private |
accumulated defect of the flow equation
Referenced by ug::d3f::InOutFlowBC< TDomain, TAlgebra >::set_volume_stabilization().