AGXDynamics  2.31.1.0
agx::SparseMatrixRepSabre Class Reference

#include <SparseMatrixRepSabre.h>

+ Inheritance diagram for agx::SparseMatrixRepSabre:

Public Member Functions

 SparseMatrixRepSabre ()
 
 SparseMatrixRepSabre (size_t *blkSizes, size_t numBlocks, size_t i, size_t j, size_t nnz, int *r, int *c, double *data)
 
virtual ~SparseMatrixRepSabre ()
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
virtual void factor () override
 
virtual agx::Real * getBlock (int i, int j, bool &writeTransposed, unsigned int &ld) override
 
virtual agx::UInt getBlockPermutedStartRowIndex (agx::UInt blockIndex) const override
 
virtual agx::Bool getColumn (agx::UInt colNumber, agx::RealValarray &retCol, agx::Bool &signFlip) const override
 
virtual agx::Real getFactorTime () const override
 
virtual unsigned int getNumColumns () const override
 
virtual unsigned int getNumRows () const override
 
int getReferenceCount () const
 
virtual agx::Bool getRow (agx::UInt rowNumber, const agx::RealValarray &signs, agx::RealValarray &retRow) const override
 
agxSabre::SabreData< agx::Real > & getSabreData ()
 
const agxSabre::SabreData< agx::Real > & getSabreData () const
 
virtual agx::Real getSolveTime () const override
 
virtual agx::UInt invPermuteRowIndex (agx::UInt permutedRowIndex) const override
 
template<typename T >
bool is () const
 Subclass test. More...
 
virtual bool loadH5 (void *group, const agx::String &name)
 
virtual void multiply (const agx::Real *x, agx::Real *r) override
 
virtual void multiplyAdd (const agx::Real *x, agx::Real *r) override
 
virtual void multiplyAdd (const agx::Real &alpha, const agx::Real *x, const agx::Real &beta, agx::Real *r) override
 
virtual agx::UInt permuteRowIndex (agx::UInt rowIndex) const override
 
virtual void print () const override
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
virtual void reset () override
 
virtual bool saveH5 (void *group, const agx::String &name) const
 
virtual void setLogicalStructure (size_t n, const unsigned int *pointers, const unsigned int *indices, const unsigned int *dimensions, const int *flags, unsigned int numThreads) override
 
virtual void setNumBodies (size_t num) override
 
virtual void solve (agx::Real *) override
 
virtual size_t unitSolve (agx::Real *, int startRow=-1) override
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 

Static Public Member Functions

template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Static Protected Member Functions

static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Protected Attributes

Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Definition at line 28 of file SparseMatrixRepSabre.h.

Constructor & Destructor Documentation

◆ SparseMatrixRepSabre() [1/2]

agx::SparseMatrixRepSabre::SparseMatrixRepSabre ( )

◆ SparseMatrixRepSabre() [2/2]

agx::SparseMatrixRepSabre::SparseMatrixRepSabre ( size_t *  blkSizes,
size_t  numBlocks,
size_t  i,
size_t  j,
size_t  nnz,
int *  r,
int *  c,
double *  data 
)

◆ ~SparseMatrixRepSabre()

virtual agx::SparseMatrixRepSabre::~SparseMatrixRepSabre ( )
virtual

Member Function Documentation

◆ allocateObserverVector()

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited

◆ as() [1/2]

template<typename T >
T* agx::Referenced::as ( )
inherited

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().

◆ as() [2/2]

template<typename T >
const T* agx::Referenced::as ( ) const
inherited

◆ asSafe() [1/2]

template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

◆ asSafe() [2/2]

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited

◆ deleteUsingDeleteHandler()

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited

◆ factor()

virtual void agx::SparseMatrixRepSabre::factor ( )
overridevirtual

Implements agx::SparseMatrixRep.

◆ getBlock()

virtual agx::Real* agx::SparseMatrixRepSabre::getBlock ( int  i,
int  j,
bool &  writeTransposed,
unsigned int &  ld 
)
overridevirtual

Implements agx::SparseMatrixRep.

◆ getBlockPermutedStartRowIndex()

virtual agx::UInt agx::SparseMatrixRepSabre::getBlockPermutedStartRowIndex ( agx::UInt  blockIndex) const
overridevirtual

Implements agx::SparseMatrixRep.

◆ getColumn()

virtual agx::Bool agx::SparseMatrixRepSabre::getColumn ( agx::UInt  colNumber,
agx::RealValarray &  retCol,
agx::Bool &  signFlip 
) const
overridevirtual

Implements agx::SparseMatrixRep.

◆ getDeleteHandler()

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.

◆ getFactorTime()

virtual agx::Real agx::SparseMatrixRepSabre::getFactorTime ( ) const
inlineoverridevirtual

