Jive reference manual
List of all members | Public Member Functions | Static Public Attributes | Protected Member Functions
jive::solver::CoarseDofSpace Class Reference

#include <jive/solver/CoarseDofSpace.h>

Inheritance diagram for jive::solver::CoarseDofSpace:
Inheritance graph

Public Member Functions

 CoarseDofSpace (Ref< Restrictor > rt)
 
void update ()
 
bool updated () const
 
virtual idx_t typeCount () const
 Returns the number of dof types. More...
 
virtual idx_t dofCount () const
 Returns the total number of dofs. More...
 
idx_t globalDofCount () const
 
virtual void resetEvents ()
 
virtual idx_t findType (const String &name) const
 Searches for a dof type with a given name. More...
 
virtual String getTypeName (idx_t itype) const
 
virtual StringVector getTypeNames () const
 Returns a array containing all dof type names. More...
 
virtual idx_t findDofIndex (idx_t iitem, idx_t itype) const
 
virtual idx_t findDofIndices (const IdxVector &idofs, const IdxVector &iitems, const IdxVector &itypes) const
 
virtual idx_t collectDofIndices (const IdxVector &idofs, const IdxVector &iitems, const IdxVector &itypes) const
 
virtual idx_t getDofsForItem (const IdxVector &idofs, const IdxVector &itypes, idx_t iitem) const
 
virtual idx_t getDofsForType (const IdxVector &idofs, const IdxVector &iitems, idx_t itype) const
 
virtual void decodeDofIndex (idx_t &iitem, idx_t &itype, idx_t idof) const
 
virtual void decodeDofIndices (const IdxVector &iitems, const IdxVector &itypes, const IdxVector &idofs) const
 
virtual SparseIdxMatrix toMatrix () const
 Returns a matrix representation of this dof space. More...
 
virtual ItemSetgetItems () const
 Returns the item set associated with this dof space. More...
 
MPContextgetMPContext () const
 
bool isDistributed () const
 
RestrictorgetRestrictor () const
 
idx_t getMyFirstDof () const
 
- Public Member Functions inherited from jive::util::DofSpace
int itemCount () const
 Returns the size of the item set associated with this dof space. More...
 
virtual String getTypeName (int itype) const =0
 Returns a name of a dof type with a given index. More...
 
virtual int findDofIndex (int iitem, int itype) const =0
 Searches for a dof attached to a given item. More...
 
int getDofIndex (int iitem, int itype) const
 Returns the index of a dof attached to a given item. More...
 
virtual int findDofIndices (const IntVector &idofs, const IntVector &iitems, const IntVector &itypes) const
 Searches for the dofs attached to a given set of items. More...
 
virtual int collectDofIndices (const IntVector &idofs, const IntVector &iitems, const IntVector &itypes) const
 Collects the indices of the dofs attached to a given set of items. More...
 
void getDofIndices (const IntVector &idofs, const IntVector &iitems, const IntVector &itypes) const
 Gets the indices of the dofs attached to a given set of items. More...
 
virtual int getDofsForItem (const IntVector &idofs, const IntVector &itypes, int iitem) const
 Returns all dofs attached to a given item. More...
 
virtual int getDofsForType (const IntVector &idofs, const IntVector &iitems, int itype) const
 Returns all dofs of a given type. More...
 
virtual void decodeDofIndex (int &iitem, int &itype, int idof) const =0
 Returns an item/type index pair given a dof index. More...
 
virtual void decodeDofIndices (const IntVector &iitems, const IntVector &itypes, const IntVector &idofs) const
 Returns item/type index pairs given a set of dof indices. More...
 
String getDofPath (int idof) const
 Returns an identification string for a given dof. More...
 
String getDofPath (int iitem, int itype) const
 Returns an identification string for a given dof. More...
 
String getContext () const
 Returns a context string. More...
 
void printTo (jem::io::TextOutput &out) const
 Writes the state of this dof space to a text output stream. More...
 
void store (const Properties &globdat) const
 Stores this dof space in a (global) data set. More...
 
virtual String toString () const
 Returns a short textual description of this object. More...
 
- Public Member Functions inherited from jem::Object
virtual ClassgetClass () const
 Returns the Class instance representing the runtime class of this object. More...
 
virtual long hashValue () const
 Returns a hash value for this object. More...
 
virtual bool equals (const Ref< Object > &obj) const
 Tests whether two objects are equal. More...
 
Ref< Objectclone () const
 Returns a copy of this object. More...
 

Static Public Attributes

static const char * DOF_TYPE_NAME
 

Protected Member Functions

virtual ~CoarseDofSpace ()
 
virtual void emitEvents_ (int events)
 
- Protected Member Functions inherited from jive::util::DofSpace
virtual ~DofSpace ()
 
- Protected Member Functions inherited from jem::Collectable
 Collectable ()
 Creates an empty Collectable. More...
 
 ~Collectable ()
 Frees resources. More...
 

Additional Inherited Members

- Public Types inherited from jive::util::DofSpace
typedef jem::String String
 Represents a string type. More...
 
typedef jem::numeric::SparseMatrix< int > SparseMatrix
 Represents a sparse integer matrix. More...
 
typedef jem::util::Properties Properties
 Represents a properties set. More...
 
- Static Public Member Functions inherited from jive::util::DofSpace
static jem::Ref< DofSpacefind (const Properties &globdat)
 Searches for the primary dof space in a (global) data set. More...
 
static jem::Ref< DofSpacefind (const jem::Ref< ItemSet > &items, const Properties &globdat)
 Searches for an item-specific dof space in a (global) data set. More...
 
