Added atan2

This commit is contained in:
Henry
2013-01-24 22:10:21 +00:00
parent 52c637f806
commit 00e4cc8c95
8 changed files with 605 additions and 0 deletions

View File

@ -430,6 +430,20 @@ Foam::dimensionSet Foam::trans(const dimensionSet& ds)
}
Foam::dimensionSet Foam::atan2(const dimensionSet& ds1, const dimensionSet& ds2)
{
if (dimensionSet::debug && ds1 != ds2)
{
FatalErrorIn("atan2(const dimensionSet&, const dimensionSet&)")
<< "Arguments of atan2 have different dimensions" << endl
<< " dimensions : " << ds1 << " and " << ds2 << endl
<< abort(FatalError);
}
return dimless;
}
Foam::dimensionSet Foam::transform(const dimensionSet& ds)
{
return ds;

View File

@ -354,6 +354,8 @@ public:
// for transcendental functions
friend dimensionSet trans(const dimensionSet&);
friend dimensionSet atan2(const dimensionSet&, const dimensionSet&);
//- Return the argument; transformations do not change the dimensions
friend dimensionSet transform(const dimensionSet&);