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

This class represents the Rivara Subdivision algorithm for triangular meshes. More...

#include <subdivision.h>

+ Inheritance diagram for oofem::Subdivision:
+ Collaboration diagram for oofem::Subdivision:

Classes

class  RS_CompareNodePositions
 
class  RS_Element
 
class  RS_IrregularNode
 
class  RS_Mesh
 
class  RS_Node
 
struct  RS_packRemoteElemsStruct
 
class  RS_SharedEdge
 
class  RS_Tetra
 
class  RS_Triangle
 

Public Member Functions

 Subdivision (Domain *d)
 Constructor. More...
 
virtual ~Subdivision ()
 
virtual returnCode createMesh (TimeStep *tStep, int domainNumber, int domainSerNum, Domain **dNew)
 Runs the mesh generation, mesh will be written to corresponding domain din file. More...
 
const char * giveClassName ()
 
DomaingiveDomain ()
 
- Public Member Functions inherited from oofem::MesherInterface
 MesherInterface (Domain *d)
 Constructor. More...
 
virtual ~MesherInterface ()
 Destructor. More...
 
virtual IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver according to object description stored in input record. More...
 

Protected Member Functions

Subdivision::RS_MeshgiveMesh ()
 
void bisectMesh ()
 
void smoothMesh ()
 
bool isNodeLocalIrregular (Subdivision::RS_Node *node, int myrank)
 
void assignGlobalNumbersToElements (Domain *d)
 
bool exchangeSharedIrregulars ()
 Exchanges the shared irregulars between partitions. More...
 
int packSharedIrregulars (Subdivision *s, ProcessCommunicator &pc)
 
int unpackSharedIrregulars (Subdivision *s, ProcessCommunicator &pc)
 
void assignGlobalNumbersToSharedIrregulars ()
 
int packIrregularSharedGlobnums (Subdivision *s, ProcessCommunicator &pc)
 
int unpackIrregularSharedGlobnums (Subdivision *s, ProcessCommunicator &pc)
 
void exchangeSharedEdges ()
 
int packSharedEdges (Subdivision *s, ProcessCommunicator &pc)
 
int unpackSharedEdges (Subdivision *s, ProcessCommunicator &pc)
 
bool isNodeLocalSharedIrregular (Subdivision::RS_Node *node, int myrank)
 Returns true if receiver is irregular, shared node locally maintatined. More...
 
int giveRank ()
 
int giveNumberOfProcesses ()
 
void exchangeRemoteElements (Domain *d, IntArray &)
 
int packRemoteElements (RS_packRemoteElemsStruct *s, ProcessCommunicator &pc)
 
int unpackRemoteElements (Domain *d, ProcessCommunicator &pc)
 

Protected Attributes

RS_Meshmesh
 
std::queue< int > subdivqueue
 
std::list< int > sharedIrregularsQueue
 
std::list< int > sharedEdgesQueue
 
bool smoothingFlag
 
- Protected Attributes inherited from oofem::MesherInterface
Domaindomain
 

Additional Inherited Members

- Public Types inherited from oofem::MesherInterface
enum  returnCode { MI_OK, MI_NEEDS_EXTERNAL_ACTION, MI_FAILED }
 

Detailed Description

This class represents the Rivara Subdivision algorithm for triangular meshes.

based on M.C. Rivara. Local modification of meshes for adaptive and/or multigrid finite-element methods. J. Comput. Appl. Math., 36:79–89, 1991.

Definition at line 69 of file subdivision.h.

Constructor & Destructor Documentation

oofem::Subdivision::Subdivision ( Domain d)
inline

Constructor.

Definition at line 410 of file subdivision.h.

virtual oofem::Subdivision::~Subdivision ( )
inlinevirtual

Definition at line 414 of file subdivision.h.

Member Function Documentation

MesherInterface::returnCode oofem::Subdivision::createMesh ( TimeStep tStep,
int  domainNumber,
int  domainSerNum,
Domain **  dNew 
)
virtual

Runs the mesh generation, mesh will be written to corresponding domain din file.

Implements oofem::MesherInterface.

Definition at line 3397 of file subdivision.C.

