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 double *B, const 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 double *B, const double *C) |
void | normalVector (int len, int dim, int dim1, const double *A, double *Normal) |
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) |
typedef std::pair<index_t,index_t> dudley::util::IndexPair |
typedef std::vector<IndexPair> dudley::util::ValueAndIndexList |
void dudley::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 dudley::Assemble_LumpedSystem(), dudley::Assemble_PDE_Points(), dudley::Assemble_PDE_Single_2D(), dudley::Assemble_PDE_Single_3D(), dudley::Assemble_PDE_System_2D(), and dudley::Assemble_PDE_System_3D().
template void dudley::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 dudley::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 dudley::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 dudley::Assemble_getNormal(), and dudley::Assemble_getSize().
IndexPair dudley::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 dudley::NodeMapping::assign(), and dudley::NodeFile::createDOFMappingAndCoupling().
IndexPair dudley::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 dudley::ElementFile::createColoring(), dudley::NodeFile::getDOFRange(), dudley::getGlobalRange(), and dudley::ElementFile::getNodeRange().
void dudley::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 dudley::Assemble_getNormal().
std::vector< index_t > dudley::util::packMask | ( | const std::vector< short > & | mask | ) |
extracts the positive entries in mask
returning a contiguous vector of those entries
Referenced by dudley::DudleyDomain::resolveNodeIds().
void dudley::util::setValuesInUse | ( | const int * | values, |
dim_t | numValues, | ||
std::vector< int > & | valuesInUse, | ||
escript::JMPI | mpiinfo | ||
) |
References MPI_INT, and MPI_MIN.
Referenced by dudley::NodeFile::updateTagList(), finley::NodeFile::updateTagList(), and dudley::ElementFile::updateTagList().
void dudley::util::smallMatMult | ( | int | A1, |
int | A2, | ||
double * | A, | ||
int | B2, | ||
const double * | B, | ||
const double * | C | ||
) |
multiplies two matrices: A(1:A1,1:A2) := B(1:A1,1:B2)*C(1:B2,1:A2)
References INDEX2.
Referenced by dudley::Assemble_getNormal().
void dudley::util::smallMatSetMult1 | ( | int | len, |
int | A1, | ||
int | A2, | ||
double * | A, | ||
int | B2, | ||
const double * | B, | ||
const 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 dudley::Assemble_interpolate().
void dudley::util::sortValueAndIndex | ( | ValueAndIndexList & | array | ) |
orders a ValueAndIndexList by value.
References ValueAndIndexCompare().
Referenced by dudley::ElementFile::optimizeOrdering().
bool dudley::util::ValueAndIndexCompare | ( | const std::pair< int, int > & | i, |
const std::pair< int, int > & | j | ||
) |
comparison function for sortValueAndIndex
Referenced by sortValueAndIndex().