33 #ifndef __H__UG__LIB_DISC__LOCAL_SHAPE_FUNCTION_SET__COMMON__LAGRANGE1D__
34 #define __H__UG__LIB_DISC__LOCAL_SHAPE_FUNCTION_SET__COMMON__LAGRANGE1D__
54 Lagrange1D(
const size_t i,
const std::vector<number>& vPos)
75 std::vector<number> vStart(1, 1.0);
81 std::vector<number> vFactor(2,1.0);
87 for(
size_t j = 0; j < vPos.size(); ++j)
92 vFactor[0] = -vPos[j];
98 scale *= 1./(vPos[i]-vPos[j]);
138 std::vector<number> vStart(1, 1.0);
144 std::vector<number> vFactor(2,
p);
150 for(
int j = 0; j <=
p; ++j)
202 std::vector<number> vStart(1, 1.0);
208 std::vector<number> vFactor(2,
p);
214 for(
int j = 0; j < i; ++j)
251 UG_ASSERT(i <= bound,
"Only #bound shape functions.");
270 std::vector<number> vStart(1, 1.0);
276 std::vector<number> vFactor(2,
p);
282 for(
int j = 0; j <= b; ++j)
Definition: lagrange1d.h:241
static number position(const size_t i, const size_t degree)
returns the position of the i'th interpolation point
Definition: lagrange1d.h:259
void compute_coeffs(const int i, const int p, const int b)
computes the coefficients for passed interpolation points
Definition: lagrange1d.h:267
BoundedEquidistantLagrange1D(const size_t i, const size_t degree, const size_t bound)
Definition: lagrange1d.h:248
Definition: lagrange1d.h:114
static number position(const size_t i, const size_t degree)
returns the position of the i'th interpolation point
Definition: lagrange1d.h:127
EquidistantLagrange1D(const size_t i, const size_t degree)
Definition: lagrange1d.h:120
void compute_coeffs(const int i, const int p)
computes the coefficients for passed interpolation points
Definition: lagrange1d.h:135
Definition: lagrange1d.h:47
Lagrange1D(const size_t i, const std::vector< number > &vPos)
Definition: lagrange1d.h:54
number position(const size_t i) const
returns the position of the i'th interpolation point
Definition: lagrange1d.h:64
std::vector< number > m_vPos
Definition: lagrange1d.h:106
void compute_coeffs(const size_t i, const std::vector< number > &vPos)
computes the coefficients for passed interpolation points
Definition: lagrange1d.h:72
Definition: polynomial1d.h:51
size_t degree() const
Definition: polynomial1d.h:72
void set_coefficients(const std::vector< number > &a)
Definition: polynomial1d.h:143
Definition: lagrange1d.h:177
void compute_coeffs(const int i, const int p)
computes the coefficients for passed interpolation points
Definition: lagrange1d.h:199
static number position(const size_t i, const size_t degree)
returns the position of the i'th interpolation point
Definition: lagrange1d.h:191
TruncatedEquidistantLagrange1D(const size_t i, const size_t degree)
Definition: lagrange1d.h:183
#define UG_ASSERT(expr, msg)
Definition: assert.h:70
double number
Definition: types.h:124