GIT: Initial commit after latest foundation merge

This commit is contained in:
andy
2016-04-25 11:40:48 +01:00
4003 changed files with 74634 additions and 37783 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,7 +25,6 @@ License
#include "collapseEdge.H"
//- Sets point neighbours of face to val
static void markPointNbrs
(
const triSurface& surf,

View File

@ -9,7 +9,7 @@
#include <assert.h>
#include <stdio.h>
template <class Type> class List {
template<class Type> class List {
public:
List(int s=0);
~List();
@ -30,7 +30,7 @@ template <class Type> class List {
};
template <class Type>
template<class Type>
List<Type>::List(int s){
num=0;
array_size = 0;
@ -40,12 +40,12 @@ List<Type>::List(int s){
}
}
template <class Type>
template<class Type>
List<Type>::~List(){
delete element;
}
template <class Type>
template<class Type>
void List<Type>::allocate(int s){
assert(s>0);
assert(s>=num);
@ -58,18 +58,18 @@ void List<Type>::allocate(int s){
}
if(old) delete old;
}
template <class Type>
template<class Type>
void List<Type>::SetSize(int s){
if(s==0) { if(element) delete element;}
else { allocate(s); }
num=s;
}
template <class Type>
template<class Type>
void List<Type>::Pack(){
allocate(num);
}
template <class Type>
template<class Type>
void List<Type>::Add(Type t){
assert(num<=array_size);
if(num==array_size) {
@ -83,7 +83,7 @@ void List<Type>::Add(Type t){
element[num++] = t;
}
template <class Type>
template<class Type>
int List<Type>::Contains(Type t){
int i;
int count=0;
@ -93,13 +93,13 @@ int List<Type>::Contains(Type t){
return count;
}
template <class Type>
template<class Type>
void List<Type>::AddUnique(Type t){
if(!Contains(t)) Add(t);
}
template <class Type>
template<class Type>
void List<Type>::DelIndex(int i){
assert(i<num);
num--;
@ -109,7 +109,7 @@ void List<Type>::DelIndex(int i){
}
}
template <class Type>
template<class Type>
void List<Type>::Remove(Type t){
int i;
for(i=0;i<num;i++) {

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -196,7 +196,7 @@ vectorField calcVertexNormals(const triSurface& surf)
Info<< "Calculating vertex normals" << endl;
vectorField pointNormals(surf.nPoints(), vector::zero);
vectorField pointNormals(surf.nPoints(), Zero);
const pointField& points = surf.points();
const labelListList& pointFaces = surf.pointFaces();
@ -276,8 +276,8 @@ triSurfacePointScalarField calcCurvature
const edgeList fEdges = f.edges();
// Calculate the edge vectors and the normal differences
vectorField edgeVectors(f.size(), vector::zero);
vectorField normalDifferences(f.size(), vector::zero);
vectorField edgeVectors(f.size(), Zero);
vectorField normalDifferences(f.size(), Zero);
forAll(fEdges, feI)
{
@ -303,7 +303,7 @@ triSurfacePointScalarField calcCurvature
faceCoordSys.normalize();
// Construct the matrix to solve
scalarSymmetricSquareMatrix T(3, 3, 0);
scalarSymmetricSquareMatrix T(3, 0);
scalarDiagonalMatrix Z(3, 0);
// Least Squares
@ -312,11 +312,11 @@ triSurfacePointScalarField calcCurvature
scalar x = edgeVectors[i] & faceCoordSys[0];
scalar y = edgeVectors[i] & faceCoordSys[1];
T[0][0] += sqr(x);
T[1][0] += x*y;
T[1][1] += sqr(x) + sqr(y);
T[2][1] += x*y;
T[2][2] += sqr(y);
T(0, 0) += sqr(x);
T(1, 0) += x*y;
T(1, 1) += sqr(x) + sqr(y);
T(2, 1) += x*y;
T(2, 2) += sqr(y);
scalar dndx = normalDifferences[i] & faceCoordSys[0];
scalar dndy = normalDifferences[i] & faceCoordSys[1];
@ -1438,7 +1438,7 @@ int main(int argc, char *argv[])
pointField end(searchSurf.faceCentres() + span*normals);
const pointField& faceCentres = searchSurf.faceCentres();
List<List<pointIndexHit> > allHitInfo;
List<List<pointIndexHit>> allHitInfo;
// Find all intersections (in order)
searchSurf.findLineAll(start, end, allHitInfo);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -151,7 +151,7 @@ void greenRefine
void createBoundaryEdgeTrees
(
const PtrList<triSurfaceMesh>& surfs,
PtrList<indexedOctree<treeDataEdge> >& bEdgeTrees,
PtrList<indexedOctree<treeDataEdge>>& bEdgeTrees,
labelListList& treeBoundaryEdges
)
{
@ -325,11 +325,11 @@ int main(int argc, char *argv[])
Info<< decrIndent;
}
PtrList<indexedOctree<treeDataEdge> > bEdgeTrees(surfs.size());
PtrList<indexedOctree<treeDataEdge>> bEdgeTrees(surfs.size());
labelListList treeBoundaryEdges(surfs.size());
List<DynamicList<labelledTri> > newFaces(surfs.size());
List<DynamicList<point> > newPoints(surfs.size());
List<DynamicList<labelledTri>> newFaces(surfs.size());
List<DynamicList<point>> newPoints(surfs.size());
List<PackedBoolList> visitedFace(surfs.size());
PtrList<triSurfaceMesh> newSurfaces(surfs.size());

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -84,14 +84,14 @@ int main(int argc, char *argv[])
const fileName surfFileName = args[1];
const scalar density = args.optionLookupOrDefault("density", 1.0);
vector refPt = vector::zero;
vector refPt = Zero;
bool calcAroundRefPt = args.optionReadIfPresent("referencePoint", refPt);
triSurface surf(surfFileName);
scalar m = 0.0;
vector cM = vector::zero;
tensor J = tensor::zero;
vector cM = Zero;
tensor J = Zero;
if (args.optionFound("shellProperties"))
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -56,8 +56,8 @@ tmp<pointField> avg
{
const labelListList& pointEdges = s.pointEdges();
tmp<pointField> tavg(new pointField(s.nPoints(), vector::zero));
pointField& avg = tavg();
tmp<pointField> tavg(new pointField(s.nPoints(), Zero));
pointField& avg = tavg.ref();
forAll(pointEdges, vertI)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -197,6 +197,7 @@ int main(int argc, char *argv[])
if (!csDictIoPtr->typeHeaderOk<coordinateSystems>(false))
{
FatalErrorInFunction
<< "Cannot open coordinateSystems file\n "
<< csDictIoPtr->objectPath() << nl
<< exit(FatalError);
}
@ -240,6 +241,7 @@ int main(int argc, char *argv[])
if (fromCsys.valid() && toCsys.valid())
{
FatalErrorInFunction
<< "Only allowed '-from' or '-to' option at the moment."
<< exit(FatalError);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -52,7 +52,7 @@ using namespace Foam;
void writeProcStats
(
const triSurface& s,
const List<List<treeBoundBox> >& meshBb
const List<List<treeBoundBox>>& meshBb
)
{
// Determine surface bounding boxes, faces, points
@ -149,7 +149,7 @@ int main(int argc, char *argv[])
Random rndGen(653213);
// Determine mesh bounding boxes:
List<List<treeBoundBox> > meshBb(Pstream::nProcs());
List<List<treeBoundBox>> meshBb(Pstream::nProcs());
if (distType == distributedTriSurfaceMesh::FOLLOW)
{
#include "createPolyMesh.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
{
if (faceZone[f] == z)
{
forAll (faceEds[f], fe)
forAll(faceEds[f], fe)
{
if (edFaces[faceEds[f][fe]].size() < 2)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -560,7 +560,7 @@ void calcPointVecs
// Determine vector as average of the vectors in the two faces.
// If there is only one face available use only one vector.
vector midVec(vector::zero);
vector midVec(Zero);
if (face0I != -1)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -149,7 +149,7 @@ int main(int argc, char *argv[])
// Convert to radians
v *= pi/180.0;
quaternion R(v.x(), v.y(), v.z());
quaternion R(quaternion::rotationSequence::XYZ, v);
Info<< "Rotating points by quaternion " << R << endl;
points = transform(R, points);