OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
residual_shop_cell.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // $Id: residual_shop_cell.h 1348 2013-08-16 00:45:07Z secanell $
3 //
4 // Copyright (C) 2006, 2007, 2008, 2009 by Guido Kanschat
5 //
6 // This file is subject to QPL and may not be distributed
7 // without copyright and license information. Please refer
8 // to the file deal.II/doc/license.html for the text and
9 // further information on this license.
10 //
11 //---------------------------------------------------------------------------
12 
13 #ifndef __appshop__residual_shop_cell_h
14 #define __appshop__residual_shop_cell_h
15 
16 #include <appframe/app_shop.h>
17 
23 namespace AppShop
24 {
25  namespace Residual
26  {
27  namespace Cell
28  {
38  template <int dim>
39  void advection(
40  Vector<double>& result,
41  const std::vector<double>& input,
42  const FEValuesBase<dim>& fe,
43  const VectorSlice<const std::vector<std::vector<double> > >& velocity,
44  double factor = 1.);
45 
57  template <int dim>
58  void advection(
59  Vector<double>& result,
60  const VectorSlice<const std::vector<std::vector<double> > >& input,
61  const FEValuesBase<dim>& fe,
62  const VectorSlice<const std::vector<std::vector<double> > >& velocity,
63  double factor = 1.);
64 
74  template <int dim>
75  void advection(
76  Vector<double>& result,
77  const std::vector<double>& input,
78  const FEValuesBase<dim>& fe,
79  const std::vector<Point<dim> >& velocity,
80  double factor = 1.);
88  template <int dim>
89  void di (
90  Vector<double>& result,
91  const std::vector<Tensor<1,dim> >& input,
92  unsigned int direction,
93  const FEValuesBase<dim>& fe,
94  const FEValuesBase<dim>& fetest,
95  double factor = 1.);
103  template <int dim>
104  void di (
105  Vector<double>& result,
106  const std::vector<double>& input,
107  unsigned int direction,
108  const FEValuesBase<dim>& fe,
109  const FEValuesBase<dim>& fetest,
110  double factor = 1.);
118  template <int dim>
119  void div (
120  Vector<double>& result,
121  const VectorSlice<const std::vector<std::vector<Tensor<1,dim> > > >& input,
122  const FEValuesBase<dim>& fe,
123  const FEValuesBase<dim>& fetest,
124  double factor = 1.);
132  template <int dim>
133  void div (
134  Vector<double>& result,
135  const VectorSlice<const std::vector<std::vector<double> > >& input,
136  const FEValuesBase<dim>& fe,
137  const FEValuesBase<dim>& fetest,
138  double factor = 1.);
146  template <int dim>
147  void div_scaled (
148  Vector<double>& result,
149  const VectorSlice<const std::vector<std::vector<double> > >& input,
150  const FEValuesBase<dim>& fe,
151  const FEValuesBase<dim>& fetest,
152  const std::vector<double>& a);
163  template <int dim>
164  void grad (
165  Vector<double>& result,
166  const std::vector<Tensor<1,dim> >& input,
167  const FEValuesBase<dim>& fe,
168  const FEValuesBase<dim>& fetest,
169  double factor = 1.);
170 
181  template <int dim>
182  void grad (
183  Vector<double>& result,
184  const std::vector<double>& input,
185  const FEValuesBase<dim>& fe,
186  const FEValuesBase<dim>& fetest,
187  double factor = 1.);
188 
192  template <int dim>
193  void eps_div (
194  Vector<double>& result,
195  const VectorSlice<const std::vector<std::vector<double> > >& input,
196  const FEValuesBase<dim>& fe,
197  const FEValuesBase<dim>& fetest);
201  template <int dim>
202  void eps (
203  Vector<double>& result,
204  const VectorSlice<const std::vector<std::vector<double> > >& input,
205  const FEValuesBase<dim>& fe,
206  const FEValuesBase<dim>& fetest);
207 
215  template <int dim>
216  void laplacian_scaled (
217  Vector<double>& result,
218  const std::vector<Tensor<1,dim> >& input,
219  const FEValuesBase<dim>& fe,
220  const std::vector<double>& nu,
221  bool divide = false);
222 
231  template <int dim>
232  void laplacian_scaled (
233  Vector<double>& result,
234  const VectorSlice<const std::vector<std::vector<Tensor<1,dim> > > >& input,
235  const FEValuesBase<dim>& fe,
236  const std::vector<double>& nu,
237  bool divide = false);
238 
239 
247  template <int dim>
248  void laplacian (
249  Vector<double>& result,
250  const std::vector<Tensor<1,dim> >& input,
251  const FEValuesBase<dim>& fe,
252  double factor = 1.);
253 
261  template <int dim>
262  void laplacian (
263  Vector<double>& result,
264  const std::vector<Tensor<1,dim> >& input,
265  const FEValuesBase<dim>& fe,
266  const Tensor<2,dim> factor);
274  template <int dim>
275  void laplacian (
276  Vector<double>& result,
277  const VectorSlice<const std::vector<std::vector<Tensor<1,dim> > > >& input,
278  const FEValuesBase<dim>& fe,
279  double factor = 1.);
287  template <int dim>
288  void mass (
289  Vector<double>& result,
290  const std::vector<double>& input,
291  const FEValuesBase<dim>& fe,
292  double factor = 1.);
293 
303  template <int dim>
304  void mass (
305  Vector<double>& result,
306  const VectorSlice<const std::vector<std::vector<double> > >& input,
307  const FEValuesBase<dim>& fe,
308  double factor = 1.);
309 
320  template <int dim>
321  void mass (
322  Vector<double>& result,
323  const std::vector<Vector<double> >& input,
324  const unsigned int start_component,
325  const FEValuesBase<dim>& fe,
326  double factor = 1.);
327 
336  template <int dim>
337  void power (
338  Vector<double>& result,
339  const std::vector<double>& input,
340  const FEValuesBase<dim>& fe,
341  const double power,
342  double factor = 1.);
343 
347  template <int dim>
348  void time_step (
349  Vector<double>& result,
350  const std::vector<double>& input,
351  const std::vector<double>& last_time,
352  const FEValuesBase<dim>& fe,
353  const double time_step);
354 
358  template <int dim>
359  void time_step (
360  Vector<double>& result,
361  const VectorSlice<const std::vector<std::vector<double> > >& input,
362  const VectorSlice<const std::vector<std::vector<double> > >& last_time,
363  const FEValuesBase<dim>& fe,
364  const double time_step);
365 
369  template <int dim>
370  void mass_scaled (
371  Vector<double>& result,
372  const std::vector<double>& input,
373  const FEValuesBase<dim>& fe,
374  const std::vector<double>& factor,
375  bool divide = false);
376 
380  template <int dim>
381  void mass_scaled (
382  Vector<double>& result,
383  const VectorSlice<const std::vector<std::vector<double> > >& input,
384  const FEValuesBase<dim>& fe,
385  const std::vector<double>& factor,
386  bool divide=false);
387 
388 
389  }
390  }
391 }
392 
393 #endif