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
53
54
55
56
57
/*
 * MeshGeneration.hpp
 *  class for generating simple meshes online
 */

#ifndef MESHGENERATION_HPP_
#define MESHGENERATION_HPP_
#include "moab/Core.hpp"

#include "moab/CartVect.hpp"

namespace moab
{

// Forward Declarations
class ParallelComm;

class MeshGeneration
{

  public:
    struct BrickOpts
    {
        // follow the options in examples/advanced/GenLargeMesh.cpp
        CartVect ui, uj, uk;         // such that ui * uj = uk; uj*uk=ui, etc
        double xsize, ysize, zsize;  // extents of the brick
        int A, B, C;                 // number of blocks per processor
        int M, N, K;                 // number of processors in each direction
        int blockSize;               // each small block size
        int GL;                      // number of ghost layers
        bool newMergeMethod;         // = false;
        bool quadratic;              // = false;
        bool keep_skins;             // = false;
        bool tetra;                  // = false;
        bool adjEnts;                // = false;
        bool parmerge;               // = false;
    };

    MeshGeneration( Interface* mbi,
#ifdef MOAB_HAVE_MPI
                    ParallelComm* pcomm = 0,
#endif
                    EntityHandle rset = 0 );
    virtual ~MeshGeneration();

    ErrorCode BrickInstance( BrickOpts& opts );

  private:
    Interface* mb;
#ifdef MOAB_HAVE_MPI
    ParallelComm* pc;
#endif
    EntityHandle cset;
};

} /* namespace moab */
#endif /* MESHGENERATION_HPP_ */