Commit 6d765c9d authored by Franjo's avatar Franjo

Implemented the << operator for boxScaling, plaeTranslation, coneScaling

and sphereScaling
parent fa61cd0e
......@@ -342,6 +342,11 @@ Ostream& boxScaling::operator<<(Ostream& os) const
return os;
}
Ostream& operator<<(Ostream& os, const boxScaling& bs)
{
return bs.operator<<(os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
......
......@@ -162,6 +162,7 @@ public:
// IOstream Operators
Ostream& operator<<(Ostream&) const;
friend Ostream& operator<<(Ostream&, const boxScaling&);
};
......
......@@ -133,7 +133,7 @@ vector coneScaling::displacement(const point& p) const
//- calculate point position in the radial direction
const vector rVec = p - (p0_ + t * axialVec_);
const scalar r = mag(rVec);
const scalar r = mag(rVec) + VSMALL;
//- calculate the radius of the cone at the axial position
const scalar tBnd = Foam::max(0.0, Foam::min(t, 1.0));
......@@ -142,9 +142,7 @@ vector coneScaling::displacement(const point& p) const
//- calculate displacement in the axial direction
disp += tBnd * axialVec_ * ((1.0/axialScaling_) - 1.0);
//- calculate displacement in the radial direction
if( r > VSMALL )
{
const scalar tRadial = r / rCone;
......@@ -169,7 +167,7 @@ vector coneScaling::backwardDisplacement(const point& p) const
//- calculate point position in the radial direction
const vector rVec = p - (p0_ + t * axialVec_);
const scalar r = mag(rVec);
const scalar r = mag(rVec) + VSMALL;
//- calculate the radius of the cone at the axial position
const scalar tBnd = Foam::max(0.0, Foam::min(t, 1.0));
......@@ -387,6 +385,11 @@ Ostream& coneScaling::operator<<(Ostream& os) const
return os;
}
Ostream& operator<<(Ostream& os, const coneScaling& cs)
{
return cs.operator<<(os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
......
......@@ -166,6 +166,7 @@ public:
// IOstream Operators
Ostream& operator<<(Ostream&) const;
friend Ostream& operator<<(Ostream&, const coneScaling&);
};
......
......@@ -212,6 +212,13 @@ point coordinateModifier::backwardModifiedPoint(const point& p) const
return pNew;
}
void coordinateModifier::printObjects() const
{
Info << "Modification objects " << modifiers_ << endl;
Info << "Backward modification objects " << backwardModifiers_ << endl;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
......
......@@ -90,6 +90,8 @@ public:
//- calculate the displacement vector for the backward modification
point backwardModifiedPoint(const point&) const;
//- Print modification objects
void printObjects() const;
};
......
......@@ -282,6 +282,11 @@ Ostream& planeTranslation::operator<<(Ostream& os) const
return os;
}
Ostream& operator<<(Ostream& os, const planeTranslation& pt)
{
return pt.operator<<(os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
......
......@@ -147,6 +147,7 @@ public:
// IOstream Operators
Ostream& operator<<(Ostream&) const;
friend Ostream& operator<<(Ostream&, const planeTranslation&);
};
......
......@@ -110,7 +110,7 @@ vector sphereScaling::displacement(const point& p) const
const scalar rScale = (1.0/radialScaling_) - 1.0;
const vector dispRadial = radius_ * (rVec / r) * rScale;
//- calculate displacements in th radial direction
//- calculate displacements in the radial direction
disp += tRadialBnd * dispRadial;
}
......@@ -267,6 +267,11 @@ Ostream& sphereScaling::operator<<(Ostream& os) const
return os;
}
Ostream& operator<<(Ostream& os, const sphereScaling& ss)
{
return ss.operator<<(os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
......
......@@ -144,6 +144,7 @@ public:
// IOstream Operators
Ostream& operator<<(Ostream&) const;
friend Ostream& operator<<(Ostream&, const sphereScaling&);
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment