Itasca C++ Interface
Loading...
Searching...
No Matches
iblockthing.h
Go to the documentation of this file.
1#pragma once
2// iblockthing.h
3
4#include "fortconv/fortdefc.h"
5#include "base/src/farray.h"
6
12namespace itasca
13{
14 class IThing;
15}
16
17namespace block
18{
19 class IZoneThing;
20 class IFaceThing;
21 class IVertexThing;
22 class IContactThing;
23 class IFElementThing;
24 class IFEFaceThing;
25
32 {
33 public:
34
37 NONE,
38 MASTER,
39 SLAVE
40 };
41
43 virtual const itasca::IThing * getIThing() const=0;
47 inline static const TType type_ = 0x4f01ef15;
49 virtual FInt getFortranOffset() const=0;
51 virtual quint64 getBlockID() const=0;
53 virtual DVect3 getLocation() const=0;
55 virtual int getMaterialNumber() const=0;
57 virtual int getModelNumber() const=0;
59 virtual bool getFix() const=0;
61 virtual void setFix(bool b) = 0;
63 virtual QString getFixString() const = 0;
65 virtual DVect3 getVelocity() const=0;
67 virtual void setVelocity(const DVect3 &)=0;
69 virtual DVect3 getDisplacement() const = 0;
71 virtual DVect3 getAngularVelocity() const=0;
73 virtual void setAngularVelocity(const DVect3 &)=0;
75 virtual double getVolume() const=0;
77 virtual double getMass() const=0;
79 virtual DVect3 getInertia() const=0;
81 virtual SymTensor getInertiaTensor() const=0;
83 virtual DVect3 getForce() const=0;
85 virtual DVect3 getMoment() const=0;
87 virtual void setMoment(const DVect3 &)=0;
89 virtual DVect3 getLoad() const=0;
91 virtual void setLoad(const DVect3 &)=0;
93 virtual int getMasterSlaveStatus() const=0;
95 virtual FInt getMasterOffset() const=0;
97 virtual bool isExcavated() const=0;
99 virtual bool isRemoved() const=0;
101 virtual bool getHidden() const=0;
103 virtual bool isWall() const=0;
105 virtual bool isRigid() const=0;
107 virtual void getEdgeAngle(double *max, double *min) const=0;
109 virtual double getMinEdge() const=0;
111 virtual double getMaxAspect() const=0;
113 virtual double getMinFaceArea() const=0;
115 virtual double getSurfaceArea() const = 0;
118 virtual bool isConcave(double d = 180.0) const=0;
120 virtual bool isValid() const=0;
123 virtual bool getBit(int bit) const=0;
129 virtual void setBit(int bit,bool b) const=0;
132 virtual QVariant getValue(int index) const=0;
137 virtual void setValue(int index,const QVariant &v) const=0;
140 virtual double getDensity() const=0;
143 virtual void setDensity(double d)=0;
145 virtual double getDensityScalingFactor() const=0;
150 virtual FArray<const IFaceThing *> getFaces(bool rigid) const=0;
154 virtual FArray<quint64> getZoneIDs() const = 0;
156 virtual bool isSlave() const=0;
158 virtual quint64 getMasterID() const=0;
164 virtual quint32 numGP() const = 0;
172 virtual uint getFreeField() const = 0;
173 // Add a single gridpoint to a block.
174 virtual FInt addGridpoint(int ifac, double x, double y, double z) = 0;
175 // Add a single tet element to a block.
176 virtual void addTetZone(FInt n0, FInt n1, FInt n2, FInt n3) = 0;
177 // Post processing stuff after gridpoints and tet zones added to a block
178 virtual void block_import_post() = 0;
180 virtual bool isInternal() const=0;
182 virtual bool isFaceBlock() const = 0;
184 virtual const IBlockThing * getHostBlock() const = 0;
186 virtual quint64 getHostID() const=0;
188 virtual const IVertexThing * findVertex(DVect3 v) const = 0;
190 virtual double getBlockCondition(int i) const = 0;
191
192 };
193
194} // end namespace block
195// EOF
An array class that attempts to minimize unnecessary heap access.
Definition farray.h:25
A symmetric 2nd order tensor.
Definition symtensor.h:22
This is the interface for BlockThing, a class that holds extra data not in the fortran arrays....
Definition iblockthing.h:32
virtual void setAngularVelocity(const DVect3 &)=0
Set block angular velocity (rigid)
virtual double getDensityScalingFactor() const =0
Return density scaling factor.
virtual DVect3 getVelocity() const =0
Return block velocity.
virtual void setFix(bool b)=0
Set block fixity condition.
virtual bool isConcave(double d=180.0) const =0
virtual double getVolume() const =0
Return block volume.
virtual const itasca::IThing * getIThing() const =0
Returns a const IThing pointer.
virtual void setBit(int bit, bool b) const =0
virtual FArray< const IFaceThing * > getFaces(bool rigid) const =0
virtual void getEdgeAngle(double *max, double *min) const =0
Get maximum and minimum angle between block (not zone) faces in degrees. Angle > 180 = concave.
virtual DVect3 getLocation() const =0
Returns block centroid position.
virtual bool isWall() const =0
Returns true if block is a wall.
virtual FArray< const IZoneThing * > getZones() const =0
Get array of ZoneThings that make up this block.
virtual SymTensor getInertiaTensor() const =0
Return moment of inertia tensor.
virtual FArray< quint64 > getZoneIDs() const =0
Get array of zone ids that make up this block.
virtual double getMass() const =0
Return block mass.
virtual double getBlockCondition(int i) const =0
get block condition
virtual bool isValid() const =0
Return true if BlockThing and Fortran block are in sync.
virtual quint64 getBlockID() const =0
Return Thing ID.
virtual DVect3 getLoad() const =0
Return load applied to block centroid (rigid)
virtual double getDensity() const =0
virtual bool isFaceBlock() const =0
Return if block is a face block.
virtual FInt getFortranOffset() const =0
Return block fortran offset. Necessary for gui queries.
virtual quint64 getMasterID() const =0
Returns id of master block. Return 0 if not a slave.
virtual quint64 getHostID() const =0
return host block ID for face blocks. Otherwise return 0
virtual QVariant getValue(int index) const =0
virtual FArray< const IFEFaceThing * > getFEFaces() const =0
Get list of finite element faces associated with block.
virtual QString getFixString() const =0
return string indicating fix condition
MasterSlaveStatus
Master/Slave status.
Definition iblockthing.h:36
virtual void setLoad(const DVect3 &)=0
Return load applied to block centroid (rigid)
static const TType type_
type used in IThing typing system
Definition iblockthing.h:47
virtual int getMasterSlaveStatus() const =0
Return block master/slave condition: 0 = none, 1 = master, 2 = slave.
virtual bool isInternal() const =0
Return if block is internal (has face blocks)
virtual FArray< const IVertexThing * > getVertices() const =0
Returns all vertices.
virtual bool isExcavated() const =0
Returns true if block is marked as excavated.
virtual void setDensity(double d)=0
virtual FInt getMasterOffset() const =0
Return fortran index of master block (0 if none)
virtual DVect3 getMoment() const =0
Return block centroid moment (rigid)
virtual void setValue(int index, const QVariant &v) const =0
Note - this is const through some hack so that we can use const BlockThings when getting data.
virtual DVect3 getForce() const =0
Return block centroid force sum (rigid)
virtual double getSurfaceArea() const =0
Return surface area.
virtual DVect3 getInertia() const =0
Return block moment of inertia.
virtual bool getFix() const =0
Return block fixity condition.
virtual double getMinEdge() const =0
Returns the minimum edge length.
virtual bool getHidden() const =0
Returns true if block is hidden.
virtual itasca::IThing * getIThing()=0
Returns a IThing pointer.
virtual DVect3 getAngularVelocity() const =0
Return block angular velocity.
virtual void setMoment(const DVect3 &)=0
set block centroid moment (rigid)
virtual double getMinFaceArea() const =0
Return minimum face area (rigid faces, not zones)
virtual int getModelNumber() const =0
Return block model number.
virtual FArray< const IFElementThing * > getFElements() const =0
Get list of finite elements associated with block.
virtual void setVelocity(const DVect3 &)=0
Set block velocity (rigid)
virtual bool isSlave() const =0
Return true if this block is a slave. False otherwise.
virtual const IBlockThing * getHostBlock() const =0
Return host block if face block. Otherwise return null.
virtual quint32 numGP() const =0
Return number of vertices.
virtual bool getBit(int bit) const =0
virtual const IVertexThing * findVertex(DVect3 v) const =0
Find vertex of block.
virtual bool isRemoved() const =0
Returns true if block is removed.
virtual uint getFreeField() const =0
Return dynamic free field code (0-4?)
virtual FArray< FArray< const IVertexThing * > > getFaceVertices() const =0
Returns vertices on each original face.
virtual FArray< const IContactThing * > getContacts() const =0
Get all of the ContactThings associated with the block.
virtual int getMaterialNumber() const =0
Return block material number.
virtual bool isRigid() const =0
Returns true if block is rigid (unzoned)
virtual double getMaxAspect() const =0
Return maximum aspect ratio (edge length / volume^(1/3))
virtual DVect3 getDisplacement() const =0
Get displacement (average of node displacements)
This is the interface for VertexThing. This will be stored in a container and the ID will be stored i...
Definition ivertexthing.h:29
Base class for items that will be stored in containers.
Definition ithing.h:30
An array class that attempts to minimize unnecessary heap access.
uint32 TType
class type indicator
Definition basedef.h:46
int32 FInt
Interface to provide access to 3DEC modules, global data, list of 3DEC entities, etc.
Definition iblockdef.h:19
namespace Itasca
Definition basememory.cpp:14