finley/src/Assemble.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2020 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
* Development 2012-2013 by School of Earth Sciences
* Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
* Development from 2019 by School of Earth and Environmental Sciences
**
*****************************************************************************/
/****************************************************************************
Assemblage routines: header file
*****************************************************************************/
#ifndef __FINLEY_ASSEMBLE_H__
#define __FINLEY_ASSEMBLE_H__
#include "Finley.h"
#include "ElementFile.h"
#include "NodeFile.h"
#include <escript/AbstractSystemMatrix.h>
namespace finley {
struct AssembleParameters
{
AssembleParameters(const NodeFile* nodes, const ElementFile* ef,
escript::ASM_ptr sm, escript::Data& rhs,
bool reducedOrder);
const ElementFile* elements;
escript::ASM_ptr S;
escript::Data& F;
int numQuadTotal;
int numQuadSub;
int numSides;
int numSub;
int numDim;
int NN;
dim_t numElements;
int numEqu;
const index_t* row_DOF;
index_t row_DOF_UpperBound;
ElementFile_Jacobians* row_jac;
const int* row_node;
int row_numShapesTotal;
int row_numShapes;
int numComp;
const index_t* col_DOF;
index_t col_DOF_UpperBound;
ElementFile_Jacobians* col_jac;
const int* col_node;
int col_numShapesTotal;
int col_numShapes;
};
void Assemble_PDE(const NodeFile* nodes, const ElementFile* elements,
escript::ASM_ptr S, escript::Data& F,
const escript::Data& A, const escript::Data& B,
const escript::Data& C, const escript::Data& D,
const escript::Data& X, const escript::Data& Y);
template<typename Scalar>
void Assemble_PDE_Points(const AssembleParameters& p,
const escript::Data& d_dirac,
const escript::Data& y_dirac);
void Assemble_PDE_Single_1D(const AssembleParameters& p,
const escript::Data& A, const escript::Data& B,
const escript::Data& C, const escript::Data& D,
const escript::Data& X, const escript::Data& Y);
template<typename Scalar>
void Assemble_PDE_Single_2D(const AssembleParameters& p,
const escript::Data& A, const escript::Data& B,
const escript::Data& C, const escript::Data& D,
const escript::Data& X, const escript::Data& Y);
template<typename Scalar>
void Assemble_PDE_Single_3D(const AssembleParameters& p,
const escript::Data& A, const escript::Data& B,
const escript::Data& C, const escript::Data& D,
const escript::Data& X, const escript::Data& Y);
template<typename Scalar>
void Assemble_PDE_Single_C(const AssembleParameters& p, const escript::Data& D,
const escript::Data& Y);
void Assemble_PDE_System_1D(const AssembleParameters& p,
const escript::Data& A, const escript::Data& B,
const escript::Data& C, const escript::Data& D,
const escript::Data& X, const escript::Data& Y);
template<typename Scalar>
void Assemble_PDE_System_2D(const AssembleParameters& p,
const escript::Data& A, const escript::Data& B,
const escript::Data& C, const escript::Data& D,
const escript::Data& X, const escript::Data& Y);
template<typename Scalar>
void Assemble_PDE_System_3D(const AssembleParameters& p,
const escript::Data& A, const escript::Data& B,
const escript::Data& C, const escript::Data& D,
const escript::Data& X, const escript::Data& Y);
template<typename Scalar>
void Assemble_PDE_System_C(const AssembleParameters& p, const escript::Data& D,
const escript::Data& Y);
template<typename Scalar = double>
void Assemble_addToSystemMatrix(escript::ASM_ptr S, int NN_Equa,
const index_t* Nodes_Equa, int num_Equa, int NN_Sol,
const index_t* Nodes_Sol, int num_Sol, const Scalar* array);
void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
escript::Data& lumpedMat, const escript::Data& D,
bool useHRZ);
template<typename Scalar>
void Assemble_AverageElementData(const ElementFile* elements,
escript::Data& out, const escript::Data& in);
template<typename Scalar>
void Assemble_CopyElementData(const ElementFile* elements, escript::Data& out,
const escript::Data& in);
template<typename Scalar>
void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
const escript::Data& in);
void Assemble_NodeCoordinates(const NodeFile* nodes, escript::Data& x);
void Assemble_getNormal(const NodeFile* nodes, const ElementFile* elements,
escript::Data& normals);
void Assemble_getSize(const NodeFile* nodes, const ElementFile* elements,
escript::Data& size);
template<typename Scalar>
void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
escript::Data& gradient, const escript::Data& data);
template<typename Scalar>
void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
const escript::Data& data, Scalar* integrals);
template<typename Scalar>
void Assemble_interpolate(const NodeFile* nodes, const ElementFile* elements,
const escript::Data& data, escript::Data& output);
void Assemble_jacobians_1D(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
void Assemble_jacobians_2D(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
void Assemble_jacobians_2D_M1D_E1D(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
void Assemble_jacobians_2D_M1D_E1D_C(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
void Assemble_jacobians_2D_M1D_E2D(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
void Assemble_jacobians_2D_M1D_E2D_C(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
void Assemble_jacobians_3D(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
void Assemble_jacobians_3D_M2D_E2D(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
void Assemble_jacobians_3D_M2D_E2D_C(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
void Assemble_jacobians_3D_M2D_E3D(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
void Assemble_jacobians_3D_M2D_E3D_C(const double* coordinates, int numQuad,
const double* QuadWeights, int numShape,
dim_t numElements, int numNodes, const index_t* nodes,
const double* DSDv, int numTest, const double* DTDv,
double* dTdX, double* volume, const index_t* elementId);
} // namespace finley
#endif // __FINLEY_ASSEMBLE_H__
Finley.h
S
#define S(_J_, _I_)
Definition: ShapeFunctions.cpp:122
escript::Data
Data represents a collection of datapoints.
Definition: Data.h:64
finley::ElementFile
Definition: finley/src/ElementFile.h:63
finley::NodeFile
Definition: finley/src/NodeFile.h:42
ElementFile.h
NodeFile.h
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:66
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:61
escript::ASM_ptr
boost::shared_ptr< AbstractSystemMatrix > ASM_ptr
Definition: AbstractSystemMatrix.h:33
escript::Scalar
Data Scalar(double value, const FunctionSpace &what, bool expanded)
A collection of factory functions for creating Data objects which contain data points of various shap...
Definition: DataFactory.cpp:49
finley
A suite of factory methods for creating various finley domains.
Definition: finley/src/Assemble.h:32
finley::Assemble_addToSystemMatrix
void Assemble_addToSystemMatrix(escript::ASM_ptr S, int NN_Equa, const index_t *Nodes_Equa, int num_Equa, int NN_Sol, const index_t *Nodes_Sol, int num_Sol, const Scalar *array)
finley::Assemble_jacobians_1D
void Assemble_jacobians_1D(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:50
finley::Assemble_jacobians_3D
void Assemble_jacobians_3D(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:376
finley::Assemble_PDE_Single_3D
void Assemble_PDE_Single_3D(const AssembleParameters &p, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y)
Definition: finley/src/Assemble_PDE_Single_3D.cpp:46
finley::Assemble_PDE_Single_2D
void Assemble_PDE_Single_2D(const AssembleParameters &p, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y)
Definition: finley/src/Assemble_PDE_Single_2D.cpp:46
finley::Assemble_CopyNodalData
void Assemble_CopyNodalData(const NodeFile *nodes, escript::Data &out, const escript::Data &in)
copies data between different types of nodal representations
Definition: finley/src/Assemble_CopyNodalData.cpp:27
finley::Assemble_getNormal
void Assemble_getNormal(const NodeFile *nodes, const ElementFile *elements, escript::Data &normals)
calculates the normal vector at quadrature points on face elements
Definition: finley/src/Assemble_getNormal.cpp:33
finley::Assemble_jacobians_2D_M1D_E1D
void Assemble_jacobians_2D_M1D_E1D(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:140
finley::Assemble_jacobians_3D_M2D_E2D_C
void Assemble_jacobians_3D_M2D_E2D_C(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:733
finley::Assemble_NodeCoordinates
void Assemble_NodeCoordinates(const NodeFile *nodes, escript::Data &x)
copies node coordinates into expanded Data object x
Definition: finley/src/Assemble_NodeCoordinates.cpp:34
finley::Assemble_PDE_Single_1D
void Assemble_PDE_Single_1D(const AssembleParameters &p, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y)
Definition: Assemble_PDE_Single_1D.cpp:46
finley::Assemble_interpolate
void Assemble_interpolate(const NodeFile *nodes, const ElementFile *elements, const escript::Data &data, escript::Data &output)
interpolates nodal data in a data array onto elements (=integration points)
Definition: finley/src/Assemble_interpolate.cpp:34
finley::Assemble_CopyElementData
void Assemble_CopyElementData(const ElementFile *elements, escript::Data &out, const escript::Data &in)
copies data between different types of elements
Definition: finley/src/Assemble_CopyElementData.cpp:31
finley::Assemble_jacobians_2D_M1D_E1D_C
void Assemble_jacobians_2D_M1D_E1D_C(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:186
finley::Assemble_integrate
void Assemble_integrate(const NodeFile *nodes, const ElementFile *elements, const escript::Data &data, Scalar *integrals)
integrates data on quadrature points
Definition: finley/src/Assemble_integrate.cpp:34
finley::Assemble_jacobians_3D_M2D_E3D
void Assemble_jacobians_3D_M2D_E3D(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:452
finley::Assemble_PDE_System_C
void Assemble_PDE_System_C(const AssembleParameters &p, const escript::Data &D, const escript::Data &Y)
Definition: Assemble_PDE_System_C.cpp:43
finley::Assemble_PDE_System_3D
void Assemble_PDE_System_3D(const AssembleParameters &p, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y)
Definition: finley/src/Assemble_PDE_System_3D.cpp:49
finley::Assemble_jacobians_2D_M1D_E2D_C
void Assemble_jacobians_2D_M1D_E2D_C(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:300
finley::Assemble_PDE_System_2D
void Assemble_PDE_System_2D(const AssembleParameters &p, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y)
Definition: finley/src/Assemble_PDE_System_2D.cpp:49
finley::Assemble_LumpedSystem
void Assemble_LumpedSystem(const NodeFile *nodes, const ElementFile *elements, escript::Data &lumpedMat, const escript::Data &D, bool useHRZ)
Definition: finley/src/Assemble_LumpedSystem.cpp:37
finley::Assemble_PDE
void Assemble_PDE(const NodeFile *nodes, const ElementFile *elements, escript::ASM_ptr S, escript::Data &F, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y)
Definition: finley/src/Assemble_PDE.cpp:86
finley::Assemble_getSize
void Assemble_getSize(const NodeFile *nodes, const ElementFile *elements, escript::Data &size)
Definition: finley/src/Assemble_getSize.cpp:33
finley::Assemble_jacobians_2D
void Assemble_jacobians_2D(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:87
finley::Assemble_jacobians_2D_M1D_E2D
void Assemble_jacobians_2D_M1D_E2D(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:246
finley::Assemble_PDE_Points
void Assemble_PDE_Points(const AssembleParameters &p, const escript::Data &d_dirac, const escript::Data &y_dirac)
Definition: finley/src/Assemble_PDE_Points.cpp:44
finley::Assemble_PDE_Single_C
void Assemble_PDE_Single_C(const AssembleParameters &p, const escript::Data &D, const escript::Data &Y)
Definition: Assemble_PDE_Single_C.cpp:42
finley::Assemble_PDE_System_1D
void Assemble_PDE_System_1D(const AssembleParameters &p, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y)
Definition: Assemble_PDE_System_1D.cpp:49
finley::Assemble_gradient
void Assemble_gradient(const NodeFile *nodes, const ElementFile *elements, escript::Data &gradient, const escript::Data &data)
Definition: finley/src/Assemble_gradient.cpp:34
finley::Assemble_jacobians_3D_M2D_E3D_C
void Assemble_jacobians_3D_M2D_E3D_C(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:533
finley::Assemble_jacobians_3D_M2D_E2D
void Assemble_jacobians_3D_M2D_E2D(const double *coordinates, int numQuad, const double *QuadWeights, int numShape, dim_t numElements, int numNodes, const index_t *nodes, const double *DSDv, int numTest, const double *DTDv, double *dTdX, double *volume, const index_t *elementId)
Definition: finley/src/Assemble_jacobians.cpp:666
finley::Assemble_AverageElementData
void Assemble_AverageElementData(const ElementFile *elements, escript::Data &out, const escript::Data &in)
averages data
Definition: finley/src/Assemble_AverageElementData.cpp:33
finley::AssembleParameters
Definition: finley/src/Assemble.h:35
finley::AssembleParameters::NN
int NN
leading dimension of element node table
Definition: finley/src/Assemble.h:57
finley::AssembleParameters::col_jac
ElementFile_Jacobians * col_jac
Definition: finley/src/Assemble.h:71
finley::AssembleParameters::row_numShapesTotal
int row_numShapesTotal
Definition: finley/src/Assemble.h:66
finley::AssembleParameters::numComp
int numComp
Definition: finley/src/Assemble.h:68
finley::AssembleParameters::elements
const ElementFile * elements
element file these parameters apply to
Definition: finley/src/Assemble.h:41
finley::AssembleParameters::col_DOF_UpperBound
index_t col_DOF_UpperBound
Definition: finley/src/Assemble.h:70
finley::AssembleParameters::S
escript::ASM_ptr S
system matrix to be updated
Definition: finley/src/Assemble.h:43
finley::AssembleParameters::row_DOF
const index_t * row_DOF
Definition: finley/src/Assemble.h:62
finley::AssembleParameters::numQuadTotal
int numQuadTotal
total number of quadrature nodes = numQuadSub * numQuadSub
Definition: finley/src/Assemble.h:47
finley::AssembleParameters::numSub
int numSub
number of sub-elements
Definition: finley/src/Assemble.h:53
finley::AssembleParameters::row_numShapes
int row_numShapes
Definition: finley/src/Assemble.h:67
finley::AssembleParameters::col_numShapes
int col_numShapes
Definition: finley/src/Assemble.h:74
finley::AssembleParameters::numQuadSub
int numQuadSub
number of quadrature nodes per subelements
Definition: finley/src/Assemble.h:49
finley::AssembleParameters::col_numShapesTotal
int col_numShapesTotal
Definition: finley/src/Assemble.h:73
finley::AssembleParameters::row_jac
ElementFile_Jacobians * row_jac
Definition: finley/src/Assemble.h:64
finley::AssembleParameters::numEqu
int numEqu
Definition: finley/src/Assemble.h:61
finley::AssembleParameters::F
escript::Data & F
right-hand side to be updated
Definition: finley/src/Assemble.h:45
finley::AssembleParameters::col_node
const int * col_node
Definition: finley/src/Assemble.h:72
finley::AssembleParameters::row_DOF_UpperBound
index_t row_DOF_UpperBound
Definition: finley/src/Assemble.h:63
finley::AssembleParameters::numSides
int numSides
number of sides
Definition: finley/src/Assemble.h:51
finley::AssembleParameters::numElements
dim_t numElements
number of elements
Definition: finley/src/Assemble.h:59
finley::AssembleParameters::numDim
int numDim
number of spatial dimensions
Definition: finley/src/Assemble.h:55
finley::AssembleParameters::col_DOF
const index_t * col_DOF
Definition: finley/src/Assemble.h:69
finley::AssembleParameters::AssembleParameters
AssembleParameters(const NodeFile *nodes, const ElementFile *ef, escript::ASM_ptr sm, escript::Data &rhs, bool reducedOrder)
Definition: finley/src/Assemble_getAssembleParameters.cpp:34
finley::AssembleParameters::row_node
const int * row_node
Definition: finley/src/Assemble.h:65
finley::ElementFile_Jacobians
Definition: finley/src/ElementFile.h:29