MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / addRegion

Method addRegion

SRC/domain/domain/Domain.cpp:2678–2697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2676
2677
2678int
2679Domain::addRegion(MeshRegion &theRegion)
2680{
2681 MeshRegion **newRegions = new MeshRegion *[numRegions + 1];
2682 if (newRegions == 0) {
2683 opserr << "Domain::addRegion() - could not add ran out of memory\n";
2684 return -1;
2685 }
2686
2687 for (int i=0; i<numRegions; i++)
2688 newRegions[i] = theRegions[i];
2689 newRegions[numRegions] = &theRegion;
2690 theRegion.setDomain(this);
2691 if (theRegions != 0)
2692 delete [] theRegions;
2693
2694 theRegions = newRegions;
2695 numRegions++;
2696 return 0;
2697}
2698
2699MeshRegion *
2700Domain::getRegion(int tag)

Callers 5

setNodesMethod · 0.45
setElementsMethod · 0.45
OPS_MeshRegionFunction · 0.45
TclAddMeshRegionFunction · 0.45
TclCommand_addMeshRegionFunction · 0.45

Calls 1

setDomainMethod · 0.45

Tested by

no test coverage detected