escript  Revision_
Speckley.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 __SPECKLEY_SPECKLEY_H__
18 #define __SPECKLEY_SPECKLEY_H__
19 
20 /*****************************************************************************
21  * Speckley is a spectral element domain library with regular
22  * hexagonal/rectangular elements and high order quadrature points
23  ****************************************************************************/
24 
25 #include <speckley/system_dep.h>
26 
27 #include <escript/EsysMPI.h>
28 
29 #include <boost/shared_ptr.hpp>
30 #include <list>
31 #include <map>
32 #include <string>
33 #include <vector>
34 
35 namespace speckley {
36 
41 
42 typedef std::pair<index_t,index_t> IndexPair;
43 typedef std::vector<index_t> IndexVector;
44 typedef std::vector<real_t> DoubleVector;
45 typedef std::map<std::string,int> TagMap;
46 
47 #define SPECKLEY_DEGREES_OF_FREEDOM 1
48 #define SPECKLEY_NODES 3
49 #define SPECKLEY_ELEMENTS 4
50 #define SPECKLEY_FACE_ELEMENTS 5
51 #define SPECKLEY_POINTS 6
52 #define SPECKLEY_REDUCED_DEGREES_OF_FREEDOM 2
53 #define SPECKLEY_REDUCED_NODES 14
54 #define SPECKLEY_REDUCED_ELEMENTS 10
55 #define SPECKLEY_REDUCED_FACE_ELEMENTS 11
56 
57 enum {
67 };
68 
69 //quadrature point locations
70 const double point_locations[][11] = {
71  {0.0, 0.5, 1.0},
72  {0.0, 0.27639320225, 0.72360679775, 1.0},
73  {0.0, 0.172673164646, 0.5, 0.827326835354, 1.0},
74  {0.0, 0.117472338035, 0.35738424176, 0.64261575824, 0.882527661965, 1.0},
75  {0.0, 0.0848880518607, 0.265575603265, 0.5, 0.734424396735, 0.915111948139, 1.0},
76  {0.0, 0.0641299257452, 0.204149909283, 0.395350391049, 0.604649608951, 0.795850090717, 0.935870074255, 1.0},
77  {0.0, 0.0501210022943, 0.161406860245, 0.318441268087, 0.5, 0.681558731913, 0.838593139755, 0.949878997706, 1.0},
78  {0.0, 0.0402330459168, 0.130613067447, 0.261037525095, 0.417360521167, 0.582639478833, 0.738962474905, 0.869386932553, 0.959766954083, 1.0},
79  {0.0, 0.032999284796, 0.107758263168, 0.217382336502, 0.352120932207, 0.5, 0.647879067793, 0.782617663498, 0.892241736832, 0.967000715204, 1.0}};
80 
81 } // namespace speckley
82 
83 #endif /* __SPECKLEY_SPECKLEY_H__ */
84 
BlockOps.h
MATRIX_FORMAT_BLK1
#define MATRIX_FORMAT_BLK1
Definition: Paso.h:62
paso::SparseMatrix_MatrixVector_CSC_OFFSET1
void SparseMatrix_MatrixVector_CSC_OFFSET1(const double alpha, const_SparseMatrix_ptr A, const double *in, const double beta, double *out)
Definition: SparseMatrix_MatrixVector.cpp:132
speckley::TagMap
std::map< std::string, int > TagMap
Definition: Speckley.h:57
paso::SparseMatrix::nullifyRowsAndCols_CSR_BLK1
void nullifyRowsAndCols_CSR_BLK1(const double *mask_row, const double *mask_col, double main_diagonal_value)
Definition: SparseMatrix_nullifyRowsAndCols.cpp:69
SPECKLEY_POINTS
#define SPECKLEY_POINTS
Definition: Speckley.h:63
paso::N
static dim_t N
Definition: SparseMatrix_saveHB.cpp:48
paso::SparseMatrix::numCols
dim_t numCols
Definition: SparseMatrix.h:175
paso::SparseMatrix_MatrixVector_CSR_OFFSET0_stripe
void SparseMatrix_MatrixVector_CSR_OFFSET0_stripe(double alpha, dim_t nRows, dim_t row_block_size, dim_t col_block_size, const index_t *ptr, const index_t *index, const double *val, const double *in, double beta, double *out)
Definition: SparseMatrix_MatrixVector.cpp:344
escript::DataTypes::real_t
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:73
speckley::DoubleVector
std::vector< real_t > DoubleVector
Definition: Speckley.h:56
paso::SparseMatrix_MatrixMatrix_DD
void SparseMatrix_MatrixMatrix_DD(SparseMatrix_ptr C, const_SparseMatrix_ptr A, const_SparseMatrix_ptr B)
Definition: SparseMatrix_MatrixMatrix.cpp:890
paso::SparseMatrix::block_size
dim_t block_size
Definition: SparseMatrix.h:173
paso::SparseMatrix::row_block_size
dim_t row_block_size
Definition: SparseMatrix.h:171
MATRIX_FORMAT_CSC
#define MATRIX_FORMAT_CSC
Definition: Paso.h:61
speckley::ReducedDegreesOfFreedom
Definition: Speckley.h:71
paso::SparseMatrix::pattern
Pattern_ptr pattern
Definition: SparseMatrix.h:176
speckley::ReducedFaceElements
Definition: Speckley.h:77
paso::SparseMatrix::nullifyRowsAndCols_CSR
void nullifyRowsAndCols_CSR(const double *mask_row, const double *mask_col, double main_diagonal_value)
Definition: SparseMatrix_nullifyRowsAndCols.cpp:111
paso::SparseMatrix::getBlock
SparseMatrix_ptr getBlock(int blockid) const
Definition: SparseMatrix_getSubmatrix.cpp:89
paso::SparseMatrix::SparseMatrix
SparseMatrix(SparseMatrixType type, Pattern_ptr pattern, dim_t rowBlockSize, dim_t colBlockSize, bool patternIsUnrolled)
Definition: SparseMatrix.cpp:118
SPECKLEY_ELEMENTS
#define SPECKLEY_ELEMENTS
Definition: Speckley.h:61
paso::SparseMatrix_MatrixVector_CSR_OFFSET1
void SparseMatrix_MatrixVector_CSR_OFFSET1(const double alpha, const_SparseMatrix_ptr A, const double *in, const double beta, double *out)
Definition: SparseMatrix_MatrixVector.cpp:204
MATRIX_FORMAT_OFFSET1
#define MATRIX_FORMAT_OFFSET1
Definition: Paso.h:63
SparseMatrix.h
speckley
Definition: AbstractAssembler.cpp:17
paso::SparseMatrix_MatrixVector_CSR_OFFSET0_DIAG
void SparseMatrix_MatrixVector_CSR_OFFSET0_DIAG(const double alpha, const_SparseMatrix_ptr A, const double *in, const double beta, double *out)
Definition: SparseMatrix_MatrixVector.cpp:439
paso::SparseMatrix_MatrixMatrixTranspose_DB
void SparseMatrix_MatrixMatrixTranspose_DB(SparseMatrix_ptr C, const_SparseMatrix_ptr A, const_SparseMatrix_ptr B, const_SparseMatrix_ptr T)
Definition: SparseMatrix_MatrixMatrixTranspose.cpp:466
paso::SparseMatrix::type
SparseMatrixType type
Definition: SparseMatrix.h:170
paso::nz
static dim_t nz
Definition: SparseMatrix_saveHB.cpp:48
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
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:87
paso::const_SparseMatrix_ptr
boost::shared_ptr< const SparseMatrix > const_SparseMatrix_ptr
Definition: SparseMatrix.h:48
paso::SparseMatrix_MatrixMatrixTranspose_DD
void SparseMatrix_MatrixMatrixTranspose_DD(SparseMatrix_ptr C, const_SparseMatrix_ptr A, const_SparseMatrix_ptr B, const_SparseMatrix_ptr T)
Definition: SparseMatrix_MatrixMatrixTranspose.cpp:1028
paso::SparseMatrix::nullifyRows_CSR_BLK1
void nullifyRows_CSR_BLK1(const double *mask_row, double main_diagonal_value)
Definition: SparseMatrix_nullifyRowsAndCols.cpp:135
paso::SparseMatrix_MatrixMatrix_DB
void SparseMatrix_MatrixMatrix_DB(SparseMatrix_ptr C, const_SparseMatrix_ptr A, const_SparseMatrix_ptr B)
Definition: SparseMatrix_MatrixMatrix.cpp:421
speckley::IndexPair
std::pair< index_t, index_t > IndexPair
Definition: Speckley.h:54
speckley::ReducedElements
Definition: Speckley.h:75
paso::SparseMatrix::nullifyRowsAndCols_CSC_BLK1
void nullifyRowsAndCols_CSC_BLK1(const double *mask_row, const double *mask_col, double main_diagonal_value)
Definition: SparseMatrix_nullifyRowsAndCols.cpp:51
paso::SparseMatrixType
int SparseMatrixType
Definition: SparseMatrix.h:50
speckley::FaceElements
Definition: Speckley.h:76
paso::SparseMatrix::nullifyRows_CSR
void nullifyRows_CSR(const double *mask_row, double main_diagonal_value)
Definition: SparseMatrix_nullifyRowsAndCols.cpp:152
paso::SparseMatrix::saveHB_CSC
void saveHB_CSC(const char *filename) const
Definition: SparseMatrix_saveHB.cpp:190
paso::SparseMatrix_MatrixMatrix_BD
void SparseMatrix_MatrixMatrix_BD(SparseMatrix_ptr C, const_SparseMatrix_ptr A, const_SparseMatrix_ptr B)
Definition: SparseMatrix_MatrixMatrix.cpp:657
paso::SparseMatrix_MatrixMatrixTranspose
SparseMatrix_ptr SparseMatrix_MatrixMatrixTranspose(const_SparseMatrix_ptr A, const_SparseMatrix_ptr B, const_SparseMatrix_ptr T)
Definition: SparseMatrix_MatrixMatrixTranspose.cpp:70
paso::SparseMatrix::len
dim_t len
Definition: SparseMatrix.h:177
SPECKLEY_REDUCED_ELEMENTS
#define SPECKLEY_REDUCED_ELEMENTS
Definition: Speckley.h:66
SPECKLEY_REDUCED_FACE_ELEMENTS
#define SPECKLEY_REDUCED_FACE_ELEMENTS
Definition: Speckley.h:67
SPECKLEY_NODES
#define SPECKLEY_NODES
Definition: Speckley.h:60
speckley::DegreesOfFreedom
Definition: Speckley.h:70
SPECKLEY_REDUCED_NODES
#define SPECKLEY_REDUCED_NODES
Definition: Speckley.h:65
speckley::Elements
Definition: Speckley.h:74
paso::SparseMatrix_ptr
boost::shared_ptr< SparseMatrix > SparseMatrix_ptr
Definition: SparseMatrix.h:46
paso::SparseMatrix_MatrixMatrixTranspose_BB
void SparseMatrix_MatrixMatrixTranspose_BB(SparseMatrix_ptr C, const_SparseMatrix_ptr A, const_SparseMatrix_ptr B, const_SparseMatrix_ptr T)
Definition: SparseMatrix_MatrixMatrixTranspose.cpp:122
paso::generate_HB
static void generate_HB(std::ofstream &, dim_t *, dim_t *, const double *)
Definition: SparseMatrix_saveHB.cpp:143
speckley::ReducedNodes
Definition: Speckley.h:73
paso::calc_digits
static int calc_digits(int)
Definition: SparseMatrix_saveHB.cpp:56
paso::BlockOps_Cpy_N
void BlockOps_Cpy_N(dim_t N, double *R, const double *V)
Definition: BlockOps.h:50
paso::PasoException
PasoException exception class.
Definition: PasoException.h:43
paso::SparseMatrix::val
double * val
this is used for classical CSR or CSC
Definition: SparseMatrix.h:180
paso::print_data
static void print_data(std::ofstream &, int, int, int, char *, const void *, int, int)
Definition: SparseMatrix_saveHB.cpp:97
SPECKLEY_FACE_ELEMENTS
#define SPECKLEY_FACE_ELEMENTS
Definition: Speckley.h:62
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:82
SPECKLEY_DEGREES_OF_FREEDOM
#define SPECKLEY_DEGREES_OF_FREEDOM
Definition: Speckley.h:59
paso::SparseMatrix_MatrixVector_CSR_OFFSET0
void SparseMatrix_MatrixVector_CSR_OFFSET0(const double alpha, const_SparseMatrix_ptr A, const double *in, const double beta, double *out)
Definition: SparseMatrix_MatrixVector.cpp:292
PasoUtil.h
paso::SparseMatrix::getSubmatrix
SparseMatrix_ptr getSubmatrix(dim_t n_row_sub, dim_t n_col_sub, const index_t *row_list, const index_t *new_col_index) const
Definition: SparseMatrix_getSubmatrix.cpp:53
paso::SparseMatrix::nullifyRowsAndCols_CSC
void nullifyRowsAndCols_CSC(const double *mask_row, const double *mask_col, double main_diagonal_value)
Definition: SparseMatrix_nullifyRowsAndCols.cpp:87
paso::M
static dim_t M
Definition: SparseMatrix_saveHB.cpp:48
paso::SparseMatrix::numRows
dim_t numRows
Definition: SparseMatrix.h:174
paso::SparseMatrix_MatrixMatrix_BB
void SparseMatrix_MatrixMatrix_BB(SparseMatrix_ptr C, const_SparseMatrix_ptr A, const_SparseMatrix_ptr B)
Definition: SparseMatrix_MatrixMatrix.cpp:115
PasoException.h
speckley::Points
Definition: Speckley.h:78
paso::SparseMatrix_MatrixMatrixTranspose_BD
void SparseMatrix_MatrixMatrixTranspose_BD(SparseMatrix_ptr C, const_SparseMatrix_ptr A, const_SparseMatrix_ptr B, const_SparseMatrix_ptr T)
Definition: SparseMatrix_MatrixMatrixTranspose.cpp:747
paso::Pattern_ptr
boost::shared_ptr< Pattern > Pattern_ptr
Definition: Pattern.h:48
paso::SparseMatrix_MatrixVector_CSC_OFFSET0
void SparseMatrix_MatrixVector_CSC_OFFSET0(const double alpha, const_SparseMatrix_ptr A, const double *in, const double beta, double *out)
Definition: SparseMatrix_MatrixVector.cpp:56
speckley::IndexVector
std::vector< index_t > IndexVector
Definition: Speckley.h:55
paso::fmt_str
static void fmt_str(int, int, int *, int *, int *, char *, char *)
Definition: SparseMatrix_saveHB.cpp:70
SPECKLEY_REDUCED_DEGREES_OF_FREEDOM
#define SPECKLEY_REDUCED_DEGREES_OF_FREEDOM
Definition: Speckley.h:64
paso::SparseMatrix_MatrixMatrix
SparseMatrix_ptr SparseMatrix_MatrixMatrix(const_SparseMatrix_ptr A, const_SparseMatrix_ptr B)
Definition: SparseMatrix_MatrixMatrix.cpp:61
paso
Definition: BiCGStab.cpp:25
escript::DataTypes::cplx_t
std::complex< real_t > cplx_t
complex data type
Definition: DataTypes.h:76
speckley::point_locations
const double point_locations[][11]
Definition: Speckley.h:82
MATRIX_FORMAT_DEFAULT
#define MATRIX_FORMAT_DEFAULT
Definition: Paso.h:60
MATRIX_FORMAT_DIAGONAL_BLOCK
#define MATRIX_FORMAT_DIAGONAL_BLOCK
Definition: Paso.h:64
paso::SparseMatrix::col_block_size
dim_t col_block_size
Definition: SparseMatrix.h:172
speckley::Nodes
Definition: Speckley.h:72