Reimplemented from agx::SparseMatrixRep.

Definition at line 73 of file SparseMatrixRepSabre.h.

◆ getNumColumns()

virtual unsigned int agx::SparseMatrixRepSabre::getNumColumns ( ) const
overridevirtual

Implements agx::SparseMatrixRep.

◆ getNumRows()

virtual unsigned int agx::SparseMatrixRepSabre::getNumRows ( ) const
overridevirtual

Implements agx::SparseMatrixRep.

◆ getReferenceCount()

int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.

◆ getRow()

virtual agx::Bool agx::SparseMatrixRepSabre::getRow ( agx::UInt  rowNumber,
const agx::RealValarray &  signs,
agx::RealValarray &  retRow 
) const
overridevirtual

Implements agx::SparseMatrixRep.

◆ getSabreData() [1/2]

agxSabre::SabreData<agx::Real>& agx::SparseMatrixRepSabre::getSabreData ( )
inline

Definition at line 76 of file SparseMatrixRepSabre.h.

◆ getSabreData() [2/2]

const agxSabre::SabreData<agx::Real>& agx::SparseMatrixRepSabre::getSabreData ( ) const
inline

Definition at line 77 of file SparseMatrixRepSabre.h.

◆ getSolveTime()

virtual agx::Real agx::SparseMatrixRepSabre::getSolveTime ( ) const
inlineoverridevirtual

Reimplemented from agx::SparseMatrixRep.

Definition at line 74 of file SparseMatrixRepSabre.h.

◆ invPermuteRowIndex()

virtual agx::UInt agx::SparseMatrixRepSabre::invPermuteRowIndex ( agx::UInt  permutedRowIndex) const
overridevirtual

Reimplemented from agx::SparseMatrixRep.

◆ is()

template<typename T >
bool agx::Referenced::is ( ) const
inherited

◆ loadH5()

virtual bool agx::SparseMatrixRep::loadH5 ( void *  group,
const agx::String &  name 
)
virtualinherited

◆ multiply()

virtual void agx::SparseMatrixRepSabre::multiply ( const agx::Real *  x,
agx::Real *  r 
)
overridevirtual

Implements agx::SparseMatrixRep.

◆ multiplyAdd() [1/2]

virtual void agx::SparseMatrixRepSabre::multiplyAdd ( const agx::Real *  x,
agx::Real *  r 
)
overridevirtual

Implements agx::SparseMatrixRep.

◆ multiplyAdd() [2/2]

virtual void agx::SparseMatrixRepSabre::multiplyAdd ( const agx::Real &  alpha,
const agx::Real *  x,
const agx::Real &  beta,
agx::Real *  r 
)
overridevirtual

Implements agx::SparseMatrixRep.

◆ permuteRowIndex()

virtual agx::UInt agx::SparseMatrixRepSabre::permuteRowIndex ( agx::UInt  rowIndex) const
overridevirtual

Reimplemented from agx::SparseMatrixRep.

◆ print()

virtual void agx::SparseMatrixRepSabre::print ( ) const
overridevirtual

Reimplemented from agx::SparseMatrixRep.

◆ reference()

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.

This method should be used with care, always balanced with the same number of calls to unreference.

◆ reset()

virtual void agx::SparseMatrixRepSabre::reset ( )
overridevirtual

Implements agx::SparseMatrixRep.

◆ saveH5()

virtual bool agx::SparseMatrixRep::saveH5 ( void *  group,
const agx::String &  name 
) const
virtualinherited

◆ setDeleteHandler()

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

◆ setLogicalStructure()

virtual void agx::SparseMatrixRepSabre::setLogicalStructure ( size_t  n,
const unsigned int *  pointers,
const unsigned int *  indices,
const unsigned int *  dimensions,
const int *  flags,
unsigned int  numThreads 
)
overridevirtual

Reimplemented from agx::SparseMatrixRep.

◆ setNumBodies()

virtual void agx::SparseMatrixRepSabre::setNumBodies ( size_t  num)
overridevirtual

Reimplemented from agx::SparseMatrixRep.

◆ solve()

virtual void agx::SparseMatrixRepSabre::solve ( agx::Real *  )
overridevirtual

Implements agx::SparseMatrixRep.

◆ unitSolve()

virtual size_t agx::SparseMatrixRepSabre::unitSolve ( agx::Real *  ,
int  startRow = -1 
)
overridevirtual

Reimplemented from agx::SparseMatrixRep.

◆ unreference()

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

This method should be used with care, always balanced with the same number of calls to reference.

Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().

◆ unreference_nodelete()

void agx::Referenced::unreference_nodelete ( ) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.

◆ ValidateCast()

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

Member Data Documentation

◆ m_mutex

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

◆ m_observers

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.


The documentation for this class was generated from the following file: