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

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

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

revision 2086 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 2087 by jfenwick, Mon Nov 24 04:51:30 2008 UTC
# Line 12  Line 12 
12  *******************************************************/  *******************************************************/
13    
14    
15    #include "DomainException.h"
16  #include "NullDomain.h"  #include "NullDomain.h"
17    #include "Data.h"
18    
19  namespace escript {  namespace escript {
20    
# Line 28  NullDomain::NullDomain() { Line 30  NullDomain::NullDomain() {
30    
31  bool NullDomain::isValidFunctionSpaceType(int functionSpaceType) const  bool NullDomain::isValidFunctionSpaceType(int functionSpaceType) const
32  {  {
33    //     return (functionSpaceType==NullDomainFS);
   // allow anything  
   return true;  
34  }  }
35    
36  std::string NullDomain::getDescription() const  std::string NullDomain::getDescription() const
37  {  {
38    return "NullDomain";    return "NullDomain";
39  }  }
40    
41    std::string NullDomain::functionSpaceTypeAsString(int functionSpaceType) const
42    {
43        return "Default_FunctionSpace";
44    }
45    
46    void NullDomain::interpolateOnDomain(Data& target,const Data& source) const
47    {
48       if (source.getFunctionSpace().getDomain().get()!=this)  
49          throw DomainException("Error - Illegal domain of interpolant.");
50       if (target.getFunctionSpace().getDomain().get()!=this)
51          throw DomainException("Error - Illegal domain of interpolation target.");
52       target=source;
53    }
54    
55    bool NullDomain::probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const
56    {
57       if ((functionSpaceType_source!=functionSpaceType_target) || (functionSpaceType_target!=NullDomainFS))
58       {
59        throw DomainException("Error - Illegal function type for NullDomain.");
60       }
61       return true;
62    }
63    
64    void NullDomain::interpolateACross(Data& target, const Data& source) const
65    {
66       throw DomainException("Error - interpolation to the NullDomain not supported.");
67    }
68    
69    bool NullDomain::probeInterpolationACross(int functionSpaceType_source,const AbstractDomain& targetDomain, int functionSpaceType_target) const
70    {
71       return false;
72    }
73    
74  int NullDomain::getContinuousFunctionCode() const  int NullDomain::getContinuousFunctionCode() const
75  {  {
76    return NullDomainFS;    return NullDomainFS;

Legend:
Removed from v.2086  
changed lines
  Added in v.2087

  ViewVC Help
Powered by ViewVC 1.1.26