/[escript]/trunk/escript/src/FunctionSpace.cpp
ViewVC logotype

Diff of /trunk/escript/src/FunctionSpace.cpp

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

revision 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1628 by phornby, Fri Jul 11 13:12:46 2008 UTC
# Line 27  namespace escript { Line 27  namespace escript {
27    
28  //  //
29  // Create a null domain for use with any default-constructed function space  // Create a null domain for use with any default-constructed function space
30  ESCRIPT_DLL_API NullDomain FunctionSpace::m_nullDomainValue;  NullDomain const FunctionSpace::nullDomainValue;
31    
32  FunctionSpace::FunctionSpace():  FunctionSpace::FunctionSpace():
33    m_domain(static_cast<AbstractDomain*>(&m_nullDomainValue)),    m_domain(static_cast<const AbstractDomain*>(&nullDomainValue)),
34    m_functionSpaceType(m_nullDomainValue.getFunctionCode())    m_functionSpaceType(nullDomainValue.getFunctionCode())
35  {  {
36  }  }
37    
# Line 73  FunctionSpace::toString() const Line 73  FunctionSpace::toString() const
73    std::stringstream temp;    std::stringstream temp;
74    temp << m_domain->functionSpaceTypeAsString(m_functionSpaceType)    temp << m_domain->functionSpaceTypeAsString(m_functionSpaceType)
75         << " on " << m_domain->getDescription();         << " on " << m_domain->getDescription();
76    
77    return temp.str();    return temp.str();
78  }  }
79    
80    
81    #ifdef DEBUG_PY_STRINGS
82    PyObject *
83    FunctionSpace::toPyString() const
84    {
85      boost::python::to_python_value<const std::string &> cvtr;
86      std::stringstream temp;
87    
88      temp << m_domain->functionSpaceTypeAsString(m_functionSpaceType)
89           << " on " << m_domain->getDescription();
90    
91      return cvtr(temp.str());
92    }
93    #endif
94    
95    
96  int  int
97  FunctionSpace::getTagFromSampleNo(int sampleNo) const  FunctionSpace::getTagFromSampleNo(int sampleNo) const
98  {  {
# Line 122  FunctionSpace& Line 139  FunctionSpace&
139  FunctionSpace::operator=(const FunctionSpace& other)  FunctionSpace::operator=(const FunctionSpace& other)
140  {  {
141    // explicitly defined assignment operator to emphasise pointer copy    // explicitly defined assignment operator to emphasise pointer copy
   m_nullDomainValue=other.m_nullDomainValue;  
142    m_functionSpaceType=other.m_functionSpaceType;    m_functionSpaceType=other.m_functionSpaceType;
143    m_domain=other.m_domain;    m_domain=other.m_domain;
144    return *this;    return *this;

Legend:
Removed from v.1388  
changed lines
  Added in v.1628

  ViewVC Help
Powered by ViewVC 1.1.26