References _IFT_Element_nodes, oofem::Subdivision::RS_Mesh::addElement(), oofem::Subdivision::RS_Mesh::addNode(), oofem::DofManager::appendDof(), assignGlobalNumbersToElements(), oofem::IntArray::at(), oofem::FloatArray::at(), bisectMesh(), oofem::classFactory, oofem::ClassFactory::createBoundaryCondition(), oofem::ClassFactory::createCrossSection(), oofem::ClassFactory::createDofManager(), oofem::ClassFactory::createElement(), oofem::ClassFactory::createFunction(), oofem::ClassFactory::createMaterial(), oofem::ClassFactory::createNonlocalBarrier(), oofem::DofManager_shared, oofem::MesherInterface::domain, oofem::Subdivision::RS_Element::drawGeometry(), oofem::Element_local, exchangeRemoteElements(), exchangeSharedEdges(), oofem::Timer::getUtime(), oofem::Domain::giveBc(), oofem::Domain::giveConnectivityTable(), oofem::Subdivision::RS_Node::giveCoordinates(), oofem::Node::giveCoordinates(), oofem::Domain::giveCrossSection(), oofem::Domain::giveDefaultNodeDofIDArry(), oofem::Element::giveDofManagerNumber(), oofem::Domain::giveDomainType(), oofem::Subdivision::RS_Mesh::giveEdge(), oofem::Domain::giveElement(), oofem::Subdivision::RS_Mesh::giveElement(), oofem::Domain::giveEngngModel(), oofem::Domain::giveErrorEstimator(), oofem::Domain::giveFunction(), oofem::Element::giveGeometryType(), oofem::Subdivision::RS_Node::giveGlobalNumber(), oofem::Subdivision::RS_Element::giveGlobalNumber(), oofem::DofManager::giveGlobalNumber(), oofem::Element::giveGlobalNumber(), oofem::Domain::giveIc(), oofem::FEMComponent::giveInputRecordName(), oofem::DofManager::giveLoadArray(), oofem::SimpleSlaveDof::giveMasterDofManagerNum(), oofem::Domain::giveMaterial(), oofem::Subdivision::RS_Mesh::giveNode(), oofem::Domain::giveNode(), oofem::Subdivision::RS_Element::giveNodes(), oofem::Domain::giveNonlocalBarrier(), oofem::Domain::giveNumberOfBoundaryConditions(), oofem::Domain::giveNumberOfCrossSectionModels(), oofem::Domain::giveNumberOfDofManagers(), oofem::Subdivision::RS_Mesh::giveNumberOfEdges(), oofem::Subdivision::RS_Mesh::giveNumberOfElements(), oofem::Domain::giveNumberOfElements(), oofem::Domain::giveNumberOfFunctions(), oofem::Domain::giveNumberOfInitialConditions(), oofem::Domain::giveNumberOfMaterialModels(), oofem::Subdivision::RS_Mesh::giveNumberOfNodes(), oofem::Domain::giveNumberOfNonlocalBarriers(), oofem::Domain::giveNumberOfSets(), oofem::Domain::giveOutputManager(), oofem::Subdivision::RS_Node::giveParallelMode(), oofem::Subdivision::RS_Element::giveParallelMode(), oofem::DofManager::giveParallelMode(), oofem::Element::giveParallelMode(), oofem::Subdivision::RS_Node::giveParent(), oofem::DofManager::givePartitionList(), oofem::Subdivision::RS_Node::givePartitions(), oofem::Subdivision::RS_SharedEdge::givePartitions(), giveRank(), oofem::DynamicInputRecord::giveRecordAsString(), oofem::DynamicInputRecord::giveRecordKeywordField(), oofem::ErrorEstimator::giveRemeshingCrit(), oofem::RemeshingCriteria::giveRequiredDofManDensity(), oofem::Domain::giveSerialNumber(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), oofem::Subdivision::RS_Element::giveTopParent(), oofem::Subdivision::RS_Node::importConnectivity(), oofem::Subdivision::RS_Element::importConnectivity(), oofem::Subdivision::RS_Mesh::initGlobalSharedNodeMap(), oofem::FEMComponent::initializeFrom(), oofem::GeneralBoundaryCondition::initializeFrom(), oofem::Material::initializeFrom(), oofem::CrossSection::initializeFrom(), oofem::Element::initializeFrom(), oofem::Subdivision::RS_Mesh::insertGlobalSharedNodeMap(), oofem::Subdivision::RS_Node::isBoundary(), oofem::DofManager::isBoundary(), oofem::Subdivision::RS_Element::isTerminal(), oofem::Subdivision::RS_Element::mesh, oofem::MesherInterface::MI_OK, oofem::Subdivision::RS_Element::nodes, oofem::NonlocalMaterialExtensionInterfaceType, oofem::Subdivision::RS_Node::numberSharedEdges(), OOFEM_ERROR, OOFEM_LOG_INFO, oofem::Subdivision::RS_Element::parent, oofem::IntArray::resize(), oofem::DofManager::setBoundaryFlag(), oofem::Domain::setDomainType(), oofem::DynamicInputRecord::setField(), oofem::Subdivision::RS_Node::setGlobalNumber(), oofem::Subdivision::RS_Element::setGlobalNumber(), oofem::DofManager::setGlobalNumber(), oofem::Element::setGlobalNumber(), oofem::DofManager::setLoadArray(), oofem::DofManager::setNumberOfDofs(), oofem::Subdivision::RS_Node::setParallelMode(), oofem::Subdivision::RS_Element::setParallelMode(), oofem::DofManager::setParallelMode(), oofem::DofManager::setPartitionList(), oofem::Subdivision::RS_Node::setPartitions(), sharedEdgesQueue, smoothingFlag, smoothMesh(), oofem::Timer::startTimer(), and oofem::Timer::stopTimer().

