16#ifndef __H__UG__PLUGINS__D3F__INOUT_BND__
17#define __H__UG__PLUGINS__D3F__INOUT_BND__
49template <
typename TDomain,
typename TAlgebra>
63 static const int dim = domain_type::dim;
97 if (spVolStabData.valid ())
98 spVolStabData->activate_flux ();
104 std::string ss_names,
105 std::string fct_names
111 std::string fct_names,
139 const std::vector<number> * vScaleMass = NULL,
140 const std::vector<number> * vScaleStiff = NULL
185 std::vector<number> & v_scaling
212template <
typename TDomain,
typename TAlgebra>
226 static const int dim = domain_type::dim;
257 std::string ss_names,
258 std::string fct_names,
276 if (spVolStabData.valid ())
278 spVolStabData->activate_flux ();
279 spVolStabData->activate_flags ();
286 std::string ss_names,
287 std::string fct_names,
297 std::string ss_names,
298 std::string fct_names,
302 add_spec (ss_names, fct_names, 0 , func);
308 std::string ss_names,
309 std::string fct_names,
318 std::string ss_names,
319 std::string fct_names,
330 std::string fct_names,
358 const std::vector<number> * vScaleMass = NULL,
359 const std::vector<number> * vScaleStiff = NULL
406 std::vector<number> & v_scaling
ConstSmartPtr< DoFDistribution > dd(const GridLevel &gl) const
Definition inout_bnd.h:215
std::map< std::string, number > fct_name_scaling_map_type
scaling specification map (for the names of the functions)
Definition inout_bnd.h:252
fct_name_scaling_map_type m_mFtoM
specification of the scaling for the equations
Definition inout_bnd.h:418
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
Definition inout_bnd_impl.h:312
void set_volume_stabilization(SmartPtr< FlowVolStabData< domain_type > > spVolStabData)
sets the volume stabilization object
Definition inout_bnd.h:271
TAlgebra algebra_type
type of algebra
Definition inout_bnd.h:229
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
Definition inout_bnd_impl.h:283
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
Definition inout_bnd.h:285
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
Definition inout_bnd.h:387
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
Definition inout_bnd.h:373
IDomainConstraint< TDomain, TAlgebra > base_type
base type
Definition inout_bnd.h:220
static const int dim
world dimension
Definition inout_bnd.h:226
DoFDistribution::traits< Vertex >::const_iterator t_vert_iterator
iterator over vertices
Definition inout_bnd.h:239
InOutFlowBC< TDomain, TAlgebra > this_type
Definition inout_bnd.h:216
TDomain domain_type
type of domain
Definition inout_bnd.h:223
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
Definition inout_bnd_impl.h:394
int type() const
returns the type of the constraints
Definition inout_bnd.h:399
bc_data_map_type m_mStoF
specification of the boundary faces and the corresponding functions
Definition inout_bnd.h:415
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
Definition inout_bnd_impl.h:477
void add_spec(std::string ss_names, std::string fct_names, number val, SmartPtr< UserData< number, dim > > func)
adds a boundary condition data specification
Definition inout_bnd_impl.h:236
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
Definition inout_bnd.h:296
void scale(std::string fct_names, number scaling)
sets scaling for a given functions
Definition inout_bnd_impl.h:267
algebra_type::vector_type vector_type
type of algebra vector
Definition inout_bnd.h:235
InOutFlowBC()
class constructor
Definition inout_bnd.h:267
algebra_type::matrix_type matrix_type
type of algebra matrix
Definition inout_bnd.h:232
std::map< std::string, std::map< std::string, t_inDirichlet > > bc_data_map_type
specification map
Definition inout_bnd.h:249
SmartPtr< FlowVolStabData< domain_type > > m_spVolStabData
accumulated defect of the flow equation
Definition inout_bnd.h:412
Definition inout_bnd.h:52
OutFlowBC< TDomain, TAlgebra > this_type
Definition inout_bnd.h:53
std::map< std::string, std::vector< std::string > > bc_data_map_type
boundary specification map
Definition inout_bnd.h:79
IDomainConstraint< TDomain, TAlgebra > base_type
base type
Definition inout_bnd.h:57
std::map< std::string, number > fct_name_scaling_map_type
scaling specification map (for the names of the functions)
Definition inout_bnd.h:82
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
Definition inout_bnd_impl.h:68
static const int dim
world dimension
Definition inout_bnd.h:63
SmartPtr< FlowVolStabData< domain_type > > m_spVolStabData
accumulated defect of the flow equation
Definition inout_bnd.h:191
void scale(std::string fct_names, number scaling)
sets scaling for a given functions
Definition inout_bnd_impl.h:52
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
Definition inout_bnd_impl.h:97
algebra_type::matrix_type matrix_type
type of algebra matrix
Definition inout_bnd.h:69
TDomain domain_type
type of domain
Definition inout_bnd.h:60
algebra_type::vector_type vector_type
type of algebra vector
Definition inout_bnd.h:72
DoFDistribution::traits< Vertex >::const_iterator t_vert_iterator
iterator over vertices
Definition inout_bnd.h:76
void adjust_solution(vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
correct the values of the solution
Definition inout_bnd.h:145
fct_name_scaling_map_type m_mFtoM
specification of the scaling for the equations
Definition inout_bnd.h:197
TAlgebra algebra_type
type of algebra
Definition inout_bnd.h:66
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
Definition inout_bnd.h:155
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
Definition inout_bnd_impl.h:164
void add(std::string ss_names, std::string fct_names)
adds a combination of subsets and functions to the condition
Definition inout_bnd_impl.h:27
int type() const
returns the type of the constraints
Definition inout_bnd.h:178
OutFlowBC()
class constructor
Definition inout_bnd.h:88
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
Definition inout_bnd.h:168
bc_data_map_type m_mStoF
specification of the boundary faces and the corresponding functions
Definition inout_bnd.h:194
void set_volume_stabilization(SmartPtr< FlowVolStabData< domain_type > > spVolStabData)
sets the volume stabilization object
Definition inout_bnd.h:92
const NullSmartPtr SPNULL
SmartPtr< T, FreePolicy > make_sp(T *inst)
auxiliary class for the Dirichlet values
Definition inout_bnd.h:243
number val
constant value (if specified)
Definition inout_bnd.h:244
SmartPtr< UserData< number, dim > > func
value as a function (if not SPNULL)
Definition inout_bnd.h:245