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