Go to the documentation of this file.
51 os <<
"l " << vertI+1 <<
' ' << vertI+2 <<
nl
52 <<
"l " << vertI+1 <<
' ' << vertI+3 <<
nl
53 <<
"l " << vertI+1 <<
' ' << vertI+4 <<
nl
54 <<
"l " << vertI+2 <<
' ' << vertI+3 <<
nl
55 <<
"l " << vertI+2 <<
' ' << vertI+4 <<
nl
56 <<
"l " << vertI+3 <<
' ' << vertI+4 <<
nl;
61 int main(
int argc,
char *argv[])
108 Info<<
"Writing B to " << str.name() <<
endl;
114 Info<<
"Writing parts of A inside B to " << str.name() <<
endl;
116 for (
label i = 0; i < nInside; ++i)
118 writeOBJ(str, vertI, insideTets[i]);
123 Info<<
"Writing parts of A outside B to " << str.name() <<
endl;
125 for (
label i = 0; i < nOutside; ++i)
127 writeOBJ(str, vertI, outsideTets[i]);
137 scalar volInside = 0;
138 for (
label i = 0; i < nInside; ++i)
140 volInside += insideTets[i].tet().mag();
142 Info<<
"Vol A inside B:" << volInside <<
endl;
144 scalar volOutside = 0;
145 for (
label i = 0; i < nOutside; ++i)
147 volOutside += outsideTets[i].tet().mag();
149 Info<<
"Vol A outside B:" << volOutside <<
endl;
151 Info<<
"Sum inside and outside:" << volInside+volOutside <<
endl;
153 if (
mag(volInside+volOutside-tetA.
mag()) > SMALL)
156 <<
"Tet volumes do not sum up to input tet."
#define forAll(list, i)
Loop across all elements in list.
void writeOBJ(Ostream &os, label &vertI, const tetPoints &tet)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
simpleMatrix< scalar > A(Nc)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tetPointRef tet() const
Return the tetrahedron.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Tet storage. Null constructable (unfortunately tetrahedron<point, point> is not)
int main(int argc, char *argv[])
void tetOverlap(const tetrahedron< Point, PointRef > &tetB, tetIntersectionList &insideTets, label &nInside, tetIntersectionList &outsideTets, label &nOutside) const
Decompose tet into tets inside and outside other tet.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D vector of objects of type <T> with a fixed size <Size>.
const fileName & name() const
Return the name of the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
vector point
Point is a vector.
scalar mag() const
Return volume.