Plugins
Loading...
Searching...
No Matches
ug::d3f::OutFlowBC< TDomain, TAlgebra > Class Template Reference

#include <inout_bnd.h>

+ Inheritance diagram for ug::d3f::OutFlowBC< TDomain, TAlgebra >:

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)
 adds a combination of subsets and functions 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)
 apply the volume stabilization to the defect
 
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)
 apply the volume stabilization to the Jacobian
 
void adjust_linear (matrix_type &A, vector_type &b, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
 apply the volume stabilization to the matrix A
 
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)
 correct the values of the solution
 
 OutFlowBC ()
 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::vector< std::string > > bc_data_map_type
 boundary specification map
 
typedef std::map< std::string, numberfct_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 OutFlowBC< TDomain, TAlgebra > this_type
 

Private Member Functions

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< DoFDistributiondd (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
 

Detailed Description

template<typename TDomain, typename TAlgebra>
class ug::d3f::OutFlowBC< TDomain, TAlgebra >

Class of the outflow boundary condition

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.

Member Typedef Documentation

◆ algebra_type

template<typename TDomain , typename TAlgebra >
typedef TAlgebra ug::d3f::OutFlowBC< TDomain, TAlgebra >::algebra_type

type of algebra

◆ base_type

template<typename TDomain , typename TAlgebra >
typedef IDomainConstraint<TDomain, TAlgebra> ug::d3f::OutFlowBC< TDomain, TAlgebra >::base_type

base type

◆ bc_data_map_type

template<typename TDomain , typename TAlgebra >
typedef std::map<std::string, std::vector<std::string> > ug::d3f::OutFlowBC< TDomain, TAlgebra >::bc_data_map_type
private

boundary specification map

◆ domain_type

template<typename TDomain , typename TAlgebra >
typedef TDomain ug::d3f::OutFlowBC< TDomain, TAlgebra >::domain_type

type of domain

◆ fct_name_scaling_map_type

template<typename TDomain , typename TAlgebra >
typedef std::map<std::string, number> ug::d3f::OutFlowBC< TDomain, TAlgebra >::fct_name_scaling_map_type
private

scaling specification map (for the names of the functions)

◆ matrix_type

template<typename TDomain , typename TAlgebra >
typedef algebra_type::matrix_type ug::d3f::OutFlowBC< TDomain, TAlgebra >::matrix_type

type of algebra matrix

◆ t_vert_iterator

template<typename TDomain , typename TAlgebra >
typedef DoFDistribution::traits<Vertex>::const_iterator ug::d3f::OutFlowBC< TDomain, TAlgebra >::t_vert_iterator
private

iterator over vertices

◆ this_type

template<typename TDomain , typename TAlgebra >
typedef OutFlowBC<TDomain, TAlgebra> ug::d3f::OutFlowBC< TDomain, TAlgebra >::this_type
private

◆ vector_type

template<typename TDomain , typename TAlgebra >
typedef algebra_type::vector_type ug::d3f::OutFlowBC< TDomain, TAlgebra >::vector_type

type of algebra vector

Constructor & Destructor Documentation

◆ OutFlowBC()

template<typename TDomain , typename TAlgebra >
ug::d3f::OutFlowBC< TDomain, TAlgebra >::OutFlowBC ( )
inline

class constructor

Member Function Documentation

◆ add()

template<typename TDomain , typename TAlgebra >
void ug::d3f::OutFlowBC< TDomain, TAlgebra >::add ( std::string  ss_names,
std::string  fct_names 
)

adds a combination of subsets and functions to the condition

Adds a boundary face with functions to the boundary condition

Parameters
ss_namesnames of the subsets
fct_namesnames of the functions

References ug::TokenizeTrimString().

◆ adjust_defect()

template<typename TDomain , typename TAlgebra >
void ug::d3f::OutFlowBC< TDomain, TAlgebra >::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 
)
virtual

apply the volume stabilization to the defect

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.

◆ adjust_jacobian()

