~chaffra/+junk/trilinos

« back to all changes in this revision

Viewing changes to packages/Sundance/src-core/Evaluation/SundanceSubtypeEvaluator.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme, Christophe Prud'homme, Johannes Ring
  • Date: 2009-12-13 12:53:22 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091213125322-in0nrdjc55deqsw9
Tags: 10.0.3.dfsg-1
[Christophe Prud'homme]
* New upstream release

[Johannes Ring]
* debian/patches/libname.patch: Add prefix 'libtrilinos_' to all
  libraries. 
* debian/patches/soname.patch: Add soversion to libraries.
* debian/watch: Update download URL.
* debian/control:
  - Remove python-numeric from Build-Depends (virtual package).
  - Remove automake and autotools from Build-Depends and add cmake to
    reflect switch to CMake.
  - Add python-support to Build-Depends.
* debian/rules: 
  - Cleanup and updates for switch to CMake.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include "SundanceEvaluator.hpp"
36
36
#include "SundanceEvaluatableExpr.hpp"
37
37
 
38
 
#ifndef DOXYGEN_DEVELOPER_ONLY
39
 
 
40
38
namespace SundanceCore 
41
39
{
42
 
  namespace Internal
43
 
  {
44
 
    class EvalContext;
45
 
  }
46
 
  
47
 
  using namespace Internal;
48
 
  using namespace TSFExtended;
49
 
 
50
 
  namespace Internal 
51
 
  {
52
 
    /**
53
 
     * 
54
 
     */
55
 
    template <class ExprType> class SubtypeEvaluator : public Evaluator
 
40
class EvalContext;
 
41
 
 
42
 
 
43
/**
 
44
 * 
 
45
 */
 
46
template <class ExprType> class SubtypeEvaluator : public Evaluator
 
47
{
 
48
public:
 
49
  /** */
 
50
  SubtypeEvaluator(const ExprType* expr,
 
51
    const EvalContext& context)
 
52
    : Evaluator(), 
 
53
      expr_(expr), 
 
54
      sparsity_(expr_->sparsitySuperset(context))
56
55
    {
57
 
    public:
58
 
      /** */
59
 
      SubtypeEvaluator(const ExprType* expr,
60
 
                       const EvalContext& context)
61
 
        : Evaluator(), 
62
 
          expr_(expr), 
63
 
          sparsity_(expr_->sparsitySuperset(context))
64
 
      {
65
 
        verbosity() = Evaluator::classVerbosity();
66
 
      }
 
56
      this->setVerbosity(Evaluator::classVerbosity());
 
57
    }
67
58
 
68
 
      /** */
69
 
      virtual ~SubtypeEvaluator(){;}
 
59
  /** */
 
60
  virtual ~SubtypeEvaluator(){;}
70
61
 
71
62
 
72
63
      
73
 
      /** */
74
 
      const RefCountPtr<SparsitySuperset>& sparsity() const {return sparsity_;}
75
 
 
76
 
    protected:
77
 
      /** */
78
 
      const ExprType* expr() const {return expr_;}
79
 
 
80
 
      /** */
81
 
      const MultipleDeriv& vectorResultDeriv(int iVec) const 
82
 
      {
83
 
        return this->sparsity()->deriv(vectorIndices()[iVec]);
84
 
      }
85
 
 
86
 
      /** */
87
 
      const MultipleDeriv& constantResultDeriv(int iConst) const 
88
 
      {
89
 
        return this->sparsity()->deriv(constantIndices()[iConst]);
90
 
      }
91
 
 
92
 
    private:
93
 
      const ExprType* expr_;
94
 
 
95
 
      RefCountPtr<SparsitySuperset> sparsity_;
96
 
    };
97
 
 
98
 
    
99
 
 
100
 
  }
 
64
  /** */
 
65
  const RefCountPtr<SparsitySuperset>& sparsity() const {return sparsity_;}
 
66
 
 
67
protected:
 
68
  /** */
 
69
  const ExprType* expr() const {return expr_;}
 
70
 
 
71
  /** */
 
72
  const MultipleDeriv& vectorResultDeriv(int iVec) const 
 
73
    {
 
74
      return this->sparsity()->deriv(vectorIndices()[iVec]);
 
75
    }
 
76
 
 
77
  /** */
 
78
  const MultipleDeriv& constantResultDeriv(int iConst) const 
 
79
    {
 
80
      return this->sparsity()->deriv(constantIndices()[iConst]);
 
81
    }
 
82
 
 
83
private:
 
84
  const ExprType* expr_;
 
85
 
 
86
  RefCountPtr<SparsitySuperset> sparsity_;
 
87
};
 
88
   
101
89
}
102
 
           
103
 
#endif  /* DOXYGEN_DEVELOPER_ONLY */  
 
90
 
104
91
 
105
92
 
106
93