NeoPZ
|
The utility classes define general purpose classes such as vectors, stacks, binary trees and chunk vectors.
All classes in the utility package are templated in order to improve strong type checking.
The class will perform a bounds checking on the operator arguments.
More...
Classes | |
class | TPZMetis |
Implements renumbering for elements of a mesh. Utility. More... | |
class | TPZSloan |
Interface to sloan subrotines. Utility. More... | |
class | TPZRenumbering |
This abstract class which defines the behavior which derived classes need to implement for implementing node sequence numbering optimization. Utility. More... | |
class | TPZfTime |
Calculate the Times. Utility. More... | |
class | TPZTimeTemp |
Takes times. (Tomada de tempos). Utility. More... | |
class | TPZAdmChunkVector< T, EXP > |
Implements a chunk vector with free store administration. Utility. More... | |
class | TPZAxesTools< TVar > |
Implements method to verify whether axes is an orthogonal normalizes matrix and to transformation from given axes to euclidian basis and viceverse. Utility. More... | |
class | TPZCheckConsistency |
Implements an interface to check the consistency of two implementations. Utility. More... | |
class | TPZFunction< TVar > |
Implements a function. Utility. More... | |
class | TPZLine |
Implements a line. Utility. More... | |
class | TPZManVector< T, NumExtAlloc > |
Implements a vector class which allows to use external storage provided by the user. Utility. More... | |
class | TPZNumeric |
Implements several methods to calculation. Utility. More... | |
class | TPZPlane |
Implements a plane (stores the plane equation). Utility. More... | |
class | TPZPolynomial |
Implements a polynomial. Utility. More... | |
class | TPZStack< T, NumExtAlloc > |
This class implements a stack object. Utility. More... | |
class | TPZString |
Implements strings as stack. Utility. More... | |
class | TPZVec< T > |
This class implements a simple vector storage scheme for a templated class T. Utility. More... | |
class | TPZAutoPointer< T > |
This class implements a reference counter mechanism to administer a dynamically allocated object. Utility. More... | |
class | TPZPermutation |
This class generates all permutations of n values. Utility. More... | |
class | TPZSemaphore |
Implements semaphore to threads. Utility. More... | |
struct | PZResourceUsage |
Information on the resources used by a child process. Utility. More... | |
class | TPZTimer |
The timer class. Utility. More... | |
class | TPZMultiTimer |
Controls several timers at once. Utility. More... | |
Macros | |
#define | AP_MUTEX_ARRAY_SZ |
Increment and Decrement actions are mutexed by this mutex. More... | |
#define | AP_MUTEX_HASH_1 |
#define | AP_MUTEX_HASH_2 |
#define | DEFAULTNUMBEROFCHUNKS |
Default number of elements which will be allocated in the chunk vector. More... | |
#define | DEFAULTCHUNKEXPONENT |
Default number of elements in each chunk is . More... | |
Typedefs | |
typedef void * | TPZPix |
TPZPix is the iterator for the AVL binary tree class. Utility. More... | |
typedef TPZVec< TPZString > | TPZText |
Typedef to vector of strings. More... | |
Functions | |
template<class Real > | |
void | GeneratePlaneRotation (Real &dx, Real &dy, Real &cs, Real &sn) |
Compute the values cs and sn parameters to rotation. More... | |
template<class Real > | |
void | ApplyPlaneRotation (Real &dx, Real &dy, Real &cs, Real &sn) |
Makes rotation of the plane based on the cs and sn parameters. More... | |
void | InitializePZLOG (const std::string &configfile) |
Initialize a log file adequated to use log4cxx lib. More... | |
void | InitializePZLOG () |
Initializes log file for log4cxx with commom name log4cxx.cfg. More... | |
template<class T1 , class T2 , class Scalar > | |
void | saxpy (TPZVec< T1 > &x, const TPZVec< T2 > &y, Scalar s) |
Performs a saxpy operation: x <- x + s * y. More... | |
template<class T1 , class Scalar > | |
void | sscal (TPZVec< T1 > &x, const Scalar s) |
Performs a sscal operation: x <- x * s. More... | |
template<class T > | |
TPZVec< T > | operator- (const TPZVec< T > &a, const TPZVec< T > &b) |
substracts two vectors More... | |
template<class T > | |
TPZVec< T > & | operator-= (TPZVec< T > &a, const TPZVec< T > &b) |
substracts two vectors More... | |
template<class T1 > | |
double | sdot (TPZVec< T1 > &x, TPZVec< T1 > &y) |
Performs a sdot operation: dot <- Transpose[x] * y. More... | |
template<class T1 > | |
REAL | dist (TPZVec< T1 > &vec1, TPZVec< T1 > &vec2) |
template<class T > | |
TPZVec< T > & | Sort (TPZVec< T > &v) |
Sorting the elements into v. More... | |
template<class T > | |
int | Find (TPZVec< T > &v, const T &e) |
Finds if exists the element e into vector v. More... | |
template<class T > | |
T | Min (TPZVec< T > &v) |
Returns the minimum element into v. More... | |
template<class T > | |
T | Max (TPZVec< T > &v) |
Returns the maximum element into v. More... | |
template<class T , int N> | |
void | Intersect (const TPZVec< T > &one, const TPZVec< T > &two, TPZStack< T, N > &result) |
Gets commom elements into the one and two vectors. More... | |
template<class T , int N> | |
void | Intersect (const TPZVec< T > &one, const TPZVec< T > &two, const TPZVec< T > &three, TPZStack< T, N > &result) |
Gets commom elements into the one, two and three vectors. More... | |
template<class T > | |
T | Norm (const TPZVec< T > &one) |
Gets commom elements into the one and two vectors. More... | |
template<class T > | |
void | Cross (const TPZVec< T > &x1, const TPZVec< T > &x2, TPZVec< T > &result) |
template<class T > | |
T | Dot (const TPZVec< T > &x1, const TPZVec< T > &x2) |
pthread_mutex_t * | get_ap_mutex (void *obj) |
template<typename R , typename T > | |
TPZAutoPointer< R > | TPZAutoPointerDynamicCast (TPZAutoPointer< T > in) |
template<typename T , typename std::enable_if< std::is_pointer< T >::value, int >::type * = nullptr> | |
void | ReadInternal (T &output, TPZStream &buf, void *context) |
An object of this class implements a vector which allocates objects by chunks. Utility. More... | |
TPZTimer::TPZTimer () | |
TPZTimer::TPZTimer (std::string pn) | |
Default constructor. More... | |
TPZTimer::~TPZTimer () | |
Default Destructor. More... | |
std::string & | TPZTimer::processName () |
Gets the process name (for reporting purposes). More... | |
const std::string & | TPZTimer::processName () const |
Gets the process name (for reporting purposes). More... | |
void | TPZTimer::reset () |
Zeroes the timer. More... | |
double | TPZTimer::seconds () const |
Returns the elapsed time in seconds. More... | |
TPZMultiTimer::TPZMultiTimer (int nT) | |
Default constructor. More... | |
TPZMultiTimer::~TPZMultiTimer () | |
Destructor. More... | |
int | TPZMultiTimer::nTimers () const |
Number of active timers. More... | |
TPZTimer & | TPZMultiTimer::getTimer (int i) |
Returns a specific timer. More... | |
const TPZTimer & | TPZMultiTimer::getTimer (int i) const |
Returns a specific timer. More... | |
std::string & | TPZMultiTimer::processName (int i) |
Gets the process name (for reporting purposes). More... | |
const std::string & | TPZMultiTimer::processName (int i) const |
Gets the process name (for reporting purposes). More... | |
void | TPZMultiTimer::start (int i) |
Turns the timer on. More... | |
void | TPZMultiTimer::start () |
Turns the timer on. More... | |
void | TPZMultiTimer::stop (int i) |
Turns the timer off, and computes the elapsed time. More... | |
void | TPZMultiTimer::stop () |
Turns the timer off, and computes the elapsed time. More... | |
void | TPZMultiTimer::reset (int i) |
Zeroes the timer. More... | |
void | TPZMultiTimer::reset () |
Zeroes the timer. More... | |
double | TPZMultiTimer::seconds (int i) const |
Returns the elapsed time in seconds. More... | |
Variables | |
TPZTimeTemp | tempo |
External variable to TPZTimeTemp (to take time) More... | |
const int | DEFAULTVEC_ALLOC |
To allocate vector by default. More... | |
pthread_mutex_t | gAutoPointerMutexArray [] |
The utility classes define general purpose classes such as vectors, stacks, binary trees and chunk vectors.
All classes in the utility package are templated in order to improve strong type checking.
The class will perform a bounds checking on the operator arguments.
#define AP_MUTEX_ARRAY_SZ |
Increment and Decrement actions are mutexed by this mutex.
Definition at line 19 of file tpzautopointer.h.
Referenced by AutoPointerMutexArrayInit::AutoPointerMutexArrayInit(), and AutoPointerMutexArrayInit::~AutoPointerMutexArrayInit().
#define AP_MUTEX_HASH_1 |
Definition at line 28 of file tpzautopointer.h.
#define AP_MUTEX_HASH_2 |
Definition at line 35 of file tpzautopointer.h.
Referenced by get_ap_mutex().
#define DEFAULTCHUNKEXPONENT |
Default number of elements in each chunk is .
Definition at line 29 of file TPZChunkVector.h.
#define DEFAULTNUMBEROFCHUNKS |
Default number of elements which will be allocated in the chunk vector.
Definition at line 23 of file TPZChunkVector.h.
typedef void* TPZPix |
Typedef to vector of strings.
Definition at line 126 of file pzstring.h.
void ApplyPlaneRotation | ( | Real & | dx, |
Real & | dy, | ||
Real & | cs, | ||
Real & | sn | ||
) |
void Cross | ( | const TPZVec< T > & | x1, |
const TPZVec< T > & | x2, | ||
TPZVec< T > & | result | ||
) |
Definition at line 255 of file pzvec_extras.h.
References DebugStop, and TPZVec< T >::size().
Referenced by TPZSBFemVolume::AdjustAxes3D(), TPZTensor< STATE >::ComputeEigenvector0(), TPZTensor< STATE >::ComputeEigenvector1(), TPZTensor< STATE >::ComputeEigenvectorsInternal(), and pzgeom::TPZCylinderMap< TGeo >::SetCylinderAxis().
Definition at line 124 of file pzvec_extras.h.
References DebugStop, TPZVec< T >::size(), and sqrt.
Referenced by pzgeom::TPZChangeEl::ChangeToQuarterPoint(), TPZSandlerExtended::CheckCoordinateTransformation(), TPZGradientReconstruction::TPZGradientData::ComputeWeights(), TPZCompMesh::DeltaX(), TPZYCSandlerDimaggio::Distance(), TPZYCSandlerDimaggio::DistThetaL(), TPZMGAnalysis::ElementError(), TPZGeoEl::ElementRadius(), Find(), TPZGeoMesh::FindApproxElement(), TPZGeoMesh::FindCloseElement(), FindCol(), TPZGeoMesh::FindElement(), TPZGeoMesh::FindElementCaju(), TPZGeoMesh::FindNode(), TPZGeoMesh::FindSubElement(), TPZGenSpecialGrid::GeneratePolygonalSphereFromOctahedron(), TPZFYsmpMatrix< TVar >::GetSub(), TPZPlacaOrthotropic::GradForce(), TPZPlacaOrthotropic::GradMoment(), TPZPlacaOrthotropic::GradTensor(), TPZCompEl::LesserEdgeOfEl(), TPZCompMesh::LesserEdgeOfMesh(), TPZEulerAnalysis::LineSearch(), TPZCompEl::MaximumRadiusOfEl(), TPZCompMesh::MaximumRadiusOfMesh(), pzgeom::TPZChangeEl::NearestNode(), TPZGradientReconstruction::TPZGradientData::NodeCloserCenterX(), TPZCompElDisc::NormalizeConst(), ProjectBissectionInParametricDomain(), ResequenceByGeometry(), TPZYCDruckerPragerPV::SurfaceParamF1(), TPZSandlerExtended::SurfaceParamF1(), TPZSandlerExtended::SurfaceParamF2(), and XMin().
Definition at line 273 of file pzvec_extras.h.
References TPZVec< T >::NElements(), and PZError.
int Find | ( | TPZVec< T > & | v, |
const T & | e | ||
) |
Finds if exists the element e into vector v.
Definition at line 150 of file pzvec_extras.h.
References dist(), and TPZVec< T >::NElements().
void GeneratePlaneRotation | ( | Real & | dx, |
Real & | dy, | ||
Real & | cs, | ||
Real & | sn | ||
) |
|
inline |
Definition at line 41 of file tpzautopointer.h.
References AP_MUTEX_HASH_2, and gAutoPointerMutexArray.
Referenced by TPZAutoPointer< T >::TPZReference< TPZDohrSubstructCondense< TVar > >::Decrease(), and TPZAutoPointer< T >::TPZReference< TPZDohrSubstructCondense< TVar > >::Increment().
|
inline |
Returns a specific timer.
Definition at line 212 of file TPZTimer.h.
References TPZMultiTimer::timers.
Referenced by operator<<().
|
inline |
Returns a specific timer.
Definition at line 218 of file TPZTimer.h.
References TPZMultiTimer::timers.
|
inline |
void InitializePZLOG | ( | ) |
Initializes log file for log4cxx with commom name log4cxx.cfg.
Definition at line 14 of file pzlog.cpp.
References InitializePZLOG(), and test::res.
Referenced by InitializePZLOG(), and main().
void Intersect | ( | const TPZVec< T > & | one, |
const TPZVec< T > & | two, | ||
TPZStack< T, N > & | result | ||
) |
Gets commom elements into the one and two vectors.
Definition at line 188 of file pzvec_extras.h.
References TPZVec< T >::NElements(), and TPZStack< T, NumExtAlloc >::Push().
void Intersect | ( | const TPZVec< T > & | one, |
const TPZVec< T > & | two, | ||
const TPZVec< T > & | three, | ||
TPZStack< T, N > & | result | ||
) |
Gets commom elements into the one, two and three vectors.
Definition at line 213 of file pzvec_extras.h.
References TPZVec< T >::NElements(), and TPZStack< T, NumExtAlloc >::Push().
T Max | ( | TPZVec< T > & | v | ) |
Returns the maximum element into v.
Definition at line 174 of file pzvec_extras.h.
References m, and TPZVec< T >::NElements().
T Min | ( | TPZVec< T > & | v | ) |
Returns the minimum element into v.
Definition at line 160 of file pzvec_extras.h.
References m, and TPZVec< T >::NElements().
T Norm | ( | const TPZVec< T > & | one | ) |
Gets commom elements into the one and two vectors.
Definition at line 245 of file pzvec_extras.h.
References TPZVec< T >::NElements(), test::res, and sqrt.
|
inline |
Number of active timers.
Definition at line 206 of file TPZTimer.h.
References TPZMultiTimer::timers.
Referenced by operator<<().
substracts two vectors
Definition at line 65 of file pzvec_extras.h.
References DebugStop, and TPZVec< T >::size().
substracts two vectors
Definition at line 80 of file pzvec_extras.h.
References DebugStop, and TPZVec< T >::size().
Referenced by TinyFad< Num, T >::d(), Fad< T >::operator=(), TFad< Num, T >::size(), Fad< T >::size(), and TPZGenAMatrix< TObj >::TPZGenAMatrix().
|
inline |
Gets the process name (for reporting purposes).
Definition at line 168 of file TPZTimer.h.
References TPZTimer::ProcessName.
Referenced by TPZStructMatrixGCTP::Serial_Assemble(), TPZStructMatrixGC::Serial_Assemble(), TPZStructMatrixCS::Serial_Assemble(), TPZStructMatrixOT::Serial_Assemble(), TPZStructMatrixOR::Serial_Assemble(), and TPZPairStructMatrix::SerialAssemble().
|
inline |
Gets the process name (for reporting purposes).
Definition at line 174 of file TPZTimer.h.
References TPZTimer::ProcessName.
|
inline |
Gets the process name (for reporting purposes).
Definition at line 224 of file TPZTimer.h.
References TPZMultiTimer::timers.
Referenced by operator<<(), and TPZReadTetGen::Process().
|
inline |
Gets the process name (for reporting purposes).
Definition at line 230 of file TPZTimer.h.
References TPZMultiTimer::timers.
void ReadInternal | ( | T & | output, |
TPZStream & | buf, | ||
void * | context | ||
) |
An object of this class implements a vector which allocates objects by chunks. Utility.
Definition at line 142 of file TPZChunkVector.h.
References TPZPersistenceManager::GetInstance(), and TPZStream::Read().
Referenced by TPZAdmChunkVector< TPZGeoEl *>::Read(), and TPZChunkVector< TPZGraphNode, 10 >::Read().
|
inline |
|
inline |
|
inline |
void saxpy | ( | TPZVec< T1 > & | x, |
const TPZVec< T2 > & | y, | ||
Scalar | s | ||
) |
Performs a saxpy operation: x <- x + s * y.
Definition at line 24 of file pzvec_extras.h.
References TPZVec< T >::NElements(), and PZError.
Referenced by TPZTensor< STATE >::ComputeEigenvector1().
Performs a sdot operation: dot <- Transpose[x] * y.
Definition at line 98 of file pzvec_extras.h.
References TPZVec< T >::NElements(), and PZError.
Referenced by TPZInterfaceElement::ComputeNormal(), TPZGeoElSide::Normal(), and TPZPlasticStep< YC_t, TF_t, ER_t >::UpdatePlasticVars().
|
inline |
Returns the elapsed time in seconds.
Definition at line 186 of file TPZTimer.h.
References TPZTimer::AccumSec.
|
inline |
Returns the elapsed time in seconds.
Definition at line 281 of file TPZTimer.h.
References TPZMultiTimer::timers.
Sorting the elements into v.
Definition at line 142 of file pzvec_extras.h.
References TPZVec< T >::begin(), and TPZVec< T >::NElements().
Referenced by TPZMatrix< STATE >::SetIsDecomposed(), and TPZMatrix< STATE >::SolveEigenvaluesJacobi().
void sscal | ( | TPZVec< T1 > & | x, |
const Scalar | s | ||
) |
Performs a sscal operation: x <- x * s.
Definition at line 49 of file pzvec_extras.h.
References TPZVec< T >::NElements().
Referenced by TPZTensor< STATE >::ComputeEigenvector1().
|
inline |
Turns the timer on.
Definition at line 236 of file TPZTimer.h.
References TPZMultiTimer::timers.
Referenced by TPZReadTetGen::Process().
|
inline |
|
inline |
Turns the timer off, and computes the elapsed time.
Definition at line 251 of file TPZTimer.h.
References TPZMultiTimer::timers.
Referenced by TPZReadTetGen::Process().
|
inline |
Turns the timer off, and computes the elapsed time.
Definition at line 257 of file TPZTimer.h.
References TPZMultiTimer::timers.
TPZAutoPointer<R> TPZAutoPointerDynamicCast | ( | TPZAutoPointer< T > | in | ) |
Definition at line 249 of file tpzautopointer.h.
References TPZAutoPointer< T >::TPZReference< T2 >::fCounter, TPZAutoPointer< T >::TPZReference< T2 >::fPointer, and TPZAutoPointer< T >::fRef.
|
inline |
Default constructor.
nT | Number of different timers we want to use. |
Definition at line 194 of file TPZTimer.h.
References TPZMultiTimer::timers.
|
inline |
Definition at line 159 of file TPZTimer.h.
|
inline |
Default constructor.
pn | The user can give a "process name" to the timer. This name will be printed when the extraction operator is called. |
Definition at line 162 of file TPZTimer.h.
|
inline |
Destructor.
Definition at line 200 of file TPZTimer.h.
|
inline |
Default Destructor.
Definition at line 165 of file TPZTimer.h.
const int DEFAULTVEC_ALLOC |
To allocate vector by default.
Definition at line 13 of file pzmanvector.h.
pthread_mutex_t gAutoPointerMutexArray[] |
Definition at line 8 of file tpzautopointer.cpp.
Referenced by AutoPointerMutexArrayInit::AutoPointerMutexArrayInit(), get_ap_mutex(), and AutoPointerMutexArrayInit::~AutoPointerMutexArrayInit().
TPZTimeTemp tempo |
External variable to TPZTimeTemp (to take time)
Definition at line 11 of file TPZTimeTemp.cpp.
Referenced by TPZDohrStructMatrix::Create(), TPZDohrMatrix< TVar, TSubStruct >::Initialize(), TPZSkylParMatrix< TVar >::main_nada(), TPZDohrPrecond< TVar, TSubStruct >::MultAdd(), and TPZDohrMatrix< TVar, TSubStruct >::MultAdd().