Public Member Functions | |
| CellJacobianBatch () | |
| int | spatialDim () const |
| int | cellDim () const |
| int | numCells () const |
| int | numQuadPoints () const |
| void | resize (int numCells, int numQuad, int spatialDim, int cellDim) |
| void | resize (int numCells, int spatialDim, int cellDim) |
| double * | jVals (int c, int q) |
| double * | jVals (int c) |
| const double * | jVals (int c) const |
| double * | detJ (int c) |
| const Array< double > & | detJ () const |
| void | applyInvJ (int cell, int q, double *rhs, int nRhs, bool trans) const |
| void | applyInvJ (int cell, double *rhs, int nRhs, bool trans) const |
| void | getInvJ (int cell, int quad, Array< double > &invJ) const |
| void | getInvJ (int cell, Array< double > &invJ) const |
| void | print (std::ostream &os) const |
Static Public Member Functions | |
| static double & | totalFlops () |
| static void | addFlops (const double &flops) |
Private Member Functions | |
| void | factor () const |
| void | computeInverses () const |
Private Attributes | |
| int | spatialDim_ |
| int | cellDim_ |
| int | jSize_ |
| int | numCells_ |
| int | numQuad_ |
| Array< int > | iPiv_ |
| Array< double > | J_ |
| Array< double > | detJ_ |
| Array< double > | invJ_ |
| bool | isFactored_ |
| bool | hasInverses_ |
| bool | hasDetJ_ |
A CellJacobianBatch is a collection of Jacobian matrices for many quadrature points distributed over batch of cells. All cells must have the same dimension and number of quadrature points. Affine cells have constant Jacobians, so in that case the quadrature point index can be ignored. See the ReferenceCellBase documentation for definitions of the coordinate systems used.
All Jacobian elements for all points and cells are packed into a single vector. The length of the vector is
where
is the spatial dimension. The indices into the vector cycle in the following order (from slowest to fastest)
Thus, the jacobian values for the
-th quadrature point on the
-th cell are the
entries following the
-th element.
Definition at line 87 of file SundanceCellJacobianBatch.hpp.
empty ctor
Definition at line 83 of file SundanceCellJacobianBatch.cpp.
| static void Sundance::CellJacobianBatch::addFlops | ( | const double & | flops | ) | [inline, static] |
Definition at line 173 of file SundanceCellJacobianBatch.hpp.
References totalFlops().
Referenced by applyInvJ(), computeInverses(), factor(), Sundance::BasicSimplicialMesh::getJacobians(), and Sundance::BasicSimplicialMesh::pushForward().
| void CellJacobianBatch::applyInvJ | ( | int | cell, |
| int | q, | ||
| double * | rhs, | ||
| int | nRhs, | ||
| bool | trans | ||
| ) | const |
Apply a cell's inverse Jacobian to (possibly) multiple rhs stored in column-major order.
Definition at line 226 of file SundanceCellJacobianBatch.cpp.
References addFlops(), dgetrs_(), factor(), iPiv_, isFactored_, J_, numCells_, numQuad_, and spatialDim_.
Referenced by Sundance::QuadratureEvalMediator::fillFunctionCache(), Sundance::CurveIntegralCalc::getCurveQuadPoints_line(), and Sundance::CurveIntegralCalc::getCurveQuadPoints_polygon().
| void Sundance::CellJacobianBatch::applyInvJ | ( | int | cell, |
| double * | rhs, | ||
| int | nRhs, | ||
| bool | trans | ||
| ) | const [inline] |
Apply an affine cell's inverse Jacobian to (possibly) multiple rhs stored in column-major order.
Definition at line 148 of file SundanceCellJacobianBatch.hpp.
References applyInvJ().
Referenced by applyInvJ().
| int Sundance::CellJacobianBatch::cellDim | ( | ) | const [inline] |
get the cell dimension
Definition at line 98 of file SundanceCellJacobianBatch.hpp.
References cellDim_.
Referenced by Sundance::ElementIntegral::createOneFormTransformationMatrix(), Sundance::ElementIntegral::createTwoFormTransformationMatrix(), detJ(), Sundance::CurveEvalMediator::evalDiscreteFuncElement(), Sundance::QuadratureEvalMediator::fillFunctionCache(), and resize().
| void CellJacobianBatch::computeInverses | ( | ) | const [private] |
Definition at line 179 of file SundanceCellJacobianBatch.cpp.
References addFlops(), dgetrs_(), factor(), hasInverses_, invJ_, iPiv_, isFactored_, J_, jacobianInversionTimer(), jSize_, numCells_, numQuad_, spatialDim_, SUNDANCE_OUT, and Playa::ObjectWithVerbosity::verb().
| double* Sundance::CellJacobianBatch::detJ | ( | int | c | ) | [inline] |
Definition at line 130 of file SundanceCellJacobianBatch.hpp.
References detJ_.
Referenced by Sundance::ElementIntegral::createOneFormTransformationMatrix(), Sundance::ElementIntegral::createTwoFormTransformationMatrix(), Sundance::PeriodicMesh1D::getJacobians(), Sundance::PeriodicSingleCellMesh1D::getJacobians(), Sundance::BasicSimplicialMesh::getJacobians(), Sundance::HNMesh2D::getJacobians(), Sundance::HNMesh3D::getJacobians(), Sundance::QuadratureIntegral::transformOneForm(), Sundance::MaximalQuadratureIntegral::transformOneForm(), Sundance::CurveQuadratureIntegral::transformOneForm(), Sundance::ReducedIntegral::transformOneForm(), Sundance::RefIntegral::transformOneForm(), Sundance::CurveQuadratureIntegral::transformSummingFirst(), Sundance::QuadratureIntegral::transformTwoForm(), Sundance::MaximalQuadratureIntegral::transformTwoForm(), Sundance::ReducedIntegral::transformTwoForm(), Sundance::RefIntegral::transformTwoForm(), Sundance::QuadratureIntegral::transformZeroForm(), Sundance::MaximalQuadratureIntegral::transformZeroForm(), Sundance::ReducedIntegral::transformZeroForm(), and Sundance::RefIntegral::transformZeroForm().
| const Array<double>& Sundance::CellJacobianBatch::detJ | ( | ) | const [inline] |
get the vector of determinant values
Definition at line 134 of file SundanceCellJacobianBatch.hpp.
References cellDim(), detJ_, factor(), isFactored_, and spatialDim().
Referenced by factor().
| void CellJacobianBatch::factor | ( | ) | const [private] |
Definition at line 126 of file SundanceCellJacobianBatch.cpp.
References addFlops(), cellDim_, detJ(), detJ_, dgetrf_(), iPiv_, isFactored_, J_, jacobianFactoringTimer(), jSize_, numCells_, numQuad_, spatialDim_, SUNDANCE_OUT, and Playa::ObjectWithVerbosity::verb().
Referenced by applyInvJ(), computeInverses(), and detJ().
| void CellJacobianBatch::getInvJ | ( | int | cell, |
| int | quad, | ||
| Array< double > & | invJ | ||
| ) | const |
Get the explicit inverse of the Jacobian for the given (cell, quad) combination.
Definition at line 252 of file SundanceCellJacobianBatch.cpp.
References computeInverses(), hasInverses_, invJ_, jSize_, numQuad_, and spatialDim_.
Referenced by Sundance::ElementIntegral::createOneFormTransformationMatrix(), Sundance::ElementIntegral::createTwoFormTransformationMatrix(), and Sundance::CurveEvalMediator::evalDiscreteFuncElement().
| void Sundance::CellJacobianBatch::getInvJ | ( | int | cell, |
| Array< double > & | invJ | ||
| ) | const [inline] |
Get the explicit inverse of the Jacobian for the given affine cell.
Definition at line 162 of file SundanceCellJacobianBatch.hpp.
References getInvJ().
Referenced by getInvJ().
| double* Sundance::CellJacobianBatch::jVals | ( | int | c, |
| int | q | ||
| ) |
Get a pointer to the values at the q-th quadrature point on the c-th cell.
| c | the index of the cell in the batch |
| q | the index of the quadrature point |
Referenced by Sundance::PeriodicMesh1D::getJacobians(), Sundance::PeriodicSingleCellMesh1D::getJacobians(), Sundance::BasicSimplicialMesh::getJacobians(), Sundance::HNMesh2D::getJacobians(), Sundance::HNMesh3D::getJacobians(), Sundance::CubicHermite::postApplyTransformationTriangle(), Sundance::CubicHermite::preApplyTransformationTransposeTriangle(), and Sundance::CubicHermite::preApplyTransformationTriangle().
| double* Sundance::CellJacobianBatch::jVals | ( | int | c | ) | [inline] |
Get a pointer to the start of the c-th Jacobian in the batch.
Definition at line 123 of file SundanceCellJacobianBatch.hpp.
| const double* Sundance::CellJacobianBatch::jVals | ( | int | c | ) | const [inline] |
Get a constant pointer to start of c-th Jacobian in the batch
Definition at line 127 of file SundanceCellJacobianBatch.hpp.
| int Sundance::CellJacobianBatch::numCells | ( | ) | const [inline] |
get the number of cells in the batch
Definition at line 101 of file SundanceCellJacobianBatch.hpp.
References numCells_.
Referenced by Sundance::ElementIntegral::createOneFormTransformationMatrix(), Sundance::ElementIntegral::createTwoFormTransformationMatrix(), Sundance::CurveEvalMediator::evalDiscreteFuncElement(), Sundance::IntegralGroup::evaluate(), Sundance::QuadratureEvalMediator::fillFunctionCache(), Sundance::CubicHermite::postApplyTransformationTriangle(), Sundance::CubicHermite::preApplyTransformationTransposeTriangle(), Sundance::CubicHermite::preApplyTransformationTriangle(), resize(), Sundance::QuadratureIntegral::transformOneForm(), Sundance::MaximalQuadratureIntegral::transformOneForm(), Sundance::CurveQuadratureIntegral::transformOneForm(), Sundance::ReducedIntegral::transformOneForm(), Sundance::RefIntegral::transformOneForm(), Sundance::CurveQuadratureIntegral::transformSummingFirst(), Sundance::QuadratureIntegral::transformTwoForm(), Sundance::MaximalQuadratureIntegral::transformTwoForm(), Sundance::CurveQuadratureIntegral::transformTwoForm(), Sundance::ReducedIntegral::transformTwoForm(), Sundance::RefIntegral::transformTwoForm(), Sundance::QuadratureIntegral::transformZeroForm(), Sundance::MaximalQuadratureIntegral::transformZeroForm(), Sundance::CurveQuadratureIntegral::transformZeroForm(), Sundance::ReducedIntegral::transformZeroForm(), and Sundance::RefIntegral::transformZeroForm().
| int Sundance::CellJacobianBatch::numQuadPoints | ( | ) | const [inline] |
get the number of quad points per cell
Definition at line 104 of file SundanceCellJacobianBatch.hpp.
References numQuad_.
| void CellJacobianBatch::print | ( | std::ostream & | os | ) | const |
Definition at line 269 of file SundanceCellJacobianBatch.cpp.
References computeInverses(), hasInverses_, invJ_, jSize_, numCells_, numQuad_, and spatialDim_.
Referenced by Sundance::operator<<().
| void CellJacobianBatch::resize | ( | int | numCells, |
| int | numQuad, | ||
| int | spatialDim, | ||
| int | cellDim | ||
| ) |
resize the batch
Definition at line 89 of file SundanceCellJacobianBatch.cpp.
References cellDim(), cellDim_, detJ_, hasInverses_, iPiv_, isFactored_, J_, jSize_, numCells(), numCells_, numQuad_, spatialDim(), and spatialDim_.
Referenced by Sundance::CurveIntegralCalc::getCurveQuadPoints_line(), Sundance::CurveIntegralCalc::getCurveQuadPoints_polygon(), Sundance::PeriodicMesh1D::getJacobians(), Sundance::PeriodicSingleCellMesh1D::getJacobians(), Sundance::BasicSimplicialMesh::getJacobians(), Sundance::HNMesh2D::getJacobians(), and Sundance::HNMesh3D::getJacobians().
| void CellJacobianBatch::resize | ( | int | numCells, |
| int | spatialDim, | ||
| int | cellDim | ||
| ) |
resize the batch, using one quadrature point per cell (appropriate for affine elements)
Definition at line 108 of file SundanceCellJacobianBatch.cpp.
References cellDim(), cellDim_, detJ_, hasInverses_, iPiv_, isFactored_, J_, jSize_, numCells(), numCells_, numQuad_, spatialDim(), and spatialDim_.
| int Sundance::CellJacobianBatch::spatialDim | ( | ) | const [inline] |
get the spatial dimension
Definition at line 95 of file SundanceCellJacobianBatch.hpp.
References spatialDim_.
Referenced by detJ(), Sundance::CurveEvalMediator::evalDiscreteFuncElement(), Sundance::QuadratureEvalMediator::fillFunctionCache(), and resize().
| static double& Sundance::CellJacobianBatch::totalFlops | ( | ) | [inline, static] |
Definition at line 169 of file SundanceCellJacobianBatch.hpp.
Referenced by addFlops(), and Sundance::QuadratureEvalMediator::computePhysQuadPts().
int Sundance::CellJacobianBatch::cellDim_ [private] |
Definition at line 182 of file SundanceCellJacobianBatch.hpp.
Array<double> Sundance::CellJacobianBatch::detJ_ [mutable, private] |
Definition at line 188 of file SundanceCellJacobianBatch.hpp.
bool Sundance::CellJacobianBatch::hasDetJ_ [mutable, private] |
Definition at line 192 of file SundanceCellJacobianBatch.hpp.
bool Sundance::CellJacobianBatch::hasInverses_ [mutable, private] |
Definition at line 191 of file SundanceCellJacobianBatch.hpp.
Referenced by computeInverses(), getInvJ(), print(), and resize().
Array<double> Sundance::CellJacobianBatch::invJ_ [mutable, private] |
Definition at line 189 of file SundanceCellJacobianBatch.hpp.
Referenced by computeInverses(), getInvJ(), and print().
Array<int> Sundance::CellJacobianBatch::iPiv_ [mutable, private] |
Definition at line 186 of file SundanceCellJacobianBatch.hpp.
Referenced by applyInvJ(), computeInverses(), factor(), and resize().
bool Sundance::CellJacobianBatch::isFactored_ [mutable, private] |
Definition at line 190 of file SundanceCellJacobianBatch.hpp.
Referenced by applyInvJ(), computeInverses(), detJ(), factor(), and resize().
Array<double> Sundance::CellJacobianBatch::J_ [mutable, private] |
Definition at line 187 of file SundanceCellJacobianBatch.hpp.
Referenced by applyInvJ(), computeInverses(), factor(), jVals(), and resize().
int Sundance::CellJacobianBatch::jSize_ [private] |
Definition at line 183 of file SundanceCellJacobianBatch.hpp.
Referenced by computeInverses(), factor(), getInvJ(), jVals(), print(), and resize().
int Sundance::CellJacobianBatch::numCells_ [private] |
Definition at line 184 of file SundanceCellJacobianBatch.hpp.
Referenced by applyInvJ(), computeInverses(), factor(), numCells(), print(), and resize().
int Sundance::CellJacobianBatch::numQuad_ [private] |
Definition at line 185 of file SundanceCellJacobianBatch.hpp.
Referenced by applyInvJ(), computeInverses(), factor(), getInvJ(), numQuadPoints(), print(), and resize().
int Sundance::CellJacobianBatch::spatialDim_ [private] |
Definition at line 181 of file SundanceCellJacobianBatch.hpp.
Referenced by applyInvJ(), computeInverses(), factor(), getInvJ(), print(), resize(), and spatialDim().