Loading [MathJax]/extensions/tex2jax.js
Plugins
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
navier_stokes_base.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010-2013: G-CSC, Goethe University Frankfurt
3 * Author: 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__NAVIER_STOKES_BASE__
34#define __H__UG__PLUGINS__NAVIER_STOKES__NAVIER_STOKES_BASE__
35
36// other ug4 modules
37#include "common/common.h"
38#include "lib_grid/lg_base.h"
39
40// library intern headers
44
45namespace ug{
46namespace NavierStokes{
47
50
52
141template< typename TDomain>
143 : public IElemDisc<TDomain>
144{
145 protected:
148
151
152 public:
154 static const int dim = base_type::dim;
155
156 public:
159 NavierStokesBase(const char* functions, const char* subsets);
160 NavierStokesBase(const std::vector<std::string>& vFct, const std::vector<std::string>& vSubset);
162
164
172#ifdef UG_FOR_LUA
173 void set_kinematic_viscosity(const char* fctName);
174#endif
176
179
181
187 void set_source(const std::vector<number>& vSource);
188#ifdef UG_FOR_LUA
189 void set_source(const char* fctName);
190#endif
192
194 void set_exact_jacobian(bool bExactJacobian) { if (bExactJacobian) m_bFullNewtonFactor=1;
195 else m_bFullNewtonFactor=0;}
196 void set_exact_jacobian(number fullNewtonFactor){ m_bFullNewtonFactor=fullNewtonFactor; };
197
198 public:
200 virtual bool requests_local_time_series() {return true;}
201
203 virtual std::string disc_type() const = 0;
204
205 protected:
208};
209
211
212} // namespace NavierStokes
213} // end namespace ug
214
215#endif /*__H__UG__PLUGINS__NAVIER_STOKES__NAVIER_STOKES_BASE__*/
function NavierStokes(fcts, subsets, discType)
static const int dim
Finite Volume Element Discretization for the incompressible Navier-Stokes Equation.
Definition navier_stokes_base.h:144
static const int dim
World dimension.
Definition navier_stokes_base.h:154
NavierStokesBase< TDomain > this_type
own type
Definition navier_stokes_base.h:150
IElemDisc< TDomain > base_type
Base class type.
Definition navier_stokes_base.h:147
number m_bFullNewtonFactor
factor for exact jacobian, (1 for exact jacobian, 0 for fix point)
Definition navier_stokes_base.h:207
virtual bool requests_local_time_series()
returns if local time series is needed
Definition navier_stokes_base.h:200
virtual SmartPtr< CplUserData< number, dim > > kinematic_viscosity()=0
returns kinematic viscosity
void set_exact_jacobian(bool bExactJacobian)
sets if the exact jacobian is computed (fixpoint approximation else)
Definition navier_stokes_base.h:194
virtual void set_source(SmartPtr< CplUserData< MathVector< dim >, dim > > user)=0
sets the source function
virtual void set_kinematic_viscosity(SmartPtr< CplUserData< number, dim > > user)=0
sets the kinematic viscosity
virtual std::string disc_type() const =0
returns string identifying disc type
void set_exact_jacobian(number fullNewtonFactor)
Definition navier_stokes_base.h:196
double number