GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmGaussValueSetGroup.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_GAUSS_VALUE_SET_GROUP_H_
24#define _GEMA_GAUSS_VALUE_SET_GROUP_H_
25
26#include "gmValueSetGroup.h"
27#include "gmGaussValueSet.h"
28
29
32{
33public:
35
36 virtual bool addValueSet(QString id, GmValueInfo* info);
37
38 bool init();
39 bool addValues();
40 void restoreSize();
41
44
45#if defined ENABLE_TESTS || defined ENABLE_VALUESET_TESTS
46 virtual void validateInternalStructure();
47#endif
48
49protected:
50 virtual GmValueSet* createValueSet(GmValueInfo* info, GmPackedBuffer* pack) { return new GmGaussValueSet(info, pack, _simData, (GmElementMesh*)_mesh); }
51
52private:
53 Q_DISABLE_COPY(GmGaussValueSetGroup)
54
55 // Returns the rule set for the stored value sets or -1 if there is none
56 int ruleSet() const { return _valueSets.isEmpty() ? -1 : _valueSets.first()->info()->ruleSet(); }
57
58 // Hide base class functions and make sure that we fail if the user ever calls them through a virtual call
59 virtual bool init(int) { assert(0); return false; }
60 virtual bool addValues(int) { assert(0); return false; }
61 virtual void removeValues(int, int) { assert(0); }
62 virtual void restoreSize(int) { assert(0); }
63};
64
65
66#endif
67
68
Base interface for FEM (finite element) meshes.
Definition gmElementMesh.h:42
A derived class from GmValueSetGroup storing GmGaussValueSet objects.
Definition gmGaussValueSetGroup.h:32
virtual bool init(int)
Initializes all the ValueSets, being responsible for allocating memory and initializing data....
Definition gmGaussValueSetGroup.h:59
virtual void removeValues(int, int)
Removes numValues from the set, starting from (and including) index. Can not fail (but might not rele...
Definition gmGaussValueSetGroup.h:61
GmGaussValueSet * gaussValueSet(QString id) const
Returns the value set associated with the given data id. Returns NULL if not found.
Definition gmGaussValueSetGroup.h:43
virtual GmValueSet * createValueSet(GmValueInfo *info, GmPackedBuffer *pack)
Virtual function used to create the stored value set. Can be overwritten by descendant classes.
Definition gmGaussValueSetGroup.h:50
virtual bool addValues(int)
Adds the given number of values to the sets, initializing them to the default value....
Definition gmGaussValueSetGroup.h:60
virtual void restoreSize(int)
Restores the size of the sets to the previous size before addValues.
Definition gmGaussValueSetGroup.h:62
Inheriting from GmValueSet, this class adds the peculiarities needed for saving values in Gauss point...
Definition gmGaussValueSet.h:35
The basic interface for a shared buffer storing interleaved data for a group of value sets.
Definition gmPackedBuffer.h:119
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
Auxiliar class used to store the definition of a value. It can be used to store informations about st...
Definition gmValueInfo.h:132
This class manages a group of ValueSets that have all the same size and must grow (or shrink) togethe...
Definition gmValueSetGroup.h:38
virtual bool addValueSet(QString id, GmValueInfo *info)
Adds a new value set to the group. If the group has not been initialized yet, an empty value set will...
Definition gmValueSetGroup.cpp:125
virtual bool init(int numValues)
Initializes all the ValueSets, being responsible for allocating memory and initializing data....
Definition gmValueSetGroup.cpp:358
virtual void restoreSize(int oldSize)
Restores the size of the sets to the previous size before addValues.
Definition gmValueSetGroup.cpp:477
virtual bool addValues(int numAddedValues)
Adds the given number of values to the sets, initializing them to the default value....
Definition gmValueSetGroup.cpp:407
GmValueSet * valueSet(QString id) const
Returns the value set associated with the given data id. Returns NULL if not found.
Definition gmValueSetGroup.h:91
Basic class used to store sets of values, bound to a common definition, on behalf of another object (...
Definition gmValueSet.h:54
#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 GmGaussValueSet class.
Declaration of the GmValueSetGroup class.