15 std::vector<Mesh::IndexType> &gridsizes,
18 if(gridsizes.size() != 3)
27 std::vector<Mesh::IndexType> flatextent(6);
29 flatextent[1] = nnodes_x;
31 flatextent[3] = nnodes_y;
33 flatextent[5] = nnodes_z;
34 gridextent.
Init(flatextent);
35 unsigned int npoints = flatextent[1]*flatextent[3]*flatextent[5];
37 std::vector<double> xcoords(ncells_x+1);
38 std::vector<double> ycoords(ncells_y+1);
40 double h_x = (ncells_x > 0 ? p.x()/ncells_x : 0);
41 double h_y = (ncells_y > 0 ? p.y()/ncells_y : 0);
42 double h_z = (ncells_z > 0 ? p.z()/ncells_z : 0);
43 for(
unsigned int i = 0;
i < nnodes_y;
i++)
44 ycoords[
i] =
i*h_y + box.
P1().
y();
45 for(
unsigned int i = 0;
i < nnodes_x;
i++)
46 xcoords[
i] =
i*h_x + box.
P1().
x();
47 unsigned int point_id = 1;
48 for(
unsigned int k = 0;
k < nnodes_z;
k++){
49 double z =
k*h_z + box.
P1().
z();
50 for(
unsigned int j = 0;
j < nnodes_y;
j++){
51 for(
unsigned int i = 0;
i < nnodes_x;
i++){
53 gridpoint.x() = xcoords[
i];
54 gridpoint.y() = ycoords[
j];
/brief Cartesian 3 Vector
int GenerateCartesianGrid(Mesh::NodalCoordinates &nc, Mesh::BSExtent< Mesh::IndexType > &gridextent, std::vector< Mesh::IndexType > &gridsizes, GeoPrim::CBox &box)
const CPoint & P2() const
Class Mesh is the main class that holds all information to describe the current state of the mesh...
Block Structured Mesh stuff.
void int int int REAL REAL REAL * z
void Init(const std::vector< T > &inflatextent)
IRAD::Primitive::IndexType IndexType
Simple Block Structured Mesh object.
const CPoint & P1() const