escript  Revision_
ShapeFunctions.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2018 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16 
17 #ifndef __FINLEY_SHAPEFUNCTIONS_H__
18 #define __FINLEY_SHAPEFUNCTIONS_H__
19 
20 #include "Finley.h"
21 
22 #include <boost/shared_ptr.hpp>
23 
24 #define S_INDEX(_J_,_I_,_NUMNODES_) INDEX2(_J_,_I_,_NUMNODES_)
25 #define DSDV_INDEX(_J_,_K_,_I_,_NUMNODES_,_DIM_) INDEX3(_J_,_K_,_I_,_NUMNODES_,_DIM_)
26 
27 namespace finley {
28 
29 typedef enum {
50  NoShape // marks end of list
52 
53 
54 typedef void (ShapeFunction_Evaluation) (int, std::vector<double>&, std::vector<double>&, std::vector<double>&);
55 
57 struct ShapeFunctionInfo {
61  const char* Name;
63  int numDim;
65  int numShapes;
67  int numOrder;
69  int numVertices;
72 };
73 
74 
76 struct ShapeFunction {
77  ShapeFunction(ShapeFunctionTypeId id, int numQuadDim, int numQuadNodes,
78  const std::vector<double>& QuadNodes,
79  const std::vector<double>& QuadWeights);
80 
81  ShapeFunctionTypeId getTypeId(const char*);
82 
83  static const ShapeFunctionInfo* getInfo(ShapeFunctionTypeId id);
84 
86  const ShapeFunctionInfo* Type;
88  int numQuadNodes;
90  std::vector<double> QuadNodes;
92  std::vector<double> QuadWeights;
94  std::vector<double> S;
96  std::vector<double> dSdv;
97 };
98 
99 typedef boost::shared_ptr<const ShapeFunction> const_ShapeFunction_ptr;
100 
121 
122 } // namespace finley
123 
124 #endif // __FINLEY_SHAPEFUNCTIONS_H__
125 
finley::Shape_Point1
ShapeFunction_Evaluation Shape_Point1
Definition: ShapeFunctions.h:100
finley::Rec9Shape
Definition: ShapeFunctions.h:39
finley::ShapeFunction_InfoList
const ShapeFunctionInfo ShapeFunction_InfoList[]
Definition: ShapeFunctions.cpp:45
main
int main(int argc, char **argv)
Definition: ScriptMPI.cpp:128
finley::ShapeFunctionInfo::numVertices
int numVertices
number of vertices of the element
Definition: ShapeFunctions.h:68
finley::Shape_Hex27
ShapeFunction_Evaluation Shape_Hex27
Definition: ShapeFunctions.h:118
finley::Line2Shape
Definition: ShapeFunctions.h:30
finley::Shape_Tri10
ShapeFunction_Evaluation Shape_Tri10
Definition: ShapeFunctions.h:107
main
int main(int argc, char **argv)
Definition: ScriptMPIredirect.cpp:128
INDEX2
#define INDEX2(_X1_, _X2_, _N1_)
Definition: index.h:21
finley::ShapeFunction::QuadNodes
std::vector< double > QuadNodes
coordinates of quadrature nodes
Definition: ShapeFunctions.h:89
finley::ShapeFunction::S
std::vector< double > S
shape functions at quadrature nodes
Definition: ShapeFunctions.h:93
finley::Shape_Hex8
ShapeFunction_Evaluation Shape_Hex8
Definition: ShapeFunctions.h:116
finley::ShapeFunctionTypeId
ShapeFunctionTypeId
Definition: ShapeFunctions.h:28
finley::Shape_Hex32
ShapeFunction_Evaluation Shape_Hex32
Definition: ShapeFunctions.h:119
finley::Shape_Rec4
ShapeFunction_Evaluation Shape_Rec4
Definition: ShapeFunctions.h:108
finley::Line3Shape
Definition: ShapeFunctions.h:31
finley::ShapeFunctionInfo
this struct holds the definition of the shape functions on an element
Definition: ShapeFunctions.h:56
finley::Shape_Tri3
ShapeFunction_Evaluation Shape_Tri3
Definition: ShapeFunctions.h:104
finley::ShapeFunctionInfo::TypeId
ShapeFunctionTypeId TypeId
shape function type
Definition: ShapeFunctions.h:58
finley::ShapeFunction::Type
const ShapeFunctionInfo * Type
shape function information
Definition: ShapeFunctions.h:85
finley::ShapeFunctionInfo::numDim
int numDim
number of spatial dimensions
Definition: ShapeFunctions.h:62
finley::NoShape
Definition: ShapeFunctions.h:49
finley::Shape_Line2
ShapeFunction_Evaluation Shape_Line2
Definition: ShapeFunctions.h:101
SparseMatrix.h
finley::Shape_Tet4
ShapeFunction_Evaluation Shape_Tet4
Definition: ShapeFunctions.h:113
paso::Solver_updateIncompleteSchurComplement
void Solver_updateIncompleteSchurComplement(SparseMatrix_ptr A_CC, SparseMatrix_ptr A_CF, double *invA_FF, index_t *A_FF_pivot, SparseMatrix_ptr A_FC)
Definition: SchurComplement.cpp:39
Solver.h
finley::Shape_Tet16
ShapeFunction_Evaluation Shape_Tet16
Definition: ShapeFunctions.h:115
Paso.h
finley::Tri6Shape
Definition: ShapeFunctions.h:34
MPI_COMM_WORLD
#define MPI_COMM_WORLD
Definition: EsysMPI.h:46
paso::util::comparIndex
int comparIndex(const void *index1, const void *index2)
this int-comparison function is used by qsort/bsearch in various places
Definition: PasoUtil.cpp:48
finley::ShapeFunction::dSdv
std::vector< double > dSdv
derivative of the shape functions at quadrature nodes
Definition: ShapeFunctions.h:95
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:87
finley::ShapeFunction::getInfo
static const ShapeFunctionInfo * getInfo(ShapeFunctionTypeId id)
Definition: ShapeFunctions.cpp:117
finley::Hex8Shape
Definition: ShapeFunctions.h:45
finley::Rec4Shape
Definition: ShapeFunctions.h:37
finley::Hex32Shape
Definition: ShapeFunctions.h:48
DSDV
#define DSDV(_J_, _K_, _I_)
Definition: ShapeFunctions.cpp:135
finley::Point1Shape
Definition: ShapeFunctions.h:29
finley::Shape_Tri9
ShapeFunction_Evaluation Shape_Tri9
Definition: ShapeFunctions.h:106
finley::ShapeFunction_Evaluation
void() ShapeFunction_Evaluation(int, std::vector< double > &, std::vector< double > &, std::vector< double > &)
Definition: ShapeFunctions.h:53
finley::Shape_Rec16
ShapeFunction_Evaluation Shape_Rec16
Definition: ShapeFunctions.h:112
finley::Shape_Tri6
ShapeFunction_Evaluation Shape_Tri6
Definition: ShapeFunctions.h:105
finley::ShapeFunction::ShapeFunction
ShapeFunction(ShapeFunctionTypeId id, int numQuadDim, int numQuadNodes, const std::vector< double > &QuadNodes, const std::vector< double > &QuadWeights)
Definition: ShapeFunctions.cpp:75
finley::ShapeFunctionInfo::numOrder
int numOrder
order of the shape functions
Definition: ShapeFunctions.h:66
finley::Tri9Shape
Definition: ShapeFunctions.h:35
finley::Line4Shape
Definition: ShapeFunctions.h:32
finley::Tri10Shape
Definition: ShapeFunctions.h:36
finley::Tet10Shape
Definition: ShapeFunctions.h:43
finley::Rec8Shape
Definition: ShapeFunctions.h:38
paso::SparseMatrix_ptr
boost::shared_ptr< SparseMatrix > SparseMatrix_ptr
Definition: SparseMatrix.h:46
V
#define V(_K_, _I_)
Definition: ShapeFunctions.cpp:133
finley::Tet16Shape
Definition: ShapeFunctions.h:44
finley::ShapeFunctionInfo::getValues
ShapeFunction_Evaluation * getValues
function to evaluate the shape functions at a set of points
Definition: ShapeFunctions.h:70
finley::Shape_Rec9
ShapeFunction_Evaluation Shape_Rec9
Definition: ShapeFunctions.h:110
finley::Hex20Shape
Definition: ShapeFunctions.h:46
finley::Shape_Rec12
ShapeFunction_Evaluation Shape_Rec12
Definition: ShapeFunctions.h:111
finley::Tri3Shape
Definition: ShapeFunctions.h:33
ShapeFunctions.h
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:82
PasoUtil.h
finley::ShapeFunction::getTypeId
ShapeFunctionTypeId getTypeId(const char *)
Definition: ShapeFunctions.cpp:105
finley::ShapeFunctionInfo::numShapes
int numShapes
number of shape functions
Definition: ShapeFunctions.h:64
Finley.h
finley::const_ShapeFunction_ptr
boost::shared_ptr< const ShapeFunction > const_ShapeFunction_ptr
Definition: ShapeFunctions.h:98
finley::Shape_Line4
ShapeFunction_Evaluation Shape_Line4
Definition: ShapeFunctions.h:103
finley::Shape_Rec8
ShapeFunction_Evaluation Shape_Rec8
Definition: ShapeFunctions.h:109
S
#define S(_J_, _I_)
Definition: ShapeFunctions.cpp:134
finley::Rec12Shape
Definition: ShapeFunctions.h:40
paso
Definition: BiCGStab.cpp:25
finley::Shape_Line3
ShapeFunction_Evaluation Shape_Line3
Definition: ShapeFunctions.h:102
finley::Rec16Shape
Definition: ShapeFunctions.h:41
finley
A suite of factory methods for creating various finley domains.
Definition: finley/src/Assemble.h:31
finley::Hex27Shape
Definition: ShapeFunctions.h:47
finley::ShapeFunctionInfo::Name
const char * Name
the name in text form e.g. "Line2", "Rec12", ...
Definition: ShapeFunctions.h:60
escript::ValueError
An exception class that signals an invalid argument value.
Definition: EsysException.h:99
finley::Shape_Tet10
ShapeFunction_Evaluation Shape_Tet10
Definition: ShapeFunctions.h:114
finley::Tet4Shape
Definition: ShapeFunctions.h:42
finley::Shape_Hex20
ShapeFunction_Evaluation Shape_Hex20
Definition: ShapeFunctions.h:117
finley::ShapeFunction::QuadWeights
std::vector< double > QuadWeights
weights of the quadrature scheme
Definition: ShapeFunctions.h:91
finley::ShapeFunction::numQuadNodes
int numQuadNodes
number of quadrature points
Definition: ShapeFunctions.h:87