OOFEM 3.0
Loading...
Searching...
No Matches
oofem::DomainTransactionManager Class Reference

#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

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

Friends

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

◆ DomainComponentType

Enumerator
DCT_DofManager 
DCT_Element 

Definition at line 78 of file domaintransactionmanager.h.

◆ DomainTransactionType

Enumerator
DTT_ADD 
DTT_Remove 

Definition at line 79 of file domaintransactionmanager.h.

Constructor & Destructor Documentation

◆ DomainTransactionManager()

oofem::DomainTransactionManager::DomainTransactionManager ( Domain * d)

Definition at line 42 of file domaintransactionmanager.C.

References Domain, and domain.

◆ ~DomainTransactionManager()

oofem::DomainTransactionManager::~DomainTransactionManager ( )

Definition at line 47 of file domaintransactionmanager.C.

References dofmanTransactions, elementTransactions, and OOFEM_WARNING.

Member Function Documentation

◆ addDofManTransaction()

◆ addElementTransaction()

◆ commitTransactions()

int oofem::DomainTransactionManager::commitTransactions ( )

Definition at line 126 of file domaintransactionmanager.C.

References domain.

◆ giveDofManager()

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

Definition at line 101 of file domaintransactionmanager.C.

References dofmanTransactions.

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

◆ giveElement()

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

Definition at line 113 of file domaintransactionmanager.C.

References elementTransactions.

◆ initialize()

void oofem::DomainTransactionManager::initialize ( )

Definition at line 55 of file domaintransactionmanager.C.

◆ Domain

friend class Domain
friend

Definition at line 110 of file domaintransactionmanager.h.

References Domain.

Referenced by Domain, and DomainTransactionManager().

Member Data Documentation

◆ dofmanTransactions

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

◆ domain

Domain* oofem::DomainTransactionManager::domain
protected

Definition at line 93 of file domaintransactionmanager.h.

Referenced by commitTransactions(), and DomainTransactionManager().

◆ elementTransactions

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

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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011