GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmContactBoundaryCondition.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_CONTACT_BOUNDARY_CONDITION_H_
25#define _GEMA_CONTACT_BOUNDARY_CONDITION_H_
26
27#include "gmBoundaryCondition.h"
28
30
33{
34public:
37 BcType bcType)
38 : GmBoundaryConditionBase(id, description, type, mesh, bcType) { _global = false; _materialAc = NULL; }
39
41
43 bool isGlobal() const { return _global; }
44
46 int numPropertyValues() const { return _propertyMaterialIds.size(); }
47
48 GmContactBoundaryConditionAccessor* propertyAccessor(QString propertyId, Unit desiredUnit, const GmLogCategory& logger) const;
49 GmValueAccessor* materialAccessor(const GmLogCategory& logger) const;
50
52 const QStringList& materialList() const { return _materialList; }
53
54 int addPropertyLines(int n = 1);
55 void setMaterialList(const QStringList& matList);
56 bool setPropertyMaterialId(int contactIndex, const QString& id);
57 bool rebuildMaterialMapping(const GmLogCategory& logger);
58
59 static GmContactBoundaryCondition* loadFromTable(LuaTable& tab, GmSimulationData* data, const GmLogCategory& logger);
60
61 int contactIndex(int bcIndex1, int bcIndex2) const;
62
63protected:
65 virtual QString msgPrefix() const { return "contact "; }
66
67 virtual void printExtraHeaderInfo (const GmLogCategory& logger, GmLogLevel level) const;
68 virtual void printExtraPropertyValues(const GmLogCategory& logger, GmLogLevel level) const;
69
70private:
71 bool parseMaterialPair(QString matId, const QMap<QString, double>& matMap,
72 int* firstIndex, int* secondIndex);
73
74 bool _global;
78
88};
89
90
91#endif
92
A base class used to implement the common part between GmBoundaryCondition and GmContactBoundaryCondi...
Definition gmBoundaryCondition.h:58
virtual void printExtraHeaderInfo(const GmLogCategory &logger, GmLogLevel level) const
Aux function to print(), giving a chance for derived classes to add additional header data.
Definition gmBoundaryCondition.h:218
BcType
Boundary condition type defining where a BC is applied (node, edge or face)
Definition gmBoundaryCondition.h:62
virtual void printExtraPropertyValues(const GmLogCategory &logger, GmLogLevel level) const
Aux function to print(), giving a chance for derived classes to add property values when _appPointUse...
Definition gmBoundaryCondition.h:221
The GmContactBoundaryConditionAccessor class is a proxy object to a value accesor implementing a more...
Definition gmContactBoundaryConditionAccessor.h:35
A class used to represent a set of contact boundary conditions of the same type, tied to the same mes...
Definition gmContactBoundaryCondition.h:33
int numPropertyValues() const
Returns the number o property values.
Definition gmContactBoundaryCondition.h:46
QStringList _materialList
The material list data.
Definition gmContactBoundaryCondition.h:75
bool _global
Is this a global or a local contact BC?
Definition gmContactBoundaryCondition.h:74
GmContactBoundaryCondition(QString id, QString description, QString type, GmMesh *mesh, BcType bcType)
Constructor. See parameter description on the GmBoundaryConditionBase constructor documentation.
Definition gmContactBoundaryCondition.h:36
virtual QString msgPrefix() const
The contents of the %1 argument on the "%1boundary condition" string used on error messages.
Definition gmContactBoundaryCondition.h:65
const QStringList & materialList() const
Returns the contact material list.
Definition gmContactBoundaryCondition.h:52
GmValueAccessor * _materialAc
The accessor for the column storing the material index associated with each BC.
Definition gmContactBoundaryCondition.h:76
QStringList _propertyMaterialIds
The ids of the property values.
Definition gmContactBoundaryCondition.h:77
QVector< QMap< int, int > > _materialMap
Given a material index (recovered from the material column of the application point table),...
Definition gmContactBoundaryCondition.h:87
bool isGlobal() const
Returns whether this table stores global or local boundary conditions.
Definition gmContactBoundaryCondition.h:43
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Base interface class for Mesh type plugins.
Definition gmMesh.h:48
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
Interface class for accessing and setting values from an "indexable" collection of values.
Definition gmValueAccessor.h:60
Declaration of the GmBoundaryCondition class.
#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
GmLogLevel
Available log levels list.
Definition gmLog.h:36