GemaCoreLib
The GeMA Core library
gmGaussValueSet.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 
23 #ifndef _GEMA_GAUSSVALUE_SET_H_
24 #define _GEMA_GAUSSVALUE_SET_H_
25 
26 #include "gmValueSet.h"
27 #include "gmElementMesh.h"
28 
29 #include "gmGaussIndex.h"
30 
35 {
36 public:
37 
39  virtual ~GmGaussValueSet();
40 
41  bool init(bool releaseInfoOnError = false);
42 
44  int pointIndex(int cellId, int ip) const { assert(_index); return _index->pointIndex(cellId, ip); }
45 
47  int numPoints(int cellId) const { assert(_index); return _index->numPoints(cellId); }
48 
52  const GmMeshGaussIndex* gaussIndex() const { return _index; }
53 
54 #if defined ENABLE_TESTS || defined ENABLE_VALUESET_TESTS
55  virtual void validateInternalStructure();
56 #endif
57 
58 private:
59  Q_DISABLE_COPY(GmGaussValueSet)
60 
61  // Hide imported functions from GmValueSet
62  bool init(int, bool);
63 
64 protected:
67 };
68 
69 
70 #endif
71 
72 
Auxiliar class used to store the definition of a value. It can be used to store informations about st...
Definition: gmValueInfo.h:126
Basic class used to store sets of values, bound to a common definition, on behalf of another object (...
Definition: gmValueSet.h:53
const GmElementMesh * _mesh
The associated mesh object.
Definition: gmGaussValueSet.h:65
Inheriting from GmValueSet, this class adds the peculiarities needed for saving values in Gauss point...
Definition: gmGaussValueSet.h:34
int pointIndex(int cellId, int ip) const
Given a cell index and an integration point index, returns the data index in the underlying value set...
Definition: gmGaussValueSet.h:44
int numPoints(int cellId) const
Returns the number of integration points for the given cell.
Definition: gmGaussValueSet.h:47
Auxiliar class used to store the complete set of simulation data.
Definition: gmSimulationData.h:51
A Gauss index interface always indexing ALL the elements of a mesh, with support for mesh growing.
Definition: gmGaussIndex.h:274
bool init(int numValues, bool releaseInfoOnError=false)
Initializes the ValueSet, beeing responsible for allocating memory and initializing data.
Definition: gmValueSet.cpp:168
Declaration of the GmGaussIndex family of classes.
Declaration of the GmElementMesh interface class.
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
Base interface for FEM (finite element) meshes.
Definition: gmElementMesh.h:40
const GmMeshGaussIndex * _index
The index object, owned by the mesh, used to translate (elemId, ip) pairs into a linear index.
Definition: gmGaussValueSet.h:66
Declaration of the GmValueSet class.
const GmMeshGaussIndex * gaussIndex() const
Returns the, mesh owned, asssociated Gauss index (equivalent ot querying the mesh for the Gauss index...
Definition: gmGaussValueSet.h:52