29 #ifndef OOMPH_SHAPE_HEADER
30 #define OOMPH_SHAPE_HEADER
35 #include <oomph-lib-config.h>
100 std::ostringstream error_stream;
101 error_stream <<
"Range Error: ";
104 error_stream <<
i <<
" is not in the range (0," <<
Index1 - 1 <<
")"
109 error_stream << j <<
" is not in the range (0," <<
Index2 - 1 <<
")"
113 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
147 std::ostringstream error_stream;
148 error_stream <<
"Cannot assign Shape object:" << std::endl
149 <<
"Indices do not match "
151 <<
", RHS: " <<
shape.Index1 <<
" " <<
shape.Index2
154 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
168 std::ostringstream error_stream;
169 error_stream <<
"Cannot assign Shape object:" << std::endl
170 <<
"Indices do not match "
172 <<
", RHS: " << shape_pt->
Index1 <<
" " << shape_pt->
Index2
175 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
189 void resize(
const unsigned&
N,
const unsigned& M = 1)
206 #ifdef RANGE_CHECKING
215 #ifdef RANGE_CHECKING
224 #ifdef RANGE_CHECKING
233 #ifdef RANGE_CHECKING
242 #ifdef RANGE_CHECKING
250 inline const double&
operator()(
const unsigned&
i,
const unsigned& j)
const
252 #ifdef RANGE_CHECKING
302 const unsigned& k)
const
307 std::ostringstream error_stream;
308 error_stream <<
"Range Error: ";
311 error_stream <<
i <<
" is not in the range (0," <<
Index1 - 1 <<
")"
316 error_stream << j <<
" is not in the range (0," <<
Index2 - 1 <<
")"
321 error_stream << k <<
" is not in the range (0," <<
Index3 - 1 <<
")"
325 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
340 DShape(
const unsigned&
N,
const unsigned& M,
const unsigned& P)
363 std::ostringstream error_stream;
364 error_stream <<
"Cannot assign DShape object:" << std::endl
365 <<
"Indices do not match "
368 <<
" " <<
dshape.Index3 << std::endl;
370 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
385 std::ostringstream error_stream;
386 error_stream <<
"Cannot assign Shape object:" << std::endl
387 <<
"Indices do not match "
389 <<
", RHS: " << dshape_pt->
Index1 <<
" "
393 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
410 void resize(
const unsigned&
N,
const unsigned& P,
const unsigned& M = 1)
428 #ifdef RANGE_CHECKING
435 inline const double&
operator()(
const unsigned&
i,
const unsigned& k)
const
437 #ifdef RANGE_CHECKING
448 #ifdef RANGE_CHECKING
457 const unsigned& k)
const
459 #ifdef RANGE_CHECKING
487 unsigned offset(
const unsigned long&
i,
const unsigned long& j)
const
558 namespace OneDimLagrange
563 template<
unsigned NNODE_1D>
566 std::ostringstream error_stream;
567 error_stream <<
"One dimensional Lagrange shape functions "
568 <<
"have not been defined "
569 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
571 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
577 template<
unsigned NNODE_1D>
580 std::ostringstream error_stream;
581 error_stream <<
"One dimensional Lagrange shape function derivatives "
582 <<
"have not been defined "
583 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
585 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
592 template<
unsigned NNODE_1D>
595 std::ostringstream error_stream;
596 error_stream <<
"One dimensional Lagrange shape function "
597 <<
"second derivatives "
598 <<
"have not been defined "
599 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
601 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
610 Psi[0] = 0.5 * (1.0 -
s);
611 Psi[1] = 0.5 * (1.0 +
s);
637 Psi[0] = 0.5 *
s * (
s - 1.0);
638 Psi[1] = 1.0 -
s *
s;
639 Psi[2] = 0.5 *
s * (
s + 1.0);
670 double t3 = 0.5625 * t2;
671 double t4 = 0.5625 * t1;
672 double t5 = 0.625E-1 *
s;
673 double t7 = 0.16875E1 * t2;
674 double t8 = 0.16875E1 *
s;
675 Psi[0] = -t3 + t4 + t5 - 0.625E-1;
676 Psi[1] = t7 - t4 - t8 + 0.5625;
677 Psi[2] = -t7 - t4 + t8 + 0.5625;
678 Psi[3] = t3 + t4 - t5 - 0.625E-1;
688 double t2 = 0.16875E1 * t1;
689 double t3 = 0.1125E1 *
s;
690 double t5 = 0.50625E1 * t1;
691 DPsi[0] = -t2 + t3 + 0.625E-1;
692 DPsi[1] = t5 - t3 - 0.16875E1;
693 DPsi[2] = -t5 - t3 + 0.16875E1;
694 DPsi[3] = t2 + t3 - 0.625E-1;
704 double t2 = 0.16875E1 * t1;
705 double t5 = 0.50625E1 * t1;
706 DPsi[0] = -t2 + 0.1125E1;
707 DPsi[1] = t5 - 0.1125E1;
708 DPsi[2] = -t5 - 0.1125E1;
709 DPsi[3] = t2 + 0.1125E1;
718 namespace OneDimDiscontinuousGalerkin
723 template<
unsigned NNODE_1D>
727 std::ostringstream error_stream;
730 error_stream <<
"One dimensional Lagrange shape functions "
731 <<
"have not been defined "
732 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
736 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
742 template<
unsigned NNODE_1D>
746 std::ostringstream error_stream;
749 error_stream <<
"One dimensional Lagrange shape function derivatives "
750 <<
"have not been defined "
751 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
755 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
762 template<
unsigned NNODE_1D>
766 std::ostringstream error_stream;
769 error_stream <<
"One dimensional Lagrange shape function "
770 <<
"second derivatives "
771 <<
"have not been defined "
772 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
776 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
813 Psi[1] = 0.5 * (1.0 -
s);
814 Psi[2] = 0.5 * (1.0 +
s);
842 Psi[1] = 0.5 *
s * (
s - 1.0);
843 Psi[2] = 1.0 -
s *
s;
844 Psi[3] = 0.5 *
s * (
s + 1.0);
875 namespace OneDimDiscontinuousGalerkinMixedOrderBasis
880 template<
unsigned NNODE_1D>
884 std::ostringstream error_stream;
887 error_stream <<
"One dimensional Lagrange shape functions "
888 <<
"have not been defined "
889 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
893 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
899 template<
unsigned NNODE_1D>
903 std::ostringstream error_stream;
906 error_stream <<
"One dimensional Lagrange shape function derivatives "
907 <<
"have not been defined "
908 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
912 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
919 template<
unsigned NNODE_1D>
923 std::ostringstream error_stream;
926 error_stream <<
"One dimensional Lagrange shape function "
927 <<
"second derivatives "
928 <<
"have not been defined "
929 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
933 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
942 Psi[0] = 0.5 * (1.0 -
s);
943 Psi[1] = 0.5 * (1.0 +
s);
969 Psi[0] = 0.5 * (1.0 -
s);
971 Psi[2] = 0.5 * (1.0 +
s);
998 Psi[0] = 0.5 * (1.0 -
s);
1001 Psi[3] = 0.5 * (1.0 +
s);
1032 namespace OneDimDiscontinuousGalerkinMixedOrderTest
1037 template<
unsigned NNODE_1D>
1041 std::ostringstream error_stream;
1044 error_stream <<
"One dimensional Lagrange shape functions "
1045 <<
"have not been defined "
1046 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
1050 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1056 template<
unsigned NNODE_1D>
1060 std::ostringstream error_stream;
1063 error_stream <<
"One dimensional Lagrange shape function derivatives "
1064 <<
"have not been defined "
1065 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
1069 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1076 template<
unsigned NNODE_1D>
1080 std::ostringstream error_stream;
1083 error_stream <<
"One dimensional Lagrange shape function "
1084 <<
"second derivatives "
1085 <<
"have not been defined "
1086 <<
"for " << NNODE_1D <<
" nodes." << std::endl;
1090 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1187 namespace OneDimHermite
1194 inline void shape(
const double&
s,
double Psi[2][2])
1197 Psi[0][0] = 0.25 * (
s *
s *
s - 3.0 *
s + 2.0);
1198 Psi[0][1] = 0.25 * (
s *
s *
s -
s *
s -
s + 1.0);
1200 Psi[1][0] = 0.25 * (2.0 + 3.0 *
s -
s *
s *
s);
1201 Psi[1][1] = 0.25 * (
s *
s *
s +
s *
s -
s - 1.0);
1206 inline void dshape(
const double&
s,
double DPsi[2][2])
1209 DPsi[0][0] = 0.75 * (
s *
s - 1.0);
1210 DPsi[0][1] = 0.25 * (3.0 *
s *
s - 2.0 *
s - 1.0);
1212 DPsi[1][0] = 0.75 * (1.0 -
s *
s);
1213 DPsi[1][1] = 0.25 * (3.0 *
s *
s + 2.0 *
s - 1.0);
1217 inline void d2shape(
const double&
s,
double DPsi[2][2])
1220 DPsi[0][0] = 1.5 *
s;
1221 DPsi[0][1] = 0.5 * (3.0 *
s - 1.0);
1223 DPsi[1][0] = -1.5 *
s;
1224 DPsi[1][1] = 0.5 * (3.0 *
s + 1.0);
1232 template<
unsigned NNODE_1D>
1258 using namespace Orthpoly;
1260 unsigned p = NNODE_1D - 1;
1262 for (
unsigned i = 0;
i < NNODE_1D;
i++)
1279 template<
unsigned NNODE_1D>
1282 template<
unsigned NNODE_1D>
1286 template<
unsigned NNODE_1D>
1293 unsigned p = NNODE_1D - 1;
1299 for (
unsigned i = 0;
i < NNODE_1D;
i++)
1301 unsigned rootnum = 0;
1302 for (
unsigned j = 0; j < NNODE_1D; j++)
1313 if (
i == rootnum &&
i == 0)
1315 (*this)[
i] = -(1.0 + p) * p / 4.0;
1317 else if (
i == rootnum &&
i == p)
1319 (*this)[
i] = (1.0 + p) * p / 4.0;
1321 else if (
i == rootnum)
1356 (*this)[0] = 0.5 * (1.0 -
s);
1357 (*this)[1] = 0.5 * (1.0 +
s);
1358 for (
unsigned i = 2;
i < p_order;
i++)
1376 for (
unsigned i = 2;
i < p_order;
i++)
1378 (*this)[
i] = (0.5 * (1.0 -
s)) * (0.5 * (1.0 +
s)) *
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
unsigned long nindex3() const
Return the range of index 3 of the derivatives of the shape functions.
unsigned long nindex2() const
Return the range of index 2 of the derivatives of the shape functions.
unsigned offset(const unsigned long &i, const unsigned long &j) const
Caculate the offset in flat-packed C-style, column-major format, required for a given i,...
unsigned Index2
Size of the second index of the shape function.
const double & raw_direct_access(const unsigned long &i) const
Direct access to internal storage of data in flat-packed C-style column-major format....
~DShape()
Destructor, clean up the memory allocated by this object.
void operator=(DShape *const &dshape_pt)
The assignment operator does a shallow copy (resets the pointer to the data)
void operator=(const DShape &dshape)
The assignment operator does a shallow copy (resets the pointer to the data)
const double & operator()(const unsigned &i, const unsigned &k) const
Overload the round bracket operator (const version)
const double & operator()(const unsigned &i, const unsigned &j, const unsigned &k) const
Overload the round bracket operator (const version)
unsigned long nindex1() const
Return the range of index 1 of the derivatives of the shape functions.
double & raw_direct_access(const unsigned long &i)
Direct access to internal storage of data in flat-packed C-style column-major format....
DShape()
Default constructor - just assigns a null pointers and zero index sizes.
double * Allocated_storage
Pointer that addresses the storage allocated by the object on construction. This will be the same as ...
void resize(const unsigned &N, const unsigned &P, const unsigned &M=1)
Change the size of the storage. Note that (for some strange reason) index2 is the "optional" index,...
unsigned Index1
Size of the first index of the shape function.
unsigned Index3
Size of the third index of the shape function.
DShape(const unsigned &N, const unsigned &M, const unsigned &P)
Constructor with three paramters: a two-index shape function.
void range_check(const unsigned &i, const unsigned &j, const unsigned &k) const
Private function that checks whether the indices are in range.
DShape(const unsigned &N, const unsigned &P)
Constructor with two parameters: a single-index shape function.
double & operator()(const unsigned &i, const unsigned &k)
Overload the round bracket operator for access to the data.
DShape(const DShape &dshape)=delete
Broken copy constructor.
double & operator()(const unsigned &i, const unsigned &j, const unsigned &k)
Overload the round bracket operator, with 3 indices.
double * DPsi
Pointer that addresses the storage that will be used to read and set the shape-function derivatives....
OneDimensionalLegendreDShape(const double &s)
Class that returns the shape functions associated with legendre.
OneDimensionalLegendreShape(const double &s)
Constructor.
static double nodal_position(const unsigned &n)
static Vector< double > z
static bool Nodes_calculated
static void calculate_nodal_positions()
Static function used to populate the stored positions.
OneDimensionalModalDShape(const unsigned p_order, const double &s)
Non-templated class that returns modal hierachical shape functions based on Legendre polynomials.
OneDimensionalModalShape(const unsigned p_order, const double &s)
Constructor.
An OomphLibError object which should be thrown when an run-time error is encountered....
A shape function with a deep copy constructor. This allows for use with stl operations (e....
ShapeWithDeepCopy()
Default constructor.
ShapeWithDeepCopy(const unsigned &N)
Constructor for a single-index set of shape functions.
~ShapeWithDeepCopy()
Destructor, clear up the memory allocated by the object.
ShapeWithDeepCopy(const unsigned &N, const unsigned &M)
Constructor for a two-index set of shape functions.
void operator=(const ShapeWithDeepCopy &old_shape)=delete
Broken assignment operator.
ShapeWithDeepCopy(const ShapeWithDeepCopy &old_shape)
Deep copy constructor.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
const double & operator[](const unsigned &i) const
Overload the bracket operator (const version)
const double & operator()(const unsigned &i) const
Overload the round bracket operator (const version)
double * Allocated_storage
Pointer that addresses the storage allocated by the object on construction. This will be the same as ...
unsigned nindex1() const
Return the range of index 1 of the shape function object.
unsigned Index1
Size of the first index of the shape function.
void resize(const unsigned &N, const unsigned &M=1)
Change the size of the storage.
void operator=(const Shape &shape)
The assignment operator does a shallow copy (resets the pointer to the data)
unsigned Index2
Size of the second index of the shape function.
double & operator()(const unsigned &i)
Overload the round bracket operator to provide access to values.
double & operator()(const unsigned &i, const unsigned &j)
Overload the round bracket operator, allowing for two indices.
const double & operator()(const unsigned &i, const unsigned &j) const
Overload the round bracket operator, allowing for two indices (const version)
Shape(const unsigned &N, const unsigned &M)
Constructor for a two-index set of shape functions.
double & operator[](const unsigned &i)
Overload the bracket operator to provide access to values.
double * Psi
Pointer that addresses the storage that will be used to read and set the shape functions....
void operator=(Shape *const &shape_pt)
The assignment operator does a shallow copy (resets the pointer to the data)
unsigned nindex2() const
Return the range of index 2 of the shape function object.
Shape(const Shape &shape)=delete
Broken copy constructor.
Shape(const unsigned &N)
Constructor for a single-index set of shape functions.
void range_check(const unsigned &i, const unsigned &j) const
Private function that checks whether the index is in range.
Shape()
Default constructor - just assigns a null pointers and zero index sizes.
~Shape()
Destructor, clear up the memory allocated by the object.
void dshape< 4 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to cubic order (4 Nodes)
void d2shape< 2 >(const double &s, double *DPsi)
Second Derivatives of 1D shape functions, specialised to linear order (2 Nodes)
void dshape< 3 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to quadratic order (3 Nodes)
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
void d2shape< 3 >(const double &s, double *DPsi)
Second Derivatives of 1D shape functions, specialised to quadratic order (3 Nodes)
void d2shape< 4 >(const double &s, double *DPsi)
Second derivatives of 1D shape functions specialised to cubic order (4 nodes)
void shape< 3 >(const double &s, double *Psi)
1D shape functions specialised to quadratic order (3 Nodes)
void dshape(const double &s, double *DPsi)
Definition for derivatives of 1D Lagrange shape functions. The value of all the shape function deriva...
void shape< 4 >(const double &s, double *Psi)
1D shape functions specialised to cubic order (4 Nodes)
void d2shape(const double &s, double *DPsi)
Definition for second derivatives of 1D Lagrange shape functions. The value of all the shape function...
void dshape< 2 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to linear order (2 Nodes)
void shape(const double &s, double *Psi)
Definition for 1D Lagrange shape functions. The value of all the shape functions at the local coordin...
void d2shape(const double &s, double *DPsi)
Definition for second derivatives of 1D Lagrange shape functions. The value of all the shape function...
void d2shape< 3 >(const double &s, double *DPsi)
Second Derivatives of 1D shape functions, specialised to quadratic order (3 Nodes)
void dshape< 3 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to quadratic order (3 Nodes)
void shape< 3 >(const double &s, double *Psi)
1D shape functions specialised to quadratic order (3 Nodes)
void dshape(const double &s, double *DPsi)
Definition for derivatives of 1D Lagrange shape functions. The value of all the shape function deriva...
void dshape< 2 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to linear order (2 Nodes)
void d2shape< 4 >(const double &s, double *DPsi)
Second derivatives of 1D shape functions specialised to cubic order (4 nodes)
void dshape< 4 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to cubic order (4 Nodes)
void shape(const double &s, double *Psi)
Definition for 1D Lagrange shape functions. The value of all the shape functions at the local coordin...
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
void d2shape< 2 >(const double &s, double *DPsi)
Second Derivatives of 1D shape functions, specialised to linear order (2 Nodes)
void shape< 4 >(const double &s, double *Psi)
1D shape functions specialised to cubic order (4 Nodes)
void dshape< 3 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to quadratic order (3 Nodes)
void dshape< 4 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to cubic order (4 Nodes)
void shape< 3 >(const double &s, double *Psi)
1D shape functions specialised to quadratic order (3 Nodes)
void dshape(const double &s, double *DPsi)
Definition for derivatives of 1D Lagrange shape functions. The value of all the shape function deriva...
void d2shape< 3 >(const double &s, double *DPsi)
Second Derivatives of 1D shape functions, specialised to quadratic order (3 Nodes)
void dshape< 2 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to linear order (2 Nodes)
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
void d2shape(const double &s, double *DPsi)
Definition for second derivatives of 1D Lagrange shape functions. The value of all the shape function...
void shape< 4 >(const double &s, double *Psi)
1D shape functions specialised to cubic order (4 Nodes)
void d2shape< 4 >(const double &s, double *DPsi)
Second derivatives of 1D shape functions specialised to cubic order (4 nodes)
void shape(const double &s, double *Psi)
Definition for 1D Lagrange shape functions. The value of all the shape functions at the local coordin...
void d2shape< 2 >(const double &s, double *DPsi)
Second Derivatives of 1D shape functions, specialised to linear order (2 Nodes)
void dshape(const double &s, double DPsi[2][2])
Derivatives of 1D Hermite shape functions.
void d2shape(const double &s, double DPsi[2][2])
Second derivatives of the Hermite shape functions.
void shape(const double &s, double Psi[2][2])
Constructor sets the values of the shape functions at the position s.
void shape(const double &s, double *Psi)
Definition for 1D Lagrange shape functions. The value of all the shape functions at the local coordin...
void d2shape< 2 >(const double &s, double *DPsi)
Second Derivatives of 1D shape functions, specialised to linear order (2 Nodes)
void dshape< 3 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to quadratic order (3 Nodes)
void d2shape(const double &s, double *DPsi)
Definition for second derivatives of 1D Lagrange shape functions. The value of all the shape function...
void dshape< 2 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to linear order (2 Nodes)
void d2shape< 3 >(const double &s, double *DPsi)
Second Derivatives of 1D shape functions, specialised to quadratic order (3 Nodes)
void d2shape< 4 >(const double &s, double *DPsi)
Second Derivatives of 1D shape functions specialised to cubic order (4 Nodes)
void dshape< 4 >(const double &s, double *DPsi)
Derivatives of 1D shape functions specialised to cubic order (4 Nodes)
void shape< 3 >(const double &s, double *Psi)
1D shape functions specialised to quadratic order (3 Nodes)
void shape< 4 >(const double &s, double *Psi)
1D shape functions specialised to cubic order (4 Nodes)
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
void dshape(const double &s, double *DPsi)
Definition for derivatives of 1D Lagrange shape functions. The value of all the shape function deriva...
double dlegendre(const unsigned &p, const double &x)
Calculates first derivative of Legendre polynomial of degree p at x using three term recursive formul...
double ddlegendre(const unsigned &p, const double &x)
Calculates second derivative of Legendre polynomial of degree p at x using three term recursive formu...
double legendre(const unsigned &p, const double &x)
Calculates Legendre polynomial of degree p at x using the three term recurrence relation .
void gll_nodes(const unsigned &Nnode, Vector< double > &x)
Calculates the Gauss Lobatto Legendre abscissas for degree p = NNode-1.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...