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 |
|
|
67 |
return *m_domain; |
return *m_domain; |
68 |
} |
} |
69 |
|
|
70 |
std::string |
const std::string & |
71 |
FunctionSpace::toString() const |
FunctionSpace::toString() const |
72 |
{ |
{ |
73 |
|
if( type_str.empty() ) |
74 |
|
{ |
75 |
|
std::stringstream temp; |
76 |
|
temp << m_domain->functionSpaceTypeAsString(m_functionSpaceType) |
77 |
|
<< " on " << m_domain->getDescription(); |
78 |
|
|
79 |
|
type_str = temp.str(); |
80 |
|
} |
81 |
|
return type_str; |
82 |
|
} |
83 |
|
|
84 |
|
|
85 |
|
#ifdef DEBUG |
86 |
|
PyObject * |
87 |
|
FunctionSpace::toPyString() const |
88 |
|
{ |
89 |
std::stringstream temp; |
std::stringstream temp; |
90 |
|
|
91 |
temp << m_domain->functionSpaceTypeAsString(m_functionSpaceType) |
temp << m_domain->functionSpaceTypeAsString(m_functionSpaceType) |
92 |
<< " on " << m_domain->getDescription(); |
<< " on " << m_domain->getDescription(); |
93 |
return temp.str(); |
|
94 |
|
boost::python::to_python_value<const std::string &> cvtr; |
95 |
|
|
96 |
|
return cvtr(temp.str()); |
97 |
} |
} |
98 |
|
#endif |
99 |
|
|
100 |
int |
int |
101 |
FunctionSpace::getTagFromSampleNo(int sampleNo) const |
FunctionSpace::getTagFromSampleNo(int sampleNo) const |
143 |
FunctionSpace::operator=(const FunctionSpace& other) |
FunctionSpace::operator=(const FunctionSpace& other) |
144 |
{ |
{ |
145 |
// explicitly defined assignment operator to emphasise pointer copy |
// explicitly defined assignment operator to emphasise pointer copy |
|
m_nullDomainValue=other.m_nullDomainValue; |
|
146 |
m_functionSpaceType=other.m_functionSpaceType; |
m_functionSpaceType=other.m_functionSpaceType; |
147 |
m_domain=other.m_domain; |
m_domain=other.m_domain; |
148 |
return *this; |
return *this; |