NUMCXX  0.13.20181108
Numerical library for small projects and teaching purposes
Functions
31-cut.cxx File Reference
+ Include dependency graph for 31-cut.cxx:

Go to the source code of this file.

Functions

int main (void)
 

Function Documentation

int main ( void  )
Examples:
31-cut.cxx.

Definition at line 20 of file 31-cut.cxx.

21 {
22  auto pGeometry=numcxx::Geometry::create();
23  pGeometry->set_points({
24  {-2,0},
25  {0,0},
26  {2,0},
27  {2,2},
28  {0.5,2},
29  {0,1},
30  {-0.5,2},
31  {-2,2}
32  });
33  pGeometry->set_bfaces({
34  {0,1},
35  {1,2},
36  {2,3},
37  {3,4},
38  {4,5},
39  {5,6},
40  {6,7},
41  {7,0},
42  {5,1},
43  });
44 
45 
46  pGeometry->set_bfaceregions({1,1,2,3,4,4,3,2,5});
47 
48  pGeometry->set_regionpoints({
49  {-0.5,1},
50  {0.5,1}
51  });
52  pGeometry->set_regionnumbers({1,2});
53  pGeometry->set_regionvolumes({0.1,0.01});
54 
55 
56 
57  auto pGrid=numcxx::SimpleGrid::create(pGeometry,"zpaAqV");
58 
59 
60 #ifdef VTKFIG
61  auto griddata=numcxx::vtkfigDataSet(pGrid);
62  auto frame=vtkfig::Frame::New();
63  auto gridview=vtkfig::GridView::New();
64  gridview->SetData(griddata);
65  frame->AddFigure(gridview);
66  frame->Interact();
67 #endif
68 }
static std::shared_ptr< Geometry > create()
Definition: geometry.hxx:73
static std::shared_ptr< SimpleGrid > create(const Geometry &geometry, const std::string triangle_flags)
Static constructor from reference to geometry.
Definition: simplegrid.hxx:35

+ Here is the call graph for this function: