コード例 #1
0
ファイル: LoadPattern.cpp プロジェクト: aceskpark/osfeo
ElementalLoad *
LoadPattern::removeElementalLoad(int tag)
{
    TaggedObject *obj = theElementalLoads->removeComponent(tag);
    if (obj == 0)
	return 0;

    ElementalLoad *result = (ElementalLoad *)obj;
    result->setDomain(0);
    currentGeoTag++;
    return result;    
}    
コード例 #2
0
ファイル: LoadPattern.cpp プロジェクト: aceskpark/osfeo
void
LoadPattern::setDomain(Domain *theDomain)
{
    // if subclass does not implement .. check for 0 pointer
    if (theNodalLoads != 0) {
	NodalLoad *nodLoad;
	NodalLoadIter &theNodalIter = this->getNodalLoads();
	while ((nodLoad = theNodalIter()) != 0)
	    nodLoad->setDomain(theDomain);
    
	ElementalLoad *eleLoad;
	ElementalLoadIter &theElementalIter = this->getElementalLoads();
	while ((eleLoad = theElementalIter()) != 0)
	    eleLoad->setDomain(theDomain);    

	SP_Constraint *theSP;
	SP_ConstraintIter &theSpConstraints = this->getSPs();
	while ((theSP = theSpConstraints()) != 0)
	    theSP->setDomain(theDomain);
    }

    // now we set this load patterns domain
    this->DomainComponent::setDomain(theDomain);
}