static jem::Ref< DofSpaceget (const Properties &globdat, const String &context)
 Returns the primary dof space in a (global) data set. More...
 
static jem::Ref< DofSpaceget (const jem::Ref< ItemSet > &items, const Properties &globdat, const String &context)
 Returns an item-specific dof space in a (global) data set. More...
 
- Static Public Member Functions inherited from jem::Object
static ClassgetType ()
 Returns the Class instance representing the Object class. More...
 
- Public Attributes inherited from jive::util::DofSpace
jem::util::Event< int, Self & > newSizeEvent
 Signals that the number of dofs has changed. More...
 
jem::util::Event< const IntVector &, Self & > newOrderEvent
 Signals that the dofs have been re-ordered. More...
 

Constructor & Destructor Documentation

jive::solver::CoarseDofSpace::CoarseDofSpace ( Ref< Restrictor rt)
explicit
virtual jive::solver::CoarseDofSpace::~CoarseDofSpace ( )
protectedvirtual

Member Function Documentation

void jive::solver::CoarseDofSpace::update ( )
bool jive::solver::CoarseDofSpace::updated ( ) const
virtual idx_t jive::solver::CoarseDofSpace::typeCount ( ) const
virtual

Returns the number of dof types known to this dof space.

Returns
The number of dof types.

Implements jive::util::DofSpace.

virtual idx_t jive::solver::CoarseDofSpace::dofCount ( ) const
virtual

Returns the number of dofs known to this dof space. This number is equal to the number of non-zeroes in the sparse matrix representation of this dof space.

Note that the number of dofs equals

itemCount() * typeCount()

when the matrix representation of this dof space is a dense matrix. That is, when typeCount() dofs are attached to each item.

Returns
The number of dofs.

Implements jive::util::DofSpace.

idx_t jive::solver::CoarseDofSpace::globalDofCount ( ) const
virtual void jive::solver::CoarseDofSpace::resetEvents ( )
virtual
virtual idx_t jive::solver::CoarseDofSpace::findType ( const String name) const
virtual

Returns the index of the dof type named name, or a negative number if a dof type with that name is not known to this dof space.

The implementation of this function provided by the DofSpace class searches for the type index by repeatedly calling the getTypeName() function. Derived classes are encouraged to provide a more efficient implementation.

Parameters
name- the name of the dof type to be found.

return The index of the dof type named name, or a negative number.

Reimplemented from jive::util::DofSpace.

virtual String jive::solver::CoarseDofSpace::getTypeName ( idx_t  itype) const
virtual
virtual StringVector jive::solver::CoarseDofSpace::getTypeNames ( ) const
virtual

Returns an array containing the names of all dof types known to this dof space. The contents of this array should not be modified as the array may share its data with one of the private data members of this DofSpace object.

The implementation of this function provided by the DofSpace class creates the array by repeatedly calling the getTypeName() function.

Returns
An array containing all dof type names.

Reimplemented from jive::util::DofSpace.

virtual idx_t jive::solver::CoarseDofSpace::findDofIndex ( idx_t  iitem,
idx_t  itype 
) const
virtual
virtual idx_t jive::solver::CoarseDofSpace::findDofIndices ( const IdxVector &  idofs,
const IdxVector &  iitems,
const IdxVector &  itypes 
) const
virtual
virtual idx_t jive::solver::CoarseDofSpace::collectDofIndices ( const IdxVector &  idofs,
const IdxVector &  iitems,
const IdxVector &  itypes 
) const
virtual
virtual idx_t jive::solver::CoarseDofSpace::getDofsForItem ( const IdxVector &  idofs,
const IdxVector &  itypes,
idx_t  iitem 
) const
virtual
virtual idx_t jive::solver::CoarseDofSpace::getDofsForType ( const IdxVector &  idofs,
const IdxVector &  iitems,
idx_t  itype 
) const
virtual
virtual void jive::solver::CoarseDofSpace::decodeDofIndex ( idx_t &  iitem,
idx_t &  itype,
idx_t  idof 
) const
virtual
virtual void jive::solver::CoarseDofSpace::decodeDofIndices ( const IdxVector &  iitems,
const IdxVector &  itypes,
const IdxVector &  idofs 
) const
virtual
virtual SparseIdxMatrix jive::solver::CoarseDofSpace::toMatrix ( ) const
virtual

Returns a sparse matrix representation of this dof space. Each row in the matrix is associated with an item and each column is associated with a dof type. The value of a matrix element (i,j) is the global index, or equation number, of the dof that is attached to item i and has type j.

Returns
A sparse matrix representation of this dof space.

Implements jive::util::DofSpace.

virtual ItemSet* jive::solver::CoarseDofSpace::getItems ( ) const
virtual

Returns a pointer to the item set containing the items to which the dofs in this dof space are attached. The pointer is guaranteed not to be NULL and to remain valid throughout the entire lifetime of this DofSpace object.

Returns
A pointer to the item set associated with this dof space.

Implements jive::util::DofSpace.

MPContext* jive::solver::CoarseDofSpace::getMPContext ( ) const
bool jive::solver::CoarseDofSpace::isDistributed ( ) const
Restrictor * jive::solver::CoarseDofSpace::getRestrictor ( ) const
idx_t jive::solver::CoarseDofSpace::getMyFirstDof ( ) const
virtual void jive::solver::CoarseDofSpace::emitEvents_ ( int  events)
protectedvirtual

Member Data Documentation

const char* jive::solver::CoarseDofSpace::DOF_TYPE_NAME
static