Itasca C++ Interface
Toggle main menu visibility
Loading...
Searching...
No Matches
ibody.h
1
#pragma once
2
// ibody.h
3
4
// Interface for a Body which can be composed of multiple Pieces.
5
// Also properties.
6
// Other utility functions required by cell space.
7
8
#include "
dim.h
"
9
namespace
itasca
{
10
class
IFishParam;
11
class
IGroup
;
12
class
IThing
;
13
}
14
15
namespace
itascaxd
{
16
using namespace
itasca;
17
class
IPiece;
18
20
class
IBody
{
21
public
:
23
inline
static
const
TType
type_
= 0x4c815b83;
24
26
enum
InOutMode
{ FullyOut=0, FullyIn, IntersectOut, IntersectIn, Surround};
27
29
virtual
IThing
*
getIThing
()=0;
30
virtual
const
IThing
*
getIThing
()
const
=0;
31
33
virtual
IPiece
*
getFirstPiece
()=0;
34
virtual
const
IPiece
*
getFirstPiece
()
const
=0;
36
virtual
IThing
*
getFirstIThing
()=0;
37
virtual
const
IThing
*
getFirstIThing
()
const
=0;
39
virtual
QStringList
getAllAttributes
()
const
=0;
41
virtual
QVariant
getAttribute
(
const
QString &name)
const
= 0;
42
43
// Return the extent of a body
44
virtual
DExtent3 getExtent()
const
=0;
45
// Return a boolean indicating whether or not a box is completely inside the body
46
virtual
bool
isBoxIn(
const
DExtent
&d,
const
double
&tol=1e-7)
const
=0;
47
// Return a boolean indicating whether or not the body intersects a DExtent
48
virtual
bool
intersectsBox(
const
DExtent
&d,
const
double
&tol=1e-7)
const
=0;
49
// Return the in/out state
50
virtual
InOutMode
checkInOutSphere(
const
DVect
&,
const
double
&)
const
=0;
51
52
virtual
Quat
getOrient()
const
=0;
53
54
// Get/set the fragment index
55
virtual
int
getFragmentIndex()
const
=0;
56
virtual
void
setFragmentIndex(
int
ind)=0;
57
58
// Reset the time step contributions
59
virtual
void
resetTimeStepContributions()=0;
60
61
// Get the stress from the previous timestep
62
virtual
void
getOldStress(std::array<
double
,
dimval
(3,6)> &)
const
=0;
63
// Get the volume
64
virtual
double
getVolume()
const
=0;
65
// Returns true if any DOF is fixed
66
virtual
bool
getAnyFixed()
const
=0;
67
virtual
bool
getAllFixed()
const
=0;
68
virtual
DVect
getPosition()
const
=0;
69
virtual
double
getBodyConvergence()
const
=0;
70
71
virtual
std::vector<uint64> getSurfaceTriangles()
const
=0;
72
73
};
74
}
// namespace itascaxd
75
// EoF
itasca::IGroup
Interface to a group object.
Definition
igroup.h:9
itasca::IThing
Base class for items that will be stored in containers.
Definition
ithing.h:30
itascaxd::IBody
Definition
ibody.h:20
itascaxd::IBody::getIThing
virtual const IThing * getIThing() const =0
itascaxd::IBody::getFirstIThing
virtual IThing * getFirstIThing()=0
Get the first IThing - may be different than getFirstPiece.
itascaxd::IBody::type_
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition
ibody.h:23
itascaxd::IBody::getFirstPiece
virtual const IPiece * getFirstPiece() const =0
itascaxd::IBody::getFirstIThing
virtual const IThing * getFirstIThing() const =0
itascaxd::IBody::getFirstPiece
virtual IPiece * getFirstPiece()=0
Get the first piece.
itascaxd::IBody::getAttribute
virtual QVariant getAttribute(const QString &name) const =0
Return the value of the attribute.
itascaxd::IBody::getIThing
virtual IThing * getIThing()=0
Return IThing interface associated with this piece.
itascaxd::IBody::getAllAttributes
virtual QStringList getAllAttributes() const =0
Return a list of all the attribute names.
itascaxd::IBody::InOutMode
InOutMode
Enumerator for defining the geometric attributes of a body relative to a geometric shape.
Definition
ibody.h:26
itascaxd::IPiece
Definition
ipiece.h:15
dim.h
DIM - Provides code portability between 2D and 3D codes.
TType
uint32 TType
class type indicator
Definition
basedef.h:46
Quat
Quat3 Quat
A complex number in 2D and quaternion in 3D.
Definition
dim.h:163
DExtent
DExtent3 DExtent
A DExtent2 in 2D, a DExtent3 in 3D.
Definition
dim.h:156
DVect
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition
dim.h:150
dimval
constexpr const U & dimval(const T &, const U &val3)
Returns the first argument in a 2D compile, and the second in a 3D compile.
Definition
dim.h:190
itasca
namespace Itasca
Definition
basememory.cpp:10
itascaxd
Itasca Library standard namespace, specific to 2D or 3D.
Definition
icontactmodule.h:4
common
module
interface
ibody.h
Generated by
1.18.0