dune-pdelab  2.4-dev
defaultimp.hh
Go to the documentation of this file.
1 // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=8 sw=2 sts=2:
3 #ifndef DUNE_PDELAB_LOCALOPERATOR_DEFAULTIMP_HH
4 #define DUNE_PDELAB_LOCALOPERATOR_DEFAULTIMP_HH
5 
6 #include <cmath>
7 #include <vector>
8 
11 
12 namespace Dune {
13  namespace PDELab {
14 
18 
20  //
21  // Numerical implementation of jacobian_*() in terms of alpha_*()
22  //
23 
25 
31  template<typename Imp>
33  {
34  public:
36  : epsilon(1e-7)
37  {}
38 
39  NumericalJacobianVolume (double epsilon_)
40  : epsilon(epsilon_)
41  {}
42 
44  template<typename EG, typename LFSU, typename X, typename LFSV,
45  typename Jacobian>
46  void jacobian_volume
47  ( const EG& eg,
48  const LFSU& lfsu, const X& x, const LFSV& lfsv,
49  Jacobian& mat) const
50  {
51  typedef typename X::value_type D;
52  typedef typename Jacobian::value_type R;
54  typedef typename ResidualVector::WeightedAccumulationView ResidualView;
55 
56  const int m=lfsv.size();
57  const int n=lfsu.size();
58 
59  X u(x);
60 
61  // Notice that in general lfsv.size() != mat.nrows()
62  ResidualVector down(mat.nrows(),0.),up(mat.nrows());
63  ResidualView downview = down.weightedAccumulationView(mat.weight());
64  ResidualView upview = up.weightedAccumulationView(mat.weight());
65 
66 
67  asImp().alpha_volume(eg,lfsu,u,lfsv,downview);
68  for (int j=0; j<n; j++) // loop over columns
69  {
70  up = 0.0;
71  D delta = epsilon*(1.0+std::abs(u(lfsu,j)));
72  u(lfsu,j) += delta;
73  asImp().alpha_volume(eg,lfsu,u,lfsv,upview);
74  for (int i=0; i<m; i++)
75  mat.rawAccumulate(lfsv,i,lfsu,j,(up(lfsv,i)-down(lfsv,i))/delta);
76  u(lfsu,j) = x(lfsu,j);
77  }
78  }
79 
80  private:
81  const double epsilon; // problem: this depends on data type R!
82  Imp& asImp () { return static_cast<Imp &> (*this); }
83  const Imp& asImp () const { return static_cast<const Imp &>(*this); }
84  };
85 
88 
95  template<typename Imp>
97  {
98  public:
100  : epsilon(1e-7)
101  {}
102 
104  : epsilon(epsilon_)
105  {}
106 
108  template<typename EG, typename LFSU, typename X, typename LFSV,
109  typename Jacobian>
111  ( const EG& eg,
112  const LFSU& lfsu, const X& x, const LFSV& lfsv,
113  Jacobian& mat) const
114  {
115  typedef typename X::value_type D;
116  typedef typename Jacobian::value_type R;
118  typedef typename ResidualVector::WeightedAccumulationView ResidualView;
119 
120  const int m=lfsv.size();
121  const int n=lfsu.size();
122 
123  X u(x);
124 
125  // Notice that in general lfsv.size() != mat.nrows()
126  ResidualVector down(mat.nrows(),0.),up(mat.nrows());
127  ResidualView downview = down.weightedAccumulationView(mat.weight());
128  ResidualView upview = up.weightedAccumulationView(mat.weight());
129 
130  asImp().alpha_volume_post_skeleton(eg,lfsu,u,lfsv,downview);
131  for (int j=0; j<n; j++) // loop over columns
132  {
133  up = 0.0;
134  D delta = epsilon*(1.0+std::abs(u(lfsu,j)));
135  u(lfsu,j) += delta;
136  asImp().alpha_volume_post_skeleton(eg,lfsu,u,lfsv,upview);
137  for (int i=0; i<m; i++)
138  mat.rawAccumulate(lfsv,i,lfsu,j,(up(lfsv,i)-down(lfsv,i))/delta);
139  u(lfsu,j) = x(lfsu,j);
140  }
141  }
142 
143  private:
144  const double epsilon; // problem: this depends on data type R!
145  Imp& asImp () { return static_cast<Imp &> (*this); }
146  const Imp& asImp () const { return static_cast<const Imp &>(*this); }
147  };
148 
150 
156  template<typename Imp>
158  {
159  public:
161  : epsilon(1e-7)
162  {}
163 
164  NumericalJacobianSkeleton (double epsilon_)
165  : epsilon(epsilon_)
166  {}
167 
169  template<typename IG, typename LFSU, typename X, typename LFSV,
170  typename Jacobian>
171  void jacobian_skeleton
172  ( const IG& ig,
173  const LFSU& lfsu_s, const X& x_s, const LFSV& lfsv_s,
174  const LFSU& lfsu_n, const X& x_n, const LFSV& lfsv_n,
175  Jacobian& mat_ss, Jacobian& mat_sn,
176  Jacobian& mat_ns, Jacobian& mat_nn) const
177  {
178  typedef typename X::value_type D;
179  typedef typename Jacobian::value_type R;
181  typedef typename ResidualVector::WeightedAccumulationView ResidualView;
182 
183  const int m_s=lfsv_s.size();
184  const int m_n=lfsv_n.size();
185  const int n_s=lfsu_s.size();
186  const int n_n=lfsu_n.size();
187 
188  X u_s(x_s);
189  X u_n(x_n);
190 
191  // Notice that in general lfsv.size() != mat.nrows()
192  ResidualVector down_s(mat_ss.nrows()),up_s(mat_ss.nrows());
193  ResidualView downview_s = down_s.weightedAccumulationView(1.0);
194  ResidualView upview_s = up_s.weightedAccumulationView(1.0);
195 
196  ResidualVector down_n(mat_nn.nrows()),up_n(mat_nn.nrows());
197  ResidualView downview_n = down_n.weightedAccumulationView(1.0);
198  ResidualView upview_n = up_n.weightedAccumulationView(1.0);
199 
200  // base line
201  asImp().alpha_skeleton(ig,lfsu_s,u_s,lfsv_s,lfsu_n,u_n,lfsv_n,downview_s,
202  downview_n);
203 
204  // jiggle in self
205  for (int j=0; j<n_s; j++)
206  {
207  up_s = 0.0;
208  up_n = 0.0;
209  D delta = epsilon*(1.0+std::abs(u_s(lfsu_s,j)));
210  u_s(lfsu_s,j) += delta;
211  asImp().alpha_skeleton(ig,lfsu_s,u_s,lfsv_s,lfsu_n,u_n,lfsv_n,upview_s,
212  upview_n);
213  for (int i=0; i<m_s; i++)
214  mat_ss.accumulate(lfsv_s,i,lfsu_s,j,(up_s(lfsv_s,i)-down_s(lfsv_s,i))/delta);
215  for (int i=0; i<m_n; i++)
216  mat_ns.accumulate(lfsv_n,i,lfsu_s,j,(up_n(lfsv_n,i)-down_n(lfsv_n,i))/delta);
217  u_s(lfsu_s,j) = x_s(lfsu_s,j);
218  }
219 
220  // jiggle in neighbor
221  for (int j=0; j<n_n; j++)
222  {
223  up_s = 0.0;
224  up_n = 0.0;
225  D delta = epsilon*(1.0+std::abs(u_n(lfsu_n,j)));
226  u_n(lfsu_n,j) += delta;
227  asImp().alpha_skeleton(ig,lfsu_s,u_s,lfsv_s,lfsu_n,u_n,lfsv_n,upview_s,
228  upview_n);
229  for (int i=0; i<m_s; i++)
230  mat_sn.accumulate(lfsv_s,i,lfsu_n,j,(up_s(lfsv_s,i)-down_s(lfsv_s,i))/delta);
231  for (int i=0; i<m_n; i++)
232  mat_nn.accumulate(lfsv_n,i,lfsu_n,j,(up_n(lfsv_n,i)-down_n(lfsv_n,i))/delta);
233  u_n(lfsu_n,j) = x_n(lfsu_n,j);
234  }
235  }
236 
237  private:
238  const double epsilon; // problem: this depends on data type R!
239  Imp& asImp () { return static_cast<Imp &> (*this); }
240  const Imp& asImp () const { return static_cast<const Imp &>(*this); }
241  };
242 
244 
250  template<typename Imp>
252  {
253  public:
255  : epsilon(1e-7)
256  {}
257 
258  NumericalJacobianBoundary (double epsilon_)
259  : epsilon(epsilon_)
260  {}
261 
263  template<typename IG, typename LFSU, typename X, typename LFSV,
264  typename Jacobian>
265  void jacobian_boundary
266  ( const IG& ig,
267  const LFSU& lfsu_s, const X& x_s, const LFSV& lfsv_s,
268  Jacobian& mat_ss) const
269  {
270  typedef typename X::value_type D;
271  typedef typename Jacobian::value_type R;
273  typedef typename ResidualVector::WeightedAccumulationView ResidualView;
274 
275  const int m_s=lfsv_s.size();
276  const int n_s=lfsu_s.size();
277 
278  X u_s(x_s);
279 
280  // Notice that in general lfsv.size() != mat.nrows()
281  ResidualVector down_s(mat_ss.nrows()),up_s(mat_ss.nrows());
282  ResidualView downview_s = down_s.weightedAccumulationView(mat_ss.weight());
283  ResidualView upview_s = up_s.weightedAccumulationView(mat_ss.weight());;
284 
285 
286  // base line
287  asImp().alpha_boundary(ig,lfsu_s,u_s,lfsv_s,downview_s);
288 
289  // jiggle in self
290  for (int j=0; j<n_s; j++)
291  {
292  up_s = 0.0;
293  D delta = epsilon*(1.0+std::abs(u_s(lfsu_s,j)));
294  u_s(lfsu_s,j) += delta;
295  asImp().alpha_boundary(ig,lfsu_s,u_s,lfsv_s,upview_s);
296  for (int i=0; i<m_s; i++)
297  mat_ss.rawAccumulate(lfsv_s,i,lfsu_s,j,(up_s(lfsv_s,i)-down_s(lfsv_s,i))/delta);
298  u_s(lfsu_s,j) = x_s(lfsu_s,j);
299  }
300  }
301 
302  private:
303  const double epsilon; // problem: this depends on data type R!
304  Imp& asImp () { return static_cast<Imp &> (*this); }
305  const Imp& asImp () const { return static_cast<const Imp &>(*this); }
306  };
307 
309  //
310  // Numerical implementation of jacobian_apply_*() in terms of alpha_*()
311  //
312 
314 
320  template<typename Imp>
322  {
323  public:
325  : epsilon(1e-7)
326  {}
327 
329  : epsilon(epsilon_)
330  {}
331 
333  template<typename EG, typename LFSU, typename X, typename LFSV,
334  typename Y>
336  ( const EG& eg,
337  const LFSU& lfsu, const X& x, const LFSV& lfsv,
338  Y& y) const
339  {
340  typedef typename X::value_type D;
341  typedef typename Y::value_type R;
343  typedef typename ResidualVector::WeightedAccumulationView ResidualView;
344 
345  const int m=lfsv.size();
346  const int n=lfsu.size();
347 
348  X u(x);
349 
350  // Notice that in general lfsv.size() != y.size()
351  ResidualVector down(y.size()),up(y.size());
352  ResidualView downview = down.weightedAccumulationView(y.weight());
353  ResidualView upview = up.weightedAccumulationView(y.weight());
354 
355  asImp().alpha_volume(eg,lfsu,u,lfsv,downview);
356  for (int j=0; j<n; j++) // loop over columns
357  {
358  up = 0.0;
359  D delta = epsilon*(1.0+std::abs(u(lfsu,j)));
360  u(lfsu,j) += delta;
361  asImp().alpha_volume(eg,lfsu,u,lfsv,upview);
362  for (int i=0; i<m; i++)
363  y.rawAccumulate(lfsv,i,((up(lfsv,i)-down(lfsv,i))/delta)*x(lfsu,j));
364  u(lfsu,j) = x(lfsu,j);
365  }
366  }
367 
368  private:
369  const double epsilon; // problem: this depends on data type R!
370  Imp& asImp () { return static_cast<Imp &> (*this); }
371  const Imp& asImp () const { return static_cast<const Imp &>(*this); }
372  };
373 
376 
383  template<typename Imp>
385  {
386  public:
388  : epsilon(1e-7)
389  {}
390 
392  : epsilon(epsilon_)
393  {}
394 
396  template<typename EG, typename LFSU, typename X, typename LFSV,
397  typename Y>
399  ( const EG& eg,
400  const LFSU& lfsu, const X& x, const LFSV& lfsv,
401  Y& y) const
402  {
403  typedef typename X::value_type D;
404  typedef typename Y::value_type R;
406  typedef typename ResidualVector::WeightedAccumulationView ResidualView;
407 
408  const int m=lfsv.size();
409  const int n=lfsu.size();
410 
411  X u(x);
412 
413  // Notice that in general lfsv.size() != y.size()
414  ResidualVector down(y.size()),up(y.size());
415  ResidualView downview = down.weightedAccumulationView(y.weight());
416  ResidualView upview = up.weightedAccumulationView(y.weight());
417 
418  asImp().alpha_volume_post_skeleton(eg,lfsu,u,lfsv,downview);
419  for (int j=0; j<n; j++) // loop over columns
420  {
421  up = 0.0;
422  D delta = epsilon*(1.0+std::abs(u(lfsu,j)));
423  u(lfsu,j) += delta;
424  asImp().alpha_volume_post_skeleton(eg,lfsu,u,lfsv,upview);
425  for (int i=0; i<m; i++)
426  y.rawAccumulate(lfsv,i,((up(lfsv,i)-down(lfsv,i))/delta)*x(lfsu,j));
427  u(lfsu,j) = x(lfsu,j);
428  }
429  }
430 
431  private:
432  const double epsilon; // problem: this depends on data type R!
433  Imp& asImp () {return static_cast<Imp &> (*this);}
434  const Imp& asImp () const {return static_cast<const Imp &>(*this);}
435  };
436 
438 
444  template<typename Imp>
446  {
447  public:
449  : epsilon(1e-7)
450  {}
451 
453  : epsilon(epsilon_)
454  {}
455 
457  template<typename IG, typename LFSU, typename X, typename LFSV,
458  typename Y>
460  ( const IG& ig,
461  const LFSU& lfsu_s, const X& x_s, const LFSV& lfsv_s,
462  const LFSU& lfsu_n, const X& x_n, const LFSV& lfsv_n,
463  Y& y_s, Y& y_n) const
464  {
465  typedef typename X::value_type D;
466  typedef typename Y::value_type R;
468  typedef typename ResidualVector::WeightedAccumulationView ResidualView;
469 
470  const int m_s=lfsv_s.size();
471  const int m_n=lfsv_n.size();
472  const int n_s=lfsu_s.size();
473  const int n_n=lfsu_n.size();
474 
475  X u_s(x_s);
476  X u_n(x_n);
477 
478  // Notice that in general lfsv_s.size() != y_s.size()
479  ResidualVector down_s(y_s.size()),up_s(y_s.size());
480  ResidualView downview_s = down_s.weightedAccumulationView(1.0);
481  ResidualView upview_s = up_s.weightedAccumulationView(1.0);
482 
483  ResidualVector down_n(y_n.size()),up_n(y_n.size());
484  ResidualView downview_n = down_n.weightedAccumulationView(1.0);
485  ResidualView upview_n = up_n.weightedAccumulationView(1.0);
486 
487  // base line
488  asImp().alpha_skeleton(ig,lfsu_s,u_s,lfsv_s,lfsu_n,u_n,lfsv_n,downview_s,
489  downview_n);
490 
491  // jiggle in self
492  for (int j=0; j<n_s; j++)
493  {
494  up_s = 0.0;
495  up_n = 0.0;
496  D delta = epsilon*(1.0+std::abs(u_s(lfsu_s,j)));
497  u_s(lfsu_s,j) += delta;
498  asImp().alpha_skeleton(ig,lfsu_s,u_s,lfsv_s,lfsu_n,u_n,lfsv_n,upview_s,
499  upview_n);
500  for (int i=0; i<m_s; i++)
501  y_s.accumulate(lfsv_s,i,((up_s(lfsv_s,i)-down_s(lfsv_s,i))/delta)*x_s(lfsu_s,j));
502  for (int i=0; i<m_n; i++)
503  y_n.accumulate(lfsv_n,i,((up_n(lfsv_n,i)-down_n(lfsv_n,i))/delta)*x_s(lfsu_s,j));
504  u_s(lfsu_s,j) = x_s(lfsu_s,j);
505  }
506 
507  // jiggle in neighbor
508  for (int j=0; j<n_n; j++)
509  {
510  up_s = 0.0;
511  up_n = 0.0;
512  D delta = epsilon*(1.0+std::abs(u_n(lfsu_n,j)));
513  u_n(lfsu_n,j) += delta;
514  asImp().alpha_skeleton(ig,lfsu_s,u_s,lfsv_s,lfsu_n,u_n,lfsv_n,upview_s,
515  upview_n);
516  for (int i=0; i<m_s; i++)
517  y_s.accumulate(lfsv_s,i,((up_s(lfsv_s,i)-down_s(lfsv_s,i))/delta)*x_n(lfsu_n,j));
518  for (int i=0; i<m_n; i++)
519  y_n.accumulate(lfsv_n,i,((up_n(lfsv_n,i)-down_n(lfsv_n,i))/delta)*x_n(lfsu_n,j));
520  u_n(lfsu_n,j) = x_n(lfsu_n,j);
521  }
522  }
523 
524  private:
525  const double epsilon; // problem: this depends on data type R!
526  Imp& asImp () { return static_cast<Imp &> (*this); }
527  const Imp& asImp () const { return static_cast<const Imp &>(*this); }
528  };
529 
531 
537  template<typename Imp>
539  {
540  public:
542  : epsilon(1e-7)
543  {}
544 
546  : epsilon(epsilon_)
547  {}
548 
550  template<typename IG, typename LFSU, typename X, typename LFSV,
551  typename Y>
553  ( const IG& ig,
554  const LFSU& lfsu_s, const X& x_s, const LFSV& lfsv_s,
555  Y& y_s) const
556  {
557  typedef typename X::value_type D;
558  typedef typename Y::value_type R;
560  typedef typename ResidualVector::WeightedAccumulationView ResidualView;
561 
562  const int m_s=lfsv_s.size();
563  const int n_s=lfsu_s.size();
564 
565  X u_s(x_s);
566 
567  // Notice that in general lfsv_s.size() != y_s.size()
568  ResidualVector down_s(y_s.size()),up_s(y_s.size());
569  ResidualView downview_s = down_s.weightedAccumulationView(1.0);
570  ResidualView upview_s = up_s.weightedAccumulationView(1.0);
571 
572  // base line
573  asImp().alpha_boundary(ig,lfsu_s,u_s,lfsv_s,downview_s);
574 
575  // jiggle in self
576  for (int j=0; j<n_s; j++)
577  {
578  up_s = 0.0;
579  D delta = epsilon*(1.0+std::abs(u_s(lfsu_s,j)));
580  u_s(lfsu_s,j) += delta;
581  asImp().alpha_boundary(ig,lfsu_s,u_s,lfsv_s,upview_s);
582  for (int i=0; i<m_s; i++)
583  y_s.rawAccumulate(lfsv_s,i,((up_s(lfsv_s,i)-down_s(lfsv_s,i))/delta)*x_s(lfsu_s,j));
584  u_s(lfsu_s,j) = x_s(lfsu_s,j);
585  }
586  }
587 
588  private:
589  const double epsilon; // problem: this depends on data type R!
590  Imp& asImp () { return static_cast<Imp &> (*this); }
591  const Imp& asImp () const { return static_cast<const Imp &>(*this); }
592  };
593 
595  //
596  // Implementation of alpha_*() in terms of jacobian_*()
597  //
598 
600 
610  template<typename Imp>
612  {
613  public:
614 
616  template<typename EG, typename LFSU, typename X, typename LFSV,
617  typename R>
618  void alpha_volume
619  ( const EG& eg,
620  const LFSU& lfsu, const X& x, const LFSV& lfsv,
621  R& r) const
622  {
623  typedef LocalMatrix<typename R::value_type> Jacobian;
624  typedef typename Jacobian::WeightedAccumulationView JacobianView;
625 
626  Jacobian mat(r.size(),x.size(), 0);
627  JacobianView matview = mat.weightedAccumulationView(1.0);
628  asImp().jacobian_volume(eg, lfsu, x, lfsv, matview);
629  // we need to include the weight here, as umv() and usmv() operate on the bare container for effiency
630  mat.usmv(r.weight(),x,r);
631  }
632 
633  private:
634  Imp& asImp () { return static_cast<Imp &> (*this); }
635  const Imp& asImp () const { return static_cast<const Imp &>(*this); }
636  };
637 
639 
649  template<typename Imp>
651  {
652  public:
653 
655  template<typename IG, typename LFSU, typename X, typename LFSV,
656  typename R>
657  void alpha_skeleton
658  ( const IG& ig,
659  const LFSU& lfsu_s, const X& x_s, const LFSV& lfsv_s,
660  const LFSU& lfsu_n, const X& x_n, const LFSV& lfsv_n,
661  R& r_s, R& r_n) const
662  {
663  typedef LocalMatrix<typename R::value_type> Jacobian;
664  typedef typename Jacobian::WeightedAccumulationView JacobianView;
665 
666  Jacobian mat_ss(r_s.size(),x_s.size(),0);
667  Jacobian mat_sn(r_s.size(),x_n.size(),0);
668  Jacobian mat_ns(r_n.size(),x_s.size(),0);
669  Jacobian mat_nn(r_n.size(),x_n.size(),0);
670 
671  JacobianView view_ss = mat_ss.weightedAccumulationView(1.0);
672  JacobianView view_sn = mat_sn.weightedAccumulationView(1.0);
673  JacobianView view_ns = mat_ns.weightedAccumulationView(1.0);
674  JacobianView view_nn = mat_nn.weightedAccumulationView(1.0);
675 
676  asImp().jacobian_skeleton(ig,
677  lfsu_s, x_s, lfsv_s,
678  lfsu_n, x_n, lfsv_n,
679  view_ss, view_sn, view_ns, view_nn);
680  // TODO: Reihenfolge der Multiplikationen!
681  mat_ss.usmv(r_s.weight(),x_s,r_s);
682  mat_ns.usmv(r_n.weight(),x_s,r_n);
683  mat_sn.usmv(r_s.weight(),x_n,r_s);
684  mat_nn.usmv(r_n.weight(),x_n,r_n);
685  }
686 
687  private:
688  Imp& asImp () { return static_cast<Imp &> (*this); }
689  const Imp& asImp () const { return static_cast<const Imp &>(*this); }
690  };
691 
693 
703  template<typename Imp>
705  {
706  public:
707 
709  template<typename IG, typename LFSU, typename X, typename LFSV,
710  typename R>
711  void alpha_boundary
712  ( const IG& ig,
713  const LFSU& lfsu, const X& x, const LFSV& lfsv,
714  R& r) const
715  {
716  typedef LocalMatrix<typename R::value_type> Jacobian;
717  typedef typename Jacobian::WeightedAccumulationView JacobianView;
718 
719  Jacobian mat(x.size(),r.size(), 0);
720  JacobianView view = mat.weightedAccumulationView(1.0);
721  asImp().jacobian_boundary(ig, lfsu, x, lfsv, view);
722  // we need to include the weight here, as umv() and usmv() operate on the bare container for effiency
723  mat.usmv(r.weight(),x,r);
724  }
725 
726  private:
727  Imp& asImp () { return static_cast<Imp &> (*this); }
728  const Imp& asImp () const { return static_cast<const Imp &>(*this); }
729  };
730 
732  }
733 }
734 
735 #endif // DUNE_PDELAB_LOCALOPERATOR_DEFAULTIMP_HH
void jacobian_volume_post_skeleton(const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Jacobian &mat) const
compute local post-skeleton jacobian of the volume term
Definition: defaultimp.hh:111
NumericalJacobianApplyVolume(double epsilon_)
Definition: defaultimp.hh:328
NumericalJacobianApplyBoundary(double epsilon_)
Definition: defaultimp.hh:545
Implement alpha_volume() based on jacobian_volume()
Definition: defaultimp.hh:611
Implement alpha_boundary() based on jacobian_boundary()
Definition: defaultimp.hh:704
NumericalJacobianApplyVolumePostSkeleton()
Definition: defaultimp.hh:387
void jacobian_skeleton(const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const X &x_n, const LFSV &lfsv_n, Jacobian &mat_ss, Jacobian &mat_sn, Jacobian &mat_ns, Jacobian &mat_nn) const
compute local jacobian of the skeleton term
Definition: defaultimp.hh:172
NumericalJacobianApplySkeleton()
Definition: defaultimp.hh:448
NumericalJacobianVolume(double epsilon_)
Definition: defaultimp.hh:39
A dense matrix for storing data associated with the degrees of freedom of a pair of LocalFunctionSpac...
Definition: localmatrix.hh:184
const E & e
Definition: interpolate.hh:172
Implement jacobian_apply_volume() based on alpha_volume()
Definition: defaultimp.hh:321
NumericalJacobianSkeleton(double epsilon_)
Definition: defaultimp.hh:164
NumericalJacobianApplyVolume()
Definition: defaultimp.hh:324
const IG & ig
Definition: constraints.hh:147
void jacobian_apply_skeleton(const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const X &x_n, const LFSV &lfsv_n, Y &y_s, Y &y_n) const
apply local jacobian of the skeleton term
Definition: defaultimp.hh:460
void alpha_boundary(const IG &ig, const LFSU &lfsu, const X &x, const LFSV &lfsv, R &r) const
compute
Definition: defaultimp.hh:712
void jacobian_boundary(const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, Jacobian &mat_ss) const
compute local jacobian of the boundary term
Definition: defaultimp.hh:266
NumericalJacobianSkeleton()
Definition: defaultimp.hh:160
NumericalJacobianApplyVolumePostSkeleton(double epsilon_)
Definition: defaultimp.hh:391
WeightedAccumulationView weightedAccumulationView(weight_type weight)
Returns a WeighedAccumulationView with some weight in addition to this view's weight.
Definition: localmatrix.hh:47
void jacobian_volume(const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Jacobian &mat) const
compute local jacobian of the volume term
Definition: defaultimp.hh:47
NumericalJacobianApplyBoundary()
Definition: defaultimp.hh:541
Implement jacobian_apply_skeleton() based on alpha_skeleton()
Definition: defaultimp.hh:445
Definition: adaptivity.hh:27
void alpha_skeleton(const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const X &x_n, const LFSV &lfsv_n, R &r_s, R &r_n) const
compute
Definition: defaultimp.hh:658
Implement jacobian_volume() based on alpha_volume()
Definition: defaultimp.hh:32
Implement jacobian_boundary() based on alpha_boundary()
Definition: defaultimp.hh:251
void jacobian_apply_volume_post_skeleton(const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Y &y) const
apply local jacobian of the volume term (post skeleton part)
Definition: defaultimp.hh:399
void jacobian_apply_volume(const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Y &y) const
apply local jacobian of the volume term
Definition: defaultimp.hh:336
NumericalJacobianVolumePostSkeleton(double epsilon_)
Definition: defaultimp.hh:103
NumericalJacobianVolume()
Definition: defaultimp.hh:35
NumericalJacobianApplySkeleton(double epsilon_)
Definition: defaultimp.hh:452
void jacobian_apply_boundary(const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, Y &y_s) const
apply local jacobian of the boundaryterm
Definition: defaultimp.hh:553
WeightedAccumulationView weightedAccumulationView(weight_type weight)
Returns a weighted accumulate-only view of this matrix with the given weight.
Definition: localmatrix.hh:398
Implement jacobian_skeleton() based on alpha_skeleton()
Definition: defaultimp.hh:157
NumericalJacobianBoundary()
Definition: defaultimp.hh:254
NumericalJacobianVolumePostSkeleton()
Definition: defaultimp.hh:99
size_type size() const
The size of the container.
Definition: localvector.hh:245
Implement alpha_skeleton() based on jacobian_skeleton()
Definition: defaultimp.hh:650
const EG & eg
Definition: constraints.hh:280
A container for storing data associated with the degrees of freedom of a LocalFunctionSpace.
Definition: localvector.hh:171
NumericalJacobianBoundary(double epsilon_)
Definition: defaultimp.hh:258
Implement jacobian_apply_boundary() based on alpha_boundary()
Definition: defaultimp.hh:538
void alpha_volume(const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, R &r) const
compute
Definition: defaultimp.hh:619