Ejemplo n.º 1
0
//! @brief Return the Vector obtained by calling getLastSysResponse() on
//! the associated FE\_Element.
const XC::Vector &XC::Subdomain::getLastExternalSysResponse(void)
  {
    if(!theFEele)
      {
        std::cerr << Domain::getClassName() << "::" << __FUNCTION__
		  << "; FATAL ERROR: "
		  << "; no FE_Element *exists for a subdomain.\n"
		  << " This is the responsibilty of the"
	          << " FE_ELement constructor.\n";
        exit(0);
      }

    // get the response from the FE_ele for the nodal
    // quantities - WARNING this is expressed in global dof

    if(mapBuilt == false)
      this->buildMap();

    ID &theMap = *map;
    const XC::Vector &localResponse = theFEele->getLastResponse();
    int numDOF = this->getNumDOF();
    for(int i=0; i<numDOF; i++)
      (*mappedVect)(theMap(i)) = localResponse(i);
    return *mappedVect;
  }
Ejemplo n.º 2
0
const Vector &
ActorSubdomain::getLastExternalSysResponse(void)
{
    int numDOF = this->getNumDOF();
    numDOF = this->getNumDOF();

    if (lastResponse == 0)
	lastResponse = new Vector(numDOF);
    else if (lastResponse->Size() != numDOF) {
	delete lastResponse;
	lastResponse = new Vector(numDOF);
    }
    
    if (mapBuilt == false)
      this->buildMap();

    ID &theMap = *map;
    Vector &localResponse = *lastResponse;
    int numberDOF = this->getNumDOF();
    for (int i=0; i<numberDOF; i++)
      (*mappedVect)(theMap(i)) = localResponse(i);

    return *mappedVect;

}