integral.h
Go to the documentation of this file.
1 //LIC// ====================================================================
2 //LIC// This file forms part of oomph-lib, the object-oriented,
3 //LIC// multi-physics finite-element library, available
4 //LIC// at http://www.oomph-lib.org.
5 //LIC//
6 //LIC// Version 1.0; svn revision $LastChangedRevision$
7 //LIC//
8 //LIC// $LastChangedDate$
9 //LIC//
10 //LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11 //LIC//
12 //LIC// This library is free software; you can redistribute it and/or
13 //LIC// modify it under the terms of the GNU Lesser General Public
14 //LIC// License as published by the Free Software Foundation; either
15 //LIC// version 2.1 of the License, or (at your option) any later version.
16 //LIC//
17 //LIC// This library is distributed in the hope that it will be useful,
18 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 //LIC// Lesser General Public License for more details.
21 //LIC//
22 //LIC// You should have received a copy of the GNU Lesser General Public
23 //LIC// License along with this library; if not, write to the Free Software
24 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 //LIC// 02110-1301 USA.
26 //LIC//
27 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28 //LIC//
29 //LIC//====================================================================
30 //Header file for numerical integration routines based on quadrature
31 
32 //Include guards to prevent multiple inclusions of the header
33 #ifndef OOMPH_INTEGRAL_HEADER
34 #define OOMPH_INTEGRAL_HEADER
35 
36 
37 // Config header generated by autoconfig
38 #ifdef HAVE_CONFIG_H
39  #include <oomph-lib-config.h>
40 #endif
41 
42 //oomph-lib headers
43 #include "oomph_utilities.h"
44 #include "orthpoly.h"
45 
46 namespace oomph
47 {
48 
49 
50 
51 //=========================================================
52 /// Generic class for numerical integration schemes:
53 /// \f[
54 /// \int f(x_0,x_1...)\ dx_0 \ dx_1... =
55 /// \sum_{i_{int}=0}^{\mbox{\tt nweight()} }
56 /// f( x_j=\mbox{\tt knot($i_{int}$,j)} ) \ \ \ \mbox{\tt weight($i_{int}$)}
57 /// \f]
58 //=========================================================
59 class Integral
60 {
61  public:
62 
63  /// Default constructor (empty)
64  Integral(){};
65 
66  /// Broken copy constructor
67  Integral(const Integral& dummy)
68  {
69  BrokenCopy::broken_copy("Integral");
70  }
71 
72  /// Broken assignment operator
73  void operator=(const Integral&)
74  {
75  BrokenCopy::broken_assign("Integral");
76  }
77 
78  /// Virtual destructor (empty)
79  virtual ~Integral(){};
80 
81  /// Return the number of integration points of the scheme.
82  virtual unsigned nweight() const=0;
83 
84  /// Return local coordinate s[j] of i-th integration point.
85  virtual double knot(const unsigned &i, const unsigned &j) const=0;
86 
87  /// Return local coordinates of i-th intergration point.
88  virtual Vector<double> knot(const unsigned &i) const
89  {
90  throw OomphLibError("Not implemented for this integration scheme (yet?).",
91  OOMPH_CURRENT_FUNCTION,
92  OOMPH_EXCEPTION_LOCATION);
93  }
94 
95  /// Return weight of i-th integration point.
96  virtual double weight(const unsigned &i) const=0;
97 
98 };
99 
100 
101 //=========================================================
102 /// Wrapper for an integral that reflects one integral at
103 /// point inside the domain, such that the integral is used
104 /// on both sides of the line of reflection
105 /// | . . .| . . . |
106 //=========================================================
108 {
109 public:
110 
111  /// Construct reflected integral, note s refers to local coordinate
112  ReflectedIntegral(const Integral* integral_to_reflect_pt,
113  const unsigned index_s,
114  const double s_reflect,
115  const double s_min,
116  const double s_max):
117  Integral_pt(integral_to_reflect_pt),
118  Index_s(index_s),
119  S_reflect(s_reflect), S_min(s_min), S_max(s_max),
120  S_reflect_fraction(local_to_fraction(s_reflect)){};
121 
122  /// Number of integration points of the scheme, two times the base scheme
123  unsigned nweight() const { return 2u*Integral_pt->nweight(); }
124 
125  /// Return local coordinate s[j] of i-th integration point.
126  double knot(const unsigned &i, const unsigned &j) const;
127 
128  /// Return weight of i-th integration point.
129  double weight(const unsigned &i) const;
130 
131 private:
132 
133  /// \brief Helper function to convert from local coordinate (s in [-1,1] for
134  /// quads) to fraction [0,1]
135  double local_to_fraction(const double& local_coord) const;
136 
137  /// \brief Helper function to convert from fraction [0,1] to local coordinate
138  /// (s in [-1,1] for quads)
139  double fraction_to_local(const double& fraction) const;
140 
141  /// Pointer to integral which we will reflect
143 
144  /// Index of local coord (s) which scheme will be reflected along
145  const unsigned Index_s;
146 
147  /// Value of local coord (s) where scheme will be reflected
148  const double S_reflect;
149 
150  /// Minimum value of local coord (s) over whole domain
151  const double S_min;
152 
153  /// Maximum value of local coord (s) over whole domain
154  const double S_max;
155 
156  /// Position where scheme will be reflected as of fraction of domain [0,1]
157  const double S_reflect_fraction;
158 };
159 
160 //===================================================================
161 /// Integration scheme formed by the tensor product of two
162 /// integration schemes
163 //===================================================================
164 template <unsigned DIM>
166 {
167 };
168 
169 //===================================================================
170 /// Integration scheme formed by the tensor product of two
171 /// integration schemes
172 //===================================================================
173 template<>
175 {
176 
177 public:
178 
179  /// Construct tensor product from two integrals
180  TensorProductIntegral(const Integral* integral0_pt,
181  const Integral* integral1_pt) :
182  Integral0_pt(integral0_pt), Integral1_pt(integral1_pt) {}
183 
184  /// Number of integration points of the scheme
185  unsigned nweight() const
186  {
187  return Integral0_pt->nweight() * Integral1_pt->nweight();
188  }
189 
190  /// Return coordinate s[j] (j=0) of integration point i
191  double knot(const unsigned &i, const unsigned &j) const
192  {
193  const unsigned Npts1 = Integral1_pt->nweight();
194  if(j == 0) return Integral0_pt->knot(i/Npts1,0);
195  if(j == 1) return Integral1_pt->knot(i%Npts1,0);
196  else
197  {
198  throw OomphLibError("Integral is two dimensional, you requested j>1",
199  OOMPH_CURRENT_FUNCTION,
200  OOMPH_EXCEPTION_LOCATION);
201  }
202  }
203 
204  /// Return weight of integration point i
205  double weight(const unsigned &i) const
206  {
207  const unsigned Npts1 = Integral1_pt->nweight();
208  return Integral0_pt->weight(i/Npts1)*Integral1_pt->weight(i%Npts1);
209  }
210 
211 private:
212 
213  /// Pointer to integral in direction indexed by 0
215 
216  /// Pointer to integral in direction indexed by 1
218 
219 };
220 
221 
222 
223 //=============================================================================
224 /// Broken pseudo-integration scheme for points elements: Iit's not clear
225 /// in general what this integration scheme is supposed to. It probably
226 /// ought to evaluate integrals to zero but we're not sure in what
227 /// context this may be used. Replace by your own integration scheme
228 /// that does what you want!
229 //=============================================================================
230 class PointIntegral : public Integral
231 {
232 
233 public:
234 
235  /// Default constructor (empty)
237 
238  /// Broken copy constructor
240  {
241  BrokenCopy::broken_copy("PointIntegral");
242  }
243 
244  /// Broken assignment operator
245  void operator=(const PointIntegral&)
246  {
247  BrokenCopy::broken_assign("PointIntegral");
248  }
249 
250  /// Number of integration points of the scheme
251  unsigned nweight() const {return 1;}
252 
253  /// \short Return coordinate s[j] (j=0) of integration point i --
254  /// deliberately broken!
255  double knot(const unsigned &i, const unsigned &j) const
256  {
257  throw OomphLibError(
258  "Local coordinate vector is of size zero, so this should never be called.",
259  OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
260 
261  // Dummy return
262  return 0.0;
263  }
264 
265  /// Return weight of integration point i
266  double weight(const unsigned &i) const {return 1.0;}
267 
268 };
269 
270 //=========================================================
271 /// Class for multidimensional Gaussian integration rules
272 ///
273 /// Empty -- just establishes the template parameters.
274 ///
275 /// General logic: The template parameters correspond to those
276 /// of the QElement family so that the integration scheme
277 /// Gauss<DIM,NNODE_1D> provides the default ("full") integration
278 /// scheme for QElement<DIM,NNODE_1D>. "Full" integration
279 /// means that for linear PDEs that are discretised on a uniform
280 /// mesh, all integrals arising in the Galerkin weak form of the PDE
281 /// are evaluated exactly. In such problems the highest-order
282 /// polynomials arise from the products of the undifferentiated
283 /// shape and test functions so a 4 node quad needs
284 /// an integration scheme that can integrate fourth-order
285 /// polynomials exactly etc.
286 //=========================================================
287 template <unsigned DIM, unsigned NPTS_1D>
288 class Gauss
289 {
290 };
291 
292 
293 
294 //=========================================================
295 /// 1D Gaussian integration class.
296 /// Two integration points. This integration scheme can
297 /// integrate up to third-order polynomials exactly and
298 /// is therefore a suitable "full" integration scheme
299 /// for linear (two-node) elements in which the
300 /// highest-order polynomial is quadratic.
301 //=========================================================
302 template<>
303 class Gauss<1,2> : public Integral
304 {
305  private:
306 
307  /// Number of integration points in the scheme
308  static const unsigned Npts=2;
309  /// Array to hold weights and knot points (defined in cc file)
310  static const double Knot[2][1], Weight[2];
311 
312 public:
313 
314 
315  /// Default constructor (empty)
316  Gauss(){};
317 
318  /// Broken copy constructor
319  Gauss(const Gauss& dummy)
320  {
321  BrokenCopy::broken_copy("Gauss");
322  }
323 
324  /// Broken assignment operator
325  void operator=(const Gauss&)
326  {
327  BrokenCopy::broken_assign("Gauss");
328  }
329 
330  /// Number of integration points of the scheme
331  unsigned nweight() const {return Npts;}
332 
333  /// Return coordinate s[j] (j=0) of integration point i
334  double knot(const unsigned &i, const unsigned &j) const
335  {return Knot[i][j];}
336 
337  /// Return weight of integration point i
338  double weight(const unsigned &i) const {return Weight[i];}
339 
340 };
341 
342 //=========================================================
343 /// 1D Gaussian integration class.
344 /// Three integration points. This integration scheme can
345 /// integrate up to fifth-order polynomials exactly and
346 /// is therefore a suitable "full" integration scheme
347 /// for quadratic (three-node) elements in which the
348 /// highest-order polynomial is fourth order.
349 //=========================================================
350 template<>
351 class Gauss<1,3> : public Integral
352 {
353  private:
354 
355  /// Number of integration points in the scheme
356  static const unsigned Npts=3;
357  /// Array to hold weights and knot points (defined in cc file)
358  static const double Knot[3][1], Weight[3];
359 
360  public:
361 
362 
363  /// Default constructor (empty)
364  Gauss(){};
365 
366  /// Broken copy constructor
367  Gauss(const Gauss& dummy)
368  {
369  BrokenCopy::broken_copy("Gauss");
370  }
371 
372  /// Broken assignment operator
373  void operator=(const Gauss&)
374  {
375  BrokenCopy::broken_assign("Gauss");
376  }
377 
378  /// Number of integration points of the scheme
379  unsigned nweight() const {return Npts;}
380 
381  /// Return coordinate s[j] (j=0) of integration point i
382  double knot(const unsigned &i, const unsigned &j) const
383  {return Knot[i][j];}
384 
385  /// Return weight of integration point i
386  double weight(const unsigned &i) const {return Weight[i];}
387 
388 };
389 
390 //=========================================================
391 /// 1D Gaussian integration class
392 /// Four integration points. This integration scheme can
393 /// integrate up to seventh-order polynomials exactly and
394 /// is therefore a suitable "full" integration scheme
395 /// for cubic (four-node) elements in which the
396 /// highest-order polynomial is sixth order.
397 //=========================================================
398 template<>
399 class Gauss<1,4> : public Integral
400 {
401 
402 private:
403 
404  /// Number of integration points in the scheme
405  static const unsigned Npts=4;
406  /// Array to hold weight and knot points (defined in cc file)
407  static const double Knot[4][1], Weight[4];
408 
409 public:
410 
411  /// Default constructor (empty)
412  Gauss(){};
413 
414  /// Broken copy constructor
415  Gauss(const Gauss& dummy)
416  {
417  BrokenCopy::broken_copy("Gauss");
418  }
419 
420  /// Broken assignment operator
421  void operator=(const Gauss&)
422  {
423  BrokenCopy::broken_assign("Gauss");
424  }
425 
426  /// Number of integration points of the scheme
427  unsigned nweight() const {return Npts;}
428 
429  /// Return coordinate x[j] (j=0) of integration point i
430  double knot(const unsigned &i, const unsigned &j) const
431  {return Knot[i][j];}
432 
433  /// Return weight of integration point i
434  double weight(const unsigned &i) const {return Weight[i];}
435 
436 };
437 
438 //=========================================================
439 /// 2D Gaussian integration class.
440 /// 2x2 integration points. This integration scheme can
441 /// integrate up to third-order polynomials exactly and
442 /// is therefore a suitable "full" integration scheme
443 /// for linear (four-node) elements in which the
444 /// highest-order polynomial is quadratic.
445 //=========================================================
446 template<>
447 class Gauss<2,2> : public Integral
448 {
449 
450 private:
451 
452  /// Number of integration points in the scheme
453  static const unsigned Npts=4;
454  /// Array to hold the weight and know points (defined in cc file)
455  static const double Knot[4][2], Weight[4];
456 
457 public:
458 
459 
460  /// Default constructor (empty)
461  Gauss(){};
462 
463  /// Broken copy constructor
464  Gauss(const Gauss& dummy)
465  {
466  BrokenCopy::broken_copy("Gauss");
467  }
468 
469  /// Broken assignment operator
470  void operator=(const Gauss&)
471  {
472  BrokenCopy::broken_assign("Gauss");
473  }
474 
475  /// Number of integration points of the scheme
476  unsigned nweight() const {return Npts;}
477 
478  /// Return coordinate x[j] of integration point i
479  double knot(const unsigned &i, const unsigned &j) const
480  {return Knot[i][j];}
481 
482  /// Return weight of integration point i
483  double weight(const unsigned &i) const {return Weight[i];}
484 };
485 
486 //=========================================================
487 /// 2D Gaussian integration class.
488 /// 3x3 integration points. This integration scheme can
489 /// integrate up to fifth-order polynomials exactly and
490 /// is therefore a suitable "full" integration scheme
491 /// for quadratic (nine-node) elements in which the
492 /// highest-order polynomial is fourth order.
493 //=========================================================
494 template<>
495 class Gauss<2,3> : public Integral
496 {
497  private:
498 
499  /// Number of integration points in the scheme
500  static const unsigned Npts=9;
501  /// Array to hold the weights and knots (defined in cc file)
502  static const double Knot[9][2], Weight[9];
503 
504  public:
505 
506 
507  /// Default constructor (empty)
508  Gauss(){};
509 
510  /// Broken copy constructor
511  Gauss(const Gauss& dummy)
512  {
513  BrokenCopy::broken_copy("Gauss");
514  }
515 
516  /// Broken assignment operator
517  void operator=(const Gauss&)
518  {
519  BrokenCopy::broken_assign("Gauss");
520  }
521 
522  /// Number of integration points of the scheme
523  unsigned nweight() const {return Npts;}
524 
525  /// Return coordinate s[j] of integration point i
526  double knot(const unsigned &i, const unsigned &j) const
527  {return Knot[i][j];}
528 
529  /// Return weight of integration point i
530  double weight(const unsigned &i) const {return Weight[i];}
531 
532 };
533 
534 //=========================================================
535 /// 2D Gaussian integration class.
536 /// 4x4 integration points. This integration scheme can
537 /// integrate up to seventh-order polynomials exactly and
538 /// is therefore a suitable "full" integration scheme
539 /// for cubic (sixteen-node) elements in which the
540 /// highest-order polynomial is sixth order.
541 //=========================================================
542 template<>
543 class Gauss<2,4> : public Integral
544 {
545  private:
546 
547  /// Number of integration points in the scheme
548  static const unsigned Npts=16;
549  /// Array to hold the weights and knots (defined in cc file)
550  static const double Knot[16][2], Weight[16];
551 
552 
553  public:
554 
555 
556  /// Default constructor (empty)
557  Gauss(){};
558 
559  /// Broken copy constructor
560  Gauss(const Gauss& dummy)
561  {
562  BrokenCopy::broken_copy("Gauss");
563  }
564 
565  /// Broken assignment operator
566  void operator=(const Gauss&)
567  {
568  BrokenCopy::broken_assign("Gauss");
569  }
570 
571  /// Number of integration points of the scheme
572  unsigned nweight() const {return Npts;}
573 
574  /// Return coordinate s[j] of integration point i
575  double knot(const unsigned &i, const unsigned &j) const
576  {return Knot[i][j];}
577 
578  /// Return weight of integration point i
579  double weight(const unsigned &i) const {return Weight[i];}
580 
581 };
582 
583 //=========================================================
584 /// 3D Gaussian integration class
585 /// 2x2x2 integration points. This integration scheme can
586 /// integrate up to third-order polynomials exactly and
587 /// is therefore a suitable "full" integration scheme
588 /// for linear (eight-node) elements in which the
589 /// highest-order polynomial is quadratic.
590 //=========================================================
591 template<>
592 class Gauss<3,2> : public Integral
593 {
594  private:
595 
596  /// Number of integration points in the scheme
597  static const unsigned Npts=8;
598  /// Array to hold the weights and knots (defined in cc file)
599  static const double Knot[8][3], Weight[8];
600 
601  public:
602 
603 
604  /// Default constructor (empty)
605  Gauss(){};
606 
607  /// Broken copy constructor
608  Gauss(const Gauss& dummy)
609  {
610  BrokenCopy::broken_copy("Gauss");
611  }
612 
613  /// Broken assignment operator
614  void operator=(const Gauss&)
615  {
616  BrokenCopy::broken_assign("Gauss");
617  }
618 
619  /// Number of integration points of the scheme
620  unsigned nweight() const {return Npts;}
621 
622  /// Return coordinate s[j] of integration point i
623  double knot(const unsigned &i, const unsigned &j) const
624  {return Knot[i][j];}
625 
626  /// Return weight of integration point i
627  double weight(const unsigned &i) const {return Weight[i];}
628 
629 };
630 
631 //=========================================================
632 /// 3D Gaussian integration class
633 /// 3x3x3 integration points. This integration scheme can
634 /// integrate up to fifth-order polynomials exactly and
635 /// is therefore a suitable "full" integration scheme
636 /// for quadratic (27-node) elements in which the
637 /// highest-order polynomial is fourth order.
638 //=========================================================
639 template<>
640 class Gauss<3,3> : public Integral
641 {
642  private:
643 
644  /// Number of integration points in the scheme
645  static const unsigned Npts=27;
646  /// Array to hold the weights and knots (defined in cc file)
647  static const double Knot[27][3], Weight[27];
648 
649  public:
650 
651 
652  /// Default constructor (empty)
653  Gauss(){};
654 
655  /// Broken copy constructor
656  Gauss(const Gauss& dummy)
657  {
658  BrokenCopy::broken_copy("Gauss");
659  }
660 
661  /// Broken assignment operator
662  void operator=(const Gauss&)
663  {
664  BrokenCopy::broken_assign("Gauss");
665  }
666 
667  /// Number of integration points of the scheme
668  unsigned nweight() const {return Npts;}
669 
670  /// Return coordinate x[j] of integration point i
671  double knot(const unsigned &i, const unsigned &j) const
672  {return Knot[i][j];}
673 
674  /// Return weight of integration point i
675  double weight(const unsigned &i) const {return Weight[i];}
676 
677 };
678 
679 //=========================================================
680 /// 3D Gaussian integration class.
681 /// 4x4x4 integration points. This integration scheme can
682 /// integrate up to seventh-order polynomials exactly and
683 /// is therefore a suitable "full" integration scheme
684 /// for cubic (64-node) elements in which the
685 /// highest-order polynomial is sixth order.
686 //=========================================================
687 template<>
688 class Gauss<3,4> : public Integral
689 {
690  private:
691 
692  /// Number of integration points in the scheme
693  static const unsigned Npts=64;
694  /// Array to hold the weights and knots (defined in cc file)
695  static const double Knot[64][3], Weight[64];
696 
697  public:
698 
699  /// Default constructor (empty)
700  Gauss(){};
701 
702  /// Broken copy constructor
703  Gauss(const Gauss& dummy)
704  {
705  BrokenCopy::broken_copy("Gauss");
706  }
707 
708  /// Broken assignment operator
709  void operator=(const Gauss&)
710  {
711  BrokenCopy::broken_assign("Gauss");
712  }
713 
714  /// Number of integration points of the scheme
715  unsigned nweight() const {return Npts;}
716 
717  /// Return coordinate x[j] of integration point i
718  double knot(const unsigned &i, const unsigned &j) const
719  {return Knot[i][j];}
720 
721  /// Return weight of integration point i
722  double weight(const unsigned &i) const {return Weight[i];}
723 
724 };
725 
726 //=========================================================
727 ///\short Class for multidimensional Gaussian integration rules,
728 /// over intervals other than -1 to 1, all intervals are
729 /// rescaled in this case
730 //=========================================================
731 template <unsigned DIM, unsigned NPTS_1D>
732 class Gauss_Rescaled : public Gauss<DIM,NPTS_1D>
733 {
734  private:
735 
736  /// Store for the lower and upper limits of integration and the range
737  double Lower, Upper, Range;
738 
739  public:
740 
741  /// Default constructor (empty)
743 
744  /// Broken copy constructor
746  {
747  BrokenCopy::broken_copy("Gauss_Rescaled");
748  }
749 
750  /// Broken assignment operator
751  void operator=(const Gauss_Rescaled&)
752  {
753  BrokenCopy::broken_assign("Gauss_Rescaled");
754  }
755 
756  /// The constructor in this case takes the lower and upper arguments
757  Gauss_Rescaled(double lower, double upper) : Lower(lower), Upper(upper)
758  {
759  //Set the range of integration
760  Range = upper - lower;
761  }
762 
763  /// Return the rescaled knot values s[j] at integration point i
764  double knot(const unsigned &i, const unsigned &j) const
765  {return (0.5*(Gauss<DIM,NPTS_1D>::knot(i,j)*Range + Lower + Upper));}
766 
767  /// Return the rescaled weight at integration point i
768  double weight(const unsigned &i) const
769  {return Gauss<DIM,NPTS_1D>::weight(i)*pow(0.5*Range,static_cast<int>(DIM));}
770 
771 };
772 
773 //=========================================================
774 /// Class for Gaussian integration rules for triangles/tets.
775 ///
776 /// Empty -- just establishes the template parameters
777 ///
778 /// General logic: The template parameters correspond to those
779 /// of the TElement family so that the integration scheme
780 /// TGauss<DIM,NNODE_1D> provides the default ("full") integration
781 /// scheme for TElement<DIM,NNODE_1D>. "Full" integration
782 /// means that for linear PDEs that are discretised on a uniform
783 /// mesh, all integrals arising in the Galerkin weak form of the PDE
784 /// are evaluated exactly. In such problems the highest-order
785 /// polynomials arise from the products of the undifferentiated
786 /// shape and test functions so a three node triangle needs
787 /// an integration scheme that can integrate quadratic
788 /// polynomials exactly etc.
789 //=========================================================
790 template<unsigned DIM, unsigned NPTS_1D>
791 class TGauss
792 {
793 };
794 
795 
796 //=========================================================
797 /// 1D Gaussian integration class for linear "triangular" elements.
798 /// Two integration points. This integration scheme can
799 /// integrate up to second-order polynomials exactly and
800 /// is therefore a suitable "full" integration scheme
801 /// for linear (two-node) elements in which the
802 /// highest-order polynomial is quadratic.
803 //=========================================================
804 template<>
805 class TGauss<1,2> : public Integral
806 {
807  private:
808 
809  /// Number of integration points in the scheme
810  static const unsigned Npts=2;
811 
812  /// Array to hold the weights and knots (defined in cc file)
813  static const double Knot[2][1], Weight[2];
814 
815  public:
816 
817 
818  /// Default constructor (empty)
819  TGauss(){};
820 
821  /// Broken copy constructor
822  TGauss(const TGauss& dummy)
823  {
824  BrokenCopy::broken_copy("TGauss");
825  }
826 
827  /// Broken assignment operator
828  void operator=(const TGauss&)
829  {
830  BrokenCopy::broken_assign("TGauss");
831  }
832 
833  /// Number of integration points of the scheme
834  unsigned nweight() const {return Npts;}
835 
836  /// Return coordinate x[j] of integration point i
837  double knot(const unsigned &i, const unsigned &j) const
838  {return Knot[i][j];}
839 
840  /// Return weight of integration point i
841  double weight(const unsigned &i) const {return Weight[i];}
842 
843 };
844 
845 //=========================================================
846 /// 1D Gaussian integration class for quadratic "triangular" elements.
847 /// Three integration points. This integration scheme can
848 /// integrate up to fifth-order polynomials exactly and
849 /// is therefore a suitable "full" integration scheme
850 /// for quadratic (three-node) elements in which the
851 /// highest-order polynomial is fourth order.
852 //=========================================================
853 template<>
854 class TGauss<1,3> : public Integral
855 {
856  private:
857 
858  /// Number of integration points in the scheme
859  static const unsigned Npts=3;
860  /// Array to hold the weights and knots (defined in cc file)
861  static const double Knot[3][1], Weight[3];
862 
863  public:
864 
865  /// Default constructor (empty)
866  TGauss(){};
867 
868  /// Broken copy constructor
869  TGauss(const TGauss& dummy)
870  {
871  BrokenCopy::broken_copy("TGauss");
872  }
873 
874  /// Broken assignment operator
875  void operator=(const TGauss&)
876  {
877  BrokenCopy::broken_assign("TGauss");
878  }
879 
880  /// Number of integration points of the scheme
881  unsigned nweight() const {return Npts;}
882 
883  /// Return coordinate x[j] of integration point i
884  double knot(const unsigned &i, const unsigned &j) const
885  {return Knot[i][j];}
886 
887  /// Return weight of integration point i
888  double weight(const unsigned &i) const {return Weight[i];}
889 
890 };
891 
892 
893 //=========================================================
894 /// 1D Gaussian integration class for cubic "triangular" elements.
895 /// Four integration points. This integration scheme can
896 /// integrate up to seventh-order polynomials exactly and
897 /// is therefore a suitable "full" integration scheme
898 /// for cubic (ten-node) elements in which the
899 /// highest-order polynomial is sixth order.
900 //=========================================================
901 template<>
902 class TGauss<1,4> : public Integral
903 {
904  private:
905 
906  /// Number of integration points in the scheme
907  static const unsigned Npts=4;
908  /// Array to hold the weights and knots (defined in cc file)
909  static const double Knot[4][1], Weight[4];
910 
911  public:
912 
913  /// Default constructor (empty)
914  TGauss(){};
915 
916  /// Broken copy constructor
917  TGauss(const TGauss& dummy)
918  {
919  BrokenCopy::broken_copy("TGauss");
920  }
921 
922  /// Broken assignment operator
923  void operator=(const TGauss&)
924  {
925  BrokenCopy::broken_assign("TGauss");
926  }
927 
928  /// Number of integration points of the scheme
929  unsigned nweight() const {return Npts;}
930 
931  /// Return coordinate x[j] of integration point i
932  double knot(const unsigned &i, const unsigned &j) const
933  {return Knot[i][j];}
934 
935  /// Return weight of integration point i
936  double weight(const unsigned &i) const {return Weight[i];}
937 
938 };
939 
940 //=========================================================
941 template<>
942 class TGauss<1,5> : public Integral
943 {
944  private:
945 
946  /// Number of integration points in the scheme
947  static const unsigned Npts=5;
948  /// Array to hold the weights and knots (defined in cc file)
949  static const double Knot[5][1], Weight[5];
950 
951  public:
952 
953  /// Default constructor (empty)
954  TGauss(){};
955 
956  /// Broken copy constructor
957  TGauss(const TGauss& dummy)
958  {
959  BrokenCopy::broken_copy("TGauss");
960  }
961 
962  /// Broken assignment operator
963  void operator=(const TGauss&)
964  {
965  BrokenCopy::broken_assign("TGauss");
966  }
967 
968  /// Number of integration points of the scheme
969  unsigned nweight() const {return Npts;}
970 
971  /// Return coordinate x[j] of integration point i
972  double knot(const unsigned &i, const unsigned &j) const
973  {return Knot[i][j];}
974 
975  /// Return weight of integration point i
976  double weight(const unsigned &i) const {return Weight[i];}
977 
978 };
979 
980 
981 //=========================================================
982 /// 2D Gaussian integration class for linear triangles.
983 /// Three integration points. This integration scheme can
984 /// integrate up to second-order polynomials exactly and
985 /// is therefore a suitable "full" integration scheme
986 /// for linear (three-node) elements in which the
987 /// highest-order polynomial is quadratic.
988 //=========================================================
989 template<>
990 class TGauss<2,2> : public Integral
991 {
992  private:
993 
994  /// Number of integration points in the scheme
995  static const unsigned Npts=3;
996 
997  /// Array to hold the weights and knots (defined in cc file)
998  static const double Knot[3][2], Weight[3];
999 
1000  public:
1001 
1002 
1003  /// Default constructor (empty)
1004  TGauss(){};
1005 
1006  /// Broken copy constructor
1007  TGauss(const TGauss& dummy)
1008  {
1009  BrokenCopy::broken_copy("TGauss");
1010  }
1011 
1012  /// Broken assignment operator
1013  void operator=(const TGauss&)
1014  {
1015  BrokenCopy::broken_assign("TGauss");
1016  }
1017 
1018  /// Number of integration points of the scheme
1019  unsigned nweight() const {return Npts;}
1020 
1021  /// Return coordinate x[j] of integration point i
1022  double knot(const unsigned &i, const unsigned &j) const
1023  {return Knot[i][j];}
1024 
1025  /// Return weight of integration point i
1026  double weight(const unsigned &i) const {return Weight[i];}
1027 
1028 };
1029 
1030 //=========================================================
1031 /// 2D Gaussian integration class for quadratic triangles.
1032 /// Seven integration points. This integration scheme can
1033 /// integrate up to fifth-order polynomials exactly and
1034 /// is therefore a suitable "full" integration scheme
1035 /// for quadratic (six-node) elements in which the
1036 /// highest-order polynomial is fourth order.
1037 //=========================================================
1038 template<>
1039 class TGauss<2,3> : public Integral
1040 {
1041  private:
1042 
1043  /// Number of integration points in the scheme
1044  static const unsigned Npts=7;
1045  /// Array to hold the weights and knots (defined in cc file)
1046  static const double Knot[7][2], Weight[7];
1047 
1048  public:
1049 
1050  /// Default constructor (empty)
1051  TGauss(){};
1052 
1053  /// Broken copy constructor
1054  TGauss(const TGauss& dummy)
1055  {
1056  BrokenCopy::broken_copy("TGauss");
1057  }
1058 
1059  /// Broken assignment operator
1060  void operator=(const TGauss&)
1061  {
1062  BrokenCopy::broken_assign("TGauss");
1063  }
1064 
1065  /// Number of integration points of the scheme
1066  unsigned nweight() const {return Npts;}
1067 
1068  /// Return coordinate x[j] of integration point i
1069  double knot(const unsigned &i, const unsigned &j) const
1070  {return Knot[i][j];}
1071 
1072  /// Return weight of integration point i
1073  double weight(const unsigned &i) const {return Weight[i];}
1074 
1075 };
1076 
1077 
1078 //=========================================================
1079 /// 2D Gaussian integration class for cubic triangles.
1080 /// Thirteen integration points. This integration scheme can
1081 /// integrate up to seventh-order polynomials exactly and
1082 /// is therefore a suitable "full" integration scheme
1083 /// for cubic (ten-node) elements in which the
1084 /// highest-order polynomial is sixth order.
1085 //=========================================================
1086 template<>
1087 class TGauss<2,4> : public Integral
1088 {
1089  private:
1090 
1091  /// Number of integration points in the scheme
1092  static const unsigned Npts=13;
1093  /// Array to hold the weights and knots (defined in cc file)
1094  static const double Knot[13][2], Weight[13];
1095 
1096  public:
1097 
1098  /// Default constructor (empty)
1099  TGauss(){};
1100 
1101  /// Broken copy constructor
1102  TGauss(const TGauss& dummy)
1103  {
1104  BrokenCopy::broken_copy("TGauss");
1105  }
1106 
1107  /// Broken assignment operator
1108  void operator=(const TGauss&)
1109  {
1110  BrokenCopy::broken_assign("TGauss");
1111  }
1112 
1113  /// Number of integration points of the scheme
1114  unsigned nweight() const {return Npts;}
1115 
1116  /// Return coordinate x[j] of integration point i
1117  double knot(const unsigned &i, const unsigned &j) const
1118  {return Knot[i][j];}
1119 
1120  /// Return weight of integration point i
1121  double weight(const unsigned &i) const {return Weight[i];}
1122 
1123 };
1124 
1125 //------------------------------------------------------------
1126 //"Full integration" weights for 2D triangles
1127 // accurate up to order 11
1128 // http://people.sc.fsu.edu/~jburkardt/datasets/quadrature_rules_tri/
1129 // quadrature_rules_tri.html
1130 //------------------------------------------------------------
1131  template<>
1132  class TGauss<2,13> : public Integral
1133  {
1134  private:
1135 
1136  /// Number of integration points in the scheme
1137  static const unsigned Npts=37;
1138  /// Array to hold the weights and knots (defined in cc file)
1139  static const double Knot[37][2], Weight[37];
1140 
1141  public:
1142 
1143  /// Default constructor (empty)
1144  TGauss(){};
1145 
1146  /// Broken copy constructor
1147  TGauss(const TGauss& dummy)
1148  {
1149  BrokenCopy::broken_copy("TGauss");
1150  }
1151 
1152  /// Broken assignment operator
1153  void operator=(const TGauss&)
1154  {
1155  BrokenCopy::broken_assign("TGauss");
1156  }
1157 
1158  /// Number of integration points of the scheme
1159  unsigned nweight() const {return Npts;}
1160 
1161  /// Return coordinate x[j] of integration point i
1162  double knot(const unsigned &i, const unsigned &j) const
1163  {return Knot[i][j];}
1164 
1165  /// Return weight of integration point i
1166  double weight(const unsigned &i) const {return Weight[i];}
1167  };
1168 
1169 //------------------------------------------------------------
1170 //"Full integration" weights for 2D triangles
1171 // accurate up to points 19, degree of precision 8, a rule from ACM TOMS
1172 // algorithm #584.
1173 // http://people.sc.fsu.edu/~jburkardt/datasets/quadrature_rules_tri/quadrature_rules_tri.html
1174 // TOMS589_19 a 19 point Gauss rule accurate to order 8
1175 //------------------------------------------------------------
1176 template<>
1177 class TGauss<2,9> : public Integral
1178 {
1179  private:
1180 
1181  /// Number of integration points in the scheme
1182  static const unsigned Npts=19;
1183  /// Array to hold the weights and knots (defined in cc file)
1184  static const double Knot[19][2], Weight[19];
1185 
1186  public:
1187 
1188  /// Default constructor (empty)
1189  TGauss(){};
1190 
1191  /// Broken copy constructor
1192  TGauss(const TGauss& dummy)
1193  {
1194  BrokenCopy::broken_copy("TGauss");
1195  }
1196 
1197  /// Broken assignment operator
1198  void operator=(const TGauss&)
1199  {
1200  BrokenCopy::broken_assign("TGauss");
1201  }
1202 
1203  /// Number of integration points of the scheme
1204  unsigned nweight() const {return Npts;}
1205 
1206  /// Return coordinate x[j] of integration point i
1207  double knot(const unsigned &i, const unsigned &j) const
1208  {return Knot[i][j];}
1209 
1210  /// Return weight of integration point i
1211  double weight(const unsigned &i) const {return Weight[i];}
1212 
1213 };
1214 
1215 //------------------------------------------------------------
1216 //"Full integration" weights for 2D triangles
1217 // accurate up to order 16
1218 // http://people.sc.fsu.edu/~jburkardt/datasets/quadrature_rules_tri/
1219 // quadrature_rules_tri.html
1220 // This uses the order 16 Dunavant rule, computed using software available from
1221 // https://people.sc.fsu.edu/~jburkardt/cpp_src/triangle_dunavant_rule/triangle_dunavant_rule.html
1222 // This integegration scheme is accurate up to order 16 and uses 52 points
1223 //------------------------------------------------------------
1224  template<>
1225  class TGauss<2,16> : public Integral
1226  {
1227  private:
1228 
1229  /// Number of integration points in the scheme
1230  static const unsigned Npts=52;
1231  /// Array to hold the weights and knots (defined in cc file)
1232  static const double Knot[52][2], Weight[52];
1233 
1234  public:
1235 
1236  /// Default constructor (empty)
1237  TGauss(){};
1238 
1239  /// Broken copy constructor
1240  TGauss(const TGauss& dummy)
1241  {
1242  BrokenCopy::broken_copy("TGauss");
1243  }
1244 
1245  /// Broken assignment operator
1246  void operator=(const TGauss&)
1247  {
1248  BrokenCopy::broken_assign("TGauss");
1249  }
1250 
1251  /// Number of integration points of the scheme
1252  unsigned nweight() const {return Npts;}
1253 
1254  /// Return coordinate x[j] of integration point i
1255  double knot(const unsigned &i, const unsigned &j) const
1256  {return Knot[i][j];}
1257 
1258  /// Return weight of integration point i
1259  double weight(const unsigned &i) const {return Weight[i];}
1260  };
1261 
1262 //------------------------------------------------------------
1263 //"Full integration" weights for 2D triangles
1264 // accurate up to order 15
1265 // http://people.sc.fsu.edu/~jburkardt/datasets/quadrature_rules_tri/quadrature_rules_tri.html
1266 //------------------------------------------------------------
1267 
1268 template<>
1269 class TGauss<2,5> : public Integral
1270 {
1271  private:
1272 
1273  /// Number of integration points in the scheme
1274  static const unsigned Npts=64;
1275  /// Array to hold the weights and knots (defined in cc file)
1276  static const double Knot[64][2], Weight[64];
1277 
1278  public:
1279 
1280  /// Default constructor (empty)
1281  TGauss(){};
1282 
1283  /// Broken copy constructor
1284  TGauss(const TGauss& dummy)
1285  {
1286  BrokenCopy::broken_copy("TGauss");
1287  }
1288 
1289  /// Broken assignment operator
1290  void operator=(const TGauss&)
1291  {
1292  BrokenCopy::broken_assign("TGauss");
1293  }
1294 
1295  /// Number of integration points of the scheme
1296  unsigned nweight() const {return Npts;}
1297 
1298  /// Return coordinate x[j] of integration point i
1299  double knot(const unsigned &i, const unsigned &j) const
1300  {return Knot[i][j];}
1301 
1302  /// Return weight of integration point i
1303  double weight(const unsigned &i) const {return Weight[i];}
1304 
1305 };
1306 
1307 //=========================================================
1308 /// 3D Gaussian integration class for tets.
1309 /// Four integration points. This integration scheme can
1310 /// integrate up to second-order polynomials exactly and
1311 /// is therefore a suitable "full" integration scheme
1312 /// for linear (four-node) elements in which the
1313 /// highest-order polynomial is quadratic.
1314 //=========================================================
1315 template<>
1316 class TGauss<3,2> : public Integral
1317 {
1318  private:
1319 
1320  /// Number of integration points in the scheme
1321  static const unsigned Npts=4;
1322  /// Array to hold the weights and knots (defined in cc file)
1323  static const double Knot[4][3], Weight[4];
1324 
1325  public:
1326 
1327 
1328  /// Default constructor (empty)
1329  TGauss(){};
1330 
1331  /// Broken copy constructor
1332  TGauss(const TGauss& dummy)
1333  {
1334  BrokenCopy::broken_copy("TGauss");
1335  }
1336 
1337  /// Broken assignment operator
1338  void operator=(const TGauss&)
1339  {
1340  BrokenCopy::broken_assign("TGauss");
1341  }
1342 
1343  /// Number of integration points of the scheme
1344  unsigned nweight() const {return Npts;}
1345 
1346  /// Return coordinate x[j] of integration point i
1347  double knot(const unsigned &i, const unsigned &j) const
1348  {return Knot[i][j];}
1349 
1350  /// Return weight of integration point i
1351  double weight(const unsigned &i) const {return Weight[i];}
1352 
1353 };
1354 
1355 
1356 
1357 //=========================================================
1358 /// 3D Gaussian integration class for tets.
1359 /// Eleven integration points. This integration scheme can
1360 /// integrate up to fourth-order polynomials exactly and
1361 /// is therefore a suitable "full" integration scheme
1362 /// for quadratic (ten-node) elements in which the
1363 /// highest-order polynomial is fourth order.
1364 /// The numbers are from Keast CMAME 55 pp339-348 (1986)
1365 //=========================================================
1366 template<>
1367 class TGauss<3,3> : public Integral
1368 {
1369  private:
1370 
1371  /// Number of integration points in the scheme
1372  static const unsigned Npts=11;
1373  /// Array to hold the weights and knots (defined in cc file)
1374  static const double Knot[11][3], Weight[11];
1375 
1376  public:
1377 
1378 
1379  /// Default constructor (empty)
1380  TGauss(){};
1381 
1382  /// Broken copy constructor
1383  TGauss(const TGauss& dummy)
1384  {
1385  BrokenCopy::broken_copy("TGauss");
1386  }
1387 
1388  /// Broken assignment operator
1389  void operator=(const TGauss&)
1390  {
1391  BrokenCopy::broken_assign("TGauss");
1392  }
1393 
1394  /// Number of integration points of the scheme
1395  unsigned nweight() const {return Npts;}
1396 
1397  /// Return coordinate x[j] of integration point i
1398  double knot(const unsigned &i, const unsigned &j) const
1399  {return Knot[i][j];}
1400 
1401  /// Return weight of integration point i
1402  double weight(const unsigned &i) const {return Weight[i];}
1403 
1404 };
1405 
1406 
1407 //=========================================================
1408 /// 3D Gaussian integration class for tets.
1409 /// 45 integration points. This integration scheme can
1410 /// integrate up to eighth-order polynomials exactly and
1411 /// is therefore a suitable "full" integration scheme
1412 /// for quartic elements in which the
1413 /// highest-order polynomial is fourth order.
1414 /// The numbers are from Keast CMAME 55 pp339-348 (1986)
1415 //=========================================================
1416 template<>
1417 class TGauss<3,5> : public Integral
1418 {
1419  private:
1420 
1421  /// Number of integration points in the scheme
1422  static const unsigned Npts=45;
1423  /// Array to hold the weights and knots (defined in cc file)
1424  static const double Knot[45][3], Weight[45];
1425 
1426  public:
1427 
1428 
1429  /// Default constructor (empty)
1430  TGauss(){};
1431 
1432  /// Broken copy constructor
1433  TGauss(const TGauss& dummy)
1434  {
1435  BrokenCopy::broken_copy("TGauss");
1436  }
1437 
1438  /// Broken assignment operator
1439  void operator=(const TGauss&)
1440  {
1441  BrokenCopy::broken_assign("TGauss");
1442  }
1443 
1444  /// Number of integration points of the scheme
1445  unsigned nweight() const {return Npts;}
1446 
1447  /// Return coordinate x[j] of integration point i
1448  double knot(const unsigned &i, const unsigned &j) const
1449  {return Knot[i][j];}
1450 
1451  /// Return weight of integration point i
1452  double weight(const unsigned &i) const {return Weight[i];}
1453 
1454 };
1455 
1456 
1457 
1458 //===================================================================
1459 /// Class for multidimensional Gauss Lobatto Legendre integration
1460 /// rules
1461 /// empty - just establishes template parameters
1462 //===================================================================
1463 template <unsigned DIM, unsigned NPTS_1D>
1465 {
1466 };
1467 
1468 //===================================================================
1469 /// 1D Gauss Lobatto Legendre integration class
1470 //===================================================================
1471 template<unsigned NPTS_1D>
1472 class GaussLobattoLegendre<1,NPTS_1D> : public Integral
1473 {
1474 private:
1475 
1476  /// Number of integration points in scheme
1477  static const unsigned Npts=NPTS_1D;
1478  /// Array to hold weight and knot points
1479  //These are not constant, because they are calculated on the fly
1480  double Knot[NPTS_1D][1], Weight[NPTS_1D];
1481 
1482 public:
1483 
1484  /// Deafault constructor. Calculates and stores GLL nodes
1486 
1487  /// Number of integration points of the scheme
1488  unsigned nweight() const {return Npts;}
1489 
1490  /// Return coordinate s[j] (j=0) of integration point i
1491  double knot(const unsigned &i, const unsigned &j) const
1492  {return Knot[i][j];}
1493 
1494  /// Return weight of integration point i
1495  double weight(const unsigned &i) const {return Weight[i];}
1496 
1497 };
1498 
1499 
1500 //=============================================================
1501 /// Calculate positions and weights for the 1D Gauss Lobatto
1502 /// Legendre integration class
1503 //=============================================================
1504 template<unsigned NPTS_1D>
1506 {
1507  //Temporary storage for the integration points
1508  Vector<double> s(NPTS_1D),w(NPTS_1D);
1509  //call the function that calculates the points
1510  Orthpoly::gll_nodes(NPTS_1D,s,w);
1511  //Populate the arrays
1512  for(unsigned i=0;i<NPTS_1D;i++)
1513  {
1514  Knot[i][0]=s[i];
1515  Weight[i]=w[i];
1516  }
1517 }
1518 
1519 
1520 //===================================================================
1521 /// 2D Gauss Lobatto Legendre integration class
1522 //===================================================================
1523 template<unsigned NPTS_1D>
1524 class GaussLobattoLegendre<2,NPTS_1D> : public Integral
1525 {
1526 private:
1527 
1528  /// Number of integration points in scheme
1529  static const unsigned long int Npts=NPTS_1D*NPTS_1D;
1530 
1531  /// Array to hold weight and knot points
1532  double Knot[NPTS_1D*NPTS_1D][2],
1533  Weight[NPTS_1D*NPTS_1D]; // COULDN'T MAKE THESE
1534  // const BECAUSE THEY ARE CALCULATED (at least currently)
1535 
1536 public:
1537 
1538  /// Deafault constructor. Calculates and stores GLL nodes
1540 
1541  /// Number of integration points of the scheme
1542  unsigned nweight() const {return Npts;}
1543 
1544  /// Return coordinate s[j] (j=0) of integration point i
1545  double knot(const unsigned &i, const unsigned &j) const
1546  {return Knot[i][j];}
1547 
1548  /// Return weight of integration point i
1549  double weight(const unsigned &i) const {return Weight[i];}
1550 
1551 };
1552 
1553 //=============================================================
1554 /// Calculate positions and weights for the 2D Gauss Lobatto
1555 /// Legendre integration class
1556 //=============================================================
1557 
1558 template<unsigned NPTS_1D>
1560 {
1561  //Tempoarary storage for the 1D knots and weights
1562  Vector<double> s(NPTS_1D),w(NPTS_1D);
1563  //Call the function to populate the array
1564  Orthpoly::gll_nodes(NPTS_1D,s,w);
1565  int i_fast=0, i_slow=0;
1566  for(unsigned i=0;i<NPTS_1D*NPTS_1D;i++){
1567  if (i_fast == NPTS_1D){i_fast=0;i_slow++;}
1568  Knot[i][0]=s[i_fast];
1569  Knot[i][1]=s[i_slow];
1570  Weight[i]=w[i_fast]*w[i_slow];
1571  i_fast++;
1572  }
1573 }
1574 
1575 
1576 
1577 
1578 //===================================================================
1579 /// 3D Gauss Lobatto Legendre integration class
1580 //===================================================================
1581 template<unsigned NPTS_1D>
1582 class GaussLobattoLegendre<3,NPTS_1D> : public Integral
1583 {
1584 private:
1585 
1586  /// Number of integration points in scheme
1587  static const unsigned long int Npts=NPTS_1D*NPTS_1D*NPTS_1D;
1588 
1589  /// Array to hold weight and knot points
1590  double Knot[NPTS_1D*NPTS_1D*NPTS_1D][3],
1591  Weight[NPTS_1D*NPTS_1D*NPTS_1D]; // COULDN'T MAKE THESE
1592  // const BECAUSE THEY ARE CALCULATED (at least currently)
1593 
1594 public:
1595 
1596  /// Deafault constructor. Calculates and stores GLL nodes
1598 
1599  /// Number of integration points of the scheme
1600  unsigned nweight() const {return Npts;}
1601 
1602  /// Return coordinate s[j] (j=0) of integration point i
1603  double knot(const unsigned &i, const unsigned &j) const
1604  {return Knot[i][j];}
1605 
1606  /// Return weight of integration point i
1607  double weight(const unsigned &i) const {return Weight[i];}
1608 
1609 };
1610 
1611 //=============================================================
1612 /// Calculate positions and weights for the 3D Gauss Lobatto
1613 /// Legendre integration class
1614 //=============================================================
1615 
1616 template<unsigned NPTS_1D>
1618 {
1619  //Tempoarary storage for the 1D knots and weights
1620  Vector<double> s(NPTS_1D),w(NPTS_1D);
1621  //Call the function to populate the array
1622  Orthpoly::gll_nodes(NPTS_1D,s,w);
1623  for(unsigned k=0;k<NPTS_1D;k++)
1624  {
1625  for(unsigned j=0;j<NPTS_1D;j++)
1626  {
1627  for(unsigned i=0;i<NPTS_1D;i++)
1628  {
1629  unsigned index = NPTS_1D*NPTS_1D*k + NPTS_1D*j + i;
1630  Knot[index][0]=s[i];
1631  Knot[index][1]=s[j];
1632  Knot[index][2]=s[k];
1633  Weight[index]=w[i]*w[j]*w[k];
1634  }
1635  }
1636  }
1637 }
1638 
1639 ////////////////////////////////////////////////////////////////////
1640 ////////////////////////////////////////////////////////////////////
1641 ////////////////////////////////////////////////////////////////////
1642 
1643 
1644 
1645 //===================================================================
1646 /// Class for multidimensional Gauss Legendre integration
1647 /// rules
1648 /// empty - just establishes template parameters
1649 //===================================================================
1650 template <unsigned DIM, unsigned NPTS_1D>
1652 {
1653 };
1654 
1655 //===================================================================
1656 /// 1D Gauss Legendre integration class
1657 //===================================================================
1658 template<unsigned NPTS_1D>
1659 class GaussLegendre<1,NPTS_1D> : public Integral
1660 {
1661 private:
1662 
1663  /// Number of integration points in scheme
1664  static const unsigned Npts=NPTS_1D;
1665  /// Array to hold weight and knot points
1666  //These are not constant, because they are calculated on the fly
1667  double Knot[NPTS_1D][1], Weight[NPTS_1D];
1668 
1669 public:
1670 
1671  /// Deafault constructor. Calculates and stores GLL nodes
1672  GaussLegendre();
1673 
1674  /// Number of integration points of the scheme
1675  unsigned nweight() const {return Npts;}
1676 
1677  /// Return coordinate s[j] (j=0) of integration point i
1678  double knot(const unsigned &i, const unsigned &j) const
1679  {return Knot[i][j];}
1680 
1681  /// Return weight of integration point i
1682  double weight(const unsigned &i) const {return Weight[i];}
1683 
1684 };
1685 
1686 
1687 //=============================================================
1688 /// Calculate positions and weights for the 1D Gauss
1689 /// Legendre integration class
1690 //=============================================================
1691 template<unsigned NPTS_1D>
1693 {
1694  //Temporary storage for the integration points
1695  Vector<double> s(NPTS_1D),w(NPTS_1D);
1696  //call the function that calculates the points
1697  Orthpoly::gl_nodes(NPTS_1D,s,w);
1698  //Populate the arrays
1699  for(unsigned i=0;i<NPTS_1D;i++)
1700  {
1701  Knot[i][0]=s[i];
1702  Weight[i]=w[i];
1703  }
1704 }
1705 
1706 
1707 //===================================================================
1708 /// 2D Gauss Legendre integration class
1709 //===================================================================
1710 template<unsigned NPTS_1D>
1711 class GaussLegendre<2,NPTS_1D> : public Integral
1712 {
1713 private:
1714 
1715  /// Number of integration points in scheme
1716  static const unsigned long int Npts=NPTS_1D*NPTS_1D;
1717 
1718  /// Array to hold weight and knot points
1719  double Knot[NPTS_1D*NPTS_1D][2],
1720  Weight[NPTS_1D*NPTS_1D]; // COULDN'T MAKE THESE
1721  // const BECAUSE THEY ARE CALCULATED (at least currently)
1722 
1723 public:
1724 
1725  /// Deafault constructor. Calculates and stores GLL nodes
1726  GaussLegendre();
1727 
1728  /// Number of integration points of the scheme
1729  unsigned nweight() const {return Npts;}
1730 
1731  /// Return coordinate s[j] (j=0) of integration point i
1732  double knot(const unsigned &i, const unsigned &j) const
1733  {return Knot[i][j];}
1734 
1735  /// Return weight of integration point i
1736  double weight(const unsigned &i) const {return Weight[i];}
1737 
1738 };
1739 
1740 //=============================================================
1741 /// Calculate positions and weights for the 2D Gauss
1742 /// Legendre integration class
1743 //=============================================================
1744 
1745 template<unsigned NPTS_1D>
1747 {
1748  //Tempoarary storage for the 1D knots and weights
1749  Vector<double> s(NPTS_1D),w(NPTS_1D);
1750  //Call the function to populate the array
1751  Orthpoly::gl_nodes(NPTS_1D,s,w);
1752  int i_fast=0, i_slow=0;
1753  for(unsigned i=0;i<NPTS_1D*NPTS_1D;i++){
1754  if (i_fast == NPTS_1D){i_fast=0;i_slow++;}
1755  Knot[i][0]=s[i_fast];
1756  Knot[i][1]=s[i_slow];
1757  Weight[i]=w[i_fast]*w[i_slow];
1758  i_fast++;
1759  }
1760 }
1761 
1762 
1763 
1764 
1765 //===================================================================
1766 /// 3D Gauss Legendre integration class
1767 //===================================================================
1768 template<unsigned NPTS_1D>
1769 class GaussLegendre<3,NPTS_1D> : public Integral
1770 {
1771 private:
1772 
1773  /// Number of integration points in scheme
1774  static const unsigned long int Npts=NPTS_1D*NPTS_1D*NPTS_1D;
1775 
1776  /// Array to hold weight and knot points
1777  double Knot[NPTS_1D*NPTS_1D*NPTS_1D][3],
1778  Weight[NPTS_1D*NPTS_1D*NPTS_1D]; // COULDN'T MAKE THESE
1779  // const BECAUSE THEY ARE CALCULATED (at least currently)
1780 
1781 public:
1782 
1783  /// Deafault constructor. Calculates and stores GLL nodes
1784  GaussLegendre();
1785 
1786  /// Number of integration points of the scheme
1787  unsigned nweight() const {return Npts;}
1788 
1789  /// Return coordinate s[j] (j=0) of integration point i
1790  double knot(const unsigned &i, const unsigned &j) const
1791  {return Knot[i][j];}
1792 
1793  /// Return weight of integration point i
1794  double weight(const unsigned &i) const {return Weight[i];}
1795 
1796 };
1797 
1798 //=============================================================
1799 /// Calculate positions and weights for the 3D Gauss
1800 /// Legendre integration class
1801 //=============================================================
1802 
1803 template<unsigned NPTS_1D>
1805 {
1806  //Tempoarary storage for the 1D knots and weights
1807  Vector<double> s(NPTS_1D),w(NPTS_1D);
1808  //Call the function to populate the array
1809  Orthpoly::gl_nodes(NPTS_1D,s,w);
1810  for(unsigned k=0;k<NPTS_1D;k++)
1811  {
1812  for(unsigned j=0;j<NPTS_1D;j++)
1813  {
1814  for(unsigned i=0;i<NPTS_1D;i++)
1815  {
1816  unsigned index = NPTS_1D*NPTS_1D*k + NPTS_1D*j + i;
1817  Knot[index][0]=s[i];
1818  Knot[index][1]=s[j];
1819  Knot[index][2]=s[k];
1820  Weight[index]=w[i]*w[j]*w[k];
1821  }
1822  }
1823  }
1824 }
1825 
1826 
1827 //===================================================================
1828 /// Gauss Legendre integration class where the knots and weights are
1829 /// calculated at runtime rather than at compile time like the
1830 /// templated version of the class. This class should only be used if
1831 /// it is not possible to use the templated version
1832 //===================================================================
1834 {
1835 
1836 public:
1837 
1838  /// Deafault constructor. Calculates and stores GL nodes
1839  RuntimeCalculatedGaussLegendre(const unsigned& npts): Npts(npts)
1840  {
1841  Knot.resize(Npts);
1842  Weight.resize(Npts);
1843 
1844  // Call the function to populate the arrays
1845  Orthpoly::gl_nodes(npts,Knot,Weight);
1846  }
1847 
1848  /// Number of integration points of the scheme
1849  unsigned nweight() const {return Npts;}
1850 
1851  /// Return coordinate s[j] of integration point i
1852  double knot(const unsigned &i, const unsigned &j) const { return Knot[i]; }
1853 
1854  /// Return weight of integration point i
1855  double weight(const unsigned &i) const { return Weight[i]; }
1856 
1857 private:
1858 
1859  /// Number of integration points in scheme
1860  unsigned long int Npts;
1861 
1862  /// Array to hold weights
1864 
1865  /// Array to hold position of knot points in local coordinates
1867 
1868 };
1869 
1870 
1871 
1872 }
1873 
1874 #endif
Gauss(const Gauss &dummy)
Broken copy constructor.
Definition: integral.h:415
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:386
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:1240
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:718
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
void operator=(const Gauss &)
Broken assignment operator.
Definition: integral.h:325
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:1448
TGauss()
Default constructor (empty)
Definition: integral.h:1004
void operator=(const Gauss &)
Broken assignment operator.
Definition: integral.h:709
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] (j=0) of integration point i.
Definition: integral.h:382
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:1013
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1026
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:869
Gauss()
Default constructor (empty)
Definition: integral.h:653
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:1433
TGauss()
Default constructor (empty)
Definition: integral.h:819
TGauss()
Default constructor (empty)
Definition: integral.h:1329
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:572
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1729
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:969
PointIntegral()
Default constructor (empty)
Definition: integral.h:236
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:923
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1445
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1495
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1542
Gauss(const Gauss &dummy)
Broken copy constructor.
Definition: integral.h:656
void operator=(const Gauss &)
Broken assignment operator.
Definition: integral.h:662
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1259
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:427
Gauss()
Default constructor (empty)
Definition: integral.h:605
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:1102
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:331
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] of integration point i.
Definition: integral.h:1852
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:1147
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] of integration point i.
Definition: integral.h:623
double knot(const unsigned &i, const unsigned &j) const
Return the rescaled knot values s[j] at integration point i.
Definition: integral.h:764
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:530
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:434
TGauss()
Default constructor (empty)
Definition: integral.h:1099
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:722
cstr elem_len * i
Definition: cfortran.h:607
Gauss()
Default constructor (empty)
Definition: integral.h:316
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:479
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1166
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] (j=0) of integration point i.
Definition: integral.h:1732
Gauss()
Default constructor (empty)
Definition: integral.h:557
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:963
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] of integration point i.
Definition: integral.h:575
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:476
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:627
const unsigned Index_s
Index of local coord (s) which scheme will be reflected along.
Definition: integral.h:145
Vector< double > Weight
Array to hold position of knot points in local coordinates.
Definition: integral.h:1866
Gauss()
Default constructor (empty)
Definition: integral.h:508
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:579
Gauss()
Default constructor (empty)
Definition: integral.h:700
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1787
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:841
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:483
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1204
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1252
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:338
void operator=(const Integral &)
Broken assignment operator.
Definition: integral.h:73
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:1347
TensorProductIntegral(const Integral *integral0_pt, const Integral *integral1_pt)
Construct tensor product from two integrals.
Definition: integral.h:180
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:620
Gauss()
Default constructor (empty)
Definition: integral.h:364
const double S_min
Minimum value of local coord (s) over whole domain.
Definition: integral.h:151
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:1284
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] (j=0) of integration point i.
Definition: integral.h:1491
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:1153
TGauss()
Default constructor (empty)
Definition: integral.h:1189
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:881
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:936
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1452
unsigned long int Npts
Number of integration points in scheme.
Definition: integral.h:1860
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1303
void operator=(const Gauss &)
Broken assignment operator.
Definition: integral.h:421
TGauss()
Default constructor (empty)
Definition: integral.h:1051
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:668
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:1439
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:888
Gauss()
Default constructor (empty)
Definition: integral.h:412
RuntimeCalculatedGaussLegendre(const unsigned &npts)
Deafault constructor. Calculates and stores GL nodes.
Definition: integral.h:1839
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1682
Gauss(const Gauss &dummy)
Broken copy constructor.
Definition: integral.h:464
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] (j=0) of integration point i – deliberately broken!
Definition: integral.h:255
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:1290
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1114
const double S_reflect
Value of local coord (s) where scheme will be reflected.
Definition: integral.h:148
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1549
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1211
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:972
double weight(const unsigned &i) const
Return the rescaled weight at integration point i.
Definition: integral.h:768
void gll_nodes(const unsigned &Nnode, Vector< double > &x)
Calculates the Gauss Lobatto Legendre abscissas for degree p = NNode-1.
Definition: orthpoly.cc:38
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1849
TGauss()
Default constructor (empty)
Definition: integral.h:1380
const Integral * Integral1_pt
Pointer to integral in direction indexed by 1.
Definition: integral.h:217
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:1332
void operator=(const Gauss &)
Broken assignment operator.
Definition: integral.h:566
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1736
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:1207
void gl_nodes(const unsigned &Nnode, Vector< double > &x)
Definition: orthpoly.cc:96
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1296
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:834
Class for multidimensional Gaussian integration rules, over intervals other than -1 to 1...
Definition: integral.h:732
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1607
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:379
void operator=(const Gauss_Rescaled &)
Broken assignment operator.
Definition: integral.h:751
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:1054
static char t char * s
Definition: cfortran.h:572
void operator=(const Gauss &)
Broken assignment operator.
Definition: integral.h:614
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:185
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:822
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] (j=0) of integration point i.
Definition: integral.h:1790
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:1007
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:1299
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:671
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:884
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:932
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:1108
Gauss_Rescaled(double lower, double upper)
The constructor in this case takes the lower and upper arguments.
Definition: integral.h:757
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:1192
Integral(const Integral &dummy)
Broken copy constructor.
Definition: integral.h:67
Gauss(const Gauss &dummy)
Broken copy constructor.
Definition: integral.h:367
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:1198
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:1060
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:675
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1855
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:828
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] (j=0) of integration point i.
Definition: integral.h:430
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:837
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] (j=0) of integration point i.
Definition: integral.h:1678
Vector< double > Knot
Array to hold weights.
Definition: integral.h:1863
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1794
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] of integration point i.
Definition: integral.h:526
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:1383
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1351
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1675
const Integral * Integral_pt
Pointer to integral which we will reflect.
Definition: integral.h:142
const Integral * Integral0_pt
Pointer to integral in direction indexed by 0.
Definition: integral.h:214
PointIntegral(const PointIntegral &dummy)
Broken copy constructor.
Definition: integral.h:239
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1344
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:1069
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1159
TGauss()
Default constructor (empty)
Definition: integral.h:1237
Gauss(const Gauss &dummy)
Broken copy constructor.
Definition: integral.h:703
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1402
Gauss(const Gauss &dummy)
Broken copy constructor.
Definition: integral.h:608
virtual ~Integral()
Virtual destructor (empty)
Definition: integral.h:79
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:1117
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] (j=0) of integration point i.
Definition: integral.h:334
const double S_reflect_fraction
Position where scheme will be reflected as of fraction of domain [0,1].
Definition: integral.h:157
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1066
Integral()
Default constructor (empty)
Definition: integral.h:64
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:917
Gauss_Rescaled()
Default constructor (empty)
Definition: integral.h:742
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1121
void operator=(const Gauss &)
Broken assignment operator.
Definition: integral.h:373
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:251
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1019
const double S_max
Maximum value of local coord (s) over whole domain.
Definition: integral.h:154
void operator=(const PointIntegral &)
Broken assignment operator.
Definition: integral.h:245
Gauss_Rescaled(const Gauss_Rescaled &dummy)
Broken copy constructor.
Definition: integral.h:745
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] (j=0) of integration point i.
Definition: integral.h:1603
Gauss(const Gauss &dummy)
Broken copy constructor.
Definition: integral.h:319
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] (j=0) of integration point i.
Definition: integral.h:191
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:1389
TGauss()
Default constructor (empty)
Definition: integral.h:914
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:1246
TGauss()
Default constructor (empty)
Definition: integral.h:1430
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:1073
TGauss()
Default constructor (empty)
Definition: integral.h:954
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:266
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1395
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:1162
ReflectedIntegral(const Integral *integral_to_reflect_pt, const unsigned index_s, const double s_reflect, const double s_min, const double s_max)
Construct reflected integral, note s refers to local coordinate.
Definition: integral.h:112
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:1255
TGauss()
Default constructor (empty)
Definition: integral.h:1144
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:929
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:205
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:875
void operator=(const Gauss &)
Broken assignment operator.
Definition: integral.h:517
Gauss()
Default constructor (empty)
Definition: integral.h:461
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:1398
Gauss(const Gauss &dummy)
Broken copy constructor.
Definition: integral.h:560
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:715
TGauss()
Default constructor (empty)
Definition: integral.h:1281
virtual Vector< double > knot(const unsigned &i) const
Return local coordinates of i-th intergration point.
Definition: integral.h:88
unsigned nweight() const
Number of integration points of the scheme, two times the base scheme.
Definition: integral.h:123
double knot(const unsigned &i, const unsigned &j) const
Return coordinate x[j] of integration point i.
Definition: integral.h:1022
void operator=(const TGauss &)
Broken assignment operator.
Definition: integral.h:1338
double weight(const unsigned &i) const
Return weight of integration point i.
Definition: integral.h:976
double knot(const unsigned &i, const unsigned &j) const
Return coordinate s[j] (j=0) of integration point i.
Definition: integral.h:1545
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1600
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:523
TGauss(const TGauss &dummy)
Broken copy constructor.
Definition: integral.h:957
void operator=(const Gauss &)
Broken assignment operator.
Definition: integral.h:470
Gauss(const Gauss &dummy)
Broken copy constructor.
Definition: integral.h:511
unsigned nweight() const
Number of integration points of the scheme.
Definition: integral.h:1488
TGauss()
Default constructor (empty)
Definition: integral.h:866