escript
Revision_
|
Typedefs | |
typedef std::pair< index_t, index_t > | IndexPair |
typedef std::vector< IndexPair > | ValueAndIndexList |
Functions | |
bool | ValueAndIndexCompare (const std::pair< int, int > &i, const std::pair< int, int > &j) |
comparison function for sortValueAndIndex More... | |
void | sortValueAndIndex (ValueAndIndexList &array) |
orders a ValueAndIndexList by value. More... | |
void | gather (int len, const index_t *index, int numData, const double *in, double *out) |
template<typename Scalar > | |
void | addScatter (int len, const index_t *index, int numData, const Scalar *in, Scalar *out, index_t upperBound) |
template void | addScatter< real_t > (int len, const index_t *index, int numData, const real_t *in, real_t *out, index_t upperBound) |
template void | addScatter< cplx_t > (int len, const index_t *index, int numData, const cplx_t *in, cplx_t *out, index_t upperBound) |
void | smallMatMult (int A1, int A2, double *A, int B2, const std::vector< double > &B, const std::vector< double > &C) |
multiplies two matrices: A(1:A1,1:A2) := B(1:A1,1:B2)*C(1:B2,1:A2) More... | |
void | smallMatSetMult1 (int len, int A1, int A2, double *A, int B2, const std::vector< double > &B, const std::vector< double > &C) |
void | invertSmallMat (int len, int dim, const double *A, double *invA, double *det) |
void | normalVector (int len, int dim, int dim1, const double *A, double *Normal) |
index_t | getMinInt (int dim, dim_t N, const index_t *values) |
calculates the minimum value from a dim X N integer array More... | |
index_t | getMaxInt (int dim, dim_t N, const index_t *values) |
calculates the maximum value from a dim X N integer array More... | |
IndexPair | getMinMaxInt (int dim, dim_t N, const index_t *values) |
IndexPair | getFlaggedMinMaxInt (dim_t N, const index_t *values, index_t ignore) |
std::vector< index_t > | packMask (const std::vector< short > &mask) |
void | setValuesInUse (const int *values, dim_t numValues, std::vector< int > &valuesInUse, escript::JMPI mpiinfo) |
bool | hasReducedIntegrationOrder (const escript::Data &in) |
returns true if the data object is defined on reduced element types More... | |
typedef std::pair<index_t,index_t> finley::util::IndexPair |
typedef std::vector<IndexPair> finley::util::ValueAndIndexList |
void finley::util::addScatter | ( | int | len, |
const index_t * | index, | ||
int | numData, | ||
const Scalar * | in, | ||
Scalar * | out, | ||
index_t | upperBound | ||
) |
adds array in
into out
using an index
: out(1:numData,index[p])+=in(1:numData,p) where p={k=1...len, index[k]<upperBound}
References addScatter< cplx_t >(), addScatter< real_t >(), and INDEX2.
Referenced by finley::Assemble_LumpedSystem(), finley::Assemble_PDE_Points(), finley::Assemble_PDE_Single_1D(), finley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), finley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), and hasReducedIntegrationOrder().
template void finley::util::addScatter< cplx_t > | ( | int | len, |
const index_t * | index, | ||
int | numData, | ||
const cplx_t * | in, | ||
cplx_t * | out, | ||
index_t | upperBound | ||
) |
Referenced by addScatter().
template void finley::util::addScatter< real_t > | ( | int | len, |
const index_t * | index, | ||
int | numData, | ||
const real_t * | in, | ||
real_t * | out, | ||
index_t | upperBound | ||
) |
Referenced by addScatter().
void finley::util::gather | ( | int | len, |
const index_t * | index, | ||
int | numData, | ||
const double * | in, | ||
double * | out | ||
) |
gathers values into array out
from array in
using index
: out(1:numData, 1:len) := in(1:numData, index(1:len))
References INDEX2.
Referenced by finley::Assemble_getNormal(), finley::Assemble_getSize(), finley::FinleyDomain::findMatchingFaces(), and hasReducedIntegrationOrder().
IndexPair finley::util::getFlaggedMinMaxInt | ( | dim_t | N, |
const index_t * | values, | ||
index_t | ignore | ||
) |
calculates the minimum and maximum value from an integer array of length N disregarding the value ignore
References escript::DataTypes::index_t_max(), escript::DataTypes::index_t_min(), and paso::N.
Referenced by finley::NodeMapping::assign(), finley::NodeFile::createDOFMappingAndCoupling(), and hasReducedIntegrationOrder().
index_t finley::util::getMaxInt | ( | int | dim, |
dim_t | N, | ||
const index_t * | values | ||
) |
calculates the maximum value from a dim X N integer array
References INDEX2, and paso::N.
Referenced by hasReducedIntegrationOrder(), and finley::FinleyDomain::merge().
index_t finley::util::getMinInt | ( | int | dim, |
dim_t | N, | ||
const index_t * | values | ||
) |
calculates the minimum value from a dim X N integer array
References INDEX2, and paso::N.
Referenced by hasReducedIntegrationOrder().
IndexPair finley::util::getMinMaxInt | ( | int | dim, |
dim_t | N, | ||
const index_t * | values | ||
) |
calculates the minimum and maximum value from an integer array of length N x dim
References INDEX2, escript::DataTypes::index_t_max(), escript::DataTypes::index_t_min(), and paso::N.
Referenced by finley::ElementFile::createColoring(), finley::NodeFile::getDOFRange(), finley::getGlobalRange(), finley::ElementFile::getNodeRange(), and hasReducedIntegrationOrder().
|
inline |
returns true if the data object is defined on reduced element types
References addScatter(), FINLEY_REDUCED_CONTACT_ELEMENTS_1, FINLEY_REDUCED_CONTACT_ELEMENTS_2, FINLEY_REDUCED_ELEMENTS, FINLEY_REDUCED_FACE_ELEMENTS, gather(), getFlaggedMinMaxInt(), escript::Data::getFunctionSpace(), getMaxInt(), getMinInt(), getMinMaxInt(), escript::FunctionSpace::getTypeCode(), invertSmallMat(), paso::N, normalVector(), packMask(), escript::Scalar(), setValuesInUse(), smallMatMult(), and smallMatSetMult1().
Referenced by finley::Assemble_AverageElementData(), finley::Assemble_CopyElementData(), finley::Assemble_getNormal(), finley::Assemble_getSize(), finley::Assemble_gradient(), finley::Assemble_integrate(), finley::Assemble_interpolate(), and finley::ElementFile::setTags().
void finley::util::invertSmallMat | ( | int | len, |
int | dim, | ||
const double * | A, | ||
double * | invA, | ||
double * | det | ||
) |
inverts the set of dim x dim matrices A(:,:,1:len) with dim=1,2,3 the inverse and determinant are returned.
References INDEX3.
Referenced by hasReducedIntegrationOrder().
void finley::util::normalVector | ( | int | len, |
int | dim, | ||
int | dim1, | ||
const double * | A, | ||
double * | Normal | ||
) |
returns the normalized vector normal[dim,len] orthogonal to A(:,0,q) and A(:,1,q) in the case of dim=3, or the vector A(:,0,q) in the case of dim=2
References INDEX2, and INDEX3.
Referenced by finley::Assemble_getNormal(), and hasReducedIntegrationOrder().
std::vector< index_t > finley::util::packMask | ( | const std::vector< short > & | mask | ) |
extracts the positive entries in mask
returning a contiguous vector of those entries
Referenced by finley::FinleyDomain::createMappings(), finley::NodeFile::createNodeMappings(), hasReducedIntegrationOrder(), finley::FinleyDomain::prepare(), and finley::FinleyDomain::resolveNodeIds().
void finley::util::setValuesInUse | ( | const int * | values, |
dim_t | numValues, | ||
std::vector< int > & | valuesInUse, | ||
escript::JMPI | mpiinfo | ||
) |
References MPI_INT, and MPI_MIN.
Referenced by hasReducedIntegrationOrder(), and finley::ElementFile::updateTagList().
void finley::util::smallMatMult | ( | int | A1, |
int | A2, | ||
double * | A, | ||
int | B2, | ||
const std::vector< double > & | B, | ||
const std::vector< double > & | C | ||
) |
multiplies two matrices: A(1:A1,1:A2) := B(1:A1,1:B2)*C(1:B2,1:A2)
References INDEX2.
Referenced by finley::Assemble_getNormal(), and hasReducedIntegrationOrder().
void finley::util::smallMatSetMult1 | ( | int | len, |
int | A1, | ||
int | A2, | ||
double * | A, | ||
int | B2, | ||
const std::vector< double > & | B, | ||
const std::vector< double > & | C | ||
) |
multiplies a set of matrices with a single matrix: A(1:A1,1:A2,i)=B(1:A1,1:B2,i)*C(1:B2,1:A2) for i=1,len
References INDEX2, and INDEX3.
Referenced by finley::Assemble_interpolate(), and hasReducedIntegrationOrder().
void finley::util::sortValueAndIndex | ( | ValueAndIndexList & | array | ) |
orders a ValueAndIndexList by value.
References ValueAndIndexCompare().
Referenced by finley::ElementFile::optimizeOrdering().
bool finley::util::ValueAndIndexCompare | ( | const std::pair< int, int > & | i, |
const std::pair< int, int > & | j | ||
) |
comparison function for sortValueAndIndex
Referenced by sortValueAndIndex().