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