ESScript
Revision_4488
|
Typedefs | |
typedef std::vector< std::pair < int, int > > | ValueAndIndexList |
Functions | |
bool | ValueAndIndexCompare (const std::pair< int, int > &i, const std::pair< int, int > &j) |
comparision function for sortValueandIndex | |
void | sortValueAndIndex (ValueAndIndexList &array) |
orders a ValueAndIndexList by value | |
void | gather (int len, const int *index, int numData, const double *in, double *out) |
void | addScatter (const int len, const int *index, const int numData, const double *in, double *out, const int 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) | |
void | smallMatSetMult1 (int len, int A1, int A2, double *A, int B2, const double *B, const 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) |
int | getMinInt (int dim, int N, const int *values) |
calculates the minimum value from a dim X N integer array | |
int | getMaxInt (int dim, int N, const int *values) |
calculates the maximum value from a dim X N integer array | |
std::pair< int, int > | getMinMaxInt (int dim, int N, const int *values) |
int | getFlaggedMinInt (int dim, int N, const int *values, int ignore) |
calculates the minimum value from a dim X N integer array | |
int | getFlaggedMaxInt (int dim, int N, const int *values, int ignore) |
calculates the maximum value from a dim X N integer array | |
int | packMask (int N, const int *mask, int *index) |
void | setValuesInUse (const int *values, const int numValues, std::vector< int > &valuesInUse, Esys_MPIInfo *mpiinfo) |
bool | hasReducedIntegrationOrder (const escript::Data &in) |
returns true if the data object is defined on reduced element types |
typedef std::vector< std::pair<int,int> > finley::util::ValueAndIndexList |
void finley::util::addScatter | ( | const int | len, |
const int * | index, | ||
const int | numData, | ||
const double * | in, | ||
double * | out, | ||
const int | upperBound | ||
) |
adds a vector in into out using an index: out(1:numData,index[p])+=in(1:numData,p) where p={k=1...len, index[k]<upperBound}
References 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(), and finley::Assemble_PDE_System_C().
void finley::util::gather | ( | int | len, |
const int * | index, | ||
int | numData, | ||
const double * | in, | ||
double * | out | ||
) |
gathers values into vector out from vector in using index: out(1:numData, 1:len) := in(1:numData, index(1:len))
References INDEX2.
Referenced by finley::Assemble_getSize(), finley::Assemble_setNormal(), and Finley_Mesh_findMatchingFaces().
int finley::util::getFlaggedMaxInt | ( | int | dim, |
int | N, | ||
const int * | values, | ||
int | ignore | ||
) |
calculates the maximum value from a dim X N integer array
Referenced by Finley_Mesh_createDOFMappingAndCoupling(), and Finley_NodeMapping_alloc().
int finley::util::getFlaggedMinInt | ( | int | dim, |
int | N, | ||
const int * | values, | ||
int | ignore | ||
) |
calculates the minimum value from a dim X N integer array
Referenced by Finley_Mesh_createDOFMappingAndCoupling(), and Finley_NodeMapping_alloc().
int finley::util::getMaxInt | ( | int | dim, |
int | N, | ||
const int * | values | ||
) |
calculates the maximum value from a dim X N integer array
Referenced by Finley_Mesh_merge().
int finley::util::getMinInt | ( | int | dim, |
int | N, | ||
const int * | values | ||
) |
std::pair< int, int > finley::util::getMinMaxInt | ( | int | dim, |
int | N, | ||
const int * | values | ||
) |
|
inline |
returns true if the data object is defined on reduced element types
References FINLEY_REDUCED_CONTACT_ELEMENTS_1, FINLEY_REDUCED_CONTACT_ELEMENTS_2, FINLEY_REDUCED_ELEMENTS, FINLEY_REDUCED_FACE_ELEMENTS, escript::Data::getFunctionSpace(), and escript::FunctionSpace::getTypeCode().
Referenced by finley::Assemble_AverageElementData(), finley::Assemble_CopyElementData(), finley::Assemble_getSize(), finley::Assemble_gradient(), finley::Assemble_integrate(), finley::Assemble_interpolate(), finley::Assemble_setNormal(), 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 ABS, Finley_setError(), INDEX3, VALUE_ERROR, and ZERO_DIVISION_ERROR.
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 Finley_setError(), INDEX2, INDEX3, and ZERO_DIVISION_ERROR.
Referenced by finley::Assemble_setNormal().
int finley::util::packMask | ( | int | N, |
const int * | mask, | ||
int * | index | ||
) |
determines the indices of the positive entries in mask returning the length of index.
References N.
Referenced by Finley_Mesh_createMappings(), Finley_Mesh_createNodeFileMappings(), Finley_Mesh_prepare(), and Finley_Mesh_resolveNodeIds().
void finley::util::setValuesInUse | ( | const int * | values, |
const int | numValues, | ||
std::vector< int > & | valuesInUse, | ||
Esys_MPIInfo * | mpiinfo | ||
) |
References Esys_MPIInfo::comm, INDEX_T_MAX, INDEX_T_MIN, and MPI_INT.
Referenced by finley::NodeFile::updateTagList(), and finley::ElementFile::updateTagList().
void finley::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 finley::Assemble_setNormal().
void finley::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 finley::Assemble_interpolate().
void finley::util::sortValueAndIndex | ( | ValueAndIndexList & | array | ) |
orders a ValueAndIndexList by value
sortValueAndIndex is used to sort items by a value. index points to the location of the original item array and can be used to reorder the array
References ValueAndIndexCompare().
Referenced by finley::ElementFile::optimizeOrdering().
bool finley::util::ValueAndIndexCompare | ( | const std::pair< int, int > & | i, |
const std::pair< int, int > & | j | ||
) |
comparision function for sortValueandIndex
Referenced by sortValueAndIndex().