mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
INT: Integration updates in preparation for merge into the develop branch
This commit is contained in:
committed by
Andrew Heather
parent
9aff74aaaf
commit
50d1ac15ef
@ -143,9 +143,9 @@ int main(int argc, char *argv[])
|
||||
runTime.write();
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< scalar(runTime.elapsedCpuTime())
|
||||
<< " s\n" << endl << endl;
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@ -74,9 +74,9 @@ int main(int argc, char *argv[])
|
||||
Info<< "Total mass of surfactant: "
|
||||
<< sum(Cs.internalField()*aMesh.S()) << endl;
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< scalar(runTime.elapsedCpuTime())
|
||||
<< " s\n" << endl << endl;
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
# \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
@ -41,7 +41,8 @@ cleanTimeDirectories()
|
||||
done
|
||||
rm -rf \
|
||||
./[1-9]* ./-[1-9]* ./log ./log.* ./log-* ./logSummary.* \
|
||||
./.fxLock ./*.xml ./ParaView* ./paraFoam* ./*.OpenFOAM ./*.blockMesh \
|
||||
./.fxLock ./*.xml ./ParaView* ./paraFoam* \
|
||||
./*.blockMesh ./*.foam ./*.OpenFOAM \
|
||||
./.setSet > /dev/null 2>&1
|
||||
}
|
||||
|
||||
@ -149,8 +150,12 @@ cleanUcomponents()
|
||||
|
||||
cleanFaMesh ()
|
||||
{
|
||||
rm -rf ./constant/faMesh/{faceLabels*,faBoundary*} \
|
||||
> /dev/null 2>&1
|
||||
(
|
||||
cd constant/faMesh 2>/dev/null && \
|
||||
rm -rf \
|
||||
faceLabels* faBoundary* \
|
||||
> /dev/null 2>&1 \
|
||||
)
|
||||
}
|
||||
|
||||
cleanApplication()
|
||||
|
||||
@ -6,7 +6,7 @@ faMesh/faBoundaryMesh/faBoundaryMesh.C
|
||||
|
||||
faPatches = faMesh/faPatches
|
||||
$(faPatches)/faPatch/faPatch.C
|
||||
$(faPatches)/faPatch/newFaPatch.C
|
||||
$(faPatches)/faPatch/faPatchNew.C
|
||||
$(faPatches)/basic/coupled/coupledFaPatch.C
|
||||
$(faPatches)/constraint/empty/emptyFaPatch.C
|
||||
$(faPatches)/constraint/processor/processorFaPatch.C
|
||||
@ -24,7 +24,6 @@ faPatchFields = fields/faPatchFields
|
||||
$(faPatchFields)/faPatchField/faPatchFields.C
|
||||
|
||||
basicFaPatchFields = $(faPatchFields)/basic
|
||||
$(basicFaPatchFields)/basicSymmetry/basicSymmetryFaPatchFields.C
|
||||
$(basicFaPatchFields)/basicSymmetry/basicSymmetryFaPatchScalarField.C
|
||||
$(basicFaPatchFields)/calculated/calculatedFaPatchFields.C
|
||||
$(basicFaPatchFields)/coupled/coupledFaPatchFields.C
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
areaMesh
|
||||
Foam::areaMesh
|
||||
|
||||
Description
|
||||
Mesh data needed to do the Finite Area discretisation.
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
edgeMesh
|
||||
Foam::edgeMesh
|
||||
|
||||
Description
|
||||
Mesh data needed to do the Finite Area discretisation.
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faMatrix
|
||||
Foam::faMatrix
|
||||
|
||||
Description
|
||||
A special matrix type and solver, designed for finite area
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faMatrix<Type>
|
||||
Foam::faMatrix
|
||||
|
||||
Description
|
||||
Finite-Area matrix.
|
||||
@ -65,7 +65,7 @@ Ostream& operator<<(Ostream&, const faMatrix<Type>&);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class faMatrix Declaration
|
||||
Class faMatrix Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -114,7 +114,7 @@ class faMatrix
|
||||
void addToInternalField
|
||||
(
|
||||
const labelUList& addr,
|
||||
const tmp<Field<Type2> >& tpf,
|
||||
const tmp<Field<Type2>>& tpf,
|
||||
Field<Type2>& intf
|
||||
) const;
|
||||
|
||||
@ -131,7 +131,7 @@ class faMatrix
|
||||
void subtractFromInternalField
|
||||
(
|
||||
const labelUList& addr,
|
||||
const tmp<Field<Type2> >& tpf,
|
||||
const tmp<Field<Type2>>& tpf,
|
||||
Field<Type2>& intf
|
||||
) const;
|
||||
|
||||
@ -308,7 +308,7 @@ public:
|
||||
SolverPerformance<Type> solve();
|
||||
|
||||
//- Return the matrix residual
|
||||
tmp<Field<Type> > residual() const;
|
||||
tmp<Field<Type>> residual() const;
|
||||
|
||||
//- Return the matrix diagonal
|
||||
tmp<scalarField> D() const;
|
||||
@ -317,30 +317,30 @@ public:
|
||||
tmp<areaScalarField> A() const;
|
||||
|
||||
//- Return the H operation source
|
||||
tmp<GeometricField<Type, faPatchField, areaMesh> > H() const;
|
||||
tmp<GeometricField<Type, faPatchField, areaMesh>> H() const;
|
||||
|
||||
//- Return the face-flux field from the matrix
|
||||
tmp<GeometricField<Type, faePatchField, edgeMesh> > flux() const;
|
||||
tmp<GeometricField<Type, faePatchField, edgeMesh>> flux() const;
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
void operator=(const faMatrix<Type>&);
|
||||
void operator=(const tmp<faMatrix<Type> >&);
|
||||
void operator=(const tmp<faMatrix<Type>>&);
|
||||
|
||||
void negate();
|
||||
|
||||
void operator+=(const faMatrix<Type>&);
|
||||
void operator+=(const tmp<faMatrix<Type> >&);
|
||||
void operator+=(const tmp<faMatrix<Type>>&);
|
||||
|
||||
void operator-=(const faMatrix<Type>&);
|
||||
void operator-=(const tmp<faMatrix<Type> >&);
|
||||
void operator-=(const tmp<faMatrix<Type>>&);
|
||||
|
||||
void operator+=(const GeometricField<Type,faPatchField,areaMesh>&);
|
||||
void operator+=(const tmp<GeometricField<Type,faPatchField,areaMesh> >&);
|
||||
void operator+=(const tmp<GeometricField<Type,faPatchField,areaMesh>>&);
|
||||
|
||||
void operator-=(const GeometricField<Type,faPatchField,areaMesh>&);
|
||||
void operator-=(const tmp<GeometricField<Type,faPatchField,areaMesh> >&);
|
||||
void operator-=(const tmp<GeometricField<Type,faPatchField,areaMesh>>&);
|
||||
|
||||
void operator+=(const dimensioned<Type>&);
|
||||
void operator-=(const dimensioned<Type>&);
|
||||
@ -398,7 +398,7 @@ SolverPerformance<Type> solve(faMatrix<Type>&, Istream&);
|
||||
// deleting temporary matrix after solution.
|
||||
// Solver controls read Istream
|
||||
template<class Type>
|
||||
SolverPerformance<Type> solve(const tmp<faMatrix<Type> >&, Istream&);
|
||||
SolverPerformance<Type> solve(const tmp<faMatrix<Type>>&, Istream&);
|
||||
|
||||
|
||||
//- Solve returning the solution statistics given convergence tolerance
|
||||
@ -411,331 +411,358 @@ SolverPerformance<Type> solve(faMatrix<Type>&);
|
||||
// deleting temporary matrix after solution.
|
||||
// Solver controls read faSolution
|
||||
template<class Type>
|
||||
SolverPerformance<Type> solve(const tmp<faMatrix<Type> >&);
|
||||
SolverPerformance<Type> solve(const tmp<faMatrix<Type>>&);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator==
|
||||
tmp<faMatrix<Type>> operator==
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator==
|
||||
tmp<faMatrix<Type>> operator==
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator==
|
||||
tmp<faMatrix<Type>> operator==
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator==
|
||||
tmp<faMatrix<Type>> operator==
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const GeometricField<Type, faPatchField, areaMesh>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const GeometricField<Type, faPatchField, areaMesh>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const GeometricField<Type, faPatchField, areaMesh>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const GeometricField<Type, faPatchField, areaMesh>&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>&,
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const GeometricField<Type, faPatchField, areaMesh>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const GeometricField<Type, faPatchField, areaMesh>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const GeometricField<Type, faPatchField, areaMesh>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const GeometricField<Type, faPatchField, areaMesh>&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>&,
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const faMatrix<Type>&,
|
||||
const dimensioned<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator+
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const dimensioned<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const dimensioned<Type>&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const dimensioned<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator-
|
||||
tmp<faMatrix<Type>> operator+
|
||||
(
|
||||
const dimensioned<Type>&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator==
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const GeometricField<Type, faPatchField, areaMesh>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator==
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const GeometricField<Type, faPatchField, areaMesh>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator==
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator==
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator==
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const dimensioned<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator==
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const tmp<faMatrix<Type> >&,
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const dimensioned<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const dimensioned<Type>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>> operator-
|
||||
(
|
||||
const dimensioned<Type>&,
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>> operator==
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const GeometricField<Type, faPatchField, areaMesh>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>> operator==
|
||||
(
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const GeometricField<Type, faPatchField, areaMesh>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>> operator==
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>> operator==
|
||||
(
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const tmp<GeometricField<Type, faPatchField, areaMesh>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>> operator==
|
||||
(
|
||||
const faMatrix<Type>&,
|
||||
const dimensioned<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>> operator==
|
||||
(
|
||||
const tmp<faMatrix<Type>>&,
|
||||
const dimensioned<Type>&
|
||||
);
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator*
|
||||
tmp<faMatrix<Type>> operator*
|
||||
(
|
||||
const areaScalarField&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator*
|
||||
tmp<faMatrix<Type>> operator*
|
||||
(
|
||||
const areaScalarField&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator*
|
||||
tmp<faMatrix<Type>> operator*
|
||||
(
|
||||
const tmp<areaScalarField>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator*
|
||||
tmp<faMatrix<Type>> operator*
|
||||
(
|
||||
const tmp<areaScalarField>&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator*
|
||||
tmp<faMatrix<Type>> operator*
|
||||
(
|
||||
const dimensioned<scalar>&,
|
||||
const faMatrix<Type>&
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type> > operator*
|
||||
tmp<faMatrix<Type>> operator*
|
||||
(
|
||||
const dimensioned<scalar>&,
|
||||
const tmp<faMatrix<Type> >&
|
||||
const tmp<faMatrix<Type>>&
|
||||
);
|
||||
|
||||
|
||||
@ -746,7 +773,7 @@ tmp<faMatrix<Type> > operator*
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "faMatrix.C"
|
||||
#include "faMatrix.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -28,15 +28,8 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Set reference level for a component of the solution
|
||||
// on a given patch face
|
||||
template<class Type>
|
||||
void faMatrix<Type>::setComponentReference
|
||||
void Foam::faMatrix<Type>::setComponentReference
|
||||
(
|
||||
const label patchi,
|
||||
const label facei,
|
||||
@ -53,14 +46,14 @@ void faMatrix<Type>::setComponentReference
|
||||
|
||||
|
||||
template<class Type>
|
||||
SolverPerformance<Type> faMatrix<Type>::solve(const dictionary& solverControls)
|
||||
Foam::SolverPerformance<Type> Foam::faMatrix<Type>::solve
|
||||
(
|
||||
const dictionary& solverControls
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "faMatrix<Type>::solve(const dictionary&) : "
|
||||
"solving faMatrix<Type>"
|
||||
<< endl;
|
||||
}
|
||||
DebugInFunction
|
||||
<< "solving faMatrix<Type>"
|
||||
<< endl;
|
||||
|
||||
SolverPerformance<Type> solverPerfVec
|
||||
(
|
||||
@ -73,16 +66,15 @@ SolverPerformance<Type> faMatrix<Type>::solve(const dictionary& solverControls)
|
||||
Field<Type> source(source_);
|
||||
addBoundarySource(source);
|
||||
|
||||
// Make a copy of interfaces: no longer a reference
|
||||
// HJ, 20/Nov/2007
|
||||
// Note: make a copy of interfaces: no longer a reference
|
||||
lduInterfaceFieldPtrsList interfaces =
|
||||
psi_.boundaryField().scalarInterfaces();
|
||||
|
||||
// Cast into a non-const to solve. HJ, 6/May/2016
|
||||
// Cast into a non-const to solve
|
||||
GeometricField<Type, faPatchField, areaMesh>& psi =
|
||||
const_cast<GeometricField<Type, faPatchField, areaMesh>&>(psi_);
|
||||
|
||||
for (direction cmpt = 0; cmpt < Type::nComponents; cmpt++)
|
||||
for (direction cmpt = 0; cmpt < Type::nComponents; ++cmpt)
|
||||
{
|
||||
// copy field and source
|
||||
|
||||
@ -156,7 +148,7 @@ SolverPerformance<Type> faMatrix<Type>::solve(const dictionary& solverControls)
|
||||
|
||||
|
||||
template<class Type>
|
||||
SolverPerformance<Type> faMatrix<Type>::faSolver::solve()
|
||||
Foam::SolverPerformance<Type> Foam::faMatrix<Type>::faSolver::solve()
|
||||
{
|
||||
return solvei
|
||||
(
|
||||
@ -169,7 +161,7 @@ SolverPerformance<Type> faMatrix<Type>::faSolver::solve()
|
||||
|
||||
|
||||
template<class Type>
|
||||
SolverPerformance<Type> faMatrix<Type>::solve()
|
||||
Foam::SolverPerformance<Type> Foam::faMatrix<Type>::solve()
|
||||
{
|
||||
return solve
|
||||
(
|
||||
@ -181,22 +173,19 @@ SolverPerformance<Type> faMatrix<Type>::solve()
|
||||
}
|
||||
|
||||
|
||||
// Return the matrix residual
|
||||
template<class Type>
|
||||
tmp<Field<Type> > faMatrix<Type>::residual() const
|
||||
Foam::tmp<Foam::Field<Type>> Foam::faMatrix<Type>::residual() const
|
||||
{
|
||||
tmp<Field<Type> > tres(source_);
|
||||
tmp<Field<Type>> tres(source_);
|
||||
Field<Type>& res = tres().ref();
|
||||
|
||||
addBoundarySource(res);
|
||||
|
||||
// Make a copy of interfaces: no longer a reference
|
||||
// HJ, 20/Nov/2007
|
||||
lduInterfaceFieldPtrsList interfaces =
|
||||
psi_.boundaryField().scalarInterfaces();
|
||||
|
||||
// Loop over field components
|
||||
for (direction cmpt = 0; cmpt < Type::nComponents; cmpt++)
|
||||
for (direction cmpt = 0; cmpt < Type::nComponents; ++cmpt)
|
||||
{
|
||||
scalarField psiCmpt(psi_.internalField().component(cmpt));
|
||||
|
||||
@ -226,8 +215,4 @@ tmp<Field<Type> > faMatrix<Type>::residual() const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -31,17 +31,10 @@ Description
|
||||
#include "faScalarMatrix.H"
|
||||
#include "zeroGradientFaPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Set reference level for a component of the solution
|
||||
// on a given patch face
|
||||
template<>
|
||||
void faMatrix<scalar>::setComponentReference
|
||||
void Foam::faMatrix<Foam::scalar>::setComponentReference
|
||||
(
|
||||
const label patchI,
|
||||
const label edgeI,
|
||||
@ -58,17 +51,14 @@ void faMatrix<scalar>::setComponentReference
|
||||
|
||||
|
||||
template<>
|
||||
solverPerformance faMatrix<scalar>::solve
|
||||
Foam::solverPerformance Foam::faMatrix<Foam::scalar>::solve
|
||||
(
|
||||
const dictionary& solverControls
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "faMatrix<scalar>::solve(const dictionary&) : "
|
||||
"solving faMatrix<scalar>"
|
||||
<< endl;
|
||||
}
|
||||
DebugInFunction
|
||||
<< "solving faMatrix<scalar>"
|
||||
<< endl;
|
||||
|
||||
GeometricField<scalar, faPatchField, areaMesh>& psi =
|
||||
const_cast<GeometricField<scalar, faPatchField, areaMesh>&>(psi_);
|
||||
@ -100,9 +90,8 @@ solverPerformance faMatrix<scalar>::solve
|
||||
}
|
||||
|
||||
|
||||
// Return the matrix residual
|
||||
template<>
|
||||
tmp<scalarField> faMatrix<scalar>::residual() const
|
||||
Foam::tmp<Foam::scalarField> Foam::faMatrix<Foam::scalar>::residual() const
|
||||
{
|
||||
scalarField boundaryDiag(psi_.size(), 0.0);
|
||||
addBoundaryDiag(boundaryDiag, 0);
|
||||
@ -125,9 +114,8 @@ tmp<scalarField> faMatrix<scalar>::residual() const
|
||||
}
|
||||
|
||||
|
||||
// H operator
|
||||
template<>
|
||||
tmp<areaScalarField> faMatrix<scalar>::H() const
|
||||
Foam::tmp<Foam::areaScalarField> Foam::faMatrix<Foam::scalar>::H() const
|
||||
{
|
||||
tmp<areaScalarField> tHphi
|
||||
(
|
||||
@ -158,8 +146,4 @@ tmp<areaScalarField> faMatrix<scalar>::H() const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faScalarMatrix
|
||||
Foam::faScalarMatrix
|
||||
|
||||
Description
|
||||
Template specialisation for scalar faMatrix
|
||||
|
||||
@ -31,23 +31,17 @@ Description
|
||||
#include "faMesh.H"
|
||||
#include "primitiveMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(faBoundaryMesh, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
defineTypeNameAndDebug(faBoundaryMesh, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from dictionary
|
||||
faBoundaryMesh::faBoundaryMesh
|
||||
Foam::faBoundaryMesh::faBoundaryMesh
|
||||
(
|
||||
const IOobject& io,
|
||||
const faMesh& mesh
|
||||
@ -83,19 +77,14 @@ faBoundaryMesh::faBoundaryMesh
|
||||
}
|
||||
|
||||
// Check state of IOstream
|
||||
is.check
|
||||
(
|
||||
"faBoundaryMesh::polyBoundaryMesh"
|
||||
"(const IOobject&, const faMesh&)"
|
||||
);
|
||||
is.check(FUNCTION_NAME);
|
||||
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Construct given size. Patches will be set later
|
||||
faBoundaryMesh::faBoundaryMesh
|
||||
Foam::faBoundaryMesh::faBoundaryMesh
|
||||
(
|
||||
const IOobject& io,
|
||||
const faMesh& pm,
|
||||
@ -110,8 +99,7 @@ faBoundaryMesh::faBoundaryMesh
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Calculate the geometry for the patches (transformation tensors etc.)
|
||||
void faBoundaryMesh::calcGeometry()
|
||||
void Foam::faBoundaryMesh::calcGeometry()
|
||||
{
|
||||
forAll(*this, patchi)
|
||||
{
|
||||
@ -125,25 +113,24 @@ void faBoundaryMesh::calcGeometry()
|
||||
}
|
||||
|
||||
|
||||
// Return the mesh reference
|
||||
const faMesh& faBoundaryMesh::mesh() const
|
||||
const Foam::faMesh& Foam::faBoundaryMesh::mesh() const
|
||||
{
|
||||
return mesh_;
|
||||
}
|
||||
|
||||
|
||||
lduInterfacePtrsList faBoundaryMesh::interfaces() const
|
||||
Foam::lduInterfacePtrsList Foam::faBoundaryMesh::interfaces() const
|
||||
{
|
||||
lduInterfacePtrsList interfaces(size());
|
||||
|
||||
forAll (interfaces, patchi)
|
||||
forAll(interfaces, patchi)
|
||||
{
|
||||
if (isA<lduInterface>(this->operator[](patchi)))
|
||||
{
|
||||
interfaces.set
|
||||
(
|
||||
patchi,
|
||||
&refCast<const lduInterface>(this->operator[](patchi))
|
||||
&refCast<const lduInterface>(this->operator[](patchi))
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -152,14 +139,13 @@ lduInterfacePtrsList faBoundaryMesh::interfaces() const
|
||||
}
|
||||
|
||||
|
||||
// Return a list of patch types
|
||||
wordList faBoundaryMesh::types() const
|
||||
Foam::wordList Foam::faBoundaryMesh::types() const
|
||||
{
|
||||
const faPatchList& patches = *this;
|
||||
|
||||
wordList t(patches.size());
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
t[patchI] = patches[patchI].type();
|
||||
}
|
||||
@ -168,14 +154,13 @@ wordList faBoundaryMesh::types() const
|
||||
}
|
||||
|
||||
|
||||
// Return a list of patch names
|
||||
wordList faBoundaryMesh::names() const
|
||||
Foam::wordList Foam::faBoundaryMesh::names() const
|
||||
{
|
||||
const faPatchList& patches = *this;
|
||||
|
||||
wordList t(patches.size());
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
t[patchI] = patches[patchI].name();
|
||||
}
|
||||
@ -184,11 +169,11 @@ wordList faBoundaryMesh::names() const
|
||||
}
|
||||
|
||||
|
||||
label faBoundaryMesh::findPatchID(const word& patchName) const
|
||||
Foam::label Foam::faBoundaryMesh::findPatchID(const word& patchName) const
|
||||
{
|
||||
const faPatchList& patches = *this;
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
if (patches[patchI].name() == patchName)
|
||||
{
|
||||
@ -236,8 +221,7 @@ Foam::labelList Foam::faBoundaryMesh::findIndices
|
||||
}
|
||||
|
||||
|
||||
// Return patch index for a given edge label
|
||||
label faBoundaryMesh::whichPatch(const label edgeIndex) const
|
||||
Foam::label Foam::faBoundaryMesh::whichPatch(const label edgeIndex) const
|
||||
{
|
||||
// Find out which patch the current face belongs to by comparing label
|
||||
// with patch start labels.
|
||||
@ -245,10 +229,8 @@ label faBoundaryMesh::whichPatch(const label edgeIndex) const
|
||||
// if it is off the end of the list, abort
|
||||
if (edgeIndex >= mesh().nEdges())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"faBoundaryMesh::whichPatch(const label edgeIndex) const"
|
||||
) << "given label greater than the number of edges"
|
||||
FatalErrorInFunction
|
||||
<< "given label greater than the number of edges"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -257,7 +239,7 @@ label faBoundaryMesh::whichPatch(const label edgeIndex) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
forAll (*this, patchI)
|
||||
forAll(*this, patchI)
|
||||
{
|
||||
label start = mesh_.patchStarts()[patchI];
|
||||
label size = operator[](patchI).faPatch::size();
|
||||
@ -273,32 +255,28 @@ label faBoundaryMesh::whichPatch(const label edgeIndex) const
|
||||
}
|
||||
|
||||
// If not in any of above, it's trouble!
|
||||
FatalErrorIn
|
||||
(
|
||||
"label faBoundaryMesh::whichPatch(const label edgeIndex) const"
|
||||
) << "error in patch search algorithm"
|
||||
FatalErrorInFunction
|
||||
<< "error in patch search algorithm"
|
||||
<< abort(FatalError);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
bool faBoundaryMesh::checkDefinition(const bool report) const
|
||||
bool Foam::faBoundaryMesh::checkDefinition(const bool report) const
|
||||
{
|
||||
label nextPatchStart = mesh().nInternalEdges();
|
||||
const faBoundaryMesh& bm = *this;
|
||||
|
||||
bool boundaryError = false;
|
||||
|
||||
forAll (bm, patchI)
|
||||
forAll(bm, patchI)
|
||||
{
|
||||
if (bm[patchI].start() != nextPatchStart)
|
||||
{
|
||||
boundaryError = true;
|
||||
|
||||
Info
|
||||
<< "bool faBoundaryMesh::checkDefinition("
|
||||
<< "const bool report) const : "
|
||||
InfoInFunction
|
||||
<< "Problem with boundary patch " << patchI
|
||||
<< ".\nThe patch should start on face no " << nextPatchStart
|
||||
<< " and the boundary file specifies " << bm[patchI].start()
|
||||
@ -310,11 +288,8 @@ bool faBoundaryMesh::checkDefinition(const bool report) const
|
||||
|
||||
if (boundaryError)
|
||||
{
|
||||
SeriousErrorIn
|
||||
(
|
||||
"bool faBoundaryMesh::checkDefinition("
|
||||
"const bool report) const"
|
||||
) << "This mesh is not valid: boundary definition is in error."
|
||||
SeriousErrorInFunction
|
||||
<< "This mesh is not valid: boundary definition is in error."
|
||||
<< endl;
|
||||
}
|
||||
else
|
||||
@ -329,24 +304,23 @@ bool faBoundaryMesh::checkDefinition(const bool report) const
|
||||
}
|
||||
|
||||
|
||||
// Correct faBoundaryMesh after moving points
|
||||
void faBoundaryMesh::movePoints(const pointField& p)
|
||||
void Foam::faBoundaryMesh::movePoints(const pointField& p)
|
||||
{
|
||||
faPatchList& patches = *this;
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
patches[patchI].initMovePoints(p);
|
||||
}
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
patches[patchI].movePoints(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void faBoundaryMesh::updateMesh()
|
||||
void Foam::faBoundaryMesh::updateMesh()
|
||||
{
|
||||
faPatchList& patches = *this;
|
||||
|
||||
@ -362,8 +336,7 @@ void faBoundaryMesh::updateMesh()
|
||||
}
|
||||
|
||||
|
||||
// writeData member function required by regIOobject
|
||||
bool faBoundaryMesh::writeData(Ostream& os) const
|
||||
bool Foam::faBoundaryMesh::writeData(Ostream& os) const
|
||||
{
|
||||
const faPatchList& patches = *this;
|
||||
|
||||
@ -380,21 +353,17 @@ bool faBoundaryMesh::writeData(Ostream& os) const
|
||||
os << decrIndent << token::END_LIST;
|
||||
|
||||
// Check state of IOstream
|
||||
os.check("polyBoundaryMesh::writeData(Ostream& os) const");
|
||||
os.check(FUNCTION_NAME);
|
||||
|
||||
return os.good();
|
||||
}
|
||||
|
||||
|
||||
Ostream& operator<<(Ostream& os, const faBoundaryMesh& bm)
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const faBoundaryMesh& bm)
|
||||
{
|
||||
bm.writeData(os);
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faBoundaryMesh
|
||||
Foam::faBoundaryMesh
|
||||
|
||||
Description
|
||||
Finite area boundary mesh
|
||||
@ -142,6 +142,7 @@ public:
|
||||
//- Check boundary definition
|
||||
bool checkDefinition(const bool report = false) const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
//- Correct faBoundaryMesh after moving points
|
||||
|
||||
@ -63,11 +63,9 @@ const Foam::faMesh& Foam::faGlobalMeshData::mesh() const
|
||||
}
|
||||
|
||||
|
||||
// Update all data after morph
|
||||
void Foam::faGlobalMeshData::updateMesh()
|
||||
{
|
||||
label polyMeshNGlobalPoints =
|
||||
mesh_().globalData().nGlobalPoints();
|
||||
label polyMeshNGlobalPoints = mesh_().globalData().nGlobalPoints();
|
||||
|
||||
const labelList& polyMeshSharedPointLabels =
|
||||
mesh_().globalData().sharedPointLabels();
|
||||
@ -81,10 +79,11 @@ void Foam::faGlobalMeshData::updateMesh()
|
||||
|
||||
forAll(mesh_.boundary(), patchI)
|
||||
{
|
||||
if(mesh_.boundary()[patchI].type() == processorFaPatch::typeName)
|
||||
const faPatch& fap = mesh_.boundary()[patchI];
|
||||
|
||||
if (isA<processorFaPatch>(fap))
|
||||
{
|
||||
const labelList& localPointLabels =
|
||||
mesh_.boundary()[patchI].pointLabels();
|
||||
const labelList& localPointLabels = fap.pointLabels();
|
||||
|
||||
forAll(localPointLabels, pointI)
|
||||
{
|
||||
@ -111,12 +110,12 @@ void Foam::faGlobalMeshData::updateMesh()
|
||||
|
||||
sharedPointLabels_ = sharedPointLabels.toc();
|
||||
|
||||
combineReduce(globalList, plusEqOp<labelField >());
|
||||
combineReduce(globalList, plusEqOp<labelField>());
|
||||
|
||||
nGlobalPoints_ = 0;
|
||||
for (label i=0; i<globalList.size(); i++)
|
||||
for (label i=0; i<globalList.size(); ++i)
|
||||
{
|
||||
if(globalList[i] > 0)
|
||||
if (globalList[i] > 0)
|
||||
{
|
||||
globalList[i] = ++nGlobalPoints_;
|
||||
}
|
||||
@ -137,4 +136,5 @@ void Foam::faGlobalMeshData::updateMesh()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faGlobalMeshData
|
||||
Foam::faGlobalMeshData
|
||||
|
||||
Description
|
||||
Various mesh related information for a parallel run
|
||||
@ -87,16 +87,11 @@ public:
|
||||
//- Runtime type information
|
||||
ClassName("faGlobalMeshData");
|
||||
|
||||
//- Construct from mesh
|
||||
faGlobalMeshData(const faMesh& mesh);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
faGlobalMeshData(const faMesh& mesh);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~faGlobalMeshData();
|
||||
//- Destructor
|
||||
~faGlobalMeshData();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -23,8 +23,8 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faProcessorTopology
|
||||
Typedef
|
||||
Foam::faProcessorTopology
|
||||
|
||||
Description
|
||||
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faMesh.H"
|
||||
@ -57,11 +55,8 @@ const int Foam::faMesh::quadricsFit_ = 0;
|
||||
|
||||
void Foam::faMesh::setPrimitiveMeshData()
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "void faMesh::setPrimitiveMeshData() const : "
|
||||
<< "Setting primitive data" << endl;
|
||||
}
|
||||
DebugInFunction
|
||||
<< "Setting primitive data" << endl;
|
||||
|
||||
const indirectPrimitivePatch& bp = patch();
|
||||
|
||||
@ -70,19 +65,18 @@ void Foam::faMesh::setPrimitiveMeshData()
|
||||
|
||||
label edgeI = -1;
|
||||
|
||||
|
||||
label nIntEdges = bp.nInternalEdges();
|
||||
|
||||
for (label curEdge = 0; curEdge < nIntEdges; curEdge++)
|
||||
for (label curEdge = 0; curEdge < nIntEdges; ++curEdge)
|
||||
{
|
||||
edges_[++edgeI] = bp.edges()[curEdge];
|
||||
}
|
||||
|
||||
forAll (boundary(), patchI)
|
||||
forAll(boundary(), patchI)
|
||||
{
|
||||
const labelList& curP = boundary()[patchI];
|
||||
|
||||
forAll (curP, eI)
|
||||
forAll(curP, eI)
|
||||
{
|
||||
edges_[++edgeI] = bp.edges()[curP[eI]];
|
||||
}
|
||||
@ -100,18 +94,18 @@ void Foam::faMesh::setPrimitiveMeshData()
|
||||
|
||||
const labelListList& bpef = bp.edgeFaces();
|
||||
|
||||
for (label curEdge = 0; curEdge < nIntEdges; curEdge++)
|
||||
for (label curEdge = 0; curEdge < nIntEdges; ++curEdge)
|
||||
{
|
||||
edgeOwner_[++edgeI] = bpef[curEdge][0];
|
||||
|
||||
edgeNeighbour_[edgeI] = bpef[curEdge][1];
|
||||
}
|
||||
|
||||
forAll (boundary(), patchI)
|
||||
forAll(boundary(), patchI)
|
||||
{
|
||||
const labelList& curP = boundary()[patchI];
|
||||
|
||||
forAll (curP, eI)
|
||||
forAll(curP, eI)
|
||||
{
|
||||
edgeOwner_[++edgeI] = bpef[curP[eI]][0];
|
||||
}
|
||||
@ -216,24 +210,24 @@ Foam::faMesh::faMesh(const polyMesh& pMesh)
|
||||
*this
|
||||
),
|
||||
comm_(Pstream::worldComm),
|
||||
patchPtr_(NULL),
|
||||
lduPtr_(NULL),
|
||||
patchPtr_(nullptr),
|
||||
lduPtr_(nullptr),
|
||||
curTimeIndex_(time().timeIndex()),
|
||||
SPtr_(NULL),
|
||||
S0Ptr_(NULL),
|
||||
S00Ptr_(NULL),
|
||||
patchStartsPtr_(NULL),
|
||||
LePtr_(NULL),
|
||||
magLePtr_(NULL),
|
||||
centresPtr_(NULL),
|
||||
edgeCentresPtr_(NULL),
|
||||
faceAreaNormalsPtr_(NULL),
|
||||
edgeAreaNormalsPtr_(NULL),
|
||||
pointAreaNormalsPtr_(NULL),
|
||||
faceCurvaturesPtr_(NULL),
|
||||
edgeTransformTensorsPtr_(NULL),
|
||||
correctPatchPointNormalsPtr_(NULL),
|
||||
globalMeshDataPtr_(NULL)
|
||||
SPtr_(nullptr),
|
||||
S0Ptr_(nullptr),
|
||||
S00Ptr_(nullptr),
|
||||
patchStartsPtr_(nullptr),
|
||||
LePtr_(nullptr),
|
||||
magLePtr_(nullptr),
|
||||
centresPtr_(nullptr),
|
||||
edgeCentresPtr_(nullptr),
|
||||
faceAreaNormalsPtr_(nullptr),
|
||||
edgeAreaNormalsPtr_(nullptr),
|
||||
pointAreaNormalsPtr_(nullptr),
|
||||
faceCurvaturesPtr_(nullptr),
|
||||
edgeTransformTensorsPtr_(nullptr),
|
||||
correctPatchPointNormalsPtr_(nullptr),
|
||||
globalMeshDataPtr_(nullptr)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
@ -274,7 +268,6 @@ Foam::faMesh::faMesh(const polyMesh& pMesh)
|
||||
}
|
||||
|
||||
|
||||
// Construct from components without boundary.
|
||||
Foam::faMesh::faMesh
|
||||
(
|
||||
const polyMesh& pMesh,
|
||||
@ -312,24 +305,24 @@ Foam::faMesh::faMesh
|
||||
0
|
||||
),
|
||||
comm_(Pstream::worldComm),
|
||||
patchPtr_(NULL),
|
||||
lduPtr_(NULL),
|
||||
patchPtr_(nullptr),
|
||||
lduPtr_(nullptr),
|
||||
curTimeIndex_(time().timeIndex()),
|
||||
SPtr_(NULL),
|
||||
S0Ptr_(NULL),
|
||||
S00Ptr_(NULL),
|
||||
patchStartsPtr_(NULL),
|
||||
LePtr_(NULL),
|
||||
magLePtr_(NULL),
|
||||
centresPtr_(NULL),
|
||||
edgeCentresPtr_(NULL),
|
||||
faceAreaNormalsPtr_(NULL),
|
||||
edgeAreaNormalsPtr_(NULL),
|
||||
pointAreaNormalsPtr_(NULL),
|
||||
faceCurvaturesPtr_(NULL),
|
||||
edgeTransformTensorsPtr_(NULL),
|
||||
correctPatchPointNormalsPtr_(NULL),
|
||||
globalMeshDataPtr_(NULL)
|
||||
SPtr_(nullptr),
|
||||
S0Ptr_(nullptr),
|
||||
S00Ptr_(nullptr),
|
||||
patchStartsPtr_(nullptr),
|
||||
LePtr_(nullptr),
|
||||
magLePtr_(nullptr),
|
||||
centresPtr_(nullptr),
|
||||
edgeCentresPtr_(nullptr),
|
||||
faceAreaNormalsPtr_(nullptr),
|
||||
edgeAreaNormalsPtr_(nullptr),
|
||||
pointAreaNormalsPtr_(nullptr),
|
||||
faceCurvaturesPtr_(nullptr),
|
||||
edgeTransformTensorsPtr_(nullptr),
|
||||
correctPatchPointNormalsPtr_(nullptr),
|
||||
globalMeshDataPtr_(nullptr)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
@ -339,7 +332,6 @@ Foam::faMesh::faMesh
|
||||
}
|
||||
|
||||
|
||||
// Construct from definition field
|
||||
Foam::faMesh::faMesh
|
||||
(
|
||||
const polyMesh& pMesh,
|
||||
@ -377,30 +369,27 @@ Foam::faMesh::faMesh
|
||||
0
|
||||
),
|
||||
comm_(Pstream::worldComm),
|
||||
patchPtr_(NULL),
|
||||
lduPtr_(NULL),
|
||||
patchPtr_(nullptr),
|
||||
lduPtr_(nullptr),
|
||||
curTimeIndex_(time().timeIndex()),
|
||||
SPtr_(NULL),
|
||||
S0Ptr_(NULL),
|
||||
S00Ptr_(NULL),
|
||||
patchStartsPtr_(NULL),
|
||||
LePtr_(NULL),
|
||||
magLePtr_(NULL),
|
||||
centresPtr_(NULL),
|
||||
edgeCentresPtr_(NULL),
|
||||
faceAreaNormalsPtr_(NULL),
|
||||
edgeAreaNormalsPtr_(NULL),
|
||||
pointAreaNormalsPtr_(NULL),
|
||||
faceCurvaturesPtr_(NULL),
|
||||
edgeTransformTensorsPtr_(NULL),
|
||||
correctPatchPointNormalsPtr_(NULL),
|
||||
globalMeshDataPtr_(NULL)
|
||||
SPtr_(nullptr),
|
||||
S0Ptr_(nullptr),
|
||||
S00Ptr_(nullptr),
|
||||
patchStartsPtr_(nullptr),
|
||||
LePtr_(nullptr),
|
||||
magLePtr_(nullptr),
|
||||
centresPtr_(nullptr),
|
||||
edgeCentresPtr_(nullptr),
|
||||
faceAreaNormalsPtr_(nullptr),
|
||||
edgeAreaNormalsPtr_(nullptr),
|
||||
pointAreaNormalsPtr_(nullptr),
|
||||
faceCurvaturesPtr_(nullptr),
|
||||
edgeTransformTensorsPtr_(nullptr),
|
||||
correctPatchPointNormalsPtr_(nullptr),
|
||||
globalMeshDataPtr_(nullptr)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "faMesh::faMesh(...) : "
|
||||
<< "Creating faMesh from definition file" << endl;
|
||||
}
|
||||
DebugInFunction
|
||||
<< "Creating faMesh from definition file" << endl;
|
||||
|
||||
// Reading faMeshDefinition dictionary
|
||||
IOdictionary faMeshDefinition
|
||||
@ -416,38 +405,29 @@ Foam::faMesh::faMesh
|
||||
)
|
||||
);
|
||||
|
||||
wordList polyMeshPatches
|
||||
(
|
||||
faMeshDefinition.lookup("polyMeshPatches")
|
||||
);
|
||||
const wordList polyMeshPatches(faMeshDefinition.lookup("polyMeshPatches"));
|
||||
|
||||
dictionary bndDict = faMeshDefinition.subDict("boundary");
|
||||
const dictionary& bndDict = faMeshDefinition.subDict("boundary");
|
||||
|
||||
wordList faPatchNames = bndDict.toc();
|
||||
const wordList faPatchNames(bndDict.toc());
|
||||
|
||||
List<faPatchData> faPatches(faPatchNames.size() + 1);
|
||||
|
||||
forAll (faPatchNames, patchI)
|
||||
const polyBoundaryMesh& pbm = pMesh.boundaryMesh();
|
||||
|
||||
forAll(faPatchNames, patchI)
|
||||
{
|
||||
dictionary curPatchDict =
|
||||
bndDict.subDict(faPatchNames[patchI]);
|
||||
dictionary curPatchDict = bndDict.subDict(faPatchNames[patchI]);
|
||||
|
||||
faPatches[patchI].name_ = faPatchNames[patchI];
|
||||
|
||||
faPatches[patchI].type_ =
|
||||
word(curPatchDict.lookup("type"));
|
||||
faPatches[patchI].type_ = word(curPatchDict.lookup("type"));
|
||||
|
||||
faPatches[patchI].ownPolyPatchID_ =
|
||||
mesh().boundaryMesh().findPatchID
|
||||
(
|
||||
word(curPatchDict.lookup("ownerPolyPatch"))
|
||||
);
|
||||
pbm.findPatchID(word(curPatchDict.lookup("ownerPolyPatch")));
|
||||
|
||||
faPatches[patchI].ngbPolyPatchID_ =
|
||||
mesh().boundaryMesh().findPatchID
|
||||
(
|
||||
word(curPatchDict.lookup("neighbourPolyPatch"))
|
||||
);
|
||||
faPatches[patchI].ngbPolyPatchID_ =
|
||||
pbm.findPatchID(word(curPatchDict.lookup("neighbourPolyPatch")));
|
||||
}
|
||||
|
||||
|
||||
@ -456,12 +436,11 @@ Foam::faMesh::faMesh
|
||||
|
||||
labelList patchIDs(polyMeshPatches.size(), -1);
|
||||
|
||||
forAll (polyMeshPatches, patchI)
|
||||
forAll(polyMeshPatches, patchI)
|
||||
{
|
||||
patchIDs[patchI] =
|
||||
mesh().boundaryMesh().findPatchID(polyMeshPatches[patchI]);
|
||||
patchIDs[patchI] = pbm.findPatchID(polyMeshPatches[patchI]);
|
||||
|
||||
size += mesh().boundaryMesh()[patchIDs[patchI]].size();
|
||||
size += pbm[patchIDs[patchI]].size();
|
||||
}
|
||||
|
||||
faceLabels_ = labelList(size, -1);
|
||||
@ -472,12 +451,12 @@ Foam::faMesh::faMesh
|
||||
|
||||
sort(patchIDs);
|
||||
|
||||
forAll (polyMeshPatches, patchI)
|
||||
forAll(polyMeshPatches, patchI)
|
||||
{
|
||||
label start = mesh().boundaryMesh()[patchIDs[patchI]].start();
|
||||
label size = mesh().boundaryMesh()[patchIDs[patchI]].size();
|
||||
label start = pbm[patchIDs[patchI]].start();
|
||||
label size = pbm[patchIDs[patchI]].size();
|
||||
|
||||
for (label i = 0; i < size; i++)
|
||||
for (label i = 0; i < size; ++i)
|
||||
{
|
||||
faceLabels_[++faceI] = start + i;
|
||||
}
|
||||
@ -488,7 +467,7 @@ Foam::faMesh::faMesh
|
||||
// Result is in the bndEdgeFaPatchIDs list
|
||||
labelList faceCells(faceLabels_.size(), -1);
|
||||
|
||||
forAll (faceCells, faceI)
|
||||
forAll(faceCells, faceI)
|
||||
{
|
||||
label faceID = faceLabels_[faceI];
|
||||
|
||||
@ -510,7 +489,7 @@ Foam::faMesh::faMesh
|
||||
|
||||
labelList bndEdgeFaPatchIDs(nTotalEdges - nInternalEdges, -1);
|
||||
|
||||
for (label edgeI = nInternalEdges; edgeI < nTotalEdges; edgeI++)
|
||||
for (label edgeI = nInternalEdges; edgeI < nTotalEdges; ++edgeI)
|
||||
{
|
||||
label curMeshEdge = meshEdges[edgeI];
|
||||
|
||||
@ -518,11 +497,11 @@ Foam::faMesh::faMesh
|
||||
|
||||
label patchI = -1;
|
||||
|
||||
forAll (edgeFaces[curMeshEdge], faceI)
|
||||
forAll(edgeFaces[curMeshEdge], faceI)
|
||||
{
|
||||
label curFace = edgeFaces[curMeshEdge][faceI];
|
||||
|
||||
label curPatchID = mesh().boundaryMesh().whichPatch(curFace);
|
||||
label curPatchID = pbm.whichPatch(curFace);
|
||||
|
||||
if (curPatchID != -1)
|
||||
{
|
||||
@ -530,7 +509,7 @@ Foam::faMesh::faMesh
|
||||
}
|
||||
}
|
||||
|
||||
for (label pI = 0; pI < faPatches.size() - 1; pI++)
|
||||
for (label pI = 0; pI < faPatches.size() - 1; ++pI)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -553,11 +532,11 @@ Foam::faMesh::faMesh
|
||||
|
||||
|
||||
// Set edgeLabels for each faPatch
|
||||
for (label pI = 0; pI < (faPatches.size() - 1); pI++)
|
||||
for (label pI = 0; pI < (faPatches.size() - 1); ++pI)
|
||||
{
|
||||
SLList<label> tmpList;
|
||||
|
||||
forAll (bndEdgeFaPatchIDs, eI)
|
||||
forAll(bndEdgeFaPatchIDs, eI)
|
||||
{
|
||||
if (bndEdgeFaPatchIDs[eI] == pI)
|
||||
{
|
||||
@ -571,7 +550,7 @@ Foam::faMesh::faMesh
|
||||
// Check for undefined edges
|
||||
SLList<label> tmpList;
|
||||
|
||||
forAll (bndEdgeFaPatchIDs, eI)
|
||||
forAll(bndEdgeFaPatchIDs, eI)
|
||||
{
|
||||
if (bndEdgeFaPatchIDs[eI] == -1)
|
||||
{
|
||||
@ -582,22 +561,21 @@ Foam::faMesh::faMesh
|
||||
if (tmpList.size() > 0)
|
||||
{
|
||||
// Check for processor edges
|
||||
labelList allUndefEdges = labelList(tmpList);
|
||||
labelList allUndefEdges(tmpList);
|
||||
labelList ngbPolyPatch(allUndefEdges.size(), -1);
|
||||
forAll (ngbPolyPatch, edgeI)
|
||||
forAll(ngbPolyPatch, edgeI)
|
||||
{
|
||||
label curEdge = allUndefEdges[edgeI];
|
||||
|
||||
label curPMeshEdge = meshEdges[curEdge];
|
||||
|
||||
forAll (edgeFaces[curPMeshEdge], faceI)
|
||||
forAll(edgeFaces[curPMeshEdge], faceI)
|
||||
{
|
||||
label curFace = edgeFaces[curPMeshEdge][faceI];
|
||||
|
||||
if (findIndex(faceLabels_, curFace) == -1)
|
||||
{
|
||||
label polyPatchID =
|
||||
pMesh.boundaryMesh().whichPatch(curFace);
|
||||
label polyPatchID = pbm.whichPatch(curFace);
|
||||
|
||||
if (polyPatchID != -1)
|
||||
{
|
||||
@ -609,33 +587,24 @@ Foam::faMesh::faMesh
|
||||
|
||||
// Count ngb processorPolyPatch-es
|
||||
labelHashSet processorPatchSet;
|
||||
forAll (ngbPolyPatch, edgeI)
|
||||
forAll(ngbPolyPatch, edgeI)
|
||||
{
|
||||
if (ngbPolyPatch[edgeI] != -1)
|
||||
{
|
||||
if
|
||||
(
|
||||
isA<processorPolyPatch>
|
||||
(
|
||||
pMesh.boundaryMesh()[ngbPolyPatch[edgeI]]
|
||||
)
|
||||
)
|
||||
if (isA<processorPolyPatch>(pbm[ngbPolyPatch[edgeI]]))
|
||||
{
|
||||
if (!processorPatchSet.found(ngbPolyPatch[edgeI]))
|
||||
{
|
||||
processorPatchSet.insert(ngbPolyPatch[edgeI]);
|
||||
}
|
||||
processorPatchSet.insert(ngbPolyPatch[edgeI]);
|
||||
}
|
||||
}
|
||||
}
|
||||
labelList processorPatches(processorPatchSet.toc());
|
||||
faPatches.setSize(faPatches.size() + processorPatches.size());
|
||||
|
||||
for (label i = 0; i < processorPatches.size(); i++)
|
||||
for (label i = 0; i < processorPatches.size(); ++i)
|
||||
{
|
||||
SLList<label> tmpLst;
|
||||
|
||||
forAll (ngbPolyPatch, eI)
|
||||
forAll(ngbPolyPatch, eI)
|
||||
{
|
||||
if (ngbPolyPatch[eI] == processorPatches[i])
|
||||
{
|
||||
@ -646,7 +615,7 @@ Foam::faMesh::faMesh
|
||||
faPatches[faPatchNames.size() + i].edgeLabels_ = tmpLst;
|
||||
|
||||
faPatches[faPatchNames.size() + i].name_ =
|
||||
pMesh.boundaryMesh()[processorPatches[i]].name();
|
||||
pbm[processorPatches[i]].name();
|
||||
|
||||
faPatches[faPatchNames.size() + i].type_ =
|
||||
processorFaPatch::typeName;
|
||||
@ -657,19 +626,13 @@ Foam::faMesh::faMesh
|
||||
|
||||
// Remaining undefined edges
|
||||
SLList<label> undefEdges;
|
||||
forAll (ngbPolyPatch, eI)
|
||||
forAll(ngbPolyPatch, eI)
|
||||
{
|
||||
if (ngbPolyPatch[eI] == -1)
|
||||
{
|
||||
undefEdges.append(allUndefEdges[eI]);
|
||||
}
|
||||
else if
|
||||
(
|
||||
!isA<processorPolyPatch>
|
||||
(
|
||||
pMesh.boundaryMesh()[ngbPolyPatch[eI]]
|
||||
)
|
||||
)
|
||||
else if (!isA<processorPolyPatch>(pbm[ngbPolyPatch[eI]]))
|
||||
{
|
||||
undefEdges.append(allUndefEdges[eI]);
|
||||
}
|
||||
@ -696,24 +659,23 @@ Foam::faMesh::faMesh
|
||||
|
||||
// Reorder processorFaPatch using
|
||||
// ordering of ngb processorPolyPatch
|
||||
forAll (faPatches, patchI)
|
||||
forAll(faPatches, patchI)
|
||||
{
|
||||
if (faPatches[patchI].type_ == processorFaPatch::typeName)
|
||||
{
|
||||
labelList ngbFaces(faPatches[patchI].edgeLabels_.size(), -1);
|
||||
|
||||
forAll (ngbFaces, edgeI)
|
||||
forAll(ngbFaces, edgeI)
|
||||
{
|
||||
label curEdge = faPatches[patchI].edgeLabels_[edgeI];
|
||||
|
||||
label curPMeshEdge = meshEdges[curEdge];
|
||||
|
||||
forAll (edgeFaces[curPMeshEdge], faceI)
|
||||
forAll(edgeFaces[curPMeshEdge], faceI)
|
||||
{
|
||||
label curFace = edgeFaces[curPMeshEdge][faceI];
|
||||
|
||||
label curPatchID =
|
||||
pMesh.boundaryMesh().whichPatch(curFace);
|
||||
label curPatchID = pbm.whichPatch(curFace);
|
||||
|
||||
if (curPatchID == faPatches[patchI].ngbPolyPatchID_)
|
||||
{
|
||||
@ -724,7 +686,7 @@ Foam::faMesh::faMesh
|
||||
|
||||
SortableList<label> sortedNgbFaces(ngbFaces);
|
||||
labelList reorderedEdgeLabels(ngbFaces.size(), -1);
|
||||
for (label i = 0; i < reorderedEdgeLabels.size(); i++)
|
||||
for (label i = 0; i < reorderedEdgeLabels.size(); ++i)
|
||||
{
|
||||
reorderedEdgeLabels[i] =
|
||||
faPatches[patchI].edgeLabels_
|
||||
@ -741,7 +703,7 @@ Foam::faMesh::faMesh
|
||||
// Add good patches to faMesh
|
||||
SLList<faPatch*> faPatchLst;
|
||||
|
||||
for (label pI = 0; pI < faPatches.size(); pI++)
|
||||
for (label pI = 0; pI < faPatches.size(); ++pI)
|
||||
{
|
||||
faPatches[pI].dict_.add("type", faPatches[pI].type_);
|
||||
faPatches[pI].dict_.add("edgeLabels", faPatches[pI].edgeLabels_);
|
||||
@ -755,19 +717,16 @@ Foam::faMesh::faMesh
|
||||
{
|
||||
if (faPatches[pI].ngbPolyPatchID_ == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void faMesh::faMesh(const polyMesh&, const fileName&)"
|
||||
)
|
||||
FatalErrorInFunction
|
||||
<< "ngbPolyPatch is not defined for processorFaPatch: "
|
||||
<< faPatches[pI].name_
|
||||
<< abort(FatalError);
|
||||
<< faPatches[pI].name_
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
const processorPolyPatch& procPolyPatch =
|
||||
refCast<const processorPolyPatch>
|
||||
(
|
||||
pMesh.boundaryMesh()[faPatches[pI].ngbPolyPatchID_]
|
||||
pbm[faPatches[pI].ngbPolyPatchID_]
|
||||
);
|
||||
|
||||
faPatches[pI].dict_.add("myProcNo", procPolyPatch.myProcNo());
|
||||
@ -823,7 +782,6 @@ Foam::faMesh::faMesh
|
||||
}
|
||||
|
||||
|
||||
// Construct from polyPatch
|
||||
Foam::faMesh::faMesh
|
||||
(
|
||||
const polyMesh& pMesh,
|
||||
@ -861,36 +819,34 @@ Foam::faMesh::faMesh
|
||||
0
|
||||
),
|
||||
comm_(Pstream::worldComm),
|
||||
patchPtr_(NULL),
|
||||
lduPtr_(NULL),
|
||||
patchPtr_(nullptr),
|
||||
lduPtr_(nullptr),
|
||||
curTimeIndex_(time().timeIndex()),
|
||||
SPtr_(NULL),
|
||||
S0Ptr_(NULL),
|
||||
S00Ptr_(NULL),
|
||||
patchStartsPtr_(NULL),
|
||||
LePtr_(NULL),
|
||||
magLePtr_(NULL),
|
||||
centresPtr_(NULL),
|
||||
edgeCentresPtr_(NULL),
|
||||
faceAreaNormalsPtr_(NULL),
|
||||
edgeAreaNormalsPtr_(NULL),
|
||||
pointAreaNormalsPtr_(NULL),
|
||||
faceCurvaturesPtr_(NULL),
|
||||
edgeTransformTensorsPtr_(NULL),
|
||||
correctPatchPointNormalsPtr_(NULL),
|
||||
globalMeshDataPtr_(NULL)
|
||||
SPtr_(nullptr),
|
||||
S0Ptr_(nullptr),
|
||||
S00Ptr_(nullptr),
|
||||
patchStartsPtr_(nullptr),
|
||||
LePtr_(nullptr),
|
||||
magLePtr_(nullptr),
|
||||
centresPtr_(nullptr),
|
||||
edgeCentresPtr_(nullptr),
|
||||
faceAreaNormalsPtr_(nullptr),
|
||||
edgeAreaNormalsPtr_(nullptr),
|
||||
pointAreaNormalsPtr_(nullptr),
|
||||
faceCurvaturesPtr_(nullptr),
|
||||
edgeTransformTensorsPtr_(nullptr),
|
||||
correctPatchPointNormalsPtr_(nullptr),
|
||||
globalMeshDataPtr_(nullptr)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "faMesh::faMesh(...) : "
|
||||
<< "Creating faMesh from polyPatch" << endl;
|
||||
}
|
||||
DebugInFunction
|
||||
<< "Creating faMesh from polyPatch" << endl;
|
||||
|
||||
const polyBoundaryMesh& pbm = pMesh.boundaryMesh();
|
||||
|
||||
// Set faceLabels
|
||||
forAll (faceLabels_, faceI)
|
||||
forAll(faceLabels_, faceI)
|
||||
{
|
||||
faceLabels_[faceI] =
|
||||
mesh().boundaryMesh()[polyPatchID].start() + faceI;
|
||||
faceLabels_[faceI] = pbm[polyPatchID].start() + faceI;
|
||||
}
|
||||
|
||||
// Add one faPatch
|
||||
@ -902,7 +858,7 @@ Foam::faMesh::faMesh
|
||||
|
||||
labelList edgeLabels(nTotalEdges - nInternalEdges, -1);
|
||||
|
||||
forAll (edgeLabels, edgeI)
|
||||
forAll(edgeLabels, edgeI)
|
||||
{
|
||||
edgeLabels[edgeI] = nInternalEdges + edgeI;
|
||||
}
|
||||
@ -915,8 +871,7 @@ Foam::faMesh::faMesh
|
||||
|
||||
List<faPatch*> faPatchLst(1);
|
||||
|
||||
faPatchLst[0] =
|
||||
faPatch::New("default", patchDict, 0, boundary()).ptr();
|
||||
faPatchLst[0] = faPatch::New("default", patchDict, 0, boundary()).ptr();
|
||||
|
||||
addFaPatches(faPatchLst);
|
||||
|
||||
@ -937,6 +892,7 @@ Foam::faMesh::~faMesh()
|
||||
clearOut();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fileName Foam::faMesh::meshDir() const
|
||||
@ -1021,22 +977,19 @@ const Foam::faceList& Foam::faMesh::faces() const
|
||||
|
||||
void Foam::faMesh::addFaPatches(const List<faPatch*>& p)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "void faMesh::addFaPatches(const List<faPatch*>& p) : "
|
||||
<< "Adding patches to faMesh" << endl;
|
||||
}
|
||||
DebugInFunction
|
||||
<< "Adding patches to faMesh" << endl;
|
||||
|
||||
if (boundary().size() > 0)
|
||||
{
|
||||
FatalErrorIn("void faMesh::addPatches(const List<faPatch*>& p)")
|
||||
FatalErrorInFunction
|
||||
<< "boundary already exists"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
boundary_.setSize(p.size());
|
||||
|
||||
forAll (p, patchI)
|
||||
forAll(p, patchI)
|
||||
{
|
||||
boundary_.set(patchI, p[patchI]);
|
||||
}
|
||||
@ -1143,7 +1096,7 @@ Foam::faMesh::S0() const
|
||||
{
|
||||
if (!S0Ptr_)
|
||||
{
|
||||
FatalErrorIn("faMesh::S0() const")
|
||||
FatalErrorInFunction
|
||||
<< "S0 is not available"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -1238,7 +1191,6 @@ Foam::faMesh::edgeTransformTensors() const
|
||||
}
|
||||
|
||||
|
||||
// Return global mesh data
|
||||
const Foam::faGlobalMeshData& Foam::faMesh::globalData() const
|
||||
{
|
||||
if (!globalMeshDataPtr_)
|
||||
@ -1271,22 +1223,18 @@ bool Foam::faMesh::movePoints()
|
||||
{
|
||||
if (S00Ptr_ && S0Ptr_)
|
||||
{
|
||||
Info<< "Copy old-old S" << endl;
|
||||
DebugInfo<< "Copy old-old S" << endl;
|
||||
*S00Ptr_ = *S0Ptr_;
|
||||
}
|
||||
|
||||
if (S0Ptr_)
|
||||
{
|
||||
Info<< "Copy old S" << endl;
|
||||
DebugInfo<< "Copy old S" << endl;
|
||||
*S0Ptr_ = S();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
InfoIn("bool faMesh::movePoints()")
|
||||
<< "Creating old cell volumes." << endl;
|
||||
}
|
||||
DebugInfo<< "Creating old cell volumes." << endl;
|
||||
|
||||
S0Ptr_ = new DimensionedField<scalar, areaMesh>
|
||||
(
|
||||
@ -1309,7 +1257,6 @@ bool Foam::faMesh::movePoints()
|
||||
clearGeomNotAreas();
|
||||
|
||||
// To satisfy the motion interface for MeshObject, const cast is needed
|
||||
// HJ, 5/Aug/2011
|
||||
if (patchPtr_)
|
||||
{
|
||||
patchPtr_->movePoints(newPoints);
|
||||
@ -1322,7 +1269,7 @@ bool Foam::faMesh::movePoints()
|
||||
const edgeInterpolation& cei = *this;
|
||||
const_cast<edgeInterpolation&>(cei).edgeInterpolation::movePoints();
|
||||
|
||||
// Fluxes were dummy? HJ, 28/Jul/2011
|
||||
// Note: Fluxes were dummy?
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1332,10 +1279,8 @@ bool Foam::faMesh::correctPatchPointNormals(const label patchID) const
|
||||
{
|
||||
if ((patchID < 0) || (patchID >= boundary().size()))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"bool correctPatchPointNormals(const label patchID) const"
|
||||
) << "patchID is not in the valid range"
|
||||
FatalErrorInFunction
|
||||
<< "patchID is not in the valid range"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -1348,13 +1293,11 @@ bool Foam::faMesh::correctPatchPointNormals(const label patchID) const
|
||||
}
|
||||
|
||||
|
||||
//- Set patch point normals corrections
|
||||
Foam::boolList& Foam::faMesh::correctPatchPointNormals() const
|
||||
{
|
||||
if (!correctPatchPointNormalsPtr_)
|
||||
{
|
||||
correctPatchPointNormalsPtr_ =
|
||||
new boolList(boundary().size(), false);
|
||||
correctPatchPointNormalsPtr_ = new boolList(boundary().size(), false);
|
||||
}
|
||||
|
||||
return *correctPatchPointNormalsPtr_;
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faMesh
|
||||
Foam::faMesh
|
||||
|
||||
Description
|
||||
Finite area mesh. Used for 2-D non-Euclidian finite area method.
|
||||
@ -56,7 +56,6 @@ Author
|
||||
#include "indirectPrimitivePatch.H"
|
||||
#include "edgeInterpolation.H"
|
||||
#include "labelIOList.H"
|
||||
#include "scalarIOField.H"
|
||||
#include "FieldFields.H"
|
||||
#include "faGlobalMeshData.H"
|
||||
|
||||
@ -70,7 +69,7 @@ class faMeshLduAddressing;
|
||||
class faMeshMapper;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class faMesh Declaration
|
||||
Class faMesh Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class faMesh
|
||||
@ -178,6 +177,7 @@ class faMesh
|
||||
//- Whether point normals must be corrected for a patch
|
||||
mutable boolList* correctPatchPointNormalsPtr_;
|
||||
|
||||
|
||||
// Other mesh-related data
|
||||
|
||||
//- Parallel info
|
||||
@ -202,6 +202,7 @@ class faMesh
|
||||
//- Set primitive mesh data
|
||||
void setPrimitiveMeshData();
|
||||
|
||||
|
||||
// Private member functions to calculate demand driven data
|
||||
|
||||
//- Calculate ldu addressing
|
||||
@ -340,7 +341,7 @@ public:
|
||||
const fileName& facesInstance() const;
|
||||
|
||||
|
||||
//- Mesh size parameters
|
||||
// Mesh size parameters
|
||||
|
||||
inline label nPoints() const
|
||||
{
|
||||
@ -362,6 +363,7 @@ public:
|
||||
return nFaces_;
|
||||
}
|
||||
|
||||
|
||||
// Primitive mesh data
|
||||
|
||||
//- Return mesh points
|
||||
@ -547,7 +549,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "faPatchFaMeshTemplates.C"
|
||||
#include "faPatchFaMeshTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faMeshLduAddressing
|
||||
Foam::faMeshLduAddressing
|
||||
|
||||
Description
|
||||
lduAddressing wrapper for faMesh
|
||||
@ -50,7 +50,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class faMeshLduAddressing Declaration
|
||||
Class faMeshLduAddressing Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class faMeshLduAddressing
|
||||
@ -101,16 +101,15 @@ public:
|
||||
patchAddr_(mesh.boundary().size()),
|
||||
patchSchedule_(mesh.globalData().patchSchedule())
|
||||
{
|
||||
forAll (mesh.boundary(), patchI)
|
||||
forAll(mesh.boundary(), patchI)
|
||||
{
|
||||
patchAddr_[patchI] = &mesh.boundary()[patchI].edgeFaces();
|
||||
}
|
||||
}
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~faMeshLduAddressing()
|
||||
{}
|
||||
//-Destructor
|
||||
virtual ~faMeshLduAddressing()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -45,7 +45,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
|| insertedObjectLabelsPtr_
|
||||
)
|
||||
{
|
||||
FatalErrorIn("void faAreaMapper::calcAddressing() const)")
|
||||
FatalErrorInFunction
|
||||
<< "Addressing already calculated"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -63,7 +63,6 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
|
||||
// Prepare a list of new face labels and (preliminary) addressing
|
||||
// Note: dimensioned to number of boundary faces of polyMesh
|
||||
// HJ, 10/Aug/2011
|
||||
newFaceLabelsPtr_ = new labelList
|
||||
(
|
||||
mesh_().nFaces() - mesh_().nInternalFaces(),
|
||||
@ -86,7 +85,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
const labelList& reverseFaceMap = mpm_.reverseFaceMap();
|
||||
|
||||
// Pick up live old faces
|
||||
forAll (oldFaces, faceI)
|
||||
forAll(oldFaces, faceI)
|
||||
{
|
||||
if (reverseFaceMap[oldFaces[faceI]] > -1)
|
||||
{
|
||||
@ -109,7 +108,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
labelList& addr = *directAddrPtr_;
|
||||
|
||||
// Adjust for creation of a boundary face from an internal face
|
||||
forAll (addr, faceI)
|
||||
forAll(addr, faceI)
|
||||
{
|
||||
if (newFaceLabelsMap[faceI] < oldNInternal)
|
||||
{
|
||||
@ -132,7 +131,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
scalarListList& w = *weightsPtr_;
|
||||
|
||||
// Insert single addressing and weights
|
||||
for (label addrI = 0; addrI < nNewFaces; addrI++)
|
||||
for (label addrI = 0; addrI < nNewFaces; ++addrI)
|
||||
{
|
||||
addr[addrI] = labelList(1, newFaceLabelsMap[addrI]);
|
||||
w[addrI] = scalarList(1, scalar(1));
|
||||
@ -150,7 +149,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
|
||||
const List<objectMap>& ffp = mpm_.facesFromPointsMap();
|
||||
|
||||
forAll (ffp, ffpI)
|
||||
forAll(ffp, ffpI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = ffp[ffpI].masterObjects();
|
||||
@ -159,7 +158,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
labelList validMo(mo.size());
|
||||
label nValidMo = 0;
|
||||
|
||||
forAll (mo, moI)
|
||||
forAll(mo, moI)
|
||||
{
|
||||
if (oldFaceLookup.found(mo[moI]))
|
||||
{
|
||||
@ -186,7 +185,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
|
||||
const List<objectMap>& ffe = mpm_.facesFromEdgesMap();
|
||||
|
||||
forAll (ffe, ffeI)
|
||||
forAll(ffe, ffeI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = ffe[ffeI].masterObjects();
|
||||
@ -195,7 +194,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
labelList validMo(mo.size());
|
||||
label nValidMo = 0;
|
||||
|
||||
forAll (mo, moI)
|
||||
forAll(mo, moI)
|
||||
{
|
||||
if (oldFaceLookup.found(mo[moI]))
|
||||
{
|
||||
@ -222,7 +221,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
|
||||
const List<objectMap>& fff = mpm_.facesFromFacesMap();
|
||||
|
||||
forAll (fff, fffI)
|
||||
forAll(fff, fffI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = fff[fffI].masterObjects();
|
||||
@ -231,7 +230,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
||||
labelList validMo(mo.size());
|
||||
label nValidMo = 0;
|
||||
|
||||
forAll (mo, moI)
|
||||
forAll(mo, moI)
|
||||
{
|
||||
if (oldFaceLookup.found(mo[moI]))
|
||||
{
|
||||
@ -287,7 +286,6 @@ void Foam::faAreaMapper::clearOut()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
Foam::faAreaMapper::faAreaMapper
|
||||
(
|
||||
const faMesh& mesh,
|
||||
@ -300,12 +298,12 @@ Foam::faAreaMapper::faAreaMapper
|
||||
direct_(false),
|
||||
hasUnmapped_(false),
|
||||
sizeBeforeMapping_(mesh.nFaces()),
|
||||
newFaceLabelsPtr_(NULL),
|
||||
newFaceLabelsMapPtr_(NULL),
|
||||
directAddrPtr_(NULL),
|
||||
interpolationAddrPtr_(NULL),
|
||||
weightsPtr_(NULL),
|
||||
insertedObjectLabelsPtr_(NULL)
|
||||
newFaceLabelsPtr_(nullptr),
|
||||
newFaceLabelsMapPtr_(nullptr),
|
||||
directAddrPtr_(nullptr),
|
||||
interpolationAddrPtr_(nullptr),
|
||||
weightsPtr_(nullptr),
|
||||
insertedObjectLabelsPtr_(nullptr)
|
||||
{
|
||||
// Check for possibility of direct mapping
|
||||
if
|
||||
@ -323,7 +321,6 @@ Foam::faAreaMapper::faAreaMapper
|
||||
}
|
||||
|
||||
// Inserted objects not suported: no master
|
||||
// HJ, 10/Aug/2011
|
||||
}
|
||||
|
||||
|
||||
@ -363,11 +360,8 @@ const Foam::labelUList& Foam::faAreaMapper::directAddressing() const
|
||||
{
|
||||
if (!direct())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const labelUList& faAreaMapper::"
|
||||
"directAddressing() const"
|
||||
) << "Requested direct addressing for an interpolative mapper."
|
||||
FatalErrorInFunction
|
||||
<< "Requested direct addressing for an interpolative mapper."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -384,10 +378,8 @@ const Foam::labelListList& Foam::faAreaMapper::addressing() const
|
||||
{
|
||||
if (direct())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const labelListList& faAreaMapper::addressing() const"
|
||||
) << "Requested interpolative addressing for a direct mapper."
|
||||
FatalErrorInFunction
|
||||
<< "Requested interpolative addressing for a direct mapper."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -404,10 +396,8 @@ const Foam::scalarListList& Foam::faAreaMapper::weights() const
|
||||
{
|
||||
if (direct())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const scalarListList& faAreaMapper::weights() const"
|
||||
) << "Requested interpolative weights for a direct mapper."
|
||||
FatalErrorInFunction
|
||||
<< "Requested interpolative weights for a direct mapper."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -102,7 +102,6 @@ class faAreaMapper
|
||||
mutable labelList* insertedObjectLabelsPtr_;
|
||||
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
@ -111,7 +110,6 @@ class faAreaMapper
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const faAreaMapper&);
|
||||
|
||||
|
||||
//- Calculate addressing
|
||||
void calcAddressing() const;
|
||||
|
||||
@ -121,19 +119,16 @@ class faAreaMapper
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
faAreaMapper
|
||||
(
|
||||
const faMesh& mesh,
|
||||
const mapPolyMesh& mpm
|
||||
);
|
||||
//- Construct from components
|
||||
faAreaMapper
|
||||
(
|
||||
const faMesh& mesh,
|
||||
const mapPolyMesh& mpm
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~faAreaMapper();
|
||||
//- Destructor
|
||||
virtual ~faAreaMapper();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -74,7 +74,7 @@ public:
|
||||
{
|
||||
const faBoundaryMesh& patches = mesh.boundary();
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
set
|
||||
(
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
FV edge mapper.
|
||||
FA edge mapper.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -37,7 +37,7 @@ void Foam::faEdgeMapper::calcAddressing() const
|
||||
{
|
||||
if (directAddrPtr_)
|
||||
{
|
||||
FatalErrorIn("void faEdgeMapper::calcAddressing() const)")
|
||||
FatalErrorInFunction
|
||||
<< "Addressing already calculated"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -58,7 +58,6 @@ void Foam::faEdgeMapper::clearOut()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
Foam::faEdgeMapper::faEdgeMapper
|
||||
(
|
||||
const faMesh& mesh,
|
||||
@ -69,7 +68,7 @@ Foam::faEdgeMapper::faEdgeMapper
|
||||
mpm_(mpm),
|
||||
sizeBeforeMapping_(mesh.nInternalEdges()),
|
||||
hasUnmapped_(false),
|
||||
directAddrPtr_(NULL)
|
||||
directAddrPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
@ -96,10 +95,8 @@ const Foam::labelUList& Foam::faEdgeMapper::directAddressing() const
|
||||
|
||||
const Foam::labelListList& Foam::faEdgeMapper::addressing() const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const labelListList& faEdgeMapper::addressing() const"
|
||||
) << "Requested interpolative addressing for a direct mapper."
|
||||
FatalErrorInFunction
|
||||
<< "Requested interpolative addressing for a direct mapper."
|
||||
<< abort(FatalError);
|
||||
|
||||
return labelListList::null();
|
||||
@ -108,10 +105,8 @@ const Foam::labelListList& Foam::faEdgeMapper::addressing() const
|
||||
|
||||
const Foam::scalarListList& Foam::faEdgeMapper::weights() const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const scalarListList& faEdgeMapper::weights() const"
|
||||
) << "Requested interpolative weights for a direct mapper."
|
||||
FatalErrorInFunction
|
||||
<< "Requested interpolative weights for a direct mapper."
|
||||
<< abort(FatalError);
|
||||
|
||||
return scalarListList::null();
|
||||
|
||||
@ -89,7 +89,6 @@ class faEdgeMapper
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const faEdgeMapper&);
|
||||
|
||||
|
||||
//- Calculate addressing
|
||||
void calcAddressing() const;
|
||||
|
||||
@ -99,19 +98,16 @@ class faEdgeMapper
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
faEdgeMapper
|
||||
(
|
||||
const faMesh& mesh,
|
||||
const mapPolyMesh& mpm
|
||||
);
|
||||
//- Construct from components
|
||||
faEdgeMapper
|
||||
(
|
||||
const faMesh& mesh,
|
||||
const mapPolyMesh& mpm
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~faEdgeMapper();
|
||||
//- Destructor
|
||||
virtual ~faEdgeMapper();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -27,9 +27,6 @@ License
|
||||
|
||||
#include "faMeshMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::faMeshMapper::faMeshMapper
|
||||
@ -53,7 +50,7 @@ Foam::faMeshMapper::faMeshMapper
|
||||
// Capture old patch information
|
||||
const faBoundaryMesh& patches = mesh.boundary();
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
oldPatchSizes_[patchI] = patches[patchI].size();
|
||||
oldPatchStarts_[patchI] = patches[patchI].start();
|
||||
|
||||
@ -38,10 +38,8 @@ void Foam::faPatchMapper::calcAddressing() const
|
||||
{
|
||||
if (directAddrPtr_)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void faPatchMapper::calcAddressing() const)"
|
||||
) << "Addressing already calculated"
|
||||
FatalErrorInFunction
|
||||
<< "Addressing already calculated"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -59,7 +57,7 @@ void Foam::faPatchMapper::calcAddressing() const
|
||||
|
||||
const labelList& reverseFaceMap = mpm_.reverseFaceMap();
|
||||
|
||||
forAll (oldEdgeFaces_, oefI)
|
||||
forAll(oldEdgeFaces_, oefI)
|
||||
{
|
||||
if (reverseFaceMap[oldEdgeFaces_[oefI]] > -1)
|
||||
{
|
||||
@ -71,7 +69,7 @@ void Foam::faPatchMapper::calcAddressing() const
|
||||
// Go through new edgeFaces and for each edge try to locate old index
|
||||
const labelList& ef = patch_.edgeFaces();
|
||||
|
||||
forAll (ef, efI)
|
||||
forAll(ef, efI)
|
||||
{
|
||||
if (edgeIndexLookup.found(ef[efI]))
|
||||
{
|
||||
@ -98,7 +96,6 @@ void Foam::faPatchMapper::clearOut()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
Foam::faPatchMapper::faPatchMapper
|
||||
(
|
||||
const faPatch& patch,
|
||||
@ -110,7 +107,7 @@ Foam::faPatchMapper::faPatchMapper
|
||||
sizeBeforeMapping_(patch.size()),
|
||||
oldEdgeFaces_(patch.edgeFaces()),
|
||||
hasUnmapped_(false),
|
||||
directAddrPtr_(NULL)
|
||||
directAddrPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
@ -137,10 +134,8 @@ const Foam::labelUList& Foam::faPatchMapper::directAddressing() const
|
||||
|
||||
const Foam::labelListList& Foam::faPatchMapper::addressing() const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const labelListList& faPatchMapper::addressing() const"
|
||||
) << "Requested interpolative addressing for a direct mapper."
|
||||
FatalErrorInFunction
|
||||
<< "Requested interpolative addressing for a direct mapper."
|
||||
<< abort(FatalError);
|
||||
|
||||
return labelListList::null();
|
||||
@ -149,10 +144,8 @@ const Foam::labelListList& Foam::faPatchMapper::addressing() const
|
||||
|
||||
const Foam::scalarListList& Foam::faPatchMapper::weights() const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const scalarListList& faPatchMapper::weights() const"
|
||||
) << "Requested interpolative weights for a direct mapper."
|
||||
FatalErrorInFunction
|
||||
<< "Requested interpolative weights for a direct mapper."
|
||||
<< abort(FatalError);
|
||||
|
||||
return scalarListList::null();
|
||||
|
||||
@ -105,14 +105,12 @@ class faPatchMapper
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mappers
|
||||
faPatchMapper
|
||||
(
|
||||
const faPatch& patch,
|
||||
const mapPolyMesh& mpm
|
||||
);
|
||||
//- Construct from mappers
|
||||
faPatchMapper
|
||||
(
|
||||
const faPatch& patch,
|
||||
const mapPolyMesh& mpm
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faMesh.H"
|
||||
@ -83,7 +81,7 @@ void Foam::faMesh::updateMesh(const mapPolyMesh& mpm)
|
||||
|
||||
const labelListList& oldPatchEdgeFaces = mapper.oldPatchEdgeFaces();
|
||||
|
||||
forAll (oldPatchEdgeFaces, patchI)
|
||||
forAll(oldPatchEdgeFaces, patchI)
|
||||
{
|
||||
labelList& curPatchEdges = patchEdges[patchI];
|
||||
curPatchEdges.setSize(nTotalEdges - nInternalEdges);
|
||||
@ -95,7 +93,7 @@ void Foam::faMesh::updateMesh(const mapPolyMesh& mpm)
|
||||
// Make a fast lookup
|
||||
labelHashSet oldFaceLookup(oldPatchEdgeFaces[patchI]);
|
||||
|
||||
for (label edgeI = nInternalEdges; edgeI < nTotalEdges; edgeI++)
|
||||
for (label edgeI = nInternalEdges; edgeI < nTotalEdges; ++edgeI)
|
||||
{
|
||||
if (edgeToPatch[edgeI - nInternalEdges] > -1)
|
||||
{
|
||||
@ -125,7 +123,7 @@ void Foam::faMesh::updateMesh(const mapPolyMesh& mpm)
|
||||
}
|
||||
|
||||
// Set new edges for all patches
|
||||
forAll (m.boundary_, patchI)
|
||||
forAll(m.boundary_, patchI)
|
||||
{
|
||||
m.boundary_[patchI].resetEdges(patchEdges[patchI]);
|
||||
}
|
||||
@ -198,7 +196,7 @@ void Foam::faMesh::mapOldAreas(const faMeshMapper& mapper) const
|
||||
const labelList& faceMap = mapper.areaMap().newFaceLabelsMap();
|
||||
|
||||
// Map existing old areas; for new faces set area to zero
|
||||
forAll (faceMap, faceI)
|
||||
forAll(faceMap, faceI)
|
||||
{
|
||||
if (faceMap[faceI] > -1)
|
||||
{
|
||||
@ -227,7 +225,7 @@ void Foam::faMesh::mapOldAreas(const faMeshMapper& mapper) const
|
||||
const labelList& faceMap = mapper.areaMap().newFaceLabelsMap();
|
||||
|
||||
// Map old areas for existing faces; for new faces, set area to zero
|
||||
forAll (faceMap, faceI)
|
||||
forAll(faceMap, faceI)
|
||||
{
|
||||
if (faceMap[faceI] > -1)
|
||||
{
|
||||
|
||||
@ -32,14 +32,12 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(coupledFaPatch, 0);
|
||||
defineTypeNameAndDebug(coupledFaPatch, 0);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
void coupledFaPatch::calcTransformTensors
|
||||
void Foam::coupledFaPatch::calcTransformTensors
|
||||
(
|
||||
const vector& Cf,
|
||||
const vector& Cr,
|
||||
@ -73,7 +71,7 @@ void coupledFaPatch::calcTransformTensors
|
||||
}
|
||||
|
||||
|
||||
void coupledFaPatch::calcTransformTensors
|
||||
void Foam::coupledFaPatch::calcTransformTensors
|
||||
(
|
||||
const vectorField& Cf,
|
||||
const vectorField& Cr,
|
||||
@ -88,7 +86,7 @@ void coupledFaPatch::calcTransformTensors
|
||||
forwardT_.setSize(size());
|
||||
reverseT_.setSize(size());
|
||||
|
||||
forAll (forwardT_, facei)
|
||||
forAll(forwardT_, facei)
|
||||
{
|
||||
forwardT_[facei] = rotationTensor(-nr[facei], nf[facei]);
|
||||
reverseT_[facei] = rotationTensor(nf[facei], -nr[facei]);
|
||||
@ -121,12 +119,8 @@ void coupledFaPatch::calcTransformTensors
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
coupledFaPatch::~coupledFaPatch()
|
||||
Foam::coupledFaPatch::~coupledFaPatch()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
coupledFaPatch
|
||||
Foam::coupledFaPatch
|
||||
|
||||
Author
|
||||
Zeljko Tukovic and Hrvoje Jasak
|
||||
@ -161,7 +161,7 @@ public:
|
||||
{
|
||||
if (!separation_.size())
|
||||
{
|
||||
FatalErrorIn("coupledFaPatch::separation() const")
|
||||
FatalErrorInFunction
|
||||
<< "Coupled patches are not separated"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -174,7 +174,7 @@ public:
|
||||
{
|
||||
if (!forwardT_.size())
|
||||
{
|
||||
FatalErrorIn("coupledFaPatch::forwardT() const")
|
||||
FatalErrorInFunction
|
||||
<< "Coupled planes do not need transformation"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -187,7 +187,7 @@ public:
|
||||
{
|
||||
if (!reverseT_.size())
|
||||
{
|
||||
FatalErrorIn("coupledFaPatch::forwardT() const")
|
||||
FatalErrorInFunction
|
||||
<< "Coupled planes do not need transformation"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -35,13 +35,11 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(cyclicFaPatch, 0);
|
||||
addToRunTimeSelectionTable(faPatch, cyclicFaPatch, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(cyclicFaPatch, 0);
|
||||
addToRunTimeSelectionTable(faPatch, cyclicFaPatch, dictionary);
|
||||
|
||||
const Foam::scalar cyclicFaPatch::matchTol_ = 1e-3;
|
||||
const Foam::scalar Foam::cyclicFaPatch::matchTol_ = 1e-3;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
@ -52,7 +50,7 @@ void Foam::cyclicFaPatch::calcTransforms()
|
||||
{
|
||||
pointField half0Ctrs(size()/2);
|
||||
pointField half1Ctrs(size()/2);
|
||||
for (label i=0; i<size()/2; i++)
|
||||
for (label i=0; i<size()/2; ++i)
|
||||
{
|
||||
half0Ctrs[i] = this->edgeCentres()[i];
|
||||
half1Ctrs[i] = this->edgeCentres()[i+size()/2];
|
||||
@ -66,7 +64,7 @@ void Foam::cyclicFaPatch::calcTransforms()
|
||||
scalar maxMatchError = 0;
|
||||
label errorEdge = -1;
|
||||
|
||||
for (label edgei = 0; edgei < size()/2; edgei++)
|
||||
for (label edgei = 0; edgei < size()/2; ++edgei)
|
||||
{
|
||||
half0Normals[edgei] = eN[edgei];
|
||||
label nbrEdgei = edgei + size()/2;
|
||||
@ -84,7 +82,7 @@ void Foam::cyclicFaPatch::calcTransforms()
|
||||
half0Normals[edgei] = point(1, 0, 0);
|
||||
half1Normals[edgei] = half0Normals[edgei];
|
||||
}
|
||||
else if(mag(magLe - nbrMagLe)/avLe > matchTol_)
|
||||
else if (mag(magLe - nbrMagLe)/avLe > matchTol_)
|
||||
{
|
||||
// Error in area matching. Find largest error
|
||||
maxMatchError =
|
||||
@ -106,10 +104,8 @@ void Foam::cyclicFaPatch::calcTransforms()
|
||||
scalar nbrMagLe = mag(half1Normals[errorEdge]);
|
||||
scalar avLe = (magLe + nbrMagLe)/2.0;
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"cyclicFaPatch::calcTransforms()"
|
||||
) << "edge " << errorEdge
|
||||
FatalErrorInFunction
|
||||
<< "edge " << errorEdge
|
||||
<< " area does not match neighbour "
|
||||
<< nbrEdgei << " by "
|
||||
<< 100*mag(magLe - nbrMagLe)/avLe
|
||||
@ -142,10 +138,8 @@ void Foam::cyclicFaPatch::calcTransforms()
|
||||
{
|
||||
if (forwardT().size() > 1 || reverseT().size() > 1)
|
||||
{
|
||||
SeriousErrorIn
|
||||
(
|
||||
"void cyclicFaPatch::calcTransforms()"
|
||||
) << "Transformation tensor is not constant for the cyclic "
|
||||
SeriousErrorInFunction
|
||||
<< "Transformation tensor is not constant for the cyclic "
|
||||
<< "patch. Please reconsider your setup and definition of "
|
||||
<< "cyclic boundaries." << endl;
|
||||
}
|
||||
@ -154,8 +148,7 @@ void Foam::cyclicFaPatch::calcTransforms()
|
||||
}
|
||||
|
||||
|
||||
// Make patch weighting factors
|
||||
void cyclicFaPatch::makeWeights(scalarField& w) const
|
||||
void Foam::cyclicFaPatch::makeWeights(scalarField& w) const
|
||||
{
|
||||
const scalarField& magL = magEdgeLengths();
|
||||
|
||||
@ -165,7 +158,7 @@ void cyclicFaPatch::makeWeights(scalarField& w) const
|
||||
scalar maxMatchError = 0;
|
||||
label errorEdge = -1;
|
||||
|
||||
for (label edgei = 0; edgei < sizeby2; edgei++)
|
||||
for (label edgei = 0; edgei < sizeby2; ++edgei)
|
||||
{
|
||||
scalar avL = (magL[edgei] + magL[edgei + sizeby2])/2.0;
|
||||
|
||||
@ -198,7 +191,7 @@ void cyclicFaPatch::makeWeights(scalarField& w) const
|
||||
{
|
||||
scalar avL = (magL[errorEdge] + magL[errorEdge + sizeby2])/2.0;
|
||||
|
||||
FatalErrorIn("cyclicFaPatch::makeWeights(scalarField& w) const")
|
||||
FatalErrorInFunction
|
||||
<< "edge " << errorEdge << " and " << errorEdge + sizeby2
|
||||
<< " areas do not match by "
|
||||
<< 100*mag(magL[errorEdge] - magL[errorEdge + sizeby2])/avL
|
||||
@ -210,13 +203,12 @@ void cyclicFaPatch::makeWeights(scalarField& w) const
|
||||
}
|
||||
|
||||
|
||||
// Make patch edge - neighbour cell distances
|
||||
void cyclicFaPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
void Foam::cyclicFaPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
{
|
||||
const scalarField deltas(edgeNormals() & faPatch::delta());
|
||||
label sizeby2 = deltas.size()/2;
|
||||
|
||||
for (label edgei = 0; edgei < sizeby2; edgei++)
|
||||
for (label edgei = 0; edgei < sizeby2; ++edgei)
|
||||
{
|
||||
scalar di = deltas[edgei];
|
||||
scalar dni = deltas[edgei + sizeby2];
|
||||
@ -252,8 +244,8 @@ void Foam::cyclicFaPatch::movePoints(const pointField& p)
|
||||
calcTransforms();
|
||||
}
|
||||
|
||||
// Return delta (P to N) vectors across coupled patch
|
||||
tmp<vectorField> cyclicFaPatch::delta() const
|
||||
|
||||
Foam::tmp<Foam::vectorField> Foam::cyclicFaPatch::delta() const
|
||||
{
|
||||
const vectorField patchD(faPatch::delta());
|
||||
label sizeby2 = patchD.size()/2;
|
||||
@ -264,9 +256,9 @@ tmp<vectorField> cyclicFaPatch::delta() const
|
||||
// Do the transformation if necessary
|
||||
if (parallel())
|
||||
{
|
||||
for (label edgei = 0; edgei < sizeby2; edgei++)
|
||||
for (label edgei = 0; edgei < sizeby2; ++edgei)
|
||||
{
|
||||
vector ddi = patchD[edgei];
|
||||
const vector& ddi = patchD[edgei];
|
||||
vector dni = patchD[edgei + sizeby2];
|
||||
|
||||
pdv[edgei] = ddi - dni;
|
||||
@ -275,9 +267,9 @@ tmp<vectorField> cyclicFaPatch::delta() const
|
||||
}
|
||||
else
|
||||
{
|
||||
for (label edgei = 0; edgei < sizeby2; edgei++)
|
||||
for (label edgei = 0; edgei < sizeby2; ++edgei)
|
||||
{
|
||||
vector ddi = patchD[edgei];
|
||||
const vector& ddi = patchD[edgei];
|
||||
vector dni = patchD[edgei + sizeby2];
|
||||
|
||||
pdv[edgei] = ddi - transform(forwardT()[0], dni);
|
||||
@ -289,14 +281,14 @@ tmp<vectorField> cyclicFaPatch::delta() const
|
||||
}
|
||||
|
||||
|
||||
label Foam::cyclicPolyPatch::neighbPatchID() const
|
||||
Foam::label Foam::cyclicPolyPatch::neighbPatchID() const
|
||||
{
|
||||
NotImplemented;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
tmp<labelField> cyclicFaPatch::interfaceInternalField
|
||||
Foam::tmp<Foam::labelField> Foam::cyclicFaPatch::interfaceInternalField
|
||||
(
|
||||
const labelUList& internalData
|
||||
) const
|
||||
@ -305,7 +297,7 @@ tmp<labelField> cyclicFaPatch::interfaceInternalField
|
||||
}
|
||||
|
||||
|
||||
tmp<labelField> cyclicFaPatch::transfer
|
||||
Foam::tmp<Foam::labelField> Foam::cyclicFaPatch::transfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
const labelUList& interfaceData
|
||||
@ -316,7 +308,7 @@ tmp<labelField> cyclicFaPatch::transfer
|
||||
|
||||
label sizeby2 = this->size()/2;
|
||||
|
||||
for (label edgei=0; edgei<sizeby2; edgei++)
|
||||
for (label edgei=0; edgei<sizeby2; ++edgei)
|
||||
{
|
||||
pnf[edgei] = interfaceData[edgei + sizeby2];
|
||||
pnf[edgei + sizeby2] = interfaceData[edgei];
|
||||
@ -326,7 +318,7 @@ tmp<labelField> cyclicFaPatch::transfer
|
||||
}
|
||||
|
||||
|
||||
tmp<labelField> cyclicFaPatch::internalFieldTransfer
|
||||
Foam::tmp<Foam::labelField> Foam::cyclicFaPatch::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const labelUList& iF
|
||||
@ -339,7 +331,7 @@ tmp<labelField> cyclicFaPatch::internalFieldTransfer
|
||||
|
||||
label sizeby2 = this->size()/2;
|
||||
|
||||
for (label edgei=0; edgei<sizeby2; edgei++)
|
||||
for (label edgei=0; edgei<sizeby2; ++edgei)
|
||||
{
|
||||
pnf[edgei] = iF[edgeCells[edgei + sizeby2]];
|
||||
pnf[edgei + sizeby2] = iF[edgeCells[edgei]];
|
||||
@ -349,8 +341,4 @@ tmp<labelField> cyclicFaPatch::internalFieldTransfer
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -59,11 +59,9 @@ class cyclicFaPatch
|
||||
public coupledFaPatch,
|
||||
public cyclicLduInterface
|
||||
{
|
||||
// Private data
|
||||
|
||||
// Private member functions
|
||||
|
||||
void calcTransforms();
|
||||
void calcTransforms();
|
||||
|
||||
protected:
|
||||
|
||||
@ -73,6 +71,7 @@ protected:
|
||||
// maximum edge length per face.
|
||||
static const scalar matchTol_;
|
||||
|
||||
|
||||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "emptyFaPatch.H"
|
||||
@ -47,7 +45,7 @@ addToRunTimeSelectionTable(faPatch, emptyFaPatch, dictionary);
|
||||
// This is the only piece of info used out of the underlying primitivePatch
|
||||
// I choose to store it there because it is used in primitive patch operations
|
||||
// and it should not be duplicated as before. However, to ensure everything
|
||||
// in the empty patch is sized to zero, we shall here return a regerence to
|
||||
// in the empty patch is sized to zero, we shall here return a reference to
|
||||
// a zero-sized field (it does not matter what the field is
|
||||
//
|
||||
// const vectorField& emptyFaPatch::edgeNormals() const
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
emptyFaPatch
|
||||
Foam::emptyFaPatch
|
||||
|
||||
Description
|
||||
A patch which will not exist in the faMesh. Typical example is a front and
|
||||
@ -79,7 +79,7 @@ public:
|
||||
faPatch(name, edgeLabels, index, bm, ngbPolyPatchIndex)
|
||||
{}
|
||||
|
||||
//- Construct from dictionary
|
||||
//- Construct from dictionary
|
||||
emptyFaPatch
|
||||
(
|
||||
const word& name,
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "processorFaPatch.H"
|
||||
@ -40,21 +38,19 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(processorFaPatch, 0);
|
||||
addToRunTimeSelectionTable(faPatch, processorFaPatch, dictionary);
|
||||
|
||||
defineTypeNameAndDebug(processorFaPatch, 0);
|
||||
addToRunTimeSelectionTable(faPatch, processorFaPatch, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
processorFaPatch::~processorFaPatch()
|
||||
Foam::processorFaPatch::~processorFaPatch()
|
||||
{
|
||||
deleteDemandDrivenData(neighbPointsPtr_);
|
||||
deleteDemandDrivenData(nonGlobalPatchPointsPtr_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::label Foam::processorFaPatch::comm() const
|
||||
@ -69,7 +65,7 @@ int Foam::processorFaPatch::tag() const
|
||||
}
|
||||
|
||||
|
||||
void processorFaPatch::makeNonGlobalPatchPoints() const
|
||||
void Foam::processorFaPatch::makeNonGlobalPatchPoints() const
|
||||
{
|
||||
// If it is not runing parallel or there are no global points
|
||||
// create a 1->1 map
|
||||
@ -79,8 +75,8 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
||||
if
|
||||
(
|
||||
!Pstream::parRun()
|
||||
|| !boundaryMesh().mesh()().globalData().nGlobalPoints()
|
||||
// || !boundaryMesh().mesh().globalData().nGlobalPoints()
|
||||
|| !boundaryMesh().mesh()().globalData().nGlobalPoints()
|
||||
// || !boundaryMesh().mesh().globalData().nGlobalPoints()
|
||||
)
|
||||
{
|
||||
nonGlobalPatchPointsPtr_ = new labelList(nPoints());
|
||||
@ -92,7 +88,6 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// Get reference to shared points
|
||||
const labelList& sharedPoints =
|
||||
boundaryMesh().mesh()().globalData().sharedPointLabels();
|
||||
@ -107,13 +102,13 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
||||
|
||||
label noFiltPoints = 0;
|
||||
|
||||
forAll (faMeshPatchPoints, pointI)
|
||||
forAll(faMeshPatchPoints, pointI)
|
||||
{
|
||||
label curP = meshPoints[faMeshPatchPoints[pointI]];
|
||||
|
||||
bool found = false;
|
||||
|
||||
forAll (sharedPoints, sharedI)
|
||||
forAll(sharedPoints, sharedI)
|
||||
{
|
||||
if (sharedPoints[sharedI] == curP)
|
||||
{
|
||||
@ -125,7 +120,7 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
||||
if (!found)
|
||||
{
|
||||
ngpp[noFiltPoints] = pointI;
|
||||
noFiltPoints++;
|
||||
++noFiltPoints;
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,13 +138,13 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
||||
|
||||
// label noFiltPoints = 0;
|
||||
|
||||
// forAll (patchPoints, pointI)
|
||||
// forAll(patchPoints, pointI)
|
||||
// {
|
||||
// label curP = patchPoints[pointI];
|
||||
|
||||
// bool found = false;
|
||||
|
||||
// forAll (sharedPoints, pI)
|
||||
// forAll(sharedPoints, pI)
|
||||
// {
|
||||
// if (sharedPoints[pI] == curP)
|
||||
// {
|
||||
@ -170,7 +165,7 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
||||
}
|
||||
|
||||
|
||||
void processorFaPatch::initGeometry()
|
||||
void Foam::processorFaPatch::initGeometry()
|
||||
{
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
@ -189,7 +184,7 @@ void processorFaPatch::initGeometry()
|
||||
}
|
||||
|
||||
|
||||
void processorFaPatch::calcGeometry()
|
||||
void Foam::processorFaPatch::calcGeometry()
|
||||
{
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
@ -215,10 +210,8 @@ void processorFaPatch::calcGeometry()
|
||||
|
||||
if (mag(magEl[edgei] - nmagEl)/avEl > 1e-6)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"processorFvPatch::makeWeights(scalarField& w) const"
|
||||
) << "edge " << edgei
|
||||
FatalErrorInFunction
|
||||
<< "edge " << edgei
|
||||
<< " length does not match neighbour by "
|
||||
<< 100*mag(magEl[edgei] - nmagEl)/avEl
|
||||
<< "% -- possible edge ordering problem"
|
||||
@ -237,20 +230,20 @@ void processorFaPatch::calcGeometry()
|
||||
}
|
||||
|
||||
|
||||
void processorFaPatch::initMovePoints(const pointField& p)
|
||||
void Foam::processorFaPatch::initMovePoints(const pointField& p)
|
||||
{
|
||||
faPatch::movePoints(p);
|
||||
initGeometry();
|
||||
}
|
||||
|
||||
|
||||
void processorFaPatch::movePoints(const pointField&)
|
||||
void Foam::processorFaPatch::movePoints(const pointField&)
|
||||
{
|
||||
calcGeometry();
|
||||
}
|
||||
|
||||
|
||||
void processorFaPatch::initUpdateMesh()
|
||||
void Foam::processorFaPatch::initUpdateMesh()
|
||||
{
|
||||
// For completeness
|
||||
faPatch::initUpdateMesh();
|
||||
@ -268,7 +261,7 @@ void processorFaPatch::initUpdateMesh()
|
||||
|
||||
const labelListList& ptEdges = pointEdges();
|
||||
|
||||
for (label patchPointI = 0; patchPointI < nPoints(); patchPointI++)
|
||||
for (label patchPointI = 0; patchPointI < nPoints(); ++patchPointI)
|
||||
{
|
||||
label edgeI = ptEdges[patchPointI][0];
|
||||
|
||||
@ -277,11 +270,7 @@ void processorFaPatch::initUpdateMesh()
|
||||
const edge& e = patchEdges[edgeI];
|
||||
|
||||
indexInEdge[patchPointI] =
|
||||
findIndex
|
||||
(
|
||||
e,
|
||||
pointLabels()[patchPointI]
|
||||
);
|
||||
findIndex(e, pointLabels()[patchPointI]);
|
||||
}
|
||||
|
||||
OPstream toNeighbProc
|
||||
@ -298,7 +287,7 @@ void processorFaPatch::initUpdateMesh()
|
||||
}
|
||||
|
||||
|
||||
void processorFaPatch::updateMesh()
|
||||
void Foam::processorFaPatch::updateMesh()
|
||||
{
|
||||
// For completeness
|
||||
faPatch::updateMesh();
|
||||
@ -348,13 +337,13 @@ void processorFaPatch::updateMesh()
|
||||
{
|
||||
// Differing number of points. Probably patch includes
|
||||
// part of a cyclic.
|
||||
neighbPointsPtr_ = NULL;
|
||||
neighbPointsPtr_ = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const labelList& processorFaPatch::neighbPoints() const
|
||||
const Foam::labelList& Foam::processorFaPatch::neighbPoints() const
|
||||
{
|
||||
if (!neighbPointsPtr_)
|
||||
{
|
||||
@ -363,7 +352,7 @@ const labelList& processorFaPatch::neighbPoints() const
|
||||
// sides of the processor patch since one side might have
|
||||
// it merged with another bit of geometry
|
||||
|
||||
FatalErrorIn("processorFaPatch::neighbPoints() const")
|
||||
FatalErrorInFunction
|
||||
<< "No extended addressing calculated for patch " << name()
|
||||
<< nl
|
||||
<< "This can happen if the number of points on both"
|
||||
@ -377,8 +366,7 @@ const labelList& processorFaPatch::neighbPoints() const
|
||||
}
|
||||
|
||||
|
||||
// Make patch weighting factors
|
||||
void processorFaPatch::makeWeights(scalarField& w) const
|
||||
void Foam::processorFaPatch::makeWeights(scalarField& w) const
|
||||
{
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
@ -391,7 +379,8 @@ void processorFaPatch::makeWeights(scalarField& w) const
|
||||
)
|
||||
& (
|
||||
neighbEdgeCentres()
|
||||
- neighbEdgeFaceCentres())
|
||||
- neighbEdgeFaceCentres()
|
||||
)
|
||||
);
|
||||
|
||||
w = neighbEdgeCentresCn/
|
||||
@ -407,8 +396,7 @@ void processorFaPatch::makeWeights(scalarField& w) const
|
||||
}
|
||||
|
||||
|
||||
// Make patch edge - neighbour face distances
|
||||
void processorFaPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
void Foam::processorFaPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
{
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
@ -421,8 +409,7 @@ void processorFaPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
}
|
||||
|
||||
|
||||
// Return delta (P to N) vectors across coupled patch
|
||||
tmp<vectorField> processorFaPatch::delta() const
|
||||
Foam::tmp<Foam::vectorField> Foam::processorFaPatch::delta() const
|
||||
{
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
@ -457,7 +444,7 @@ tmp<vectorField> processorFaPatch::delta() const
|
||||
}
|
||||
|
||||
|
||||
const labelList& processorFaPatch::nonGlobalPatchPoints() const
|
||||
const Foam::labelList& Foam::processorFaPatch::nonGlobalPatchPoints() const
|
||||
{
|
||||
if (!nonGlobalPatchPointsPtr_)
|
||||
{
|
||||
@ -467,7 +454,8 @@ const labelList& processorFaPatch::nonGlobalPatchPoints() const
|
||||
return *nonGlobalPatchPointsPtr_;
|
||||
}
|
||||
|
||||
tmp<labelField> processorFaPatch::interfaceInternalField
|
||||
|
||||
Foam::tmp<Foam::labelField> Foam::processorFaPatch::interfaceInternalField
|
||||
(
|
||||
const labelUList& internalData
|
||||
) const
|
||||
@ -476,7 +464,7 @@ tmp<labelField> processorFaPatch::interfaceInternalField
|
||||
}
|
||||
|
||||
|
||||
void processorFaPatch::initTransfer
|
||||
void Foam::processorFaPatch::initTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const labelUList& interfaceData
|
||||
@ -486,7 +474,7 @@ void processorFaPatch::initTransfer
|
||||
}
|
||||
|
||||
|
||||
tmp<labelField> processorFaPatch::transfer
|
||||
Foam::tmp<Foam::labelField> Foam::processorFaPatch::transfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const labelUList&
|
||||
@ -496,7 +484,7 @@ tmp<labelField> processorFaPatch::transfer
|
||||
}
|
||||
|
||||
|
||||
void processorFaPatch::initInternalFieldTransfer
|
||||
void Foam::processorFaPatch::initInternalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const labelUList& iF
|
||||
@ -506,7 +494,7 @@ void processorFaPatch::initInternalFieldTransfer
|
||||
}
|
||||
|
||||
|
||||
tmp<labelField> processorFaPatch::internalFieldTransfer
|
||||
Foam::tmp<Foam::labelField> Foam::processorFaPatch::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const labelUList&
|
||||
@ -516,8 +504,7 @@ tmp<labelField> processorFaPatch::internalFieldTransfer
|
||||
}
|
||||
|
||||
|
||||
// Write
|
||||
void processorFaPatch::write(Ostream& os) const
|
||||
void Foam::processorFaPatch::write(Ostream& os) const
|
||||
{
|
||||
faPatch::write(os);
|
||||
os.writeKeyword("myProcNo") << myProcNo_
|
||||
@ -527,8 +514,4 @@ void processorFaPatch::write(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
processorFaPatch
|
||||
Foam::processorFaPatch
|
||||
|
||||
Description
|
||||
Processor patch.
|
||||
@ -146,8 +146,8 @@ public:
|
||||
neighbEdgeCentres_(),
|
||||
neighbEdgeLengths_(),
|
||||
neighbEdgeFaceCentres_(),
|
||||
neighbPointsPtr_(NULL),
|
||||
nonGlobalPatchPointsPtr_(NULL)
|
||||
neighbPointsPtr_(nullptr),
|
||||
nonGlobalPatchPointsPtr_(nullptr)
|
||||
{}
|
||||
|
||||
//- Construct from dictionary
|
||||
@ -165,8 +165,8 @@ public:
|
||||
neighbEdgeCentres_(),
|
||||
neighbEdgeLengths_(),
|
||||
neighbEdgeFaceCentres_(),
|
||||
neighbPointsPtr_(NULL),
|
||||
nonGlobalPatchPointsPtr_(NULL)
|
||||
neighbPointsPtr_(nullptr),
|
||||
nonGlobalPatchPointsPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "symmetryFaPatch.H"
|
||||
@ -34,25 +32,22 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(symmetryFaPatch, 0);
|
||||
addToRunTimeSelectionTable(faPatch, symmetryFaPatch, dictionary);
|
||||
defineTypeNameAndDebug(symmetryFaPatch, 0);
|
||||
addToRunTimeSelectionTable(faPatch, symmetryFaPatch, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void symmetryFaPatch::makeCorrVecs(vectorField& cv) const
|
||||
void Foam::symmetryFaPatch::makeCorrVecs(vectorField& cv) const
|
||||
{
|
||||
// Non-orthogonal correction not allowed. HJ, 16/Apr/2009
|
||||
// Non-orthogonal correction not allowed
|
||||
cv = vector::zero;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
symmetryFaPatch::symmetryFaPatch
|
||||
Foam::symmetryFaPatch::symmetryFaPatch
|
||||
(
|
||||
const word& name,
|
||||
const labelList& edgeLabels,
|
||||
@ -64,8 +59,8 @@ symmetryFaPatch::symmetryFaPatch
|
||||
faPatch(name, edgeLabels, index, bm, ngbPolyPatchIndex)
|
||||
{}
|
||||
|
||||
//- Construct from dictionary
|
||||
symmetryFaPatch::symmetryFaPatch
|
||||
|
||||
Foam::symmetryFaPatch::symmetryFaPatch
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
@ -75,18 +70,13 @@ symmetryFaPatch::symmetryFaPatch
|
||||
:
|
||||
faPatch(name, dict, index, bm)
|
||||
{
|
||||
if(ngbPolyPatchIndex() == -1)
|
||||
if (ngbPolyPatchIndex() == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"symmetryFaPatch::symmetryFaPatch(const word&, const dictionary&, const label, const faBoundaryMesh&)"
|
||||
) << "Neighbour polyPatch index is not specified for faPatch "
|
||||
FatalErrorInFunction
|
||||
<< "Neighbour polyPatch index is not specified for faPatch "
|
||||
<< this->name() << exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -112,10 +112,9 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~symmetryFaPatch()
|
||||
{}
|
||||
//- Destructor
|
||||
virtual ~symmetryFaPatch()
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "wedgeFaPatch.H"
|
||||
@ -38,21 +36,19 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(wedgeFaPatch, 0);
|
||||
addToRunTimeSelectionTable(faPatch, wedgeFaPatch, dictionary);
|
||||
defineTypeNameAndDebug(wedgeFaPatch, 0);
|
||||
addToRunTimeSelectionTable(faPatch, wedgeFaPatch, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
void wedgeFaPatch::findAxisPoint() const
|
||||
void Foam::wedgeFaPatch::findAxisPoint() const
|
||||
{
|
||||
// Find axis point
|
||||
|
||||
labelList ptLabels = pointLabels();
|
||||
const labelList& ptLabels = pointLabels();
|
||||
|
||||
labelListList ptEdges = pointEdges();
|
||||
const labelListList& ptEdges = pointEdges();
|
||||
|
||||
const vectorField& points = boundaryMesh().mesh().points();
|
||||
|
||||
@ -60,11 +56,11 @@ void wedgeFaPatch::findAxisPoint() const
|
||||
|
||||
forAll(ptEdges, pointI)
|
||||
{
|
||||
if( ptEdges[pointI].size() == 1 )
|
||||
if (ptEdges[pointI].size() == 1)
|
||||
{
|
||||
scalar r = mag((I-axis()*axis())&points[ptLabels[pointI]]);
|
||||
|
||||
if( r < magL[ptEdges[pointI][0]] )
|
||||
if (r < magL[ptEdges[pointI][0]])
|
||||
{
|
||||
axisPoint_ = ptLabels[pointI];
|
||||
break;
|
||||
@ -78,8 +74,7 @@ void wedgeFaPatch::findAxisPoint() const
|
||||
|
||||
// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//- Construct from polyPatch
|
||||
wedgeFaPatch::wedgeFaPatch
|
||||
Foam::wedgeFaPatch::wedgeFaPatch
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
@ -88,24 +83,18 @@ wedgeFaPatch::wedgeFaPatch
|
||||
)
|
||||
:
|
||||
faPatch(name, dict, index, bm),
|
||||
wedgePolyPatchPtr_(NULL),
|
||||
wedgePolyPatchPtr_(nullptr),
|
||||
axisPoint_(-1),
|
||||
axisPointChecked_(false)
|
||||
{
|
||||
if(ngbPolyPatchIndex() == -1)
|
||||
if (ngbPolyPatchIndex() == -1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"wedgeFaPatch::wedgeFaPatch(const word&, const dictionary&, const label, const faBoundaryMesh&)"
|
||||
) << "Neighbour polyPatch index is not specified for faPatch "
|
||||
FatalErrorInFunction
|
||||
<< "Neighbour polyPatch index is not specified for faPatch "
|
||||
<< this->name() << exit(FatalError);
|
||||
}
|
||||
|
||||
if
|
||||
(
|
||||
bm.mesh()().boundaryMesh()[ngbPolyPatchIndex()].type()
|
||||
== wedgePolyPatch::typeName
|
||||
)
|
||||
if (isA<wedgePolyPatch>(bm.mesh()().boundaryMesh()[ngbPolyPatchIndex()]))
|
||||
{
|
||||
const wedgePolyPatch& wedge =
|
||||
refCast<const wedgePolyPatch>
|
||||
@ -117,18 +106,12 @@ wedgeFaPatch::wedgeFaPatch
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"wedgeFaPatch::wedgeFaPatch(const word&, const dictionary&, const label, const faBoundaryMesh&)"
|
||||
) << "Neighbour polyPatch is not of type "
|
||||
FatalErrorInFunction
|
||||
<< "Neighbour polyPatch is not of type "
|
||||
<< wedgePolyPatch::typeName
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
wedgeFaPatch
|
||||
Foam::wedgeFaPatch
|
||||
|
||||
Description
|
||||
Wedge front and back plane patch.
|
||||
@ -70,28 +70,25 @@ class wedgeFaPatch
|
||||
//- Finde axis point
|
||||
void findAxisPoint() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("wedge");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary
|
||||
wedgeFaPatch
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const label index,
|
||||
const faBoundaryMesh& bm
|
||||
);
|
||||
//- Construct from dictionary
|
||||
wedgeFaPatch
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const label index,
|
||||
const faBoundaryMesh& bm
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~wedgeFaPatch()
|
||||
{}
|
||||
//- Destructor
|
||||
virtual ~wedgeFaPatch()
|
||||
{}
|
||||
|
||||
|
||||
// Member functions
|
||||
@ -125,7 +122,7 @@ public:
|
||||
//- Return axis point label
|
||||
label axisPoint() const
|
||||
{
|
||||
if(axisPoint_ == -1 && !axisPointChecked_)
|
||||
if (axisPoint_ == -1 && !axisPointChecked_)
|
||||
{
|
||||
findAxisPoint();
|
||||
}
|
||||
|
||||
@ -55,7 +55,6 @@ void Foam::faPatch::clearOut()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
Foam::faPatch::faPatch
|
||||
(
|
||||
const word& name,
|
||||
@ -69,13 +68,12 @@ Foam::faPatch::faPatch
|
||||
patchIdentifier(name, index),
|
||||
ngbPolyPatchIndex_(ngbPolyPatchIndex),
|
||||
boundaryMesh_(bm),
|
||||
edgeFacesPtr_(NULL),
|
||||
pointLabelsPtr_(NULL),
|
||||
pointEdgesPtr_(NULL)
|
||||
edgeFacesPtr_(nullptr),
|
||||
pointLabelsPtr_(nullptr),
|
||||
pointEdgesPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
// Construct from dictionary
|
||||
Foam::faPatch::faPatch
|
||||
(
|
||||
const word& name,
|
||||
@ -88,20 +86,21 @@ Foam::faPatch::faPatch
|
||||
patchIdentifier(name, dict, index),
|
||||
ngbPolyPatchIndex_(readInt(dict.lookup("ngbPolyPatchIndex"))),
|
||||
boundaryMesh_(bm),
|
||||
edgeFacesPtr_(NULL),
|
||||
pointLabelsPtr_(NULL),
|
||||
pointEdgesPtr_(NULL)
|
||||
edgeFacesPtr_(nullptr),
|
||||
pointLabelsPtr_(nullptr),
|
||||
pointEdgesPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
Foam::faPatch::faPatch(const faPatch& p, const faBoundaryMesh& bm)
|
||||
:
|
||||
labelList(p),
|
||||
patchIdentifier(p, p.index()),
|
||||
ngbPolyPatchIndex_(p.ngbPolyPatchIndex_),
|
||||
boundaryMesh_(bm),
|
||||
edgeFacesPtr_(NULL),
|
||||
pointLabelsPtr_(NULL),
|
||||
pointEdgesPtr_(NULL)
|
||||
edgeFacesPtr_(nullptr),
|
||||
pointLabelsPtr_(nullptr),
|
||||
pointEdgesPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
@ -120,6 +119,7 @@ Foam::label Foam::faPatch::ngbPolyPatchIndex() const
|
||||
return ngbPolyPatchIndex_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::faBoundaryMesh& Foam::faPatch::boundaryMesh() const
|
||||
{
|
||||
return boundaryMesh_;
|
||||
@ -147,38 +147,32 @@ void Foam::faPatch::calcPointLabels() const
|
||||
{
|
||||
SLList<label> labels;
|
||||
|
||||
UList<edge> edges =
|
||||
patchSlice(boundaryMesh().mesh().edges());
|
||||
UList<edge> edges = patchSlice(boundaryMesh().mesh().edges());
|
||||
|
||||
forAll(edges, edgeI)
|
||||
{
|
||||
bool existStart = false;
|
||||
bool existEnd = false;
|
||||
|
||||
for
|
||||
(
|
||||
SLList<label>::iterator iter = labels.begin();
|
||||
iter != labels.end();
|
||||
++iter
|
||||
)
|
||||
forAllIters(labels, iter)
|
||||
{
|
||||
if(*iter == edges[edgeI].start())
|
||||
if (*iter == edges[edgeI].start())
|
||||
{
|
||||
existStart = true;
|
||||
}
|
||||
|
||||
if(*iter == edges[edgeI].end())
|
||||
if (*iter == edges[edgeI].end())
|
||||
{
|
||||
existEnd = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!existStart)
|
||||
if (!existStart)
|
||||
{
|
||||
labels.append(edges[edgeI].start());
|
||||
}
|
||||
|
||||
if(!existEnd)
|
||||
if (!existEnd)
|
||||
{
|
||||
labels.append(edges[edgeI].end());
|
||||
}
|
||||
@ -190,22 +184,20 @@ void Foam::faPatch::calcPointLabels() const
|
||||
|
||||
void Foam::faPatch::calcPointEdges() const
|
||||
{
|
||||
labelList points = pointLabels();
|
||||
const labelList& points = pointLabels();
|
||||
|
||||
const edgeList::subList e =
|
||||
patchSlice(boundaryMesh().mesh().edges());
|
||||
const edgeList::subList e = patchSlice(boundaryMesh().mesh().edges());
|
||||
|
||||
// set up storage for pointEdges
|
||||
List<SLList<label> > pointEdgs(points.size());
|
||||
List<SLList<label>> pointEdgs(points.size());
|
||||
|
||||
forAll (e, edgeI)
|
||||
forAll(e, edgeI)
|
||||
{
|
||||
const edge& curPoints = e[edgeI];
|
||||
|
||||
forAll (curPoints, pointI)
|
||||
forAll(curPoints, pointI)
|
||||
{
|
||||
label localPointIndex =
|
||||
findIndex(points, curPoints[pointI]);
|
||||
label localPointIndex = findIndex(points, curPoints[pointI]);
|
||||
|
||||
pointEdgs[localPointIndex].append(edgeI);
|
||||
}
|
||||
@ -215,7 +207,7 @@ void Foam::faPatch::calcPointEdges() const
|
||||
pointEdgesPtr_ = new labelListList(pointEdgs.size());
|
||||
labelListList& pEdges = *pointEdgesPtr_;
|
||||
|
||||
forAll (pointEdgs, pointI)
|
||||
forAll(pointEdgs, pointI)
|
||||
{
|
||||
pEdges[pointI].setSize(pointEdgs[pointI].size());
|
||||
|
||||
@ -248,7 +240,7 @@ Foam::labelList Foam::faPatch::ngbPolyPatchFaces() const
|
||||
{
|
||||
labelList ngbFaces;
|
||||
|
||||
if(ngbPolyPatchIndex() == -1)
|
||||
if (ngbPolyPatchIndex() == -1)
|
||||
{
|
||||
return ngbFaces;
|
||||
}
|
||||
@ -261,22 +253,24 @@ Foam::labelList Foam::faPatch::ngbPolyPatchFaces() const
|
||||
|
||||
const labelListList& edgeFaces = pMesh.edgeFaces();
|
||||
|
||||
labelList faceCells (patch.size(), -1);
|
||||
labelList faceCells(patch.size(), -1);
|
||||
|
||||
forAll (faceCells, faceI)
|
||||
forAll(faceCells, faceI)
|
||||
{
|
||||
label faceID = aMesh.faceLabels()[faceI];
|
||||
|
||||
faceCells[faceI] = pMesh.faceOwner()[faceID];
|
||||
}
|
||||
|
||||
labelList meshEdges =
|
||||
labelList meshEdges
|
||||
(
|
||||
patch.meshEdges
|
||||
(
|
||||
pMesh.edges(),
|
||||
pMesh.cellEdges(),
|
||||
faceCells
|
||||
);
|
||||
)
|
||||
);
|
||||
|
||||
forAll(ngbFaces, edgeI)
|
||||
{
|
||||
@ -298,10 +292,11 @@ Foam::labelList Foam::faPatch::ngbPolyPatchFaces() const
|
||||
}
|
||||
}
|
||||
|
||||
if(ngbFaces[edgeI] == -1)
|
||||
if (ngbFaces[edgeI] == -1)
|
||||
{
|
||||
Info<< "faPatch::edgeNgbPolyPatchFaces(): "
|
||||
<< "Problem with determination of edge ngb faces!" << endl;
|
||||
WarningInFunction
|
||||
<< "Problem with determination of edge ngb faces!"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -345,7 +340,7 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::ngbPolyPatchPointNormals() const
|
||||
return tmp<vectorField>(new vectorField());
|
||||
}
|
||||
|
||||
labelListList pntEdges = pointEdges();
|
||||
const labelListList& pntEdges = pointEdges();
|
||||
|
||||
tmp<vectorField> tpN(new vectorField(pntEdges.size(), vector::zero));
|
||||
vectorField& pN = tpN.ref();
|
||||
@ -380,28 +375,24 @@ const Foam::labelUList& Foam::faPatch::edgeFaces() const
|
||||
}
|
||||
|
||||
|
||||
// Return the patch edge centres
|
||||
const Foam::vectorField& Foam::faPatch::edgeCentres() const
|
||||
{
|
||||
return boundaryMesh().mesh().edgeCentres().boundaryField()[index()];
|
||||
}
|
||||
|
||||
|
||||
// Return the patch edges length vectors
|
||||
const Foam::vectorField& Foam::faPatch::edgeLengths() const
|
||||
{
|
||||
return boundaryMesh().mesh().Le().boundaryField()[index()];
|
||||
}
|
||||
|
||||
|
||||
// Return the patch edge length magnitudes
|
||||
const Foam::scalarField& Foam::faPatch::magEdgeLengths() const
|
||||
{
|
||||
return boundaryMesh().mesh().magLe().boundaryField()[index()];
|
||||
}
|
||||
|
||||
|
||||
// Return the patch edge unit normals
|
||||
Foam::tmp<Foam::vectorField> Foam::faPatch::edgeNormals() const
|
||||
{
|
||||
tmp<vectorField> eN(new vectorField(size()));
|
||||
@ -412,7 +403,6 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::edgeNormals() const
|
||||
}
|
||||
|
||||
|
||||
// Return the patch edge neighbour face centres
|
||||
Foam::tmp<Foam::vectorField> Foam::faPatch::edgeFaceCentres() const
|
||||
{
|
||||
tmp<vectorField> tfc(new vectorField(size()));
|
||||
@ -424,7 +414,7 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::edgeFaceCentres() const
|
||||
|
||||
const labelUList& faceLabels = edgeFaces();
|
||||
|
||||
forAll (faceLabels, edgeI)
|
||||
forAll(faceLabels, edgeI)
|
||||
{
|
||||
fc[edgeI] = gfc[faceLabels[edgeI]];
|
||||
}
|
||||
@ -433,21 +423,18 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::edgeFaceCentres() const
|
||||
}
|
||||
|
||||
|
||||
// Return cell-centre to face-centre vector
|
||||
Foam::tmp<Foam::vectorField> Foam::faPatch::delta() const
|
||||
{
|
||||
return edgeCentres() - edgeFaceCentres();
|
||||
}
|
||||
|
||||
|
||||
// Make delta coefficients as patch face - neighbour cell distances
|
||||
void Foam::faPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
{
|
||||
dc = 1.0/(edgeNormals() & delta());
|
||||
}
|
||||
|
||||
|
||||
// Return delta coefficients
|
||||
const Foam::scalarField& Foam::faPatch::deltaCoeffs() const
|
||||
{
|
||||
return boundaryMesh().mesh().deltaCoeffs().boundaryField()[index()];
|
||||
@ -496,7 +483,7 @@ void Foam::faPatch::write(Ostream& os) const
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const faPatch& p)
|
||||
{
|
||||
p.write(os);
|
||||
os.check("Ostream& operator<<(Ostream& f, const faPatch& p)");
|
||||
os.check(FUNCTION_NAME);
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faPatch
|
||||
Foam::faPatch
|
||||
|
||||
Description
|
||||
Finite area patch class. Used for 2-D non-Euclidian finite area method.
|
||||
@ -92,19 +92,19 @@ private:
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow construct as copy
|
||||
faPatch(const faPatch&);
|
||||
faPatch(const faPatch&) = delete;
|
||||
|
||||
//- Disallow assignment
|
||||
void operator=(const faPatch&);
|
||||
void operator=(const faPatch&) = delete;
|
||||
|
||||
|
||||
//- Clear out topological patch data
|
||||
void clearOut();
|
||||
//- Clear out topological patch data
|
||||
void clearOut();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// The faPatch geometry initialisation is called by faBoundaryMesh
|
||||
//- The faPatch geometry initialisation is called by faBoundaryMesh
|
||||
friend class faBoundaryMesh;
|
||||
|
||||
//- Calculate patch point labels
|
||||
@ -216,9 +216,8 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~faPatch();
|
||||
//- Destructor
|
||||
virtual ~faPatch();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -334,7 +333,7 @@ public:
|
||||
|
||||
//- Return given internal field next to patch as patch field
|
||||
template<class Type>
|
||||
tmp<Field<Type> > patchInternalField(const UList<Type>&) const;
|
||||
tmp<Field<Type>> patchInternalField(const UList<Type>&) const;
|
||||
|
||||
//- Return the corresponding patchField of the named field
|
||||
template<class GeometricField, class Type>
|
||||
@ -352,8 +351,8 @@ public:
|
||||
const typename GeometricField::Patch& lookupPatchField
|
||||
(
|
||||
const word& name,
|
||||
const GeometricField* = NULL,
|
||||
const Type* = NULL
|
||||
const GeometricField* = nullptr,
|
||||
const Type* = nullptr
|
||||
) const;
|
||||
|
||||
|
||||
@ -370,7 +369,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "faPatchTemplates.C"
|
||||
#include "faPatchTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -24,13 +24,11 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faPatchData
|
||||
Foam::faPatchData
|
||||
|
||||
Description
|
||||
Class which holds data needed for faPatch construction
|
||||
|
||||
SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef faPatchData_H
|
||||
@ -44,7 +42,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class faPatchData Declaration
|
||||
Class faPatchData Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
struct faPatchData
|
||||
@ -69,9 +67,6 @@ struct faPatchData
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Typedef
|
||||
faPatchList
|
||||
foam::faPatchList
|
||||
|
||||
Description
|
||||
Container classes for faPatch
|
||||
|
||||
@ -23,21 +23,14 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faPatch.H"
|
||||
#include "dictionary.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<faPatch> faPatch::New
|
||||
Foam::autoPtr<Foam::faPatch> Foam::faPatch::New
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
@ -45,27 +38,18 @@ autoPtr<faPatch> faPatch::New
|
||||
const faBoundaryMesh& bm
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "faPatch::New(const word&, const dictionary&, const label, "
|
||||
"const faBoundaryMesh&) : constructing faPatch"
|
||||
<< endl;
|
||||
}
|
||||
DebugInFunction
|
||||
<< "constructing faPatch" << endl;
|
||||
|
||||
word patchType(dict.lookup("type"));
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(patchType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"faPatch::New(const word&, const dictionary&, "
|
||||
"const label, const faBoundaryMesh&)",
|
||||
dict
|
||||
) << "Unknown faPatch type " << patchType << endl << endl
|
||||
<< "Valid faPatch types are :" << endl
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Unknown faPatch type " << patchType << nl << nl
|
||||
<< "Valid faPatch types are :" << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
@ -74,8 +58,4 @@ autoPtr<faPatch> faPatch::New
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -30,12 +30,12 @@ License
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> > Foam::faPatch::patchInternalField
|
||||
Foam::tmp<Foam::Field<Type>> Foam::faPatch::patchInternalField
|
||||
(
|
||||
const UList<Type>& f
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type> > tpif(new Field<Type>(size()));
|
||||
tmp<Field<Type>> tpif (new Field<Type>(size()));
|
||||
Field<Type>& pif = tpif.ref();
|
||||
|
||||
const labelUList& edgeFaces = this->edgeFaces();
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
faSolution
|
||||
Foam::faSolution
|
||||
|
||||
Description
|
||||
Selector class for finite area solution.
|
||||
@ -64,13 +64,11 @@ class faSolution
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from objectRegistry
|
||||
faSolution(const objectRegistry& obr)
|
||||
:
|
||||
solution(obr, "faSolution")
|
||||
{}
|
||||
//- Construct from objectRegistry
|
||||
faSolution(const objectRegistry& obr)
|
||||
:
|
||||
solution(obr, "faSolution")
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faMesh.H"
|
||||
@ -50,7 +48,7 @@ defineTemplateTypeNameAndDebug(areaSymmTensorField, 0);
|
||||
defineTemplateTypeNameAndDebug(areaTensorField, 0);
|
||||
|
||||
template<>
|
||||
tmp<GeometricField<scalar, faPatchField, areaMesh> >
|
||||
tmp<GeometricField<scalar, faPatchField, areaMesh>>
|
||||
GeometricField<scalar, faPatchField, areaMesh>::component
|
||||
(
|
||||
const direction
|
||||
@ -74,4 +72,3 @@ void GeometricField<scalar, faPatchField, areaMesh>::replace
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
areaFields
|
||||
Foam::areaFields
|
||||
|
||||
Description
|
||||
Finite area area (element) fields
|
||||
@ -57,7 +57,7 @@ namespace Foam
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<>
|
||||
tmp<GeometricField<scalar, faPatchField, areaMesh> >
|
||||
tmp<GeometricField<scalar, faPatchField, areaMesh>>
|
||||
GeometricField<scalar, faPatchField, areaMesh>::component
|
||||
(
|
||||
const direction
|
||||
|
||||
@ -31,7 +31,6 @@ Description
|
||||
SourceFiles
|
||||
areaFields.C
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef areaFieldsFwd_H
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faMesh.H"
|
||||
@ -55,4 +53,3 @@ defineTemplateTypeNameAndDebug(edgeTensorField, 0);
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@ Description
|
||||
SourceFiles
|
||||
edgeFields.C
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef edgeFieldsFwd_H
|
||||
|
||||
@ -28,15 +28,10 @@ License
|
||||
#include "basicSymmetryFaPatchField.H"
|
||||
#include "symmTransformField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
Foam::basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -47,7 +42,7 @@ basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
Foam::basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
(
|
||||
const basicSymmetryFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -60,7 +55,7 @@ basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
Foam::basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -74,7 +69,7 @@ basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
Foam::basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
(
|
||||
const basicSymmetryFaPatchField<Type>& ptf
|
||||
)
|
||||
@ -84,7 +79,7 @@ basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
Foam::basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
(
|
||||
const basicSymmetryFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -96,9 +91,9 @@ basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Return gradient at boundary
|
||||
template<class Type>
|
||||
tmp<Field<Type> > basicSymmetryFaPatchField<Type>::snGrad() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::basicSymmetryFaPatchField<Type>::snGrad() const
|
||||
{
|
||||
const vectorField nHat(this->patch().edgeNormals());
|
||||
|
||||
@ -110,9 +105,8 @@ tmp<Field<Type> > basicSymmetryFaPatchField<Type>::snGrad() const
|
||||
}
|
||||
|
||||
|
||||
// Evaluate the field on the patch
|
||||
template<class Type>
|
||||
void basicSymmetryFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
void Foam::basicSymmetryFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
{
|
||||
if (!this->updated())
|
||||
{
|
||||
@ -132,9 +126,9 @@ void basicSymmetryFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
}
|
||||
|
||||
|
||||
// Return defining fields
|
||||
template<class Type>
|
||||
tmp<Field<Type> > basicSymmetryFaPatchField<Type>::snGradTransformDiag() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::basicSymmetryFaPatchField<Type>::snGradTransformDiag() const
|
||||
{
|
||||
const vectorField nHat(this->patch().edgeNormals());
|
||||
vectorField diag(nHat.size());
|
||||
@ -147,8 +141,4 @@ tmp<Field<Type> > basicSymmetryFaPatchField<Type>::snGradTransformDiag() const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -50,7 +50,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicSymmetryFaPatchField Declaration
|
||||
Class basicSymmetryFaPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -61,10 +61,6 @@ class basicSymmetryFaPatchField
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName(symmetryFaPatch::typeName_());
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
@ -98,9 +94,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new basicSymmetryFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -114,12 +110,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new basicSymmetryFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
@ -131,7 +127,7 @@ public:
|
||||
// Evaluation functions
|
||||
|
||||
//- Return gradient at boundary
|
||||
virtual tmp<Field<Type> > snGrad() const;
|
||||
virtual tmp<Field<Type>> snGrad() const;
|
||||
|
||||
//- Evaluate the patch field
|
||||
// Default argument needed to allow call in constructors
|
||||
@ -142,14 +138,14 @@ public:
|
||||
);
|
||||
|
||||
//- Return face-gradient transform diagonal
|
||||
virtual tmp<Field<Type> > snGradTransformDiag() const;
|
||||
virtual tmp<Field<Type>> snGradTransformDiag() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
|
||||
|
||||
template<>
|
||||
tmp<scalarField > basicSymmetryFaPatchField<scalar>::snGrad() const;
|
||||
tmp<scalarField> basicSymmetryFaPatchField<scalar>::snGrad() const;
|
||||
|
||||
template<>
|
||||
void basicSymmetryFaPatchField<scalar>::evaluate
|
||||
@ -165,7 +161,7 @@ void basicSymmetryFaPatchField<scalar>::evaluate
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "basicSymmetryFaPatchField.C"
|
||||
#include "basicSymmetryFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -28,22 +28,21 @@ License
|
||||
#include "basicSymmetryFaPatchField.H"
|
||||
#include "areaFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<>
|
||||
tmp<scalarField > basicSymmetryFaPatchField<scalar>::snGrad() const
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::basicSymmetryFaPatchField<Foam::scalar>::snGrad() const
|
||||
{
|
||||
return tmp<scalarField >(new scalarField(size(), 0.0));
|
||||
return tmp<scalarField>(new scalarField(size(), 0.0));
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
void basicSymmetryFaPatchField<scalar>::evaluate(const Pstream::commsTypes)
|
||||
void Foam::basicSymmetryFaPatchField<Foam::scalar>::evaluate
|
||||
(
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
{
|
||||
if (!updated())
|
||||
{
|
||||
@ -54,8 +53,4 @@ void basicSymmetryFaPatchField<scalar>::evaluate(const Pstream::commsTypes)
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -30,19 +30,17 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
template<class Type>
|
||||
const word& faPatchField<Type>::calculatedType()
|
||||
const Foam::word& Foam::faPatchField<Type>::calculatedType()
|
||||
{
|
||||
return calculatedFaPatchField<Type>::typeName;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
Foam::calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -53,7 +51,7 @@ calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
Foam::calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
(
|
||||
const calculatedFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -66,7 +64,7 @@ calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
Foam::calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -78,7 +76,7 @@ calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
Foam::calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
(
|
||||
const calculatedFaPatchField<Type>& ptf
|
||||
)
|
||||
@ -88,7 +86,7 @@ calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
Foam::calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
(
|
||||
const calculatedFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -100,7 +98,7 @@ calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||
|
||||
template<class Type>
|
||||
template<class Type2>
|
||||
tmp<faPatchField<Type> > faPatchField<Type>::NewCalculatedType
|
||||
Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::NewCalculatedType
|
||||
(
|
||||
const faPatchField<Type2>& pf
|
||||
)
|
||||
@ -108,7 +106,7 @@ tmp<faPatchField<Type> > faPatchField<Type>::NewCalculatedType
|
||||
typename patchConstructorTable::iterator patchTypeCstrIter =
|
||||
patchConstructorTablePtr_->find(pf.patch().type());
|
||||
|
||||
if (patchTypeCstrIter != patchConstructorTablePtr_->end())
|
||||
if (patchTypeCstrIter.found())
|
||||
{
|
||||
return patchTypeCstrIter()
|
||||
(
|
||||
@ -118,7 +116,7 @@ tmp<faPatchField<Type> > faPatchField<Type>::NewCalculatedType
|
||||
}
|
||||
else
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new calculatedFaPatchField<Type>
|
||||
(
|
||||
@ -133,17 +131,14 @@ tmp<faPatchField<Type> > faPatchField<Type>::NewCalculatedType
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > calculatedFaPatchField<Type>::valueInternalCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::calculatedFaPatchField<Type>::valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"calculatedFaPatchField<Type>::"
|
||||
"valueInternalCoeffs(const tmp<scalarField>&) const"
|
||||
) << "\n "
|
||||
"valueInternalCoeffs cannot be called for a calculatedFaPatchField"
|
||||
FatalErrorInFunction
|
||||
<< "valueInternalCoeffs cannot be called for a calculatedFaPatchField"
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
@ -156,17 +151,14 @@ tmp<Field<Type> > calculatedFaPatchField<Type>::valueInternalCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > calculatedFaPatchField<Type>::valueBoundaryCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::calculatedFaPatchField<Type>::valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"calculatedFaPatchField<Type>::"
|
||||
"valueBoundaryCoeffs(const tmp<scalarField>&) const"
|
||||
) << "\n "
|
||||
"valueBoundaryCoeffs cannot be called for a calculatedFaPatchField"
|
||||
FatalErrorInFunction
|
||||
<< "valueBoundaryCoeffs cannot be called for a calculatedFaPatchField"
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
@ -179,14 +171,11 @@ tmp<Field<Type> > calculatedFaPatchField<Type>::valueBoundaryCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > calculatedFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::calculatedFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"calculatedFaPatchField<Type>::"
|
||||
"gradientInternalCoeffs() const"
|
||||
) << "\n "
|
||||
"gradientInternalCoeffs cannot be called for a "
|
||||
FatalErrorInFunction
|
||||
<< "gradientInternalCoeffs cannot be called for a "
|
||||
"calculatedFaPatchField"
|
||||
<< "\n on patch " << this->patch().name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
@ -200,13 +189,11 @@ tmp<Field<Type> > calculatedFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > calculatedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::calculatedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"calculatedFaPatchField<Type>::"
|
||||
"gradientBoundaryCoeffs() const"
|
||||
) << "\n "
|
||||
FatalErrorInFunction
|
||||
<< "\n "
|
||||
"gradientBoundaryCoeffs cannot be called for a "
|
||||
"calculatedFaPatchField"
|
||||
<< "\n on patch " << this->patch().name()
|
||||
@ -220,17 +207,12 @@ tmp<Field<Type> > calculatedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
}
|
||||
|
||||
|
||||
// Write
|
||||
template<class Type>
|
||||
void calculatedFaPatchField<Type>::write(Ostream& os) const
|
||||
void Foam::calculatedFaPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
faPatchField<Type>::write(os);
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
calculatedFaPatchField
|
||||
Foam::calculatedFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
@ -96,9 +96,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new calculatedFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -112,12 +112,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new calculatedFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
@ -141,25 +141,25 @@ public:
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
||||
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
||||
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
tmp<Field<Type> > gradientInternalCoeffs() const;
|
||||
tmp<Field<Type>> gradientInternalCoeffs() const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
||||
tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||
|
||||
|
||||
//- Write
|
||||
@ -174,7 +174,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "calculatedFaPatchField.C"
|
||||
#include "calculatedFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faPatchFields.H"
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
calculatedFaPatchFields
|
||||
Foam::calculatedFaPatchFields
|
||||
|
||||
Description
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
calculatedFaPatchField
|
||||
Foam::calculatedFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
|
||||
@ -27,15 +27,10 @@ License
|
||||
|
||||
#include "coupledFaPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
coupledFaPatchField<Type>::coupledFaPatchField
|
||||
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -47,7 +42,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
coupledFaPatchField<Type>::coupledFaPatchField
|
||||
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -60,7 +55,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
coupledFaPatchField<Type>::coupledFaPatchField
|
||||
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||
(
|
||||
const coupledFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -74,7 +69,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
coupledFaPatchField<Type>::coupledFaPatchField
|
||||
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -87,7 +82,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
coupledFaPatchField<Type>::coupledFaPatchField
|
||||
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||
(
|
||||
const coupledFaPatchField<Type>& ptf
|
||||
)
|
||||
@ -98,7 +93,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
coupledFaPatchField<Type>::coupledFaPatchField
|
||||
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||
(
|
||||
const coupledFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -112,7 +107,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > coupledFaPatchField<Type>::snGrad() const
|
||||
Foam::tmp<Foam::Field<Type>> Foam::coupledFaPatchField<Type>::snGrad() const
|
||||
{
|
||||
return
|
||||
(patchNeighbourField() - this->patchInternalField())
|
||||
@ -121,7 +116,7 @@ tmp<Field<Type> > coupledFaPatchField<Type>::snGrad() const
|
||||
|
||||
|
||||
template<class Type>
|
||||
void coupledFaPatchField<Type>::initEvaluate(const Pstream::commsTypes)
|
||||
void Foam::coupledFaPatchField<Type>::initEvaluate(const Pstream::commsTypes)
|
||||
{
|
||||
if (!this->updated())
|
||||
{
|
||||
@ -131,7 +126,7 @@ void coupledFaPatchField<Type>::initEvaluate(const Pstream::commsTypes)
|
||||
|
||||
|
||||
template<class Type>
|
||||
void coupledFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
void Foam::coupledFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
{
|
||||
Field<Type>::operator=
|
||||
(
|
||||
@ -142,7 +137,8 @@ void coupledFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > coupledFaPatchField<Type>::valueInternalCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::coupledFaPatchField<Type>::valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>& w
|
||||
) const
|
||||
@ -152,7 +148,8 @@ tmp<Field<Type> > coupledFaPatchField<Type>::valueInternalCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > coupledFaPatchField<Type>::valueBoundaryCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::coupledFaPatchField<Type>::valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>& w
|
||||
) const
|
||||
@ -162,29 +159,27 @@ tmp<Field<Type> > coupledFaPatchField<Type>::valueBoundaryCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > coupledFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::coupledFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
{
|
||||
return -Type(pTraits<Type>::one)*this->patch().deltaCoeffs();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > coupledFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::coupledFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
{
|
||||
return -gradientInternalCoeffs();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void coupledFaPatchField<Type>::write(Ostream& os) const
|
||||
void Foam::coupledFaPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
faPatchField<Type>::write(os);
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
coupledFaPatchField
|
||||
Foam::coupledFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
@ -50,7 +50,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class coupledFaPatchField Declaration
|
||||
Class coupledFaPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -107,7 +107,7 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const = 0;
|
||||
virtual tmp<faPatchField<Type>> clone() const = 0;
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
coupledFaPatchField
|
||||
@ -117,7 +117,7 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>&
|
||||
) const = 0;
|
||||
@ -135,13 +135,13 @@ public:
|
||||
}
|
||||
|
||||
//- Return neighbour field of internal field
|
||||
virtual tmp<Field<Type> > patchNeighbourField() const = 0;
|
||||
virtual tmp<Field<Type>> patchNeighbourField() const = 0;
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Return patch-normal gradient
|
||||
virtual tmp<Field<Type> > snGrad() const;
|
||||
virtual tmp<Field<Type>> snGrad() const;
|
||||
|
||||
//- Initialise the evaluation of the patch field
|
||||
virtual void initEvaluate
|
||||
@ -157,25 +157,25 @@ public:
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
||||
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
||||
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientInternalCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientInternalCoeffs() const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||
|
||||
|
||||
// Coupled interface functionality
|
||||
@ -220,7 +220,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "coupledFaPatchField.C"
|
||||
#include "coupledFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -26,17 +26,11 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fixedGradientFaPatchField.H"
|
||||
#include "dictionary.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -48,7 +42,7 @@ fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
(
|
||||
const fixedGradientFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -62,7 +56,7 @@ fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -77,7 +71,7 @@ fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
(
|
||||
const fixedGradientFaPatchField<Type>& ptf
|
||||
)
|
||||
@ -88,7 +82,7 @@ fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
(
|
||||
const fixedGradientFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -102,7 +96,7 @@ fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void fixedGradientFaPatchField<Type>::autoMap
|
||||
void Foam::fixedGradientFaPatchField<Type>::autoMap
|
||||
(
|
||||
const faPatchFieldMapper& m
|
||||
)
|
||||
@ -113,7 +107,7 @@ void fixedGradientFaPatchField<Type>::autoMap
|
||||
|
||||
|
||||
template<class Type>
|
||||
void fixedGradientFaPatchField<Type>::rmap
|
||||
void Foam::fixedGradientFaPatchField<Type>::rmap
|
||||
(
|
||||
const faPatchField<Type>& ptf,
|
||||
const labelList& addr
|
||||
@ -122,14 +116,14 @@ void fixedGradientFaPatchField<Type>::rmap
|
||||
faPatchField<Type>::rmap(ptf, addr);
|
||||
|
||||
const fixedGradientFaPatchField<Type>& fgptf =
|
||||
refCast<const fixedGradientFaPatchField<Type> >(ptf);
|
||||
refCast<const fixedGradientFaPatchField<Type>>(ptf);
|
||||
|
||||
gradient_.rmap(fgptf.gradient_, addr);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void fixedGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
void Foam::fixedGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
{
|
||||
if (!this->updated())
|
||||
{
|
||||
@ -146,17 +140,19 @@ void fixedGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > fixedGradientFaPatchField<Type>::valueInternalCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::fixedGradientFaPatchField<Type>::valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
{
|
||||
return tmp<Field<Type> >(new Field<Type>(this->size(), pTraits<Type>::one));
|
||||
return tmp<Field<Type>>(new Field<Type>(this->size(), pTraits<Type>::one));
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > fixedGradientFaPatchField<Type>::valueBoundaryCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::fixedGradientFaPatchField<Type>::valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
@ -166,10 +162,10 @@ tmp<Field<Type> > fixedGradientFaPatchField<Type>::valueBoundaryCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> >
|
||||
fixedGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::fixedGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
{
|
||||
return tmp<Field<Type> >
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||
);
|
||||
@ -177,23 +173,19 @@ fixedGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> >
|
||||
fixedGradientFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::fixedGradientFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
{
|
||||
return gradient();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void fixedGradientFaPatchField<Type>::write(Ostream& os) const
|
||||
void Foam::fixedGradientFaPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
faPatchField<Type>::write(os);
|
||||
gradient_.writeEntry("gradient", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
fixedGradientFaPatchField
|
||||
Foam::fixedGradientFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
@ -48,7 +48,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedGradientFaPatch Declaration
|
||||
Class fixedGradientFaPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -101,9 +101,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new fixedGradientFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -117,12 +117,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new fixedGradientFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
@ -164,7 +164,7 @@ public:
|
||||
// Evaluation functions
|
||||
|
||||
//- Return gradient at boundary
|
||||
virtual tmp<Field<Type> > snGrad() const
|
||||
virtual tmp<Field<Type>> snGrad() const
|
||||
{
|
||||
return gradient_;
|
||||
}
|
||||
@ -172,31 +172,32 @@ public:
|
||||
//- Evaluate the patch field
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType = Pstream::commsTypes::blocking
|
||||
const Pstream::commsTypes commsType =
|
||||
Pstream::commsTypes::blocking
|
||||
);
|
||||
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
||||
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
||||
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientInternalCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientInternalCoeffs() const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||
|
||||
|
||||
//- Write
|
||||
@ -211,7 +212,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "fixedGradientFaPatchField.C"
|
||||
#include "fixedGradientFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faPatchFields.H"
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
fixedGradientFaPatchFields
|
||||
Foam::fixedGradientFaPatchFields
|
||||
|
||||
Description
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
fixedGradientFaPatchField
|
||||
Foam::fixedGradientFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
|
||||
@ -27,15 +27,10 @@ License
|
||||
|
||||
#include "fixedValueFaPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
Foam::fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -46,7 +41,7 @@ fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
Foam::fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -58,7 +53,7 @@ fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
Foam::fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
(
|
||||
const fixedValueFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -69,7 +64,7 @@ fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
Foam::fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
(
|
||||
const fixedValueFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -82,7 +77,7 @@ fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
Foam::fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
(
|
||||
const fixedValueFaPatchField<Type>& ptf
|
||||
)
|
||||
@ -94,12 +89,13 @@ fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > fixedValueFaPatchField<Type>::valueInternalCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::fixedValueFaPatchField<Type>::valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
{
|
||||
return tmp<Field<Type> >
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||
);
|
||||
@ -107,7 +103,8 @@ tmp<Field<Type> > fixedValueFaPatchField<Type>::valueInternalCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > fixedValueFaPatchField<Type>::valueBoundaryCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::fixedValueFaPatchField<Type>::valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
@ -117,30 +114,28 @@ tmp<Field<Type> > fixedValueFaPatchField<Type>::valueBoundaryCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > fixedValueFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::fixedValueFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
{
|
||||
return -Type(pTraits<Type>::one)*this->patch().deltaCoeffs();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > fixedValueFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::fixedValueFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
{
|
||||
return this->patch().deltaCoeffs()*(*this);
|
||||
}
|
||||
|
||||
|
||||
// Write
|
||||
template<class Type>
|
||||
void fixedValueFaPatchField<Type>::write(Ostream& os) const
|
||||
void Foam::fixedValueFaPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
faPatchField<Type>::write(os);
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
fixedValueFaPatchField
|
||||
Foam::fixedValueFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
@ -48,7 +48,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedValueFaPatch Declaration
|
||||
Class fixedValueFaPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -97,9 +97,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new fixedValueFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -113,12 +113,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new fixedValueFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
@ -142,25 +142,25 @@ public:
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
||||
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
||||
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientInternalCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientInternalCoeffs() const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||
|
||||
|
||||
//- Write
|
||||
@ -198,7 +198,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "fixedValueFaPatchField.C"
|
||||
#include "fixedValueFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -27,15 +27,10 @@ License
|
||||
|
||||
#include "mixedFaPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
mixedFaPatchField<Type>::mixedFaPatchField
|
||||
Foam::mixedFaPatchField<Type>::mixedFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -49,7 +44,7 @@ mixedFaPatchField<Type>::mixedFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
mixedFaPatchField<Type>::mixedFaPatchField
|
||||
Foam::mixedFaPatchField<Type>::mixedFaPatchField
|
||||
(
|
||||
const mixedFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -65,7 +60,7 @@ mixedFaPatchField<Type>::mixedFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
mixedFaPatchField<Type>::mixedFaPatchField
|
||||
Foam::mixedFaPatchField<Type>::mixedFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -82,7 +77,7 @@ mixedFaPatchField<Type>::mixedFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
mixedFaPatchField<Type>::mixedFaPatchField
|
||||
Foam::mixedFaPatchField<Type>::mixedFaPatchField
|
||||
(
|
||||
const mixedFaPatchField<Type>& ptf
|
||||
)
|
||||
@ -95,7 +90,7 @@ mixedFaPatchField<Type>::mixedFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
mixedFaPatchField<Type>::mixedFaPatchField
|
||||
Foam::mixedFaPatchField<Type>::mixedFaPatchField
|
||||
(
|
||||
const mixedFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -111,7 +106,7 @@ mixedFaPatchField<Type>::mixedFaPatchField
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void mixedFaPatchField<Type>::autoMap
|
||||
void Foam::mixedFaPatchField<Type>::autoMap
|
||||
(
|
||||
const faPatchFieldMapper& m
|
||||
)
|
||||
@ -124,7 +119,7 @@ void mixedFaPatchField<Type>::autoMap
|
||||
|
||||
|
||||
template<class Type>
|
||||
void mixedFaPatchField<Type>::rmap
|
||||
void Foam::mixedFaPatchField<Type>::rmap
|
||||
(
|
||||
const faPatchField<Type>& ptf,
|
||||
const labelList& addr
|
||||
@ -133,7 +128,7 @@ void mixedFaPatchField<Type>::rmap
|
||||
faPatchField<Type>::rmap(ptf, addr);
|
||||
|
||||
const mixedFaPatchField<Type>& mptf =
|
||||
refCast<const mixedFaPatchField<Type> >(ptf);
|
||||
refCast<const mixedFaPatchField<Type>>(ptf);
|
||||
|
||||
refValue_.rmap(mptf.refValue_, addr);
|
||||
refGrad_.rmap(mptf.refGrad_, addr);
|
||||
@ -142,7 +137,7 @@ void mixedFaPatchField<Type>::rmap
|
||||
|
||||
|
||||
template<class Type>
|
||||
void mixedFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
void Foam::mixedFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
{
|
||||
if (!this->updated())
|
||||
{
|
||||
@ -165,7 +160,7 @@ void mixedFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > mixedFaPatchField<Type>::snGrad() const
|
||||
Foam::tmp<Foam::Field<Type>> Foam::mixedFaPatchField<Type>::snGrad() const
|
||||
{
|
||||
return
|
||||
valueFraction_
|
||||
@ -176,18 +171,17 @@ tmp<Field<Type> > mixedFaPatchField<Type>::snGrad() const
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > mixedFaPatchField<Type>::valueInternalCoeffs
|
||||
Foam::tmp<Foam::Field<Type>> Foam::mixedFaPatchField<Type>::valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
{
|
||||
return Type(pTraits<Type>::one)*(1.0 - valueFraction_);
|
||||
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > mixedFaPatchField<Type>::valueBoundaryCoeffs
|
||||
Foam::tmp<Foam::Field<Type>> Foam::mixedFaPatchField<Type>::valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
@ -199,14 +193,16 @@ tmp<Field<Type> > mixedFaPatchField<Type>::valueBoundaryCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > mixedFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::mixedFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
{
|
||||
return -Type(pTraits<Type>::one)*valueFraction_*this->patch().deltaCoeffs();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > mixedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::mixedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
{
|
||||
return
|
||||
valueFraction_*this->patch().deltaCoeffs()*refValue_
|
||||
@ -215,7 +211,7 @@ tmp<Field<Type> > mixedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
|
||||
|
||||
template<class Type>
|
||||
void mixedFaPatchField<Type>::write(Ostream& os) const
|
||||
void Foam::mixedFaPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
faPatchField<Type>::write(os);
|
||||
refValue_.writeEntry("refValue", os);
|
||||
@ -225,8 +221,4 @@ void mixedFaPatchField<Type>::write(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
mixedFaPatchField
|
||||
Foam::mixedFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
@ -48,7 +48,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class mixedFaPatchField Declaration
|
||||
Class mixedFaPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -107,9 +107,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new mixedFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -123,12 +123,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new mixedFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
@ -200,7 +200,7 @@ public:
|
||||
// Evaluation functions
|
||||
|
||||
//- Return gradient at boundary
|
||||
virtual tmp<Field<Type> > snGrad() const;
|
||||
virtual tmp<Field<Type>> snGrad() const;
|
||||
|
||||
//- Evaluate the patch field
|
||||
virtual void evaluate
|
||||
@ -210,25 +210,25 @@ public:
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
||||
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
||||
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientInternalCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientInternalCoeffs() const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||
|
||||
|
||||
//- Write
|
||||
@ -266,7 +266,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "mixedFaPatchField.C"
|
||||
#include "mixedFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -26,18 +26,12 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "transformFaPatchField.H"
|
||||
#include "IOstreams.H"
|
||||
#include "transformField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
transformFaPatchField<Type>::transformFaPatchField
|
||||
Foam::transformFaPatchField<Type>::transformFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -48,7 +42,7 @@ transformFaPatchField<Type>::transformFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
transformFaPatchField<Type>::transformFaPatchField
|
||||
Foam::transformFaPatchField<Type>::transformFaPatchField
|
||||
(
|
||||
const transformFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -61,7 +55,7 @@ transformFaPatchField<Type>::transformFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
transformFaPatchField<Type>::transformFaPatchField
|
||||
Foam::transformFaPatchField<Type>::transformFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -73,7 +67,7 @@ transformFaPatchField<Type>::transformFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
transformFaPatchField<Type>::transformFaPatchField
|
||||
Foam::transformFaPatchField<Type>::transformFaPatchField
|
||||
(
|
||||
const transformFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -85,10 +79,9 @@ transformFaPatchField<Type>::transformFaPatchField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the value of this patchField
|
||||
template<class Type>
|
||||
tmp<Field<Type> > transformFaPatchField<Type>::valueInternalCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::transformFaPatchField<Type>::valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
@ -97,10 +90,9 @@ tmp<Field<Type> > transformFaPatchField<Type>::valueInternalCoeffs
|
||||
}
|
||||
|
||||
|
||||
// Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the value of this patchField
|
||||
template<class Type>
|
||||
tmp<Field<Type> > transformFaPatchField<Type>::valueBoundaryCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::transformFaPatchField<Type>::valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
@ -115,19 +107,17 @@ tmp<Field<Type> > transformFaPatchField<Type>::valueBoundaryCoeffs
|
||||
}
|
||||
|
||||
|
||||
// Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
template<class Type>
|
||||
tmp<Field<Type> > transformFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::transformFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
{
|
||||
return -this->patch().deltaCoeffs()*snGradTransformDiag();
|
||||
}
|
||||
|
||||
|
||||
// Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
template<class Type>
|
||||
tmp<Field<Type> > transformFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::transformFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
{
|
||||
return
|
||||
snGrad()
|
||||
@ -138,7 +128,7 @@ tmp<Field<Type> > transformFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void transformFaPatchField<Type>::operator=
|
||||
void Foam::transformFaPatchField<Type>::operator=
|
||||
(
|
||||
const faPatchField<Type>& ptf
|
||||
)
|
||||
@ -147,8 +137,4 @@ void transformFaPatchField<Type>::operator=
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
transformFaPatchField
|
||||
Foam::transformFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
@ -49,7 +49,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class transformFvPatch Declaration
|
||||
Class transformFaPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -92,7 +92,7 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const = 0;
|
||||
virtual tmp<faPatchField<Type>> clone() const = 0;
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
transformFaPatchField
|
||||
@ -102,7 +102,7 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>&
|
||||
) const = 0;
|
||||
@ -113,32 +113,32 @@ public:
|
||||
// Evaluation functions
|
||||
|
||||
//- Return gradient at boundary
|
||||
virtual tmp<Field<Type> > snGrad() const = 0;
|
||||
virtual tmp<Field<Type>> snGrad() const = 0;
|
||||
|
||||
//- Return face-gradient transform diagonal
|
||||
virtual tmp<Field<Type> > snGradTransformDiag() const = 0;
|
||||
virtual tmp<Field<Type>> snGradTransformDiag() const = 0;
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
||||
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
||||
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientInternalCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientInternalCoeffs() const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||
|
||||
|
||||
// Member operators
|
||||
@ -150,7 +150,7 @@ public:
|
||||
// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
|
||||
|
||||
template<>
|
||||
tmp<scalarField > transformFaPatchField<scalar>::gradientInternalCoeffs() const;
|
||||
tmp<scalarField> transformFaPatchField<scalar>::gradientInternalCoeffs() const;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -160,7 +160,7 @@ tmp<scalarField > transformFaPatchField<scalar>::gradientInternalCoeffs() const;
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "transformFaPatchField.C"
|
||||
#include "transformFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faPatchFields.H"
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
transformFaPatchFields
|
||||
Foam::transformFaPatchFields
|
||||
|
||||
Description
|
||||
|
||||
|
||||
@ -23,9 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
transformFvPatchField
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef transformFaPatchFieldsFwd_H
|
||||
|
||||
@ -23,29 +23,18 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "transformFaPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
template<>
|
||||
tmp<scalarField > transformFaPatchField<scalar>::gradientInternalCoeffs() const
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::transformFaPatchField<Foam::scalar>::gradientInternalCoeffs() const
|
||||
{
|
||||
return tmp<scalarField >(new scalarField(size(), 0.0));
|
||||
return tmp<scalarField>(new scalarField(size(), 0.0));
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -28,15 +28,10 @@ License
|
||||
#include "zeroGradientFaPatchField.H"
|
||||
#include "faPatchFieldMapper.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
Foam::zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -47,7 +42,7 @@ zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
Foam::zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
(
|
||||
const zeroGradientFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -60,7 +55,7 @@ zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
Foam::zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -74,7 +69,7 @@ zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
Foam::zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
(
|
||||
const zeroGradientFaPatchField& zgpf
|
||||
)
|
||||
@ -84,7 +79,7 @@ zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
Foam::zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
(
|
||||
const zeroGradientFaPatchField& zgpf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -97,7 +92,7 @@ zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void zeroGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
void Foam::zeroGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
{
|
||||
if (!this->updated())
|
||||
{
|
||||
@ -110,12 +105,13 @@ void zeroGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > zeroGradientFaPatchField<Type>::valueInternalCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::zeroGradientFaPatchField<Type>::valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
{
|
||||
return tmp<Field<Type> >
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>(this->size(), pTraits<Type>::one)
|
||||
);
|
||||
@ -123,12 +119,13 @@ tmp<Field<Type> > zeroGradientFaPatchField<Type>::valueInternalCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > zeroGradientFaPatchField<Type>::valueBoundaryCoeffs
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::zeroGradientFaPatchField<Type>::valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
{
|
||||
return tmp<Field<Type> >
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||
);
|
||||
@ -136,9 +133,10 @@ tmp<Field<Type> > zeroGradientFaPatchField<Type>::valueBoundaryCoeffs
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > zeroGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::zeroGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
{
|
||||
return tmp<Field<Type> >
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||
);
|
||||
@ -146,17 +144,14 @@ tmp<Field<Type> > zeroGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > zeroGradientFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::zeroGradientFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||
{
|
||||
return tmp<Field<Type> >
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
zeroGradientFaPatchField
|
||||
Foam::zeroGradientFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
@ -48,7 +48,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class zeroGradientFaPatchField Declaration
|
||||
Class zeroGradientFaPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -97,9 +97,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new zeroGradientFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -113,12 +113,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new zeroGradientFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
@ -135,9 +135,9 @@ public:
|
||||
// Evaluation functions
|
||||
|
||||
//- Return gradient at boundary
|
||||
virtual tmp<Field<Type> > snGrad() const
|
||||
virtual tmp<Field<Type>> snGrad() const
|
||||
{
|
||||
return tmp<Field<Type> >
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||
);
|
||||
@ -151,25 +151,25 @@ public:
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
||||
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
||||
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const;
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientInternalCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientInternalCoeffs() const;
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
||||
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||
};
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "zeroGradientFaPatchField.C"
|
||||
#include "zeroGradientFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faPatchFields.H"
|
||||
|
||||
@ -23,9 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
zeroGradientFaPatchFields
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
|
||||
@ -23,11 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
zeroGradientFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef zeroGradientFaPatchFieldsFwd_H
|
||||
|
||||
@ -27,15 +27,10 @@ License
|
||||
|
||||
#include "cyclicFaPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -47,7 +42,7 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
(
|
||||
const cyclicFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -58,18 +53,10 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
coupledFaPatchField<Type>(ptf, p, iF, mapper),
|
||||
cyclicPatch_(refCast<const cyclicFaPatch>(p))
|
||||
{
|
||||
if (!isType<cyclicFaPatch>(this->patch()))
|
||||
if (!isA<cyclicFaPatch>(this->patch()))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"cyclicFaPatchField<Type>::cyclicFaPatchField\n"
|
||||
"(\n"
|
||||
" const cyclicFaPatchField<Type>& ptf,\n"
|
||||
" const faPatch& p,\n"
|
||||
" const DimensionedField<Type, areaMesh>& iF,\n"
|
||||
" const faPatchFieldMapper& mapper\n"
|
||||
")\n"
|
||||
) << "\n patch type '" << p.type()
|
||||
FatalErrorInFunction
|
||||
<< "\n patch type '" << p.type()
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
@ -80,7 +67,7 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -90,18 +77,10 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
coupledFaPatchField<Type>(p, iF, dict),
|
||||
cyclicPatch_(refCast<const cyclicFaPatch>(p))
|
||||
{
|
||||
if (!isType<cyclicFaPatch>(p))
|
||||
if (!isA<cyclicFaPatch>(p))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"cyclicFaPatchField<Type>::cyclicFaPatchField\n"
|
||||
"(\n"
|
||||
" const faPatch& p,\n"
|
||||
" const Field<Type>& field,\n"
|
||||
" const dictionary& dict\n"
|
||||
")\n",
|
||||
dict
|
||||
) << "\n patch type '" << p.type()
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "\n patch type '" << p.type()
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
@ -114,7 +93,7 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
(
|
||||
const cyclicFaPatchField<Type>& ptf
|
||||
)
|
||||
@ -126,7 +105,7 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
(
|
||||
const cyclicFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -140,19 +119,20 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > cyclicFaPatchField<Type>::patchNeighbourField() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::cyclicFaPatchField<Type>::patchNeighbourField() const
|
||||
{
|
||||
const Field<Type>& iField = this->internalField();
|
||||
const labelUList& faceCells = cyclicPatch_.faceCells();
|
||||
|
||||
tmp<Field<Type> > tpnf(new Field<Type>(this->size()));
|
||||
tmp<Field<Type>> tpnf(new Field<Type>(this->size()));
|
||||
Field<Type>& pnf = tpnf.ref();
|
||||
|
||||
label sizeby2 = this->size()/2;
|
||||
|
||||
if (doTransform())
|
||||
{
|
||||
for (label facei=0; facei<sizeby2; facei++)
|
||||
for (label facei=0; facei<sizeby2; ++facei)
|
||||
{
|
||||
pnf[facei] = transform
|
||||
(
|
||||
@ -167,7 +147,7 @@ tmp<Field<Type> > cyclicFaPatchField<Type>::patchNeighbourField() const
|
||||
}
|
||||
else
|
||||
{
|
||||
for (label facei=0; facei<sizeby2; facei++)
|
||||
for (label facei=0; facei<sizeby2; ++facei)
|
||||
{
|
||||
pnf[facei] = iField[faceCells[facei + sizeby2]];
|
||||
pnf[facei + sizeby2] = iField[faceCells[facei]];
|
||||
@ -179,7 +159,7 @@ tmp<Field<Type> > cyclicFaPatchField<Type>::patchNeighbourField() const
|
||||
|
||||
|
||||
template<class Type>
|
||||
void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
||||
void Foam::cyclicFaPatchField<Type>::updateInterfaceMatrix
|
||||
(
|
||||
scalarField& result,
|
||||
const bool add,
|
||||
@ -194,7 +174,7 @@ void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
||||
label sizeby2 = this->size()/2;
|
||||
const labelUList& faceCells = cyclicPatch_.faceCells();
|
||||
|
||||
for (label facei = 0; facei < sizeby2; facei++)
|
||||
for (label facei = 0; facei < sizeby2; ++facei)
|
||||
{
|
||||
pnf[facei] = psiInternal[faceCells[facei + sizeby2]];
|
||||
pnf[facei + sizeby2] = psiInternal[faceCells[facei]];
|
||||
@ -222,7 +202,7 @@ void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
||||
|
||||
|
||||
template<class Type>
|
||||
void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
||||
void Foam::cyclicFaPatchField<Type>::updateInterfaceMatrix
|
||||
(
|
||||
Field<Type>& result,
|
||||
const bool add,
|
||||
@ -236,7 +216,7 @@ void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
||||
label sizeby2 = this->size()/2;
|
||||
const labelUList& faceCells = cyclicPatch_.faceCells();
|
||||
|
||||
for (label facei = 0; facei < sizeby2; facei++)
|
||||
for (label facei = 0; facei < sizeby2; ++facei)
|
||||
{
|
||||
pnf[facei] = psiInternal[faceCells[facei + sizeby2]];
|
||||
pnf[facei + sizeby2] = psiInternal[faceCells[facei]];
|
||||
@ -260,8 +240,4 @@ void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -52,7 +52,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class cyclicFaPatchField Declaration
|
||||
Class cyclicFaPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -71,7 +71,7 @@ class cyclicFaPatchField
|
||||
|
||||
//- Return neighbour side field given internal fields
|
||||
template<class Type2>
|
||||
tmp<Field<Type2> > neighbourSideField
|
||||
tmp<Field<Type2>> neighbourSideField
|
||||
(
|
||||
const Field<Type2>&
|
||||
) const;
|
||||
@ -116,9 +116,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new cyclicFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -132,12 +132,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new cyclicFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
@ -158,7 +158,7 @@ public:
|
||||
// Evaluation functions
|
||||
|
||||
//- Return neighbour coupled given internal cell data
|
||||
virtual tmp<Field<Type> > patchNeighbourField() const;
|
||||
virtual tmp<Field<Type>> patchNeighbourField() const;
|
||||
|
||||
|
||||
// Coupled interface functionality
|
||||
@ -230,7 +230,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "cyclicFaPatchField.C"
|
||||
#include "cyclicFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -29,15 +29,10 @@ License
|
||||
#include "faPatchFieldMapper.H"
|
||||
#include "areaFaMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
emptyFaPatchField<Type>::emptyFaPatchField
|
||||
Foam::emptyFaPatchField<Type>::emptyFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -48,7 +43,7 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
emptyFaPatchField<Type>::emptyFaPatchField
|
||||
Foam::emptyFaPatchField<Type>::emptyFaPatchField
|
||||
(
|
||||
const emptyFaPatchField<Type>&,
|
||||
const faPatch& p,
|
||||
@ -60,16 +55,8 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
||||
{
|
||||
if (!isType<emptyFaPatch>(p))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"emptyFaPatchField<Type>::emptyFaPatchField\n"
|
||||
"(\n"
|
||||
" const emptyFaPatchField<Type>&,\n"
|
||||
" const faPatch& p,\n"
|
||||
" const DimensionedField<Type, areaMesh>& iF,\n"
|
||||
" const faPatchFieldMapper& mapper\n"
|
||||
")\n"
|
||||
) << "\n patch type '" << p.type()
|
||||
FatalErrorInFunction
|
||||
<< "\n patch type '" << p.type()
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
@ -80,7 +67,7 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
emptyFaPatchField<Type>::emptyFaPatchField
|
||||
Foam::emptyFaPatchField<Type>::emptyFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -89,18 +76,10 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
||||
:
|
||||
faPatchField<Type>(p, iF, Field<Type>(0))
|
||||
{
|
||||
if (typeid(p) != typeid(emptyFaPatch))
|
||||
if (!isA<emptyFaPatch>(p))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"emptyFaPatchField<Type>::emptyFaPatchField\n"
|
||||
"(\n"
|
||||
" const faPatch& p,\n"
|
||||
" const DimensionedField<Type, areaMesh>& iF,\n"
|
||||
" const dictionary& dict\n"
|
||||
")\n",
|
||||
dict
|
||||
) << "\n patch type '" << p.type()
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "\n patch type '" << p.type()
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
@ -111,7 +90,7 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
emptyFaPatchField<Type>::emptyFaPatchField
|
||||
Foam::emptyFaPatchField<Type>::emptyFaPatchField
|
||||
(
|
||||
const emptyFaPatchField<Type>& ptf
|
||||
)
|
||||
@ -126,7 +105,7 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
emptyFaPatchField<Type>::emptyFaPatchField
|
||||
Foam::emptyFaPatchField<Type>::emptyFaPatchField
|
||||
(
|
||||
const emptyFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -139,9 +118,8 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void emptyFaPatchField<Type>::updateCoeffs()
|
||||
void Foam::emptyFaPatchField<Type>::updateCoeffs()
|
||||
{
|
||||
// ZT, 26/06/2010, bug-fix for faMesh of zero size
|
||||
if (this->dimensionedInternalField().mesh().nFaces())
|
||||
{
|
||||
if
|
||||
@ -150,18 +128,15 @@ void emptyFaPatchField<Type>::updateCoeffs()
|
||||
% this->dimensionedInternalField().mesh().nFaces()
|
||||
)
|
||||
{
|
||||
FatalErrorIn("emptyFaPatchField<Type>::updateCoeffs()")
|
||||
<< "This mesh contains patches of type empty but is not 1D or 2D\n"
|
||||
" by virtue of the fact that the number of faces of this\n"
|
||||
" empty patch is not divisible by the number of cells."
|
||||
<< exit(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "This mesh contains patches of type empty but is "
|
||||
<< "not 1D or 2D by virtue of the fact that the number of "
|
||||
<< "faces of this empty patch is not divisible by the number "
|
||||
<< "of cells."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
emptyFaPatchField
|
||||
Foam::emptyFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
@ -49,7 +49,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class emptyFaPatch Declaration
|
||||
Class emptyFaPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -97,9 +97,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new emptyFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -113,18 +113,23 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new emptyFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~emptyFaPatchField()
|
||||
{}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Mapping functions
|
||||
@ -155,36 +160,36 @@ public:
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
||||
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
{
|
||||
return tmp<Field<Type> >(new Field<Type>(0));
|
||||
return tmp<Field<Type>>(new Field<Type>(0));
|
||||
}
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the value of this patchField with given weights
|
||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
||||
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||
(
|
||||
const tmp<scalarField>&
|
||||
) const
|
||||
{
|
||||
return tmp<Field<Type> >(new Field<Type>(0));
|
||||
return tmp<Field<Type>>(new Field<Type>(0));
|
||||
}
|
||||
|
||||
//- Return the matrix diagonal coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
tmp<Field<Type> > gradientInternalCoeffs() const
|
||||
tmp<Field<Type>> gradientInternalCoeffs() const
|
||||
{
|
||||
return tmp<Field<Type> >(new Field<Type>(0));
|
||||
return tmp<Field<Type>>(new Field<Type>(0));
|
||||
}
|
||||
|
||||
//- Return the matrix source coefficients corresponding to the
|
||||
// evaluation of the gradient of this patchField
|
||||
tmp<Field<Type> > gradientBoundaryCoeffs() const
|
||||
tmp<Field<Type>> gradientBoundaryCoeffs() const
|
||||
{
|
||||
return tmp<Field<Type> >(new Field<Type>(0));
|
||||
return tmp<Field<Type>>(new Field<Type>(0));
|
||||
}
|
||||
};
|
||||
|
||||
@ -196,7 +201,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "emptyFaPatchField.C"
|
||||
#include "emptyFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faPatchFields.H"
|
||||
|
||||
@ -23,15 +23,11 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
emptyFaPatchFields
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
emptyFaPatchFields.C
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef emptyFaPatchFields_H
|
||||
|
||||
@ -23,11 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
emptyFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef emptyFaPatchFieldsFwd_H
|
||||
|
||||
@ -29,18 +29,12 @@ License
|
||||
#include "processorFaPatch.H"
|
||||
#include "IPstream.H"
|
||||
#include "OPstream.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "transformField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
processorFaPatchField<Type>::processorFaPatchField
|
||||
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -52,7 +46,7 @@ processorFaPatchField<Type>::processorFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
processorFaPatchField<Type>::processorFaPatchField
|
||||
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -64,9 +58,8 @@ processorFaPatchField<Type>::processorFaPatchField
|
||||
{}
|
||||
|
||||
|
||||
// Construct by mapping given processorFaPatchField<Type>
|
||||
template<class Type>
|
||||
processorFaPatchField<Type>::processorFaPatchField
|
||||
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||
(
|
||||
const processorFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -79,16 +72,8 @@ processorFaPatchField<Type>::processorFaPatchField
|
||||
{
|
||||
if (!isType<processorFaPatch>(this->patch()))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"processorFaPatchField<Type>::processorFaPatchField\n"
|
||||
"(\n"
|
||||
" const processorFaPatchField<Type>& ptf,\n"
|
||||
" const faPatch& p,\n"
|
||||
" const DimensionedField<Type, volMesh>& iF,\n"
|
||||
" const faPatchFieldMapper& mapper\n"
|
||||
")\n"
|
||||
) << "\n patch type '" << p.type()
|
||||
FatalErrorInFunction
|
||||
<< "\n patch type '" << p.type()
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
@ -99,7 +84,7 @@ processorFaPatchField<Type>::processorFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
processorFaPatchField<Type>::processorFaPatchField
|
||||
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -111,16 +96,8 @@ processorFaPatchField<Type>::processorFaPatchField
|
||||
{
|
||||
if (!isType<processorFaPatch>(p))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"processorFaPatchField<Type>::processorFaPatchField\n"
|
||||
"(\n"
|
||||
" const faPatch& p,\n"
|
||||
" const Field<Type>& field,\n"
|
||||
" const dictionary& dict\n"
|
||||
")\n",
|
||||
dict
|
||||
) << "\n patch type '" << p.type()
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "\n patch type '" << p.type()
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
@ -131,7 +108,7 @@ processorFaPatchField<Type>::processorFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
processorFaPatchField<Type>::processorFaPatchField
|
||||
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||
(
|
||||
const processorFaPatchField<Type>& ptf
|
||||
)
|
||||
@ -143,7 +120,7 @@ processorFaPatchField<Type>::processorFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
processorFaPatchField<Type>::processorFaPatchField
|
||||
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||
(
|
||||
const processorFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -157,21 +134,22 @@ processorFaPatchField<Type>::processorFaPatchField
|
||||
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
processorFaPatchField<Type>::~processorFaPatchField()
|
||||
Foam::processorFaPatchField<Type>::~processorFaPatchField()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > processorFaPatchField<Type>::patchNeighbourField() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::processorFaPatchField<Type>::patchNeighbourField() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void processorFaPatchField<Type>::initEvaluate
|
||||
void Foam::processorFaPatchField<Type>::initEvaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType
|
||||
)
|
||||
@ -184,7 +162,7 @@ void processorFaPatchField<Type>::initEvaluate
|
||||
|
||||
|
||||
template<class Type>
|
||||
void processorFaPatchField<Type>::evaluate
|
||||
void Foam::processorFaPatchField<Type>::evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType
|
||||
)
|
||||
@ -202,14 +180,14 @@ void processorFaPatchField<Type>::evaluate
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > processorFaPatchField<Type>::snGrad() const
|
||||
Foam::tmp<Foam::Field<Type>> Foam::processorFaPatchField<Type>::snGrad() const
|
||||
{
|
||||
return this->patch().deltaCoeffs()*(*this - this->patchInternalField());
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
||||
void Foam::processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
||||
(
|
||||
scalarField& result,
|
||||
const bool add,
|
||||
@ -228,7 +206,7 @@ void processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
||||
|
||||
|
||||
template<class Type>
|
||||
void processorFaPatchField<Type>::updateInterfaceMatrix
|
||||
void Foam::processorFaPatchField<Type>::updateInterfaceMatrix
|
||||
(
|
||||
scalarField& result,
|
||||
const bool add,
|
||||
@ -268,7 +246,7 @@ void processorFaPatchField<Type>::updateInterfaceMatrix
|
||||
|
||||
|
||||
template<class Type>
|
||||
void processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
||||
void Foam::processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
||||
(
|
||||
Field<Type>& result,
|
||||
const bool add,
|
||||
@ -286,7 +264,7 @@ void processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
||||
|
||||
|
||||
template<class Type>
|
||||
void processorFaPatchField<Type>::updateInterfaceMatrix
|
||||
void Foam::processorFaPatchField<Type>::updateInterfaceMatrix
|
||||
(
|
||||
Field<Type>& result,
|
||||
const bool add,
|
||||
@ -321,8 +299,4 @@ void processorFaPatchField<Type>::updateInterfaceMatrix
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
processorFvPatchField
|
||||
Foam::processorFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
@ -51,7 +51,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class processorFaPatchField Declaration
|
||||
Class processorFaPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -110,9 +110,9 @@ public:
|
||||
processorFaPatchField(const processorFaPatchField<Type>&);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new processorFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -126,12 +126,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new processorFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
@ -161,7 +161,7 @@ public:
|
||||
}
|
||||
|
||||
//- Return neighbour field given internal field
|
||||
tmp<Field<Type> > patchNeighbourField() const;
|
||||
tmp<Field<Type>> patchNeighbourField() const;
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
@ -173,7 +173,7 @@ public:
|
||||
virtual void evaluate(const Pstream::commsTypes commsType);
|
||||
|
||||
//- Return patch-normal gradient
|
||||
virtual tmp<Field<Type> > snGrad() const;
|
||||
virtual tmp<Field<Type>> snGrad() const;
|
||||
|
||||
// Coupled interface functionality
|
||||
|
||||
@ -276,7 +276,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "processorFaPatchField.C"
|
||||
#include "processorFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -27,23 +27,19 @@ License
|
||||
|
||||
#include "processorFaPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<>
|
||||
void processorFaPatchField<scalar>::transformCoupleField
|
||||
void Foam::processorFaPatchField<Foam::scalar>::transformCoupleField
|
||||
(
|
||||
scalarField& f,
|
||||
const direction cmpt
|
||||
) const
|
||||
{}
|
||||
|
||||
|
||||
template<>
|
||||
void processorFaPatchField<scalar>::initInterfaceMatrixUpdate
|
||||
void Foam::processorFaPatchField<Foam::scalar>::initInterfaceMatrixUpdate
|
||||
(
|
||||
scalarField& result,
|
||||
const bool add,
|
||||
@ -62,7 +58,7 @@ void processorFaPatchField<scalar>::initInterfaceMatrixUpdate
|
||||
|
||||
|
||||
template<>
|
||||
void processorFaPatchField<scalar>::updateInterfaceMatrix
|
||||
void Foam::processorFaPatchField<Foam::scalar>::updateInterfaceMatrix
|
||||
(
|
||||
scalarField& result,
|
||||
const bool add,
|
||||
@ -96,8 +92,4 @@ void processorFaPatchField<scalar>::updateInterfaceMatrix
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -27,15 +27,10 @@ License
|
||||
|
||||
#include "symmetryFaPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -46,7 +41,7 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
(
|
||||
const symmetryFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -58,16 +53,8 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
{
|
||||
if (!isType<symmetryFaPatch>(this->patch()))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"symmetryFaPatchField<Type>::symmetryFaPatchField\n"
|
||||
"(\n"
|
||||
" const symmetryFaPatchField<Type>& ptf,\n"
|
||||
" const faPatch& p,\n"
|
||||
" const DimensionedField<Type, areaMesh>& iF,\n"
|
||||
" const faPatchFieldMapper& mapper\n"
|
||||
")\n"
|
||||
) << "\n patch type '" << p.type()
|
||||
FatalErrorInFunction
|
||||
<< "\n patch type '" << p.type()
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
@ -78,7 +65,7 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -89,16 +76,8 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
{
|
||||
if (!isType<symmetryFaPatch>(p))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"symmetryFaPatchField<Type>::symmetryFaPatchField\n"
|
||||
"(\n"
|
||||
" const faPatch& p,\n"
|
||||
" const Field<Type>& field,\n"
|
||||
" const dictionary& dict\n"
|
||||
")\n",
|
||||
dict
|
||||
) << "\n patch type '" << p.type()
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "\n patch type '" << p.type()
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->dimensionedInternalField().name()
|
||||
@ -109,7 +88,7 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
(
|
||||
const symmetryFaPatchField<Type>& ptf
|
||||
)
|
||||
@ -119,7 +98,7 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
(
|
||||
const symmetryFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -129,8 +108,4 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -98,9 +98,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new symmetryFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -114,12 +114,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new symmetryFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
@ -134,7 +134,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "symmetryFaPatchField.C"
|
||||
#include "symmetryFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -31,15 +31,10 @@ License
|
||||
#include "symmTransform.H"
|
||||
#include "diagTensor.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
Foam::wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -50,7 +45,7 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
Foam::wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
(
|
||||
const wedgeFaPatchField<Type>& ptf,
|
||||
const faPatch& p,
|
||||
@ -62,16 +57,8 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
{
|
||||
if (!isType<wedgeFaPatch>(this->patch()))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"wedgeFaPatchField<Type>::wedgeFaPatchField\n"
|
||||
"(\n"
|
||||
" const wedgeFaPatchField<Type>& ptf,\n"
|
||||
" const faPatch& p,\n"
|
||||
" const Field<Type>& iF,\n"
|
||||
" const faPatchFieldMapper& mapper\n"
|
||||
")\n"
|
||||
) << "Field type does not correspond to patch type for patch "
|
||||
FatalErrorInFunction
|
||||
<< "Field type does not correspond to patch type for patch "
|
||||
<< this->patch().index() << "." << endl
|
||||
<< "Field type: " << typeName << endl
|
||||
<< "Patch type: " << this->patch().type()
|
||||
@ -81,7 +68,7 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
Foam::wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
(
|
||||
const faPatch& p,
|
||||
const DimensionedField<Type, areaMesh>& iF,
|
||||
@ -92,16 +79,8 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
{
|
||||
if (!isType<wedgeFaPatch>(p))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"wedgeFaPatchField<Type>::wedgeFaPatchField\n"
|
||||
"(\n"
|
||||
" const faPatch& p,\n"
|
||||
" const Field<Type>& field,\n"
|
||||
" dictionary& dict\n"
|
||||
")\n",
|
||||
dict
|
||||
) << "patch " << this->patch().index() << " not wedge type. "
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "patch " << this->patch().index() << " not wedge type. "
|
||||
<< "Patch type = " << p.type()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
@ -111,7 +90,7 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
|
||||
|
||||
template<class Type>
|
||||
wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
Foam::wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
(
|
||||
const wedgeFaPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
@ -123,11 +102,10 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Return gradient at boundary
|
||||
template<class Type>
|
||||
tmp<Field<Type> > wedgeFaPatchField<Type>::snGrad() const
|
||||
Foam::tmp<Foam::Field<Type>> Foam::wedgeFaPatchField<Type>::snGrad() const
|
||||
{
|
||||
const Field<Type> pif(this->patchInternalField());
|
||||
const Field<Type> pif (this->patchInternalField());
|
||||
|
||||
return
|
||||
(
|
||||
@ -137,9 +115,8 @@ tmp<Field<Type> > wedgeFaPatchField<Type>::snGrad() const
|
||||
}
|
||||
|
||||
|
||||
// Evaluate the patch field
|
||||
template<class Type>
|
||||
void wedgeFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
void Foam::wedgeFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
{
|
||||
if (!this->updated())
|
||||
{
|
||||
@ -157,16 +134,16 @@ void wedgeFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||
}
|
||||
|
||||
|
||||
// Return defining fields
|
||||
template<class Type>
|
||||
tmp<Field<Type> > wedgeFaPatchField<Type>::snGradTransformDiag() const
|
||||
Foam::tmp<Foam::Field<Type>>
|
||||
Foam::wedgeFaPatchField<Type>::snGradTransformDiag() const
|
||||
{
|
||||
const diagTensor diagT =
|
||||
0.5*diag(I - refCast<const wedgeFaPatch>(this->patch()).faceT());
|
||||
|
||||
const vector diagV(diagT.xx(), diagT.yy(), diagT.zz());
|
||||
|
||||
return tmp<Field<Type> >
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
@ -185,8 +162,4 @@ tmp<Field<Type> > wedgeFaPatchField<Type>::snGradTransformDiag() const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
wedgeFaPatchField
|
||||
Foam::wedgeFaPatchField
|
||||
|
||||
Description
|
||||
|
||||
@ -50,7 +50,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class wedgeFaPatch Declaration
|
||||
Class wedgeFaPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -92,9 +92,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<faPatchField<Type> > clone() const
|
||||
virtual tmp<faPatchField<Type>> clone() const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new wedgeFaPatchField<Type>(*this)
|
||||
);
|
||||
@ -108,12 +108,12 @@ public:
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<faPatchField<Type> > clone
|
||||
virtual tmp<faPatchField<Type>> clone
|
||||
(
|
||||
const DimensionedField<Type, areaMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<faPatchField<Type> >
|
||||
return tmp<faPatchField<Type>>
|
||||
(
|
||||
new wedgeFaPatchField<Type>(*this, iF)
|
||||
);
|
||||
@ -125,7 +125,7 @@ public:
|
||||
// Evaluation functions
|
||||
|
||||
//- Return gradient at boundary
|
||||
virtual tmp<Field<Type> > snGrad() const;
|
||||
virtual tmp<Field<Type>> snGrad() const;
|
||||
|
||||
//- Evaluate the patch field
|
||||
virtual void evaluate
|
||||
@ -135,7 +135,7 @@ public:
|
||||
|
||||
|
||||
//- Return face-gradient transform diagonal
|
||||
virtual tmp<Field<Type> > snGradTransformDiag() const;
|
||||
virtual tmp<Field<Type>> snGradTransformDiag() const;
|
||||
};
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@ void wedgeFaPatchField<scalar>::evaluate
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "wedgeFaPatchField.C"
|
||||
#include "wedgeFaPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -23,8 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "faPatchFields.H"
|
||||
|
||||
@ -23,14 +23,6 @@ License
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
wedgeFaPatchFields
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
wedgeFaPatchFields.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wedgeFaPatchFields_H
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user