Loading [MathJax]/extensions/tex2jax.js
Plugins
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
no_normal_stress_outflow_fv1.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012-2014: G-CSC, Goethe University Frankfurt
3 * Authors: Dmitry Logashenko, Andreas Vogel
4 *
5 * This file is part of UG4.
6 *
7 * UG4 is free software: you can redistribute it and/or modify it under the
8 * terms of the GNU Lesser General Public License version 3 (as published by the
9 * Free Software Foundation) with the following additional attribution
10 * requirements (according to LGPL/GPL v3 §7):
11 *
12 * (1) The following notice must be displayed in the Appropriate Legal Notices
13 * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14 *
15 * (2) The following notice must be displayed at a prominent place in the
16 * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17 *
18 * (3) The following bibliography is recommended for citation and must be
19 * preserved in all covered files:
20 * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21 * parallel geometric multigrid solver on hierarchically distributed grids.
22 * Computing and visualization in science 16, 4 (2013), 151-164"
23 * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24 * flexible software system for simulating pde based models on high performance
25 * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26 *
27 * This program is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 * GNU Lesser General Public License for more details.
31 */
32
33#ifndef __H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__FV1__BND__NO_NORMAL_STRESS_OUTFLOW_FV1_
34#define __H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__FV1__BND__NO_NORMAL_STRESS_OUTFLOW_FV1_
35
36// other ug4 modules
37#include "common/common.h"
38#include "lib_grid/lg_base.h"
39
40// library intern headers
44
45#include "../../bnd/no_normal_stress_outflow_base.h"
46
47namespace ug{
48namespace NavierStokes{
49
50
53
55
69template< typename TDomain>
72{
73 private:
76
79
80 public:
82 static const int dim = base_type::dim;
83
84 public:
87
88 protected:
92
96
97 public:
99 virtual void prepare_setting(const std::vector<LFEID>& vLfeID, bool bNonRegularGrid);
100
101 public:
103 template <typename TElem, typename TFVGeom>
104 void prep_elem_loop(const ReferenceObjectID roid, const int si);
105
107 template <typename TElem, typename TFVGeom>
108 void prep_elem(const LocalVector& u, GridObject* elem, const ReferenceObjectID roid, const MathVector<dim> vCornerCoords[]);
109
111 template <typename TElem, typename TFVGeom>
112 void fsh_elem_loop();
113
115 template <typename TElem, typename TFVGeom>
116 void add_jac_A_elem(LocalMatrix& J, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
117
119 template <typename TElem, typename TFVGeom>
120 void add_def_A_elem(LocalVector& d, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
121
122 public:
125 template <typename TElem, typename TFVGeom>
126 void add_jac_M_elem(LocalMatrix& J, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]){}
127 template <typename TElem, typename TFVGeom>
128 void add_def_M_elem(LocalVector& d, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]){}
129 template <typename TElem, typename TFVGeom>
130 void add_rhs_elem(LocalVector& d, GridObject* elem, const MathVector<dim> vCornerCoords[]){}
132
133 private:
135 template <typename BF>
136 inline void diffusive_flux_Jac
137 (
138 const size_t ip,
139 const BF& bf,
140 LocalMatrix& J,
141 const LocalVector& u
142 );
144 template <typename BF>
145 inline void diffusive_flux_defect
146 (
147 const size_t ip,
148 const BF& bf,
149 LocalVector& d,
150 const LocalVector& u
151 );
153 template <typename BF>
154 inline void convective_flux_Jac
155 (
156 const size_t ip,
157 const BF& bf,
158 LocalMatrix& J,
159 const LocalVector& u
160 );
162 template <typename BF>
163 inline void convective_flux_defect
164 (
165 const size_t ip,
166 const BF& bf,
167 LocalVector& d,
168 const LocalVector& u,
169 const MathVector<dim>& StdVel
170 );
171
172 protected:
174 static const size_t _P_ = dim;
175
178
181
184
186 std::vector<MathVector<dim> > m_vLocIP;
187 std::vector<MathVector<dim> > m_vGloIP;
188
189 protected:
190 void register_all_funcs(bool bHang);
191 template<typename TElem, typename TFVGeom>
192 void register_func();
193
194};
195
197
198} // namespace NavierStokes
199} // end namespace ug
200
201#endif /*__H__UG__PLUGINS__NAVIER_STOKES__NO_NORMAL_STRESS_OUTFLOW_FV1_*/
function NavierStokes(fcts, subsets, discType)
void set_data(SmartPtr< CplUserData< TData, dim > > spData)
Finite Volume Element Discretization for the incompressible Navier-Stokes Equation.
Definition incompressible_navier_stokes_base.h:146
The zero-stress (neutral) outflow boundary condition for the incompressible NS equation.
Definition no_normal_stress_outflow_base.h:72
static const int dim
World dimension.
Definition no_normal_stress_outflow_base.h:82
std::vector< int > m_vBndSubSetIndex
Definition no_normal_stress_outflow_base.h:108
SmartPtr< IncompressibleNavierStokesBase< TDomain > > m_spMaster
The master discretization:
Definition no_normal_stress_outflow_base.h:104
The zero-stress (neutral) outflow boundary condition for the incompressible NS equation.
Definition no_normal_stress_outflow_fv1.h:72
static const size_t _P_
abbreviation for pressure
Definition no_normal_stress_outflow_fv1.h:174
virtual void set_kinematic_viscosity(SmartPtr< CplUserData< number, dim > > data)
sets the kinematic viscosity
Definition no_normal_stress_outflow_fv1.h:90
DataImport< number, dim > m_imDensity
Data import for density.
Definition no_normal_stress_outflow_fv1.h:183
NavierStokesNoNormalStressOutflowFV1< TDomain > this_type
own type
Definition no_normal_stress_outflow_fv1.h:78
void diffusive_flux_Jac(const size_t ip, const BF &bf, LocalMatrix &J, const LocalVector &u)
adds the diffusive part of the local Jacobian of the momentum equation
Definition no_normal_stress_outflow_fv1.cpp:194
void add_jac_A_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
adds the stiffness part to the local jacobian
Definition no_normal_stress_outflow_fv1.cpp:343
void add_jac_M_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition no_normal_stress_outflow_fv1.h:126
NavierStokesNoNormalStressOutflowBase< TDomain > base_type
Base class type.
Definition no_normal_stress_outflow_fv1.h:75
DataImport< number, dim > m_imKinViscosity
Data import for kinematic viscosity.
Definition no_normal_stress_outflow_fv1.h:180
virtual void set_density(SmartPtr< CplUserData< number, dim > > data)
sets the density
Definition no_normal_stress_outflow_fv1.h:94
void add_rhs_elem(LocalVector &d, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition no_normal_stress_outflow_fv1.h:130
std::vector< MathVector< dim > > m_vLocIP
Boundary integration points of the viscosity and the density.
Definition no_normal_stress_outflow_fv1.h:186
void add_def_M_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition no_normal_stress_outflow_fv1.h:128
virtual void prepare_setting(const std::vector< LFEID > &vLfeID, bool bNonRegularGrid)
type of trial space for each function used
Definition no_normal_stress_outflow_fv1.cpp:66
void fsh_elem_loop()
finishes the element loop
Definition no_normal_stress_outflow_fv1.cpp:132
void register_func()
Definition no_normal_stress_outflow_fv1.cpp:493
void prep_elem_loop(const ReferenceObjectID roid, const int si)
prepares the element loop
Definition no_normal_stress_outflow_fv1.cpp:95
void diffusive_flux_defect(const size_t ip, const BF &bf, LocalVector &d, const LocalVector &u)
adds the diffusive part of the local defect of the momentum equation
Definition no_normal_stress_outflow_fv1.cpp:242
void convective_flux_defect(const size_t ip, const BF &bf, LocalVector &d, const LocalVector &u, const MathVector< dim > &StdVel)
adds the convective part of the local defect of the momentum equation
Definition no_normal_stress_outflow_fv1.cpp:320
void add_def_A_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
adds the stiffness part to the local defect
Definition no_normal_stress_outflow_fv1.cpp:386
static const int dim
World dimension.
Definition no_normal_stress_outflow_fv1.h:82
void prep_elem(const LocalVector &u, GridObject *elem, const ReferenceObjectID roid, const MathVector< dim > vCornerCoords[])
prepares the element for evaluation
Definition no_normal_stress_outflow_fv1.cpp:150
std::vector< MathVector< dim > > m_vGloIP
Definition no_normal_stress_outflow_fv1.h:187
void convective_flux_Jac(const size_t ip, const BF &bf, LocalMatrix &J, const LocalVector &u)
adds the convective part of the local Jacobian of the momentum equation
Definition no_normal_stress_outflow_fv1.cpp:287
ReferenceObjectID