GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmRegularGridMesh.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_REGULAR_GRID_MESH_H_
25#define _GEMA_REGULAR_GRID_MESH_H_
26
27#include "gmMesh.h"
28
31{
32Q_OBJECT
33
34public:
36 GmRegularGridMesh(GmSimulationData* simulation, QString id, QString description, const GmLogCategory& logger)
37 : GmMesh(simulation, id, description, logger) {}
38
40 virtual ~GmRegularGridMesh() {}
41
43 virtual double nodeSpacing(int dim) const = 0;
44
46 virtual int nodeCount(int dim) const = 0;
47
49 virtual bool nodeWrap(int dim) const = 0;
50
55 virtual int nodeFromIndex(int x, int y = -1, int z = -1) const = 0;
56
61 virtual void indexFromNode(int node, int* x, int* y = NULL, int* z = NULL) const = 0;
62
67 virtual int neighbor(int node, int xoffset, int yoffset = 0, int zoffset = 0) const = 0;
68};
69
70#endif
71
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Base interface class for Mesh type plugins.
Definition gmMesh.h:48
Base interface class for Regular Grid Mesh type plugins.
Definition gmRegularGridMesh.h:31
virtual void indexFromNode(int node, int *x, int *y=NULL, int *z=NULL) const =0
Given a node index, returns in x, y and z the corresponding grid indices. Parameters y and z should b...
virtual int nodeFromIndex(int x, int y=-1, int z=-1) const =0
Given a set of node column, line and depth indices, returns the correspondent node index....
virtual double nodeSpacing(int dim) const =0
Returns the spacing between grid nodes in the given dimension (0 <= dim < nodeCoordInfo()->size())
virtual ~GmRegularGridMesh()
Basic destructor.
Definition gmRegularGridMesh.h:40
virtual bool nodeWrap(int dim) const =0
Returns true if for the given dimension the first node at the direction is conected to the last one (...
virtual int neighbor(int node, int xoffset, int yoffset=0, int zoffset=0) const =0
Returns the index of the neighbor node given the current node and the offset in each dimension....
GmRegularGridMesh(GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
Basic contructor.
Definition gmRegularGridMesh.h:36
virtual int nodeCount(int dim) const =0
Returns the number of nodes in the mesh in the given dimension (0 <= dim < nodeCoordInfo()->size())
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Declaration of the GmMesh interface class.