Loading [MathJax]/extensions/tex2jax.js
Plugins
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
no_normal_stress_outflow_fv.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__FV__BND__NO_NORMAL_STRESS_OUTFLOW_FV_
34#define __H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__FV__BND__NO_NORMAL_STRESS_OUTFLOW_FV_
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 VGeom, typename PGeom>
104 void prep_elem_loop(const ReferenceObjectID roid, const int si);
105
107 template<typename TElem, typename VGeom, typename PGeom>
108 void prep_elem(const LocalVector& u, GridObject* elem, const ReferenceObjectID roid, const MathVector<dim> vCornerCoords[]);
109
111 template<typename TElem, typename VGeom, typename PGeom>
112 void fsh_elem_loop();
113
115 template<typename TElem, typename VGeom, typename PGeom>
116 void add_jac_A_elem(LocalMatrix& J, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
117
119 template<typename TElem, typename VGeom, typename PGeom>
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 VGeom, typename PGeom>
126 void add_jac_M_elem(LocalMatrix& J, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]){}
127 template<typename TElem, typename VGeom, typename PGeom>
128 void add_def_M_elem(LocalVector& d, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]){}
129 template<typename TElem, typename VGeom, typename PGeom>
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 i,
139 const size_t ip,
140 const BF& bf,
141 LocalMatrix& J,
142 const LocalVector& u
143 );
145 template <typename BF>
146 inline void diffusive_flux_defect
147 (
148 const size_t i,
149 const size_t ip,
150 const BF& bf,
151 LocalVector& d,
152 const LocalVector& u
153 );
155 template <typename BF>
156 inline void convective_flux_Jac
157 (
158 const size_t i,
159 const size_t ip,
160 const BF& bf,
161 LocalMatrix& J,
162 const LocalVector& u
163 );
165 template <typename BF>
166 inline void convective_flux_defect
167 (
168 const size_t i,
169 const size_t ip,
170 const BF& bf,
171 LocalVector& d,
172 const LocalVector& u
173 );
174
175 protected:
177 static const size_t _P_ = dim;
178
181
184
188
190 std::vector<MathVector<dim> > m_vLocIPv;
191 std::vector<MathVector<dim> > m_vGloIPv;
192 std::vector<MathVector<dim> > m_vLocIPp;
193 std::vector<MathVector<dim> > m_vGloIPp;
194
195 protected:
199
202
203 protected:
205 void register_all_funcs(const LFEID& vLfeID, const LFEID& pLfeID);
206 template<typename TElem, typename VGeom, typename PGeom>
207 void register_func();
208
209 std::vector<std::vector<number> > m_vvVShape;
210};
211
213
214} // namespace NavierStokes
215} // end namespace ug
216
217#endif /*__H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__FV__BND__NO_NORMAL_STRESS_OUTFLOW_FV_*/
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_fv.h:72
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_fv.cpp:449
virtual void prepare_setting(const std::vector< LFEID > &vLfeID, bool bNonRegularGrid)
type of trial space for each function used
Definition no_normal_stress_outflow_fv.cpp:66
std::vector< MathVector< dim > > m_vLocIPp
Definition no_normal_stress_outflow_fv.h:192
int m_quadOrder
quadrature order
Definition no_normal_stress_outflow_fv.h:201
DataImport< number, dim > m_imDensityP
Definition no_normal_stress_outflow_fv.h:187
void add_jac_M_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition no_normal_stress_outflow_fv.h:126
void prep_elem_loop(const ReferenceObjectID roid, const int si)
prepares the element loop
Definition no_normal_stress_outflow_fv.cpp:100
static const size_t _P_
abbreviation for pressure
Definition no_normal_stress_outflow_fv.h:177
NavierStokesNoNormalStressOutflowFV< TDomain > this_type
own type
Definition no_normal_stress_outflow_fv.h:78
static const int dim
World dimension.
Definition no_normal_stress_outflow_fv.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_fv.cpp:163
std::vector< MathVector< dim > > m_vGloIPv
Definition no_normal_stress_outflow_fv.h:191
void register_all_funcs(const LFEID &vLfeID, const LFEID &pLfeID)
register util
void convective_flux_Jac(const size_t i, 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_fv.cpp:336
LFEID m_vLFEID
current shape function set
Definition no_normal_stress_outflow_fv.h:197
DataImport< number, dim > m_imKinViscosity
Data import for kinematic viscosity.
Definition no_normal_stress_outflow_fv.h:183
void diffusive_flux_Jac(const size_t i, 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_fv.cpp:238
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_fv.cpp:400
void add_def_M_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition no_normal_stress_outflow_fv.h:128
void fsh_elem_loop()
finishes the element loop
Definition no_normal_stress_outflow_fv.cpp:142
LFEID m_pLFEID
Definition no_normal_stress_outflow_fv.h:198
virtual void set_kinematic_viscosity(SmartPtr< CplUserData< number, dim > > data)
sets the kinematic viscosity
Definition no_normal_stress_outflow_fv.h:90
void convective_flux_defect(const size_t i, const size_t ip, const BF &bf, LocalVector &d, const LocalVector &u)
adds the convective part of the local defect of the momentum equation
Definition no_normal_stress_outflow_fv.cpp:371
void register_func()
Definition no_normal_stress_outflow_fv.cpp:541
void diffusive_flux_defect(const size_t i, 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_fv.cpp:287
std::vector< MathVector< dim > > m_vGloIPp
Definition no_normal_stress_outflow_fv.h:193
virtual void set_density(SmartPtr< CplUserData< number, dim > > data)
sets the density
Definition no_normal_stress_outflow_fv.h:94
std::vector< std::vector< number > > m_vvVShape
Definition no_normal_stress_outflow_fv.h:209
NavierStokesNoNormalStressOutflowBase< TDomain > base_type
Base class type.
Definition no_normal_stress_outflow_fv.h:75
void add_rhs_elem(LocalVector &d, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition no_normal_stress_outflow_fv.h:130
DataImport< number, dim > m_imDensity
Data import for density.
Definition no_normal_stress_outflow_fv.h:186
std::vector< MathVector< dim > > m_vLocIPv
Boundary integration points of the viscosity and the density.
Definition no_normal_stress_outflow_fv.h:190
ReferenceObjectID