forked from SCOREC/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrvBezierShapes.h
61 lines (51 loc) · 2.2 KB
/
crvBezierShapes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Copyright 2015 Scientific Computation Research Center
*
* This work is open source software, licensed under the terms of the
* BSD license as described in the LICENSE file in the top-level directory.
*/
#ifndef CRVBEZIERSHAPES_H
#define CRVBEZIERSHAPES_H
/** \file crvBezierShapes.h
* \brief main file for bezier shape functions */
namespace crv {
/** \brief shape blending functions
\details see bezier.tex in SCOREC/docs repo */
void BlendedTriangleGetValues(apf::Mesh* m, apf::MeshEntity* e,
apf::Vector3 const& xi, apf::NewArray<double>& values);
void BlendedTriangleGetLocalGradients(apf::Mesh* m, apf::MeshEntity* e,
apf::Vector3 const& xi, apf::NewArray<apf::Vector3>& grads);
void BlendedTetGetValues(apf::Mesh* m, apf::MeshEntity* e,
apf::Vector3 const& xi, apf::NewArray<double>& values);
void BlendedTetGetLocalGradients(apf::Mesh* m, apf::MeshEntity* e,
apf::Vector3 const& xi, apf::NewArray<apf::Vector3>& grads);
/** \brief typedef for table of shape functions */
typedef void (*bezierShape)(int P,
apf::Vector3 const& xi,
apf::NewArray<double>& values);
/** \brief typedef for table of shape function gradients */
typedef void (*bezierShapeGrads)(int P,
apf::Vector3 const& xi,
apf::NewArray<apf::Vector3>& grads);
/** \brief table of shape functions */
extern const bezierShape bezier[apf::Mesh::TYPES];
/** \brief table of shape function gradients */
extern const bezierShapeGrads bezierGrads[apf::Mesh::TYPES];
/** \brief Get transformation matrix corresponding to a parametric range
\details Range is an array of size(num vertices), this is used for
subdivision, refinement. It is the element transformation matrix,
see notes */
void getBezierTransformationMatrix(int type, int P,
mth::Matrix<double>& A,
const apf::Vector3 *range);
/** \brief Get transformation matrix of a lower entity in a higher entity
over a parametric range
\details Range is an array of size(num vertices), this is used for
refinement, It is the lower dimensional component, as part of the
higher array, see notes */
void getBezierTransformationMatrix(int parentType,
int childType, int P,
mth::Matrix<double>& A,
const apf::Vector3* childRange);
}
#endif