Xfem
The Xfem Plugin
Loading...
Searching...
No Matches
xfemGaussValueSet.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_XFEM_GAUSS_VS_H_
25#define _GEMA_XFEM_GAUSS_VS_H_
26
28
30class XfemElement;
31class GmTaskManager;
32
37{
38public:
40 virtual ~XfemGaussValueSet();
41
42 virtual void clear();
43
44 double* dataPointer(const XfemElement* e, int ip, int stateIndex);
45
46 int numEnrichedPoints(int cellId) const;
47
49 void clearEnrichedIntegrationPoints (int cellId);
50 void insertEnrichedIntegrationPoints(int cellId, int firstPoint, int numPoints);
51 void removeEnrichedIntegrationPoints(int cellId, int firstPoint, int numPoints);
52
54 int stateIndex(int snum) const { return t(snum); }
55
56 virtual bool saveState(GmTaskManager* tm, SaveStateMode mode, const GmLogCategory& logger);
57
58#if defined ENABLE_TESTS || defined ENABLE_VALUESET_TESTS
59 void validateInternalStructure(bool xfemOnly = false);
60#endif
61
62private:
63 friend class XfemGaussAccessor;
64
67 {
68 XfemGaussValueData(int n, GmValueInfo* info, int nstates);
70
71 void addPoints (int index, int n, GmValueInfo* info);
72 void removePoints(int index, int n, GmValueInfo* info);
73
75 void initState(int index, SaveStateMode mode, int oldIndex, GmValueInfo* info);
76
80 };
81
83};
84
87{
88public:
90 : GmGaussValueSetGroup(simData, mesh) {}
91
94
95protected:
96 virtual GmValueSet* createValueSet(GmValueInfo* info, GmPackedBuffer* pack) { return new XfemGaussValueSet(info, pack, _simData, (GmElementMesh*)_mesh); }
97};
98
99#endif
100
GmGaussValueSetGroup(GmSimulationData *simData, GmElementMesh *mesh)
int numPoints(int cellId) const
GmSimulationData * _simData
GmValueSet * valueSet(QString id) const
int t(int index) const
GmValueInfo * info() const
GmPackedBuffer * pack() const
Basic interface for an XFEM element.
Definition xfemElement.h:44
The XfemGaussAccessor class is a proxy object to a value accesor implementing a more convenient inter...
Definition xfemGaussAccessor.h:41
A derived class from GmGaussValueSetGroup storing XfemGaussValueSet objects.
Definition xfemGaussValueSet.h:87
XfemGaussValueSet * xfemValueSet(QString id) const
Returns the value set associated with the given data id. Returns NULL if not found.
Definition xfemGaussValueSet.h:93
Operating in colaboration with the XfemGaussAccessor class this value set extends the normal Gauss va...
Definition xfemGaussValueSet.h:37
QMap< int, XfemGaussValueData * > _enrichedDataMap
Map storing per enriched element data.
Definition xfemGaussValueSet.h:82
void removeEnrichedIntegrationPoints(int cellId, int firstPoint, int numPoints)
Removes the the given number of integration points, starting at firstPoint, from the given element....
Definition xfemGaussValueSet.cpp:128
double * dataPointer(const XfemElement *e, int ip, int stateIndex)
Returns a pointer to the area used to store data for the given ENRICHED element integration point,...
Definition xfemGaussValueSet.cpp:56
int numEnrichedPoints(int cellId) const
Returns the number of enriched integration points for the given cell.
Definition xfemGaussValueSet.cpp:75
XfemGaussValueSet(GmValueInfo *info, GmPackedBuffer *pack, GmSimulationData *simData, GmElementMesh *mesh)
Constructor. See base class GmMGaussValueSet.
Definition xfemGaussValueSet.cpp:37
void insertEnrichedIntegrationPoints(int cellId, int firstPoint, int numPoints)
Insertss the given number of points into the specified position (firstPOint) of the set of enriched i...
Definition xfemGaussValueSet.cpp:105
virtual ~XfemGaussValueSet()
Destructor.
Definition xfemGaussValueSet.cpp:43
void clearEnrichedIntegrationPoints()
Removes the complete set of enriched integration points (for all elements)
Definition xfemGaussValueSet.cpp:84
int stateIndex(int snum) const
Translates a state number into the index needed by dataPointer()
Definition xfemGaussValueSet.h:54
Auxiliar class used to store enriched data for a single element.
Definition xfemGaussValueSet.h:67
~XfemGaussValueData()
Destructor.
Definition xfemGaussValueSet.cpp:264
void removePoints(int index, int n, GmValueInfo *info)
Removes the given number of points from the set. Remaining points are moved to fill the gap.
Definition xfemGaussValueSet.cpp:318
int _nvalues
Number of saved values (equal to the number of integration points)
Definition xfemGaussValueSet.h:77
QList< double * > _valuesList
List with a data vector with size equal to _nstored * data dimension, filled with _nvalues * data dim...
Definition xfemGaussValueSet.h:79
int _nstored
The number of alocated values in the data vector. Always >= _nvalues.
Definition xfemGaussValueSet.h:78
void addState(GmValueInfo *info)
Adds a new (history) state to the set, with the same number of points as the other states....
Definition xfemGaussValueSet.cpp:343
void addPoints(int index, int n, GmValueInfo *info)
Adds the given number of points to the set, initialized with the default value given by info Points a...
Definition xfemGaussValueSet.cpp:274
void initState(int index, SaveStateMode mode, int oldIndex, GmValueInfo *info)
Initializes the values in the state given by index according to the given save mode.
Definition xfemGaussValueSet.cpp:355
XfemGaussValueData(int n, GmValueInfo *info, int nstates)
Constructor getting as parameter the number of stored values, the information describing the data typ...
Definition xfemGaussValueSet.cpp:236