OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
feitspline.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef feitspline_h
36 #define feitspline_h
37 
38 #include "feibspline.h"
39 #include "floatarray.h"
40 #include "floatmatrix.h"
41 
42 /*
43  * alternatively, it is possible to store for individual control points open local knot vector;
44  * however, this is not enough as I need to know how many knots have been prepended and appended
45  * (see createLocalKnotVector) as these are relevant for finding relevant knot span using BSpline method
46  * (this could be overcome by writing corresponding TSpline method) and for extraction proper
47  * basis function and its derivatives (computed by BSpline methods)
48  */
49 
51 
52 #define _IFT_TSplineInterpolation_localIndexKnotVectorU "localindexknotvectoru"
53 #define _IFT_TSplineInterpolation_localIndexKnotVectorV "localindexknotvectorv"
54 #define _IFT_TSplineInterpolation_localIndexKnotVectorW "localindexknotvectorw"
55 
56 
57 namespace oofem {
61 class OOFEM_EXPORT TSplineInterpolation : public BSplineInterpolation
62 {
63 protected:
71 public:
73  virtual ~TSplineInterpolation();
74 
75  IRResultType initializeFrom(InputRecord *ir);
76  void setNumberOfControlPoints(int num) { this->totalNumberOfControlPoints = num; }
77  virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo);
78  virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo);
79  virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo);
80  virtual int global2local(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) {
81  OOFEM_ERROR("Not yet implemented, contact lazy dr for implementation");
82  return 0;
83  }
84  virtual void giveJacobianMatrixAt(FloatMatrix &jacobianMatrix, const FloatArray &lcoords, const FEICellGeometry &cellgeo);
85 
86  virtual int giveKnotSpanBasisFuncMask(const IntArray &knotSpan, IntArray &mask);
87  virtual int giveNumberOfKnotSpanBasisFunctions(const IntArray &knotSpan);
88 
89  const char *giveClassName() const { return "TSplineInterpolation"; }
90 
91 protected:
101  double basisFunction(double u, int p, const FloatArray &U, const int *I);
119  void dersBasisFunction(int n, double u, int p, const FloatArray &U, const int *I, FloatArray &ders);
131  void createLocalKnotVector(int p, const FloatArray &U, const int *I, int *prepend, int *append);
135  int giveKnotSpanBasisFuncMask(const IntArray &startKnotSpan, const IntArray &endKnotSpan, IntArray &mask);
137  int giveNumberOfKnotSpanBasisFunctions(const IntArray &startKnotSpan, const IntArray &endKnotSpan);
138 }; // end of TSplineInterpolation class definition
139 } // end namespace oofem
140 #endif //feitspline_h
virtual int global2local(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates local coordinates from given global ones.
Definition: feitspline.h:80
Interpolation for B-splines.
Definition: feibspline.h:60
void setNumberOfControlPoints(int num)
Definition: feitspline.h:76
Class representing a general abstraction for cell geometry.
Definition: feinterpol.h:62
double * openLocalKnotVector
Temporary open local knot vector to enable use of BSpline algorithms (common for all directions) [3*m...
Definition: feitspline.h:70
Class implementing an array of integers.
Definition: intarray.h:61
const char * giveClassName() const
Definition: feitspline.h:89
#define OOFEM_ERROR(...)
Definition: error.h:61
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
int *** localIndexKnotVector
Local index knot vector of the dimensions [totalNumberOfControlPoints][nsd][degree+2].
Definition: feitspline.h:65
Class representing the general Input Record.
Definition: inputrecord.h:101
the oofem namespace is to define a context or scope in which all oofem names are defined.
Interpolation for T-splines.
Definition: feitspline.h:61

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011