File: Cell.h

package info (click to toggle)
vtk6 6.3.0%2Bdfsg2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 118,880 kB
  • sloc: cpp: 1,442,792; ansic: 113,395; python: 72,383; tcl: 46,998; xml: 8,119; yacc: 4,525; java: 4,239; perl: 3,108; lex: 1,694; sh: 1,093; asm: 154; makefile: 103; objc: 17
file content (52 lines) | stat: -rw-r--r-- 1,321 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*=========================================================================

Copyright (c) Kitware Inc.
All rights reserved.

=========================================================================*/
// This class was written by Daniel Aguilera and Philippe Pebay
// This work was supported by Commissariat a l'Energie Atomique (CEA/DIF)

#ifndef CELL_H
#define CELL_H

#include <vector>

#include <vtkType.h>

class Node;

class Cell
{
   public:
      Cell (int id, std::vector<Node*> nodes);
      ~Cell ();
      void replaceNode (Node * oldNode, Node * newNode);
      bool isRefined () {return _refined;}
      int getId () {return _id;}
      vtkIdType * getNodeIds();
      void setNeighbours(int idx1, int idx2, int idy1, int idy2, int idz1, int idz2) {}

      void refine ();
      void refineIfNeeded();
      static void setRefine (int refine) {_refineNumber = refine;}
      static void setR (double R) {_R = R;}
      
      static int getCount() {return _count;}
      
   protected:
      std::vector<Node*> _nodes;
      std::vector<Cell*> _cells;
      bool _refined;
      int _id;
      vtkIdType * _nodeIds;

   private:
      double computeValue (Node * n);
      static int _count;
      static int _refinedCount;
      static int _refineNumber;
      static double _R;
} ;

#endif /* CELL_H */