/[escript]/branches/diaplayground/finley/src/CPPAdapter/MeshAdapter.cpp
ViewVC logotype

Diff of /branches/diaplayground/finley/src/CPPAdapter/MeshAdapter.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3981 by jfenwick, Fri Sep 21 02:47:54 2012 UTC revision 3993 by caltinay, Wed Sep 26 07:00:55 2012 UTC
# Line 1569  void MeshAdapter::saveDX(const string& f Line 1569  void MeshAdapter::saveDX(const string& f
1569        TMPMEMFREE(names[i]);        TMPMEMFREE(names[i]);
1570     }     }
1571     TMPMEMFREE(names);     TMPMEMFREE(names);
   
    return;  
1572  }  }
1573    
1574  //  //
# Line 1585  void MeshAdapter::saveVTK(const string& Line 1583  void MeshAdapter::saveVTK(const string&
1583    
1584  bool MeshAdapter::ownSample(int fs_code, index_t id) const  bool MeshAdapter::ownSample(int fs_code, index_t id) const
1585  {  {
1586        if (getMPISize() > 1) {
1587  #ifdef ESYS_MPI  #ifdef ESYS_MPI
1588      index_t myFirstNode=0, myLastNode=0, k=0;          index_t myFirstNode=0, myLastNode=0, k=0;
1589      index_t* globalNodeIndex=0;          index_t* globalNodeIndex=0;
1590      Finley_Mesh* mesh_p=m_finleyMesh.get();          Finley_Mesh* mesh_p=m_finleyMesh.get();
1591      if (fs_code == FINLEY_REDUCED_NODES)          if (fs_code == FINLEY_REDUCED_NODES)
1592      {          {
1593      myFirstNode = Finley_NodeFile_getFirstReducedNode(mesh_p->Nodes);              myFirstNode = Finley_NodeFile_getFirstReducedNode(mesh_p->Nodes);
1594      myLastNode = Finley_NodeFile_getLastReducedNode(mesh_p->Nodes);              myLastNode = Finley_NodeFile_getLastReducedNode(mesh_p->Nodes);
1595      globalNodeIndex = Finley_NodeFile_borrowGlobalReducedNodesIndex(mesh_p->Nodes);              globalNodeIndex = Finley_NodeFile_borrowGlobalReducedNodesIndex(mesh_p->Nodes);
1596      }          }
1597      else          else if (fs_code == FINLEY_NODES)
1598      {          {
1599      myFirstNode = Finley_NodeFile_getFirstNode(mesh_p->Nodes);              myFirstNode = Finley_NodeFile_getFirstNode(mesh_p->Nodes);
1600      myLastNode = Finley_NodeFile_getLastNode(mesh_p->Nodes);              myLastNode = Finley_NodeFile_getLastNode(mesh_p->Nodes);
1601      globalNodeIndex = Finley_NodeFile_borrowGlobalNodesIndex(mesh_p->Nodes);              globalNodeIndex = Finley_NodeFile_borrowGlobalNodesIndex(mesh_p->Nodes);
1602      }          }
1603      k=globalNodeIndex[id];          else
1604      return static_cast<bool>( (myFirstNode <= k) && (k < myLastNode) );          {
1605                throw FinleyAdapterException("Unsupported function space type for ownSample()");
1606            }
1607    
1608            k=globalNodeIndex[id];
1609            return static_cast<bool>( (myFirstNode <= k) && (k < myLastNode) );
1610  #endif  #endif
1611        }
1612      return true;      return true;
1613  }  }
1614    
1615    
   
1616  //  //
1617  // creates a SystemMatrixAdapter stiffness matrix an initializes it with zeros  // creates a SystemMatrixAdapter stiffness matrix an initializes it with zeros
1618  //  //

Legend:
Removed from v.3981  
changed lines
  Added in v.3993

  ViewVC Help
Powered by ViewVC 1.1.26