template<typename TDomain , typename TAlgebra >
void ug::d3f::OutFlowBC< TDomain, TAlgebra >::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 
)
virtual

apply the volume stabilization to the Jacobian

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::FunctionGroup::size(), ug::SubsetGroup::size(), subset_handler(), and UG_THROW.

Referenced by ug::d3f::OutFlowBC< TDomain, TAlgebra >::adjust_linear().

◆ adjust_linear()

template<typename TDomain , typename TAlgebra >
void ug::d3f::OutFlowBC< TDomain, TAlgebra >::adjust_linear ( matrix_type A,
vector_type b,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0 
)
inlinevirtual

◆ adjust_rhs()

template<typename TDomain , typename TAlgebra >
void ug::d3f::OutFlowBC< TDomain, TAlgebra >::adjust_rhs ( vector_type b,
const vector_type u,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0 
)
inlinevirtual

sets the dirichlet value in the right-hand side

Implements ug::IConstraint< typename TAlgebra >.

◆ adjust_solution()

template<typename TDomain , typename TAlgebra >
void ug::d3f::OutFlowBC< TDomain, TAlgebra >::adjust_solution ( vector_type u,
ConstSmartPtr< DoFDistribution dd,
int  type,
number  time = 0.0 
)
inlinevirtual

correct the values of the solution

Implements ug::IConstraint< typename TAlgebra >.

◆ names_to_ids_in_scaling()

template<typename TDomain , typename TAlgebra >
void ug::d3f::OutFlowBC< TDomain, TAlgebra >::names_to_ids_in_scaling ( const FunctionPattern fct_pattern,
std::vector< number > &  v_scaling 
) const
private

transform the scaling specification from the names to the id's

Transforms the scaling specification from the names to the id's

Parameters
fct_patternthe function pattern
v_scalingwhere to save the result

References ug::FunctionPattern::name(), and ug::FunctionPattern::num_fct().

◆ scale()

template<typename TDomain , typename TAlgebra >
void ug::d3f::OutFlowBC< TDomain, TAlgebra >::scale ( std::string  fct_names,
number  scaling 
)

sets scaling for a given functions

Sets scaling for a given functions

Parameters
fct_namesnames of the functions
scalingthe scaling factor

References ug::TokenizeTrimString().

◆ set_volume_stabilization()

template<typename TDomain , typename TAlgebra >
void ug::d3f::OutFlowBC< TDomain, TAlgebra >::set_volume_stabilization ( SmartPtr< FlowVolStabData< domain_type > >  spVolStabData)
inline

sets the volume stabilization object

Parameters
spVolStabDatathe volume stabilization data object

References ug::d3f::OutFlowBC< TDomain, TAlgebra >::m_spVolStabData.

◆ type()

template<typename TDomain , typename TAlgebra >
int ug::d3f::OutFlowBC< TDomain, TAlgebra >::type ( ) const
inlinevirtual

returns the type of the constraints

Implements ug::IDomainConstraint< TDomain, TAlgebra >.

References ug::CT_DIRICHLET.

Member Data Documentation

◆ dim

template<typename TDomain , typename TAlgebra >
const int ug::d3f::OutFlowBC< TDomain, TAlgebra >::dim = domain_type::dim
static

world dimension

◆ m_mFtoM

template<typename TDomain , typename TAlgebra >
fct_name_scaling_map_type ug::d3f::OutFlowBC< TDomain, TAlgebra >::m_mFtoM
private

specification of the scaling for the equations

◆ m_mStoF

template<typename TDomain , typename TAlgebra >
bc_data_map_type ug::d3f::OutFlowBC< TDomain, TAlgebra >::m_mStoF
private

specification of the boundary faces and the corresponding functions

◆ m_spVolStabData

template<typename TDomain , typename TAlgebra >
SmartPtr<FlowVolStabData<domain_type> > ug::d3f::OutFlowBC< TDomain, TAlgebra >::m_spVolStabData
private

accumulated defect of the flow equation

Referenced by ug::d3f::OutFlowBC< TDomain, TAlgebra >::set_volume_stabilization().


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