bool oofem::Subdivision::exchangeSharedIrregulars ( )
protected

Exchanges the shared irregulars between partitions.

Returns true if any shared irregular has been exchanged between any partitions.

Definition at line 4803 of file subdivision.C.

References oofem::CBT_dynamic, oofem::CommMode_Dynamic, oofem::MesherInterface::domain, oofem::Domain::giveEngngModel(), giveNumberOfProcesses(), giveRank(), OOFEM_LOG_INFO, oofem::Communicator::packAllData(), packSharedIrregulars(), SHARED_IRREGULAR_DATA_TAG, sharedIrregularsQueue, and unpackSharedIrregulars().

Referenced by bisectMesh().

const char* oofem::Subdivision::giveClassName ( )
inline

Definition at line 422 of file subdivision.h.

Domain* oofem::Subdivision::giveDomain ( )
inline
Subdivision :: RS_Mesh* oofem::Subdivision::giveMesh ( )
inlineprotected

Definition at line 426 of file subdivision.h.

bool oofem::Subdivision::isNodeLocalSharedIrregular ( Subdivision::RS_Node node,
int  myrank 
)
protected
int oofem::Subdivision::unpackSharedIrregulars ( Subdivision s,
ProcessCommunicator pc 
)
protected

Definition at line 4880 of file subdivision.C.

References oofem::FloatArray::add(), oofem::Subdivision::RS_Mesh::addNode(), oofem::IntArray::at(), oofem::FloatArray::at(), oofem::DofManager_shared, oofem::MesherInterface::domain, oofem::Subdivision::RS_Node::drawGeometry(), oofem::IntArray::findCommonValuesSorted(), oofem::Subdivision::RS_Node::giveConnectedElements(), oofem::Subdivision::RS_Node::giveCoordinates(), oofem::Subdivision::RS_Mesh::giveEdge(), oofem::Subdivision::RS_Element::giveEdgeIndex(), oofem::Domain::giveElement(), oofem::Subdivision::RS_Mesh::giveElement(), oofem::Subdivision::RS_Node::giveGlobalNumber(), oofem::Subdivision::RS_Element::giveGlobalNumber(), oofem::Subdivision::RS_Mesh::giveNode(), oofem::Subdivision::RS_Mesh::giveNumberOfNodes(), oofem::Subdivision::RS_SharedEdge::givePartitions(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::ProcessCommunicator::giveRank(), giveRank(), oofem::Subdivision::RS_Node::giveRequiredDensity(), oofem::IntArray::giveSize(), oofem::Subdivision::RS_Element::mesh, OOFEM_ERROR, OOFEM_LOG_INFO, oofem::IntArray::preallocate(), oofem::ProcessCommunicatorBuff::read(), oofem::IntArray::restoreYourself(), oofem::Subdivision::RS_IrregularNode::setEdgeNodes(), oofem::Subdivision::RS_Node::setParallelMode(), oofem::Subdivision::RS_Node::setPartitions(), oofem::Subdivision::RS_Mesh::sharedNodeGlobal2Local(), SUBDIVISION_END_DATA, SUBDIVISION_SHARED_IRREGULAR_REC_TAG, subdivqueue, and oofem::FloatArray::times().

Referenced by exchangeSharedIrregulars().

Member Data Documentation

RS_Mesh* oofem::Subdivision::mesh
protected

Definition at line 401 of file subdivision.h.

std :: list< int > oofem::Subdivision::sharedEdgesQueue
protected

Definition at line 404 of file subdivision.h.

Referenced by bisectMesh(), createMesh(), exchangeSharedEdges(), and packSharedEdges().

std :: list< int > oofem::Subdivision::sharedIrregularsQueue
protected

Definition at line 403 of file subdivision.h.

Referenced by bisectMesh(), exchangeSharedIrregulars(), and packSharedIrregulars().

bool oofem::Subdivision::smoothingFlag
protected

Definition at line 406 of file subdivision.h.

Referenced by createMesh().

std :: queue< int > oofem::Subdivision::subdivqueue
protected

Definition at line 402 of file subdivision.h.

Referenced by bisectMesh(), and unpackSharedIrregulars().


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:42 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011