This example demonstrates the Grid class.
- Construct two grids in a rectangular region defined by the lower and upper limits that describe the region's body diagonal endpoints. 'grid1' is a 3D Reference grid, while 'grid2' is a 1D Current grid
Eigen::Matrix< double, 1, DIM, Eigen::RowMajor > Vector3d
- Write the coordinates of grids to files grid1.grid and grid2.grid
- An alternate way to construct a grid is to read its coordinates from a file. The following snippet initializes a 3D Current grid and reads its coordinates from a file
29 grid3.read(
"grid1.grid");
- We can keep track of the total number of Reference and Current grids using static variables.
Full code:
29 grid3.
read(
"grid1.grid");
void write(std::string) const