Files
openfoam/src/OpenFOAM/primitives/Vector/floatVector/floatVector.C
Mark Olesen 689db16064 ENH: add explicit doubleVector, doubleTensor typedefs
- the counterpart to floatVector, doubleTensor, which can be useful
  for connecting to programs that always expect double precision for
  the arguments, when using single-precision for OpenFOAM itself.

  Eg,
     doubleVector pos = ...;
     vtkcamera->SetPosition(pos.v_);
2018-12-09 17:44:12 +01:00

77 lines
2.2 KiB
C

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "floatVector.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<>
const char* const Foam::floatVector::vsType::typeName = "floatVector";
template<>
const char* const Foam::floatVector::vsType::componentNames[] =
{
"x", "y", "z"
};
template<>
const Foam::floatVector Foam::floatVector::vsType::zero
(
floatVector::uniform(0)
);
template<>
const Foam::floatVector Foam::floatVector::vsType::one
(
floatVector::uniform(1)
);
template<>
const Foam::floatVector Foam::floatVector::vsType::max
(
floatVector::uniform(floatScalarVGREAT)
);
template<>
const Foam::floatVector Foam::floatVector::vsType::min
(
floatVector::uniform(-floatScalarVGREAT)
);
template<>
const Foam::floatVector Foam::floatVector::vsType::rootMax
(
floatVector::uniform(floatScalarROOTVGREAT)
);
template<>
const Foam::floatVector Foam::floatVector::vsType::rootMin
(
floatVector::uniform(-floatScalarROOTVGREAT)
);
// ************************************************************************* //