OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::DomainTransactionManager Class Reference

Class representing domain transaction manager. More...

#include <domaintransactionmanager.h>

+ Collaboration diagram for oofem::DomainTransactionManager:

Public Types

enum  DomainComponentType { DCT_DofManager, DCT_Element }
enum  DomainTransactionType { DTT_ADD, DTT_Remove }

Public Member Functions

 DomainTransactionManager (Domain *d)
 ~DomainTransactionManager ()
void initialize ()
int addDofManTransaction (DomainTransactionType, int, DofManager *)
int addElementTransaction (DomainTransactionType, int, Element *)
DofManagergiveDofManager (int label)
ElementgiveElement (int label)
int commitTransactions ()

Protected Attributes

std::map< int, DofManager * > dofmanTransactions
std::map< int, Element * > elementTransactions


class Domain

Detailed Description

Class representing domain transaction manager.

The purpose of this class is to make the domain modification in terms of adding and deleting components) possible.

The changes are recorded in transaction manager and until the are committed, no change is reflected in domain itself.

When adding a new component has to be created and send as transaction parameter. The allocated component will be further maintained (and deallocated) in transaction manager or domain itself. When adding component a reference to already existing as well as newly added (but not yet committed) component must be possible. Therefore, the concept of temporary numbering is introduced. Existing domain components are assigned with temporary numbers equal to to their local numbers (in parallel version to their global numbers) and newly added components can be assigned with arbitrary temporary number (but which should be different from those already used). Then references between components for newly added components is specified using temporary numbering. After transactions are committed, the local numbering can change.

The user is responsible for data consistency, so for example if a node is removed, but an element exist that needs such node, then (hopefully) an error will be thrown since there is no mechanism for enforcing data consistency.

Transaction manager provides an access to recorded transactions; so it is possible to modify an existing transaction instead of posting a new one. However, transaction manager does not provides access to original unmodified domain components, since this can lead to their modification and since in the current implementation the transaction manager keeps only modified records, the original records are not returned. They must be requested from original domain, so it is clear that their modification is not part of transaction but it directly changes domain data.

Definition at line 75 of file domaintransactionmanager.h.

Member Enumeration Documentation


Definition at line 78 of file domaintransactionmanager.h.


Definition at line 79 of file domaintransactionmanager.h.

Constructor & Destructor Documentation

oofem::DomainTransactionManager::DomainTransactionManager ( Domain d)

Definition at line 42 of file domaintransactionmanager.C.

References domain.

oofem::DomainTransactionManager::~DomainTransactionManager ( )

Definition at line 47 of file domaintransactionmanager.C.

References dofmanTransactions, elementTransactions, and OOFEM_WARNING.

Member Function Documentation

int oofem::DomainTransactionManager::commitTransactions ( )

Definition at line 126 of file domaintransactionmanager.C.

References oofem::Domain::commitTransactions(), and domain.

DofManager * oofem::DomainTransactionManager::giveDofManager ( int  label)

Definition at line 101 of file domaintransactionmanager.C.

References dofmanTransactions.

Referenced by oofem::Subdivision::unpackRemoteElements().

Element * oofem::DomainTransactionManager::giveElement ( int  label)

Definition at line 113 of file domaintransactionmanager.C.

References elementTransactions.

void oofem::DomainTransactionManager::initialize ( )

Definition at line 55 of file domaintransactionmanager.C.

Friends And Related Function Documentation

friend class Domain

Definition at line 110 of file domaintransactionmanager.h.

Member Data Documentation

std :: map< int, DofManager * > oofem::DomainTransactionManager::dofmanTransactions
Domain* oofem::DomainTransactionManager::domain

Definition at line 93 of file domaintransactionmanager.h.

Referenced by commitTransactions(), and DomainTransactionManager().

std :: map< int, Element * > oofem::DomainTransactionManager::elementTransactions

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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:34 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011