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();
|
runTime.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "ExecutionTime = "
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< scalar(runTime.elapsedCpuTime())
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
<< " s\n" << endl << endl;
|
<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -74,9 +74,9 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Total mass of surfactant: "
|
Info<< "Total mass of surfactant: "
|
||||||
<< sum(Cs.internalField()*aMesh.S()) << endl;
|
<< sum(Cs.internalField()*aMesh.S()) << endl;
|
||||||
|
|
||||||
Info<< "ExecutionTime = "
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< scalar(runTime.elapsedCpuTime())
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
<< " s\n" << endl << endl;
|
<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
# \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -41,7 +41,8 @@ cleanTimeDirectories()
|
|||||||
done
|
done
|
||||||
rm -rf \
|
rm -rf \
|
||||||
./[1-9]* ./-[1-9]* ./log ./log.* ./log-* ./logSummary.* \
|
./[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
|
./.setSet > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,8 +150,12 @@ cleanUcomponents()
|
|||||||
|
|
||||||
cleanFaMesh ()
|
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()
|
cleanApplication()
|
||||||
|
|||||||
@ -6,7 +6,7 @@ faMesh/faBoundaryMesh/faBoundaryMesh.C
|
|||||||
|
|
||||||
faPatches = faMesh/faPatches
|
faPatches = faMesh/faPatches
|
||||||
$(faPatches)/faPatch/faPatch.C
|
$(faPatches)/faPatch/faPatch.C
|
||||||
$(faPatches)/faPatch/newFaPatch.C
|
$(faPatches)/faPatch/faPatchNew.C
|
||||||
$(faPatches)/basic/coupled/coupledFaPatch.C
|
$(faPatches)/basic/coupled/coupledFaPatch.C
|
||||||
$(faPatches)/constraint/empty/emptyFaPatch.C
|
$(faPatches)/constraint/empty/emptyFaPatch.C
|
||||||
$(faPatches)/constraint/processor/processorFaPatch.C
|
$(faPatches)/constraint/processor/processorFaPatch.C
|
||||||
@ -24,7 +24,6 @@ faPatchFields = fields/faPatchFields
|
|||||||
$(faPatchFields)/faPatchField/faPatchFields.C
|
$(faPatchFields)/faPatchField/faPatchFields.C
|
||||||
|
|
||||||
basicFaPatchFields = $(faPatchFields)/basic
|
basicFaPatchFields = $(faPatchFields)/basic
|
||||||
$(basicFaPatchFields)/basicSymmetry/basicSymmetryFaPatchFields.C
|
|
||||||
$(basicFaPatchFields)/basicSymmetry/basicSymmetryFaPatchScalarField.C
|
$(basicFaPatchFields)/basicSymmetry/basicSymmetryFaPatchScalarField.C
|
||||||
$(basicFaPatchFields)/calculated/calculatedFaPatchFields.C
|
$(basicFaPatchFields)/calculated/calculatedFaPatchFields.C
|
||||||
$(basicFaPatchFields)/coupled/coupledFaPatchFields.C
|
$(basicFaPatchFields)/coupled/coupledFaPatchFields.C
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
areaMesh
|
Foam::areaMesh
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Mesh data needed to do the Finite Area discretisation.
|
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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
edgeMesh
|
Foam::edgeMesh
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Mesh data needed to do the Finite Area discretisation.
|
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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
faMatrix
|
Foam::faMatrix
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A special matrix type and solver, designed for finite area
|
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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
faMatrix<Type>
|
Foam::faMatrix
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Finite-Area matrix.
|
Finite-Area matrix.
|
||||||
@ -65,7 +65,7 @@ Ostream& operator<<(Ostream&, const faMatrix<Type>&);
|
|||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class faMatrix Declaration
|
Class faMatrix Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -114,7 +114,7 @@ class faMatrix
|
|||||||
void addToInternalField
|
void addToInternalField
|
||||||
(
|
(
|
||||||
const labelUList& addr,
|
const labelUList& addr,
|
||||||
const tmp<Field<Type2> >& tpf,
|
const tmp<Field<Type2>>& tpf,
|
||||||
Field<Type2>& intf
|
Field<Type2>& intf
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ class faMatrix
|
|||||||
void subtractFromInternalField
|
void subtractFromInternalField
|
||||||
(
|
(
|
||||||
const labelUList& addr,
|
const labelUList& addr,
|
||||||
const tmp<Field<Type2> >& tpf,
|
const tmp<Field<Type2>>& tpf,
|
||||||
Field<Type2>& intf
|
Field<Type2>& intf
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
@ -308,7 +308,7 @@ public:
|
|||||||
SolverPerformance<Type> solve();
|
SolverPerformance<Type> solve();
|
||||||
|
|
||||||
//- Return the matrix residual
|
//- Return the matrix residual
|
||||||
tmp<Field<Type> > residual() const;
|
tmp<Field<Type>> residual() const;
|
||||||
|
|
||||||
//- Return the matrix diagonal
|
//- Return the matrix diagonal
|
||||||
tmp<scalarField> D() const;
|
tmp<scalarField> D() const;
|
||||||
@ -317,30 +317,30 @@ public:
|
|||||||
tmp<areaScalarField> A() const;
|
tmp<areaScalarField> A() const;
|
||||||
|
|
||||||
//- Return the H operation source
|
//- 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
|
//- Return the face-flux field from the matrix
|
||||||
tmp<GeometricField<Type, faePatchField, edgeMesh> > flux() const;
|
tmp<GeometricField<Type, faePatchField, edgeMesh>> flux() const;
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
void operator=(const faMatrix<Type>&);
|
void operator=(const faMatrix<Type>&);
|
||||||
void operator=(const tmp<faMatrix<Type> >&);
|
void operator=(const tmp<faMatrix<Type>>&);
|
||||||
|
|
||||||
void negate();
|
void negate();
|
||||||
|
|
||||||
void operator+=(const faMatrix<Type>&);
|
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 faMatrix<Type>&);
|
||||||
void operator-=(const tmp<faMatrix<Type> >&);
|
void operator-=(const tmp<faMatrix<Type>>&);
|
||||||
|
|
||||||
void operator+=(const 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 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>&);
|
||||||
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.
|
// deleting temporary matrix after solution.
|
||||||
// Solver controls read Istream
|
// Solver controls read Istream
|
||||||
template<class Type>
|
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
|
//- Solve returning the solution statistics given convergence tolerance
|
||||||
@ -411,331 +411,358 @@ SolverPerformance<Type> solve(faMatrix<Type>&);
|
|||||||
// deleting temporary matrix after solution.
|
// deleting temporary matrix after solution.
|
||||||
// Solver controls read faSolution
|
// Solver controls read faSolution
|
||||||
template<class Type>
|
template<class Type>
|
||||||
SolverPerformance<Type> solve(const tmp<faMatrix<Type> >&);
|
SolverPerformance<Type> solve(const tmp<faMatrix<Type>>&);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator+
|
tmp<faMatrix<Type>> operator+
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&,
|
const faMatrix<Type>&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator+
|
tmp<faMatrix<Type>> operator+
|
||||||
(
|
(
|
||||||
const tmp<faMatrix<Type> >&,
|
const tmp<faMatrix<Type>>&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator+
|
tmp<faMatrix<Type>> operator+
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&,
|
const faMatrix<Type>&,
|
||||||
const tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&,
|
const faMatrix<Type>&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const tmp<faMatrix<Type> >&,
|
const tmp<faMatrix<Type>>&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&,
|
const faMatrix<Type>&,
|
||||||
const tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator==
|
tmp<faMatrix<Type>> operator==
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&,
|
const faMatrix<Type>&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator==
|
tmp<faMatrix<Type>> operator==
|
||||||
(
|
(
|
||||||
const tmp<faMatrix<Type> >&,
|
const tmp<faMatrix<Type>>&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator==
|
tmp<faMatrix<Type>> operator==
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&,
|
const faMatrix<Type>&,
|
||||||
const tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator+
|
tmp<faMatrix<Type>> operator+
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&,
|
const faMatrix<Type>&,
|
||||||
const GeometricField<Type, faPatchField, areaMesh>&
|
const GeometricField<Type, faPatchField, areaMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator+
|
tmp<faMatrix<Type>> operator+
|
||||||
(
|
(
|
||||||
const tmp<faMatrix<Type> >&,
|
const tmp<faMatrix<Type>>&,
|
||||||
const GeometricField<Type, faPatchField, areaMesh>&
|
const GeometricField<Type, faPatchField, areaMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator+
|
tmp<faMatrix<Type>> operator+
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&,
|
const faMatrix<Type>&,
|
||||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&
|
const tmp<GeometricField<Type, faPatchField, areaMesh>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator+
|
tmp<faMatrix<Type>> operator+
|
||||||
(
|
(
|
||||||
const tmp<faMatrix<Type> >&,
|
const tmp<faMatrix<Type>>&,
|
||||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&
|
const tmp<GeometricField<Type, faPatchField, areaMesh>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator+
|
tmp<faMatrix<Type>> operator+
|
||||||
(
|
(
|
||||||
const GeometricField<Type, faPatchField, areaMesh>&,
|
const GeometricField<Type, faPatchField, areaMesh>&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator+
|
tmp<faMatrix<Type>> operator+
|
||||||
(
|
(
|
||||||
const GeometricField<Type, faPatchField, areaMesh>&,
|
const GeometricField<Type, faPatchField, areaMesh>&,
|
||||||
const tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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 tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&,
|
const faMatrix<Type>&,
|
||||||
const GeometricField<Type, faPatchField, areaMesh>&
|
const GeometricField<Type, faPatchField, areaMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const tmp<faMatrix<Type> >&,
|
const tmp<faMatrix<Type>>&,
|
||||||
const GeometricField<Type, faPatchField, areaMesh>&
|
const GeometricField<Type, faPatchField, areaMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const faMatrix<Type>&,
|
const faMatrix<Type>&,
|
||||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&
|
const tmp<GeometricField<Type, faPatchField, areaMesh>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const tmp<faMatrix<Type> >&,
|
const tmp<faMatrix<Type>>&,
|
||||||
const tmp<GeometricField<Type, faPatchField, areaMesh> >&
|
const tmp<GeometricField<Type, faPatchField, areaMesh>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const GeometricField<Type, faPatchField, areaMesh>&,
|
const GeometricField<Type, faPatchField, areaMesh>&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator-
|
tmp<faMatrix<Type>> operator-
|
||||||
(
|
(
|
||||||
const GeometricField<Type, faPatchField, areaMesh>&,
|
const GeometricField<Type, faPatchField, areaMesh>&,
|
||||||
const tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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 tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator+
|
tmp<faMatrix<Type>> operator+
|
||||||
(
|
(
|
||||||
const tmp<faMatrix<Type> >&,
|
const faMatrix<Type>&,
|
||||||
const dimensioned<Type>&
|
const dimensioned<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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 dimensioned<Type>&,
|
||||||
const tmp<faMatrix<Type> >&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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 dimensioned<Type>&,
|
||||||
const tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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==
|
|
||||||
(
|
|
||||||
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 faMatrix<Type>&,
|
||||||
const dimensioned<Type>&
|
const dimensioned<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class 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>&
|
const dimensioned<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator*
|
tmp<faMatrix<Type>> operator*
|
||||||
(
|
(
|
||||||
const areaScalarField&,
|
const areaScalarField&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator*
|
tmp<faMatrix<Type>> operator*
|
||||||
(
|
(
|
||||||
const areaScalarField&,
|
const areaScalarField&,
|
||||||
const tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator*
|
tmp<faMatrix<Type>> operator*
|
||||||
(
|
(
|
||||||
const tmp<areaScalarField>&,
|
const tmp<areaScalarField>&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator*
|
tmp<faMatrix<Type>> operator*
|
||||||
(
|
(
|
||||||
const tmp<areaScalarField>&,
|
const tmp<areaScalarField>&,
|
||||||
const tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator*
|
tmp<faMatrix<Type>> operator*
|
||||||
(
|
(
|
||||||
const dimensioned<scalar>&,
|
const dimensioned<scalar>&,
|
||||||
const faMatrix<Type>&
|
const faMatrix<Type>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<faMatrix<Type> > operator*
|
tmp<faMatrix<Type>> operator*
|
||||||
(
|
(
|
||||||
const dimensioned<scalar>&,
|
const dimensioned<scalar>&,
|
||||||
const tmp<faMatrix<Type> >&
|
const tmp<faMatrix<Type>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -746,7 +773,7 @@ tmp<faMatrix<Type> > operator*
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "faMatrix.C"
|
#include "faMatrix.C"
|
||||||
#endif
|
#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>
|
template<class Type>
|
||||||
void faMatrix<Type>::setComponentReference
|
void Foam::faMatrix<Type>::setComponentReference
|
||||||
(
|
(
|
||||||
const label patchi,
|
const label patchi,
|
||||||
const label facei,
|
const label facei,
|
||||||
@ -53,14 +46,14 @@ void faMatrix<Type>::setComponentReference
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
SolverPerformance<Type> faMatrix<Type>::solve(const dictionary& solverControls)
|
Foam::SolverPerformance<Type> Foam::faMatrix<Type>::solve
|
||||||
|
(
|
||||||
|
const dictionary& solverControls
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "solving faMatrix<Type>"
|
||||||
Info<< "faMatrix<Type>::solve(const dictionary&) : "
|
<< endl;
|
||||||
"solving faMatrix<Type>"
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
SolverPerformance<Type> solverPerfVec
|
SolverPerformance<Type> solverPerfVec
|
||||||
(
|
(
|
||||||
@ -73,16 +66,15 @@ SolverPerformance<Type> faMatrix<Type>::solve(const dictionary& solverControls)
|
|||||||
Field<Type> source(source_);
|
Field<Type> source(source_);
|
||||||
addBoundarySource(source);
|
addBoundarySource(source);
|
||||||
|
|
||||||
// Make a copy of interfaces: no longer a reference
|
// Note: make a copy of interfaces: no longer a reference
|
||||||
// HJ, 20/Nov/2007
|
|
||||||
lduInterfaceFieldPtrsList interfaces =
|
lduInterfaceFieldPtrsList interfaces =
|
||||||
psi_.boundaryField().scalarInterfaces();
|
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 =
|
GeometricField<Type, faPatchField, areaMesh>& psi =
|
||||||
const_cast<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
|
// copy field and source
|
||||||
|
|
||||||
@ -156,7 +148,7 @@ SolverPerformance<Type> faMatrix<Type>::solve(const dictionary& solverControls)
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
SolverPerformance<Type> faMatrix<Type>::faSolver::solve()
|
Foam::SolverPerformance<Type> Foam::faMatrix<Type>::faSolver::solve()
|
||||||
{
|
{
|
||||||
return solvei
|
return solvei
|
||||||
(
|
(
|
||||||
@ -169,7 +161,7 @@ SolverPerformance<Type> faMatrix<Type>::faSolver::solve()
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
SolverPerformance<Type> faMatrix<Type>::solve()
|
Foam::SolverPerformance<Type> Foam::faMatrix<Type>::solve()
|
||||||
{
|
{
|
||||||
return solve
|
return solve
|
||||||
(
|
(
|
||||||
@ -181,22 +173,19 @@ SolverPerformance<Type> faMatrix<Type>::solve()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return the matrix residual
|
|
||||||
template<class Type>
|
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();
|
Field<Type>& res = tres().ref();
|
||||||
|
|
||||||
addBoundarySource(res);
|
addBoundarySource(res);
|
||||||
|
|
||||||
// Make a copy of interfaces: no longer a reference
|
|
||||||
// HJ, 20/Nov/2007
|
|
||||||
lduInterfaceFieldPtrsList interfaces =
|
lduInterfaceFieldPtrsList interfaces =
|
||||||
psi_.boundaryField().scalarInterfaces();
|
psi_.boundaryField().scalarInterfaces();
|
||||||
|
|
||||||
// Loop over field components
|
// 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));
|
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 "faScalarMatrix.H"
|
||||||
#include "zeroGradientFaPatchFields.H"
|
#include "zeroGradientFaPatchFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Set reference level for a component of the solution
|
|
||||||
// on a given patch face
|
|
||||||
template<>
|
template<>
|
||||||
void faMatrix<scalar>::setComponentReference
|
void Foam::faMatrix<Foam::scalar>::setComponentReference
|
||||||
(
|
(
|
||||||
const label patchI,
|
const label patchI,
|
||||||
const label edgeI,
|
const label edgeI,
|
||||||
@ -58,17 +51,14 @@ void faMatrix<scalar>::setComponentReference
|
|||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
solverPerformance faMatrix<scalar>::solve
|
Foam::solverPerformance Foam::faMatrix<Foam::scalar>::solve
|
||||||
(
|
(
|
||||||
const dictionary& solverControls
|
const dictionary& solverControls
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "solving faMatrix<scalar>"
|
||||||
Info<< "faMatrix<scalar>::solve(const dictionary&) : "
|
<< endl;
|
||||||
"solving faMatrix<scalar>"
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
GeometricField<scalar, faPatchField, areaMesh>& psi =
|
GeometricField<scalar, faPatchField, areaMesh>& psi =
|
||||||
const_cast<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<>
|
template<>
|
||||||
tmp<scalarField> faMatrix<scalar>::residual() const
|
Foam::tmp<Foam::scalarField> Foam::faMatrix<Foam::scalar>::residual() const
|
||||||
{
|
{
|
||||||
scalarField boundaryDiag(psi_.size(), 0.0);
|
scalarField boundaryDiag(psi_.size(), 0.0);
|
||||||
addBoundaryDiag(boundaryDiag, 0);
|
addBoundaryDiag(boundaryDiag, 0);
|
||||||
@ -125,9 +114,8 @@ tmp<scalarField> faMatrix<scalar>::residual() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// H operator
|
|
||||||
template<>
|
template<>
|
||||||
tmp<areaScalarField> faMatrix<scalar>::H() const
|
Foam::tmp<Foam::areaScalarField> Foam::faMatrix<Foam::scalar>::H() const
|
||||||
{
|
{
|
||||||
tmp<areaScalarField> tHphi
|
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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
faScalarMatrix
|
Foam::faScalarMatrix
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Template specialisation for scalar faMatrix
|
Template specialisation for scalar faMatrix
|
||||||
|
|||||||
@ -31,23 +31,17 @@ Description
|
|||||||
#include "faMesh.H"
|
#include "faMesh.H"
|
||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
defineTypeNameAndDebug(faBoundaryMesh, 0);
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
}
|
||||||
|
|
||||||
defineTypeNameAndDebug(faBoundaryMesh, 0);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from dictionary
|
Foam::faBoundaryMesh::faBoundaryMesh
|
||||||
faBoundaryMesh::faBoundaryMesh
|
|
||||||
(
|
(
|
||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
const faMesh& mesh
|
const faMesh& mesh
|
||||||
@ -83,19 +77,14 @@ faBoundaryMesh::faBoundaryMesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check state of IOstream
|
// Check state of IOstream
|
||||||
is.check
|
is.check(FUNCTION_NAME);
|
||||||
(
|
|
||||||
"faBoundaryMesh::polyBoundaryMesh"
|
|
||||||
"(const IOobject&, const faMesh&)"
|
|
||||||
);
|
|
||||||
|
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct given size. Patches will be set later
|
Foam::faBoundaryMesh::faBoundaryMesh
|
||||||
faBoundaryMesh::faBoundaryMesh
|
|
||||||
(
|
(
|
||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
const faMesh& pm,
|
const faMesh& pm,
|
||||||
@ -110,8 +99,7 @@ faBoundaryMesh::faBoundaryMesh
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Calculate the geometry for the patches (transformation tensors etc.)
|
void Foam::faBoundaryMesh::calcGeometry()
|
||||||
void faBoundaryMesh::calcGeometry()
|
|
||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
{
|
{
|
||||||
@ -125,25 +113,24 @@ void faBoundaryMesh::calcGeometry()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return the mesh reference
|
const Foam::faMesh& Foam::faBoundaryMesh::mesh() const
|
||||||
const faMesh& faBoundaryMesh::mesh() const
|
|
||||||
{
|
{
|
||||||
return mesh_;
|
return mesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
lduInterfacePtrsList faBoundaryMesh::interfaces() const
|
Foam::lduInterfacePtrsList Foam::faBoundaryMesh::interfaces() const
|
||||||
{
|
{
|
||||||
lduInterfacePtrsList interfaces(size());
|
lduInterfacePtrsList interfaces(size());
|
||||||
|
|
||||||
forAll (interfaces, patchi)
|
forAll(interfaces, patchi)
|
||||||
{
|
{
|
||||||
if (isA<lduInterface>(this->operator[](patchi)))
|
if (isA<lduInterface>(this->operator[](patchi)))
|
||||||
{
|
{
|
||||||
interfaces.set
|
interfaces.set
|
||||||
(
|
(
|
||||||
patchi,
|
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
|
Foam::wordList Foam::faBoundaryMesh::types() const
|
||||||
wordList faBoundaryMesh::types() const
|
|
||||||
{
|
{
|
||||||
const faPatchList& patches = *this;
|
const faPatchList& patches = *this;
|
||||||
|
|
||||||
wordList t(patches.size());
|
wordList t(patches.size());
|
||||||
|
|
||||||
forAll (patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
t[patchI] = patches[patchI].type();
|
t[patchI] = patches[patchI].type();
|
||||||
}
|
}
|
||||||
@ -168,14 +154,13 @@ wordList faBoundaryMesh::types() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return a list of patch names
|
Foam::wordList Foam::faBoundaryMesh::names() const
|
||||||
wordList faBoundaryMesh::names() const
|
|
||||||
{
|
{
|
||||||
const faPatchList& patches = *this;
|
const faPatchList& patches = *this;
|
||||||
|
|
||||||
wordList t(patches.size());
|
wordList t(patches.size());
|
||||||
|
|
||||||
forAll (patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
t[patchI] = patches[patchI].name();
|
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;
|
const faPatchList& patches = *this;
|
||||||
|
|
||||||
forAll (patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
if (patches[patchI].name() == patchName)
|
if (patches[patchI].name() == patchName)
|
||||||
{
|
{
|
||||||
@ -236,8 +221,7 @@ Foam::labelList Foam::faBoundaryMesh::findIndices
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return patch index for a given edge label
|
Foam::label Foam::faBoundaryMesh::whichPatch(const label edgeIndex) const
|
||||||
label faBoundaryMesh::whichPatch(const label edgeIndex) const
|
|
||||||
{
|
{
|
||||||
// Find out which patch the current face belongs to by comparing label
|
// Find out which patch the current face belongs to by comparing label
|
||||||
// with patch start labels.
|
// 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 it is off the end of the list, abort
|
||||||
if (edgeIndex >= mesh().nEdges())
|
if (edgeIndex >= mesh().nEdges())
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "given label greater than the number of edges"
|
||||||
"faBoundaryMesh::whichPatch(const label edgeIndex) const"
|
|
||||||
) << "given label greater than the number of edges"
|
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,7 +239,7 @@ label faBoundaryMesh::whichPatch(const label edgeIndex) const
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (*this, patchI)
|
forAll(*this, patchI)
|
||||||
{
|
{
|
||||||
label start = mesh_.patchStarts()[patchI];
|
label start = mesh_.patchStarts()[patchI];
|
||||||
label size = operator[](patchI).faPatch::size();
|
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!
|
// If not in any of above, it's trouble!
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "error in patch search algorithm"
|
||||||
"label faBoundaryMesh::whichPatch(const label edgeIndex) const"
|
|
||||||
) << "error in patch search algorithm"
|
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool faBoundaryMesh::checkDefinition(const bool report) const
|
bool Foam::faBoundaryMesh::checkDefinition(const bool report) const
|
||||||
{
|
{
|
||||||
label nextPatchStart = mesh().nInternalEdges();
|
label nextPatchStart = mesh().nInternalEdges();
|
||||||
const faBoundaryMesh& bm = *this;
|
const faBoundaryMesh& bm = *this;
|
||||||
|
|
||||||
bool boundaryError = false;
|
bool boundaryError = false;
|
||||||
|
|
||||||
forAll (bm, patchI)
|
forAll(bm, patchI)
|
||||||
{
|
{
|
||||||
if (bm[patchI].start() != nextPatchStart)
|
if (bm[patchI].start() != nextPatchStart)
|
||||||
{
|
{
|
||||||
boundaryError = true;
|
boundaryError = true;
|
||||||
|
|
||||||
Info
|
InfoInFunction
|
||||||
<< "bool faBoundaryMesh::checkDefinition("
|
|
||||||
<< "const bool report) const : "
|
|
||||||
<< "Problem with boundary patch " << patchI
|
<< "Problem with boundary patch " << patchI
|
||||||
<< ".\nThe patch should start on face no " << nextPatchStart
|
<< ".\nThe patch should start on face no " << nextPatchStart
|
||||||
<< " and the boundary file specifies " << bm[patchI].start()
|
<< " and the boundary file specifies " << bm[patchI].start()
|
||||||
@ -310,11 +288,8 @@ bool faBoundaryMesh::checkDefinition(const bool report) const
|
|||||||
|
|
||||||
if (boundaryError)
|
if (boundaryError)
|
||||||
{
|
{
|
||||||
SeriousErrorIn
|
SeriousErrorInFunction
|
||||||
(
|
<< "This mesh is not valid: boundary definition is in error."
|
||||||
"bool faBoundaryMesh::checkDefinition("
|
|
||||||
"const bool report) const"
|
|
||||||
) << "This mesh is not valid: boundary definition is in error."
|
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -329,24 +304,23 @@ bool faBoundaryMesh::checkDefinition(const bool report) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Correct faBoundaryMesh after moving points
|
void Foam::faBoundaryMesh::movePoints(const pointField& p)
|
||||||
void faBoundaryMesh::movePoints(const pointField& p)
|
|
||||||
{
|
{
|
||||||
faPatchList& patches = *this;
|
faPatchList& patches = *this;
|
||||||
|
|
||||||
forAll (patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
patches[patchI].initMovePoints(p);
|
patches[patchI].initMovePoints(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
patches[patchI].movePoints(p);
|
patches[patchI].movePoints(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void faBoundaryMesh::updateMesh()
|
void Foam::faBoundaryMesh::updateMesh()
|
||||||
{
|
{
|
||||||
faPatchList& patches = *this;
|
faPatchList& patches = *this;
|
||||||
|
|
||||||
@ -362,8 +336,7 @@ void faBoundaryMesh::updateMesh()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// writeData member function required by regIOobject
|
bool Foam::faBoundaryMesh::writeData(Ostream& os) const
|
||||||
bool faBoundaryMesh::writeData(Ostream& os) const
|
|
||||||
{
|
{
|
||||||
const faPatchList& patches = *this;
|
const faPatchList& patches = *this;
|
||||||
|
|
||||||
@ -380,21 +353,17 @@ bool faBoundaryMesh::writeData(Ostream& os) const
|
|||||||
os << decrIndent << token::END_LIST;
|
os << decrIndent << token::END_LIST;
|
||||||
|
|
||||||
// Check state of IOstream
|
// Check state of IOstream
|
||||||
os.check("polyBoundaryMesh::writeData(Ostream& os) const");
|
os.check(FUNCTION_NAME);
|
||||||
|
|
||||||
return os.good();
|
return os.good();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Ostream& operator<<(Ostream& os, const faBoundaryMesh& bm)
|
Foam::Ostream& Foam::operator<<(Ostream& os, const faBoundaryMesh& bm)
|
||||||
{
|
{
|
||||||
bm.writeData(os);
|
bm.writeData(os);
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
faBoundaryMesh
|
Foam::faBoundaryMesh
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Finite area boundary mesh
|
Finite area boundary mesh
|
||||||
@ -142,6 +142,7 @@ public:
|
|||||||
//- Check boundary definition
|
//- Check boundary definition
|
||||||
bool checkDefinition(const bool report = false) const;
|
bool checkDefinition(const bool report = false) const;
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
//- Correct faBoundaryMesh after moving points
|
//- 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()
|
void Foam::faGlobalMeshData::updateMesh()
|
||||||
{
|
{
|
||||||
label polyMeshNGlobalPoints =
|
label polyMeshNGlobalPoints = mesh_().globalData().nGlobalPoints();
|
||||||
mesh_().globalData().nGlobalPoints();
|
|
||||||
|
|
||||||
const labelList& polyMeshSharedPointLabels =
|
const labelList& polyMeshSharedPointLabels =
|
||||||
mesh_().globalData().sharedPointLabels();
|
mesh_().globalData().sharedPointLabels();
|
||||||
@ -81,10 +79,11 @@ void Foam::faGlobalMeshData::updateMesh()
|
|||||||
|
|
||||||
forAll(mesh_.boundary(), patchI)
|
forAll(mesh_.boundary(), patchI)
|
||||||
{
|
{
|
||||||
if(mesh_.boundary()[patchI].type() == processorFaPatch::typeName)
|
const faPatch& fap = mesh_.boundary()[patchI];
|
||||||
|
|
||||||
|
if (isA<processorFaPatch>(fap))
|
||||||
{
|
{
|
||||||
const labelList& localPointLabels =
|
const labelList& localPointLabels = fap.pointLabels();
|
||||||
mesh_.boundary()[patchI].pointLabels();
|
|
||||||
|
|
||||||
forAll(localPointLabels, pointI)
|
forAll(localPointLabels, pointI)
|
||||||
{
|
{
|
||||||
@ -111,12 +110,12 @@ void Foam::faGlobalMeshData::updateMesh()
|
|||||||
|
|
||||||
sharedPointLabels_ = sharedPointLabels.toc();
|
sharedPointLabels_ = sharedPointLabels.toc();
|
||||||
|
|
||||||
combineReduce(globalList, plusEqOp<labelField >());
|
combineReduce(globalList, plusEqOp<labelField>());
|
||||||
|
|
||||||
nGlobalPoints_ = 0;
|
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_;
|
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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
faGlobalMeshData
|
Foam::faGlobalMeshData
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Various mesh related information for a parallel run
|
Various mesh related information for a parallel run
|
||||||
@ -87,16 +87,11 @@ public:
|
|||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
ClassName("faGlobalMeshData");
|
ClassName("faGlobalMeshData");
|
||||||
|
|
||||||
|
//- Construct from mesh
|
||||||
|
faGlobalMeshData(const faMesh& mesh);
|
||||||
|
|
||||||
// Constructors
|
//- Destructor
|
||||||
|
~faGlobalMeshData();
|
||||||
//- Construct from mesh
|
|
||||||
faGlobalMeshData(const faMesh& mesh);
|
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
|
||||||
|
|
||||||
~faGlobalMeshData();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -23,8 +23,8 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Typedef
|
||||||
faProcessorTopology
|
Foam::faProcessorTopology
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faMesh.H"
|
#include "faMesh.H"
|
||||||
@ -57,11 +55,8 @@ const int Foam::faMesh::quadricsFit_ = 0;
|
|||||||
|
|
||||||
void Foam::faMesh::setPrimitiveMeshData()
|
void Foam::faMesh::setPrimitiveMeshData()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Setting primitive data" << endl;
|
||||||
Info<< "void faMesh::setPrimitiveMeshData() const : "
|
|
||||||
<< "Setting primitive data" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const indirectPrimitivePatch& bp = patch();
|
const indirectPrimitivePatch& bp = patch();
|
||||||
|
|
||||||
@ -70,19 +65,18 @@ void Foam::faMesh::setPrimitiveMeshData()
|
|||||||
|
|
||||||
label edgeI = -1;
|
label edgeI = -1;
|
||||||
|
|
||||||
|
|
||||||
label nIntEdges = bp.nInternalEdges();
|
label nIntEdges = bp.nInternalEdges();
|
||||||
|
|
||||||
for (label curEdge = 0; curEdge < nIntEdges; curEdge++)
|
for (label curEdge = 0; curEdge < nIntEdges; ++curEdge)
|
||||||
{
|
{
|
||||||
edges_[++edgeI] = bp.edges()[curEdge];
|
edges_[++edgeI] = bp.edges()[curEdge];
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (boundary(), patchI)
|
forAll(boundary(), patchI)
|
||||||
{
|
{
|
||||||
const labelList& curP = boundary()[patchI];
|
const labelList& curP = boundary()[patchI];
|
||||||
|
|
||||||
forAll (curP, eI)
|
forAll(curP, eI)
|
||||||
{
|
{
|
||||||
edges_[++edgeI] = bp.edges()[curP[eI]];
|
edges_[++edgeI] = bp.edges()[curP[eI]];
|
||||||
}
|
}
|
||||||
@ -100,18 +94,18 @@ void Foam::faMesh::setPrimitiveMeshData()
|
|||||||
|
|
||||||
const labelListList& bpef = bp.edgeFaces();
|
const labelListList& bpef = bp.edgeFaces();
|
||||||
|
|
||||||
for (label curEdge = 0; curEdge < nIntEdges; curEdge++)
|
for (label curEdge = 0; curEdge < nIntEdges; ++curEdge)
|
||||||
{
|
{
|
||||||
edgeOwner_[++edgeI] = bpef[curEdge][0];
|
edgeOwner_[++edgeI] = bpef[curEdge][0];
|
||||||
|
|
||||||
edgeNeighbour_[edgeI] = bpef[curEdge][1];
|
edgeNeighbour_[edgeI] = bpef[curEdge][1];
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (boundary(), patchI)
|
forAll(boundary(), patchI)
|
||||||
{
|
{
|
||||||
const labelList& curP = boundary()[patchI];
|
const labelList& curP = boundary()[patchI];
|
||||||
|
|
||||||
forAll (curP, eI)
|
forAll(curP, eI)
|
||||||
{
|
{
|
||||||
edgeOwner_[++edgeI] = bpef[curP[eI]][0];
|
edgeOwner_[++edgeI] = bpef[curP[eI]][0];
|
||||||
}
|
}
|
||||||
@ -216,24 +210,24 @@ Foam::faMesh::faMesh(const polyMesh& pMesh)
|
|||||||
*this
|
*this
|
||||||
),
|
),
|
||||||
comm_(Pstream::worldComm),
|
comm_(Pstream::worldComm),
|
||||||
patchPtr_(NULL),
|
patchPtr_(nullptr),
|
||||||
lduPtr_(NULL),
|
lduPtr_(nullptr),
|
||||||
curTimeIndex_(time().timeIndex()),
|
curTimeIndex_(time().timeIndex()),
|
||||||
SPtr_(NULL),
|
SPtr_(nullptr),
|
||||||
S0Ptr_(NULL),
|
S0Ptr_(nullptr),
|
||||||
S00Ptr_(NULL),
|
S00Ptr_(nullptr),
|
||||||
patchStartsPtr_(NULL),
|
patchStartsPtr_(nullptr),
|
||||||
LePtr_(NULL),
|
LePtr_(nullptr),
|
||||||
magLePtr_(NULL),
|
magLePtr_(nullptr),
|
||||||
centresPtr_(NULL),
|
centresPtr_(nullptr),
|
||||||
edgeCentresPtr_(NULL),
|
edgeCentresPtr_(nullptr),
|
||||||
faceAreaNormalsPtr_(NULL),
|
faceAreaNormalsPtr_(nullptr),
|
||||||
edgeAreaNormalsPtr_(NULL),
|
edgeAreaNormalsPtr_(nullptr),
|
||||||
pointAreaNormalsPtr_(NULL),
|
pointAreaNormalsPtr_(nullptr),
|
||||||
faceCurvaturesPtr_(NULL),
|
faceCurvaturesPtr_(nullptr),
|
||||||
edgeTransformTensorsPtr_(NULL),
|
edgeTransformTensorsPtr_(nullptr),
|
||||||
correctPatchPointNormalsPtr_(NULL),
|
correctPatchPointNormalsPtr_(nullptr),
|
||||||
globalMeshDataPtr_(NULL)
|
globalMeshDataPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -274,7 +268,6 @@ Foam::faMesh::faMesh(const polyMesh& pMesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct from components without boundary.
|
|
||||||
Foam::faMesh::faMesh
|
Foam::faMesh::faMesh
|
||||||
(
|
(
|
||||||
const polyMesh& pMesh,
|
const polyMesh& pMesh,
|
||||||
@ -312,24 +305,24 @@ Foam::faMesh::faMesh
|
|||||||
0
|
0
|
||||||
),
|
),
|
||||||
comm_(Pstream::worldComm),
|
comm_(Pstream::worldComm),
|
||||||
patchPtr_(NULL),
|
patchPtr_(nullptr),
|
||||||
lduPtr_(NULL),
|
lduPtr_(nullptr),
|
||||||
curTimeIndex_(time().timeIndex()),
|
curTimeIndex_(time().timeIndex()),
|
||||||
SPtr_(NULL),
|
SPtr_(nullptr),
|
||||||
S0Ptr_(NULL),
|
S0Ptr_(nullptr),
|
||||||
S00Ptr_(NULL),
|
S00Ptr_(nullptr),
|
||||||
patchStartsPtr_(NULL),
|
patchStartsPtr_(nullptr),
|
||||||
LePtr_(NULL),
|
LePtr_(nullptr),
|
||||||
magLePtr_(NULL),
|
magLePtr_(nullptr),
|
||||||
centresPtr_(NULL),
|
centresPtr_(nullptr),
|
||||||
edgeCentresPtr_(NULL),
|
edgeCentresPtr_(nullptr),
|
||||||
faceAreaNormalsPtr_(NULL),
|
faceAreaNormalsPtr_(nullptr),
|
||||||
edgeAreaNormalsPtr_(NULL),
|
edgeAreaNormalsPtr_(nullptr),
|
||||||
pointAreaNormalsPtr_(NULL),
|
pointAreaNormalsPtr_(nullptr),
|
||||||
faceCurvaturesPtr_(NULL),
|
faceCurvaturesPtr_(nullptr),
|
||||||
edgeTransformTensorsPtr_(NULL),
|
edgeTransformTensorsPtr_(nullptr),
|
||||||
correctPatchPointNormalsPtr_(NULL),
|
correctPatchPointNormalsPtr_(nullptr),
|
||||||
globalMeshDataPtr_(NULL)
|
globalMeshDataPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -339,7 +332,6 @@ Foam::faMesh::faMesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct from definition field
|
|
||||||
Foam::faMesh::faMesh
|
Foam::faMesh::faMesh
|
||||||
(
|
(
|
||||||
const polyMesh& pMesh,
|
const polyMesh& pMesh,
|
||||||
@ -377,30 +369,27 @@ Foam::faMesh::faMesh
|
|||||||
0
|
0
|
||||||
),
|
),
|
||||||
comm_(Pstream::worldComm),
|
comm_(Pstream::worldComm),
|
||||||
patchPtr_(NULL),
|
patchPtr_(nullptr),
|
||||||
lduPtr_(NULL),
|
lduPtr_(nullptr),
|
||||||
curTimeIndex_(time().timeIndex()),
|
curTimeIndex_(time().timeIndex()),
|
||||||
SPtr_(NULL),
|
SPtr_(nullptr),
|
||||||
S0Ptr_(NULL),
|
S0Ptr_(nullptr),
|
||||||
S00Ptr_(NULL),
|
S00Ptr_(nullptr),
|
||||||
patchStartsPtr_(NULL),
|
patchStartsPtr_(nullptr),
|
||||||
LePtr_(NULL),
|
LePtr_(nullptr),
|
||||||
magLePtr_(NULL),
|
magLePtr_(nullptr),
|
||||||
centresPtr_(NULL),
|
centresPtr_(nullptr),
|
||||||
edgeCentresPtr_(NULL),
|
edgeCentresPtr_(nullptr),
|
||||||
faceAreaNormalsPtr_(NULL),
|
faceAreaNormalsPtr_(nullptr),
|
||||||
edgeAreaNormalsPtr_(NULL),
|
edgeAreaNormalsPtr_(nullptr),
|
||||||
pointAreaNormalsPtr_(NULL),
|
pointAreaNormalsPtr_(nullptr),
|
||||||
faceCurvaturesPtr_(NULL),
|
faceCurvaturesPtr_(nullptr),
|
||||||
edgeTransformTensorsPtr_(NULL),
|
edgeTransformTensorsPtr_(nullptr),
|
||||||
correctPatchPointNormalsPtr_(NULL),
|
correctPatchPointNormalsPtr_(nullptr),
|
||||||
globalMeshDataPtr_(NULL)
|
globalMeshDataPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Creating faMesh from definition file" << endl;
|
||||||
Info<< "faMesh::faMesh(...) : "
|
|
||||||
<< "Creating faMesh from definition file" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reading faMeshDefinition dictionary
|
// Reading faMeshDefinition dictionary
|
||||||
IOdictionary faMeshDefinition
|
IOdictionary faMeshDefinition
|
||||||
@ -416,38 +405,29 @@ Foam::faMesh::faMesh
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
wordList polyMeshPatches
|
const wordList polyMeshPatches(faMeshDefinition.lookup("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);
|
List<faPatchData> faPatches(faPatchNames.size() + 1);
|
||||||
|
|
||||||
forAll (faPatchNames, patchI)
|
const polyBoundaryMesh& pbm = pMesh.boundaryMesh();
|
||||||
|
|
||||||
|
forAll(faPatchNames, patchI)
|
||||||
{
|
{
|
||||||
dictionary curPatchDict =
|
dictionary curPatchDict = bndDict.subDict(faPatchNames[patchI]);
|
||||||
bndDict.subDict(faPatchNames[patchI]);
|
|
||||||
|
|
||||||
faPatches[patchI].name_ = faPatchNames[patchI];
|
faPatches[patchI].name_ = faPatchNames[patchI];
|
||||||
|
|
||||||
faPatches[patchI].type_ =
|
faPatches[patchI].type_ = word(curPatchDict.lookup("type"));
|
||||||
word(curPatchDict.lookup("type"));
|
|
||||||
|
|
||||||
faPatches[patchI].ownPolyPatchID_ =
|
faPatches[patchI].ownPolyPatchID_ =
|
||||||
mesh().boundaryMesh().findPatchID
|
pbm.findPatchID(word(curPatchDict.lookup("ownerPolyPatch")));
|
||||||
(
|
|
||||||
word(curPatchDict.lookup("ownerPolyPatch"))
|
|
||||||
);
|
|
||||||
|
|
||||||
faPatches[patchI].ngbPolyPatchID_ =
|
faPatches[patchI].ngbPolyPatchID_ =
|
||||||
mesh().boundaryMesh().findPatchID
|
pbm.findPatchID(word(curPatchDict.lookup("neighbourPolyPatch")));
|
||||||
(
|
|
||||||
word(curPatchDict.lookup("neighbourPolyPatch"))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -456,12 +436,11 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
labelList patchIDs(polyMeshPatches.size(), -1);
|
labelList patchIDs(polyMeshPatches.size(), -1);
|
||||||
|
|
||||||
forAll (polyMeshPatches, patchI)
|
forAll(polyMeshPatches, patchI)
|
||||||
{
|
{
|
||||||
patchIDs[patchI] =
|
patchIDs[patchI] = pbm.findPatchID(polyMeshPatches[patchI]);
|
||||||
mesh().boundaryMesh().findPatchID(polyMeshPatches[patchI]);
|
|
||||||
|
|
||||||
size += mesh().boundaryMesh()[patchIDs[patchI]].size();
|
size += pbm[patchIDs[patchI]].size();
|
||||||
}
|
}
|
||||||
|
|
||||||
faceLabels_ = labelList(size, -1);
|
faceLabels_ = labelList(size, -1);
|
||||||
@ -472,12 +451,12 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
sort(patchIDs);
|
sort(patchIDs);
|
||||||
|
|
||||||
forAll (polyMeshPatches, patchI)
|
forAll(polyMeshPatches, patchI)
|
||||||
{
|
{
|
||||||
label start = mesh().boundaryMesh()[patchIDs[patchI]].start();
|
label start = pbm[patchIDs[patchI]].start();
|
||||||
label size = mesh().boundaryMesh()[patchIDs[patchI]].size();
|
label size = pbm[patchIDs[patchI]].size();
|
||||||
|
|
||||||
for (label i = 0; i < size; i++)
|
for (label i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
faceLabels_[++faceI] = start + i;
|
faceLabels_[++faceI] = start + i;
|
||||||
}
|
}
|
||||||
@ -488,7 +467,7 @@ Foam::faMesh::faMesh
|
|||||||
// Result is in the bndEdgeFaPatchIDs list
|
// Result is in the bndEdgeFaPatchIDs list
|
||||||
labelList faceCells(faceLabels_.size(), -1);
|
labelList faceCells(faceLabels_.size(), -1);
|
||||||
|
|
||||||
forAll (faceCells, faceI)
|
forAll(faceCells, faceI)
|
||||||
{
|
{
|
||||||
label faceID = faceLabels_[faceI];
|
label faceID = faceLabels_[faceI];
|
||||||
|
|
||||||
@ -510,7 +489,7 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
labelList bndEdgeFaPatchIDs(nTotalEdges - nInternalEdges, -1);
|
labelList bndEdgeFaPatchIDs(nTotalEdges - nInternalEdges, -1);
|
||||||
|
|
||||||
for (label edgeI = nInternalEdges; edgeI < nTotalEdges; edgeI++)
|
for (label edgeI = nInternalEdges; edgeI < nTotalEdges; ++edgeI)
|
||||||
{
|
{
|
||||||
label curMeshEdge = meshEdges[edgeI];
|
label curMeshEdge = meshEdges[edgeI];
|
||||||
|
|
||||||
@ -518,11 +497,11 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
label patchI = -1;
|
label patchI = -1;
|
||||||
|
|
||||||
forAll (edgeFaces[curMeshEdge], faceI)
|
forAll(edgeFaces[curMeshEdge], faceI)
|
||||||
{
|
{
|
||||||
label curFace = edgeFaces[curMeshEdge][faceI];
|
label curFace = edgeFaces[curMeshEdge][faceI];
|
||||||
|
|
||||||
label curPatchID = mesh().boundaryMesh().whichPatch(curFace);
|
label curPatchID = pbm.whichPatch(curFace);
|
||||||
|
|
||||||
if (curPatchID != -1)
|
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
|
if
|
||||||
(
|
(
|
||||||
@ -553,11 +532,11 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
|
|
||||||
// Set edgeLabels for each faPatch
|
// 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;
|
SLList<label> tmpList;
|
||||||
|
|
||||||
forAll (bndEdgeFaPatchIDs, eI)
|
forAll(bndEdgeFaPatchIDs, eI)
|
||||||
{
|
{
|
||||||
if (bndEdgeFaPatchIDs[eI] == pI)
|
if (bndEdgeFaPatchIDs[eI] == pI)
|
||||||
{
|
{
|
||||||
@ -571,7 +550,7 @@ Foam::faMesh::faMesh
|
|||||||
// Check for undefined edges
|
// Check for undefined edges
|
||||||
SLList<label> tmpList;
|
SLList<label> tmpList;
|
||||||
|
|
||||||
forAll (bndEdgeFaPatchIDs, eI)
|
forAll(bndEdgeFaPatchIDs, eI)
|
||||||
{
|
{
|
||||||
if (bndEdgeFaPatchIDs[eI] == -1)
|
if (bndEdgeFaPatchIDs[eI] == -1)
|
||||||
{
|
{
|
||||||
@ -582,22 +561,21 @@ Foam::faMesh::faMesh
|
|||||||
if (tmpList.size() > 0)
|
if (tmpList.size() > 0)
|
||||||
{
|
{
|
||||||
// Check for processor edges
|
// Check for processor edges
|
||||||
labelList allUndefEdges = labelList(tmpList);
|
labelList allUndefEdges(tmpList);
|
||||||
labelList ngbPolyPatch(allUndefEdges.size(), -1);
|
labelList ngbPolyPatch(allUndefEdges.size(), -1);
|
||||||
forAll (ngbPolyPatch, edgeI)
|
forAll(ngbPolyPatch, edgeI)
|
||||||
{
|
{
|
||||||
label curEdge = allUndefEdges[edgeI];
|
label curEdge = allUndefEdges[edgeI];
|
||||||
|
|
||||||
label curPMeshEdge = meshEdges[curEdge];
|
label curPMeshEdge = meshEdges[curEdge];
|
||||||
|
|
||||||
forAll (edgeFaces[curPMeshEdge], faceI)
|
forAll(edgeFaces[curPMeshEdge], faceI)
|
||||||
{
|
{
|
||||||
label curFace = edgeFaces[curPMeshEdge][faceI];
|
label curFace = edgeFaces[curPMeshEdge][faceI];
|
||||||
|
|
||||||
if (findIndex(faceLabels_, curFace) == -1)
|
if (findIndex(faceLabels_, curFace) == -1)
|
||||||
{
|
{
|
||||||
label polyPatchID =
|
label polyPatchID = pbm.whichPatch(curFace);
|
||||||
pMesh.boundaryMesh().whichPatch(curFace);
|
|
||||||
|
|
||||||
if (polyPatchID != -1)
|
if (polyPatchID != -1)
|
||||||
{
|
{
|
||||||
@ -609,33 +587,24 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
// Count ngb processorPolyPatch-es
|
// Count ngb processorPolyPatch-es
|
||||||
labelHashSet processorPatchSet;
|
labelHashSet processorPatchSet;
|
||||||
forAll (ngbPolyPatch, edgeI)
|
forAll(ngbPolyPatch, edgeI)
|
||||||
{
|
{
|
||||||
if (ngbPolyPatch[edgeI] != -1)
|
if (ngbPolyPatch[edgeI] != -1)
|
||||||
{
|
{
|
||||||
if
|
if (isA<processorPolyPatch>(pbm[ngbPolyPatch[edgeI]]))
|
||||||
(
|
|
||||||
isA<processorPolyPatch>
|
|
||||||
(
|
|
||||||
pMesh.boundaryMesh()[ngbPolyPatch[edgeI]]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (!processorPatchSet.found(ngbPolyPatch[edgeI]))
|
processorPatchSet.insert(ngbPolyPatch[edgeI]);
|
||||||
{
|
|
||||||
processorPatchSet.insert(ngbPolyPatch[edgeI]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
labelList processorPatches(processorPatchSet.toc());
|
labelList processorPatches(processorPatchSet.toc());
|
||||||
faPatches.setSize(faPatches.size() + processorPatches.size());
|
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;
|
SLList<label> tmpLst;
|
||||||
|
|
||||||
forAll (ngbPolyPatch, eI)
|
forAll(ngbPolyPatch, eI)
|
||||||
{
|
{
|
||||||
if (ngbPolyPatch[eI] == processorPatches[i])
|
if (ngbPolyPatch[eI] == processorPatches[i])
|
||||||
{
|
{
|
||||||
@ -646,7 +615,7 @@ Foam::faMesh::faMesh
|
|||||||
faPatches[faPatchNames.size() + i].edgeLabels_ = tmpLst;
|
faPatches[faPatchNames.size() + i].edgeLabels_ = tmpLst;
|
||||||
|
|
||||||
faPatches[faPatchNames.size() + i].name_ =
|
faPatches[faPatchNames.size() + i].name_ =
|
||||||
pMesh.boundaryMesh()[processorPatches[i]].name();
|
pbm[processorPatches[i]].name();
|
||||||
|
|
||||||
faPatches[faPatchNames.size() + i].type_ =
|
faPatches[faPatchNames.size() + i].type_ =
|
||||||
processorFaPatch::typeName;
|
processorFaPatch::typeName;
|
||||||
@ -657,19 +626,13 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
// Remaining undefined edges
|
// Remaining undefined edges
|
||||||
SLList<label> undefEdges;
|
SLList<label> undefEdges;
|
||||||
forAll (ngbPolyPatch, eI)
|
forAll(ngbPolyPatch, eI)
|
||||||
{
|
{
|
||||||
if (ngbPolyPatch[eI] == -1)
|
if (ngbPolyPatch[eI] == -1)
|
||||||
{
|
{
|
||||||
undefEdges.append(allUndefEdges[eI]);
|
undefEdges.append(allUndefEdges[eI]);
|
||||||
}
|
}
|
||||||
else if
|
else if (!isA<processorPolyPatch>(pbm[ngbPolyPatch[eI]]))
|
||||||
(
|
|
||||||
!isA<processorPolyPatch>
|
|
||||||
(
|
|
||||||
pMesh.boundaryMesh()[ngbPolyPatch[eI]]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
undefEdges.append(allUndefEdges[eI]);
|
undefEdges.append(allUndefEdges[eI]);
|
||||||
}
|
}
|
||||||
@ -696,24 +659,23 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
// Reorder processorFaPatch using
|
// Reorder processorFaPatch using
|
||||||
// ordering of ngb processorPolyPatch
|
// ordering of ngb processorPolyPatch
|
||||||
forAll (faPatches, patchI)
|
forAll(faPatches, patchI)
|
||||||
{
|
{
|
||||||
if (faPatches[patchI].type_ == processorFaPatch::typeName)
|
if (faPatches[patchI].type_ == processorFaPatch::typeName)
|
||||||
{
|
{
|
||||||
labelList ngbFaces(faPatches[patchI].edgeLabels_.size(), -1);
|
labelList ngbFaces(faPatches[patchI].edgeLabels_.size(), -1);
|
||||||
|
|
||||||
forAll (ngbFaces, edgeI)
|
forAll(ngbFaces, edgeI)
|
||||||
{
|
{
|
||||||
label curEdge = faPatches[patchI].edgeLabels_[edgeI];
|
label curEdge = faPatches[patchI].edgeLabels_[edgeI];
|
||||||
|
|
||||||
label curPMeshEdge = meshEdges[curEdge];
|
label curPMeshEdge = meshEdges[curEdge];
|
||||||
|
|
||||||
forAll (edgeFaces[curPMeshEdge], faceI)
|
forAll(edgeFaces[curPMeshEdge], faceI)
|
||||||
{
|
{
|
||||||
label curFace = edgeFaces[curPMeshEdge][faceI];
|
label curFace = edgeFaces[curPMeshEdge][faceI];
|
||||||
|
|
||||||
label curPatchID =
|
label curPatchID = pbm.whichPatch(curFace);
|
||||||
pMesh.boundaryMesh().whichPatch(curFace);
|
|
||||||
|
|
||||||
if (curPatchID == faPatches[patchI].ngbPolyPatchID_)
|
if (curPatchID == faPatches[patchI].ngbPolyPatchID_)
|
||||||
{
|
{
|
||||||
@ -724,7 +686,7 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
SortableList<label> sortedNgbFaces(ngbFaces);
|
SortableList<label> sortedNgbFaces(ngbFaces);
|
||||||
labelList reorderedEdgeLabels(ngbFaces.size(), -1);
|
labelList reorderedEdgeLabels(ngbFaces.size(), -1);
|
||||||
for (label i = 0; i < reorderedEdgeLabels.size(); i++)
|
for (label i = 0; i < reorderedEdgeLabels.size(); ++i)
|
||||||
{
|
{
|
||||||
reorderedEdgeLabels[i] =
|
reorderedEdgeLabels[i] =
|
||||||
faPatches[patchI].edgeLabels_
|
faPatches[patchI].edgeLabels_
|
||||||
@ -741,7 +703,7 @@ Foam::faMesh::faMesh
|
|||||||
// Add good patches to faMesh
|
// Add good patches to faMesh
|
||||||
SLList<faPatch*> faPatchLst;
|
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("type", faPatches[pI].type_);
|
||||||
faPatches[pI].dict_.add("edgeLabels", faPatches[pI].edgeLabels_);
|
faPatches[pI].dict_.add("edgeLabels", faPatches[pI].edgeLabels_);
|
||||||
@ -755,19 +717,16 @@ Foam::faMesh::faMesh
|
|||||||
{
|
{
|
||||||
if (faPatches[pI].ngbPolyPatchID_ == -1)
|
if (faPatches[pI].ngbPolyPatchID_ == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
|
||||||
"void faMesh::faMesh(const polyMesh&, const fileName&)"
|
|
||||||
)
|
|
||||||
<< "ngbPolyPatch is not defined for processorFaPatch: "
|
<< "ngbPolyPatch is not defined for processorFaPatch: "
|
||||||
<< faPatches[pI].name_
|
<< faPatches[pI].name_
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
const processorPolyPatch& procPolyPatch =
|
const processorPolyPatch& procPolyPatch =
|
||||||
refCast<const processorPolyPatch>
|
refCast<const processorPolyPatch>
|
||||||
(
|
(
|
||||||
pMesh.boundaryMesh()[faPatches[pI].ngbPolyPatchID_]
|
pbm[faPatches[pI].ngbPolyPatchID_]
|
||||||
);
|
);
|
||||||
|
|
||||||
faPatches[pI].dict_.add("myProcNo", procPolyPatch.myProcNo());
|
faPatches[pI].dict_.add("myProcNo", procPolyPatch.myProcNo());
|
||||||
@ -823,7 +782,6 @@ Foam::faMesh::faMesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct from polyPatch
|
|
||||||
Foam::faMesh::faMesh
|
Foam::faMesh::faMesh
|
||||||
(
|
(
|
||||||
const polyMesh& pMesh,
|
const polyMesh& pMesh,
|
||||||
@ -861,36 +819,34 @@ Foam::faMesh::faMesh
|
|||||||
0
|
0
|
||||||
),
|
),
|
||||||
comm_(Pstream::worldComm),
|
comm_(Pstream::worldComm),
|
||||||
patchPtr_(NULL),
|
patchPtr_(nullptr),
|
||||||
lduPtr_(NULL),
|
lduPtr_(nullptr),
|
||||||
curTimeIndex_(time().timeIndex()),
|
curTimeIndex_(time().timeIndex()),
|
||||||
SPtr_(NULL),
|
SPtr_(nullptr),
|
||||||
S0Ptr_(NULL),
|
S0Ptr_(nullptr),
|
||||||
S00Ptr_(NULL),
|
S00Ptr_(nullptr),
|
||||||
patchStartsPtr_(NULL),
|
patchStartsPtr_(nullptr),
|
||||||
LePtr_(NULL),
|
LePtr_(nullptr),
|
||||||
magLePtr_(NULL),
|
magLePtr_(nullptr),
|
||||||
centresPtr_(NULL),
|
centresPtr_(nullptr),
|
||||||
edgeCentresPtr_(NULL),
|
edgeCentresPtr_(nullptr),
|
||||||
faceAreaNormalsPtr_(NULL),
|
faceAreaNormalsPtr_(nullptr),
|
||||||
edgeAreaNormalsPtr_(NULL),
|
edgeAreaNormalsPtr_(nullptr),
|
||||||
pointAreaNormalsPtr_(NULL),
|
pointAreaNormalsPtr_(nullptr),
|
||||||
faceCurvaturesPtr_(NULL),
|
faceCurvaturesPtr_(nullptr),
|
||||||
edgeTransformTensorsPtr_(NULL),
|
edgeTransformTensorsPtr_(nullptr),
|
||||||
correctPatchPointNormalsPtr_(NULL),
|
correctPatchPointNormalsPtr_(nullptr),
|
||||||
globalMeshDataPtr_(NULL)
|
globalMeshDataPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Creating faMesh from polyPatch" << endl;
|
||||||
Info<< "faMesh::faMesh(...) : "
|
|
||||||
<< "Creating faMesh from polyPatch" << endl;
|
const polyBoundaryMesh& pbm = pMesh.boundaryMesh();
|
||||||
}
|
|
||||||
|
|
||||||
// Set faceLabels
|
// Set faceLabels
|
||||||
forAll (faceLabels_, faceI)
|
forAll(faceLabels_, faceI)
|
||||||
{
|
{
|
||||||
faceLabels_[faceI] =
|
faceLabels_[faceI] = pbm[polyPatchID].start() + faceI;
|
||||||
mesh().boundaryMesh()[polyPatchID].start() + faceI;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add one faPatch
|
// Add one faPatch
|
||||||
@ -902,7 +858,7 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
labelList edgeLabels(nTotalEdges - nInternalEdges, -1);
|
labelList edgeLabels(nTotalEdges - nInternalEdges, -1);
|
||||||
|
|
||||||
forAll (edgeLabels, edgeI)
|
forAll(edgeLabels, edgeI)
|
||||||
{
|
{
|
||||||
edgeLabels[edgeI] = nInternalEdges + edgeI;
|
edgeLabels[edgeI] = nInternalEdges + edgeI;
|
||||||
}
|
}
|
||||||
@ -915,8 +871,7 @@ Foam::faMesh::faMesh
|
|||||||
|
|
||||||
List<faPatch*> faPatchLst(1);
|
List<faPatch*> faPatchLst(1);
|
||||||
|
|
||||||
faPatchLst[0] =
|
faPatchLst[0] = faPatch::New("default", patchDict, 0, boundary()).ptr();
|
||||||
faPatch::New("default", patchDict, 0, boundary()).ptr();
|
|
||||||
|
|
||||||
addFaPatches(faPatchLst);
|
addFaPatches(faPatchLst);
|
||||||
|
|
||||||
@ -937,6 +892,7 @@ Foam::faMesh::~faMesh()
|
|||||||
clearOut();
|
clearOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::fileName Foam::faMesh::meshDir() const
|
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)
|
void Foam::faMesh::addFaPatches(const List<faPatch*>& p)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Adding patches to faMesh" << endl;
|
||||||
Info<< "void faMesh::addFaPatches(const List<faPatch*>& p) : "
|
|
||||||
<< "Adding patches to faMesh" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (boundary().size() > 0)
|
if (boundary().size() > 0)
|
||||||
{
|
{
|
||||||
FatalErrorIn("void faMesh::addPatches(const List<faPatch*>& p)")
|
FatalErrorInFunction
|
||||||
<< "boundary already exists"
|
<< "boundary already exists"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
boundary_.setSize(p.size());
|
boundary_.setSize(p.size());
|
||||||
|
|
||||||
forAll (p, patchI)
|
forAll(p, patchI)
|
||||||
{
|
{
|
||||||
boundary_.set(patchI, p[patchI]);
|
boundary_.set(patchI, p[patchI]);
|
||||||
}
|
}
|
||||||
@ -1143,7 +1096,7 @@ Foam::faMesh::S0() const
|
|||||||
{
|
{
|
||||||
if (!S0Ptr_)
|
if (!S0Ptr_)
|
||||||
{
|
{
|
||||||
FatalErrorIn("faMesh::S0() const")
|
FatalErrorInFunction
|
||||||
<< "S0 is not available"
|
<< "S0 is not available"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -1238,7 +1191,6 @@ Foam::faMesh::edgeTransformTensors() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return global mesh data
|
|
||||||
const Foam::faGlobalMeshData& Foam::faMesh::globalData() const
|
const Foam::faGlobalMeshData& Foam::faMesh::globalData() const
|
||||||
{
|
{
|
||||||
if (!globalMeshDataPtr_)
|
if (!globalMeshDataPtr_)
|
||||||
@ -1271,22 +1223,18 @@ bool Foam::faMesh::movePoints()
|
|||||||
{
|
{
|
||||||
if (S00Ptr_ && S0Ptr_)
|
if (S00Ptr_ && S0Ptr_)
|
||||||
{
|
{
|
||||||
Info<< "Copy old-old S" << endl;
|
DebugInfo<< "Copy old-old S" << endl;
|
||||||
*S00Ptr_ = *S0Ptr_;
|
*S00Ptr_ = *S0Ptr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (S0Ptr_)
|
if (S0Ptr_)
|
||||||
{
|
{
|
||||||
Info<< "Copy old S" << endl;
|
DebugInfo<< "Copy old S" << endl;
|
||||||
*S0Ptr_ = S();
|
*S0Ptr_ = S();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo<< "Creating old cell volumes." << endl;
|
||||||
{
|
|
||||||
InfoIn("bool faMesh::movePoints()")
|
|
||||||
<< "Creating old cell volumes." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
S0Ptr_ = new DimensionedField<scalar, areaMesh>
|
S0Ptr_ = new DimensionedField<scalar, areaMesh>
|
||||||
(
|
(
|
||||||
@ -1309,7 +1257,6 @@ bool Foam::faMesh::movePoints()
|
|||||||
clearGeomNotAreas();
|
clearGeomNotAreas();
|
||||||
|
|
||||||
// To satisfy the motion interface for MeshObject, const cast is needed
|
// To satisfy the motion interface for MeshObject, const cast is needed
|
||||||
// HJ, 5/Aug/2011
|
|
||||||
if (patchPtr_)
|
if (patchPtr_)
|
||||||
{
|
{
|
||||||
patchPtr_->movePoints(newPoints);
|
patchPtr_->movePoints(newPoints);
|
||||||
@ -1322,7 +1269,7 @@ bool Foam::faMesh::movePoints()
|
|||||||
const edgeInterpolation& cei = *this;
|
const edgeInterpolation& cei = *this;
|
||||||
const_cast<edgeInterpolation&>(cei).edgeInterpolation::movePoints();
|
const_cast<edgeInterpolation&>(cei).edgeInterpolation::movePoints();
|
||||||
|
|
||||||
// Fluxes were dummy? HJ, 28/Jul/2011
|
// Note: Fluxes were dummy?
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1332,10 +1279,8 @@ bool Foam::faMesh::correctPatchPointNormals(const label patchID) const
|
|||||||
{
|
{
|
||||||
if ((patchID < 0) || (patchID >= boundary().size()))
|
if ((patchID < 0) || (patchID >= boundary().size()))
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "patchID is not in the valid range"
|
||||||
"bool correctPatchPointNormals(const label patchID) const"
|
|
||||||
) << "patchID is not in the valid range"
|
|
||||||
<< abort(FatalError);
|
<< 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
|
Foam::boolList& Foam::faMesh::correctPatchPointNormals() const
|
||||||
{
|
{
|
||||||
if (!correctPatchPointNormalsPtr_)
|
if (!correctPatchPointNormalsPtr_)
|
||||||
{
|
{
|
||||||
correctPatchPointNormalsPtr_ =
|
correctPatchPointNormalsPtr_ = new boolList(boundary().size(), false);
|
||||||
new boolList(boundary().size(), false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return *correctPatchPointNormalsPtr_;
|
return *correctPatchPointNormalsPtr_;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
faMesh
|
Foam::faMesh
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Finite area mesh. Used for 2-D non-Euclidian finite area method.
|
Finite area mesh. Used for 2-D non-Euclidian finite area method.
|
||||||
@ -56,7 +56,6 @@ Author
|
|||||||
#include "indirectPrimitivePatch.H"
|
#include "indirectPrimitivePatch.H"
|
||||||
#include "edgeInterpolation.H"
|
#include "edgeInterpolation.H"
|
||||||
#include "labelIOList.H"
|
#include "labelIOList.H"
|
||||||
#include "scalarIOField.H"
|
|
||||||
#include "FieldFields.H"
|
#include "FieldFields.H"
|
||||||
#include "faGlobalMeshData.H"
|
#include "faGlobalMeshData.H"
|
||||||
|
|
||||||
@ -70,7 +69,7 @@ class faMeshLduAddressing;
|
|||||||
class faMeshMapper;
|
class faMeshMapper;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class faMesh Declaration
|
Class faMesh Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class faMesh
|
class faMesh
|
||||||
@ -178,6 +177,7 @@ class faMesh
|
|||||||
//- Whether point normals must be corrected for a patch
|
//- Whether point normals must be corrected for a patch
|
||||||
mutable boolList* correctPatchPointNormalsPtr_;
|
mutable boolList* correctPatchPointNormalsPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Other mesh-related data
|
// Other mesh-related data
|
||||||
|
|
||||||
//- Parallel info
|
//- Parallel info
|
||||||
@ -202,6 +202,7 @@ class faMesh
|
|||||||
//- Set primitive mesh data
|
//- Set primitive mesh data
|
||||||
void setPrimitiveMeshData();
|
void setPrimitiveMeshData();
|
||||||
|
|
||||||
|
|
||||||
// Private member functions to calculate demand driven data
|
// Private member functions to calculate demand driven data
|
||||||
|
|
||||||
//- Calculate ldu addressing
|
//- Calculate ldu addressing
|
||||||
@ -340,7 +341,7 @@ public:
|
|||||||
const fileName& facesInstance() const;
|
const fileName& facesInstance() const;
|
||||||
|
|
||||||
|
|
||||||
//- Mesh size parameters
|
// Mesh size parameters
|
||||||
|
|
||||||
inline label nPoints() const
|
inline label nPoints() const
|
||||||
{
|
{
|
||||||
@ -362,6 +363,7 @@ public:
|
|||||||
return nFaces_;
|
return nFaces_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Primitive mesh data
|
// Primitive mesh data
|
||||||
|
|
||||||
//- Return mesh points
|
//- Return mesh points
|
||||||
@ -547,7 +549,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "faPatchFaMeshTemplates.C"
|
#include "faPatchFaMeshTemplates.C"
|
||||||
#endif
|
#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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
faMeshLduAddressing
|
Foam::faMeshLduAddressing
|
||||||
|
|
||||||
Description
|
Description
|
||||||
lduAddressing wrapper for faMesh
|
lduAddressing wrapper for faMesh
|
||||||
@ -50,7 +50,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class faMeshLduAddressing Declaration
|
Class faMeshLduAddressing Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class faMeshLduAddressing
|
class faMeshLduAddressing
|
||||||
@ -101,16 +101,15 @@ public:
|
|||||||
patchAddr_(mesh.boundary().size()),
|
patchAddr_(mesh.boundary().size()),
|
||||||
patchSchedule_(mesh.globalData().patchSchedule())
|
patchSchedule_(mesh.globalData().patchSchedule())
|
||||||
{
|
{
|
||||||
forAll (mesh.boundary(), patchI)
|
forAll(mesh.boundary(), patchI)
|
||||||
{
|
{
|
||||||
patchAddr_[patchI] = &mesh.boundary()[patchI].edgeFaces();
|
patchAddr_[patchI] = &mesh.boundary()[patchI].edgeFaces();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destructor
|
//-Destructor
|
||||||
|
virtual ~faMeshLduAddressing()
|
||||||
virtual ~faMeshLduAddressing()
|
{}
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -45,7 +45,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
|| insertedObjectLabelsPtr_
|
|| insertedObjectLabelsPtr_
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalErrorIn("void faAreaMapper::calcAddressing() const)")
|
FatalErrorInFunction
|
||||||
<< "Addressing already calculated"
|
<< "Addressing already calculated"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -63,7 +63,6 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
|
|
||||||
// Prepare a list of new face labels and (preliminary) addressing
|
// Prepare a list of new face labels and (preliminary) addressing
|
||||||
// Note: dimensioned to number of boundary faces of polyMesh
|
// Note: dimensioned to number of boundary faces of polyMesh
|
||||||
// HJ, 10/Aug/2011
|
|
||||||
newFaceLabelsPtr_ = new labelList
|
newFaceLabelsPtr_ = new labelList
|
||||||
(
|
(
|
||||||
mesh_().nFaces() - mesh_().nInternalFaces(),
|
mesh_().nFaces() - mesh_().nInternalFaces(),
|
||||||
@ -86,7 +85,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
const labelList& reverseFaceMap = mpm_.reverseFaceMap();
|
const labelList& reverseFaceMap = mpm_.reverseFaceMap();
|
||||||
|
|
||||||
// Pick up live old faces
|
// Pick up live old faces
|
||||||
forAll (oldFaces, faceI)
|
forAll(oldFaces, faceI)
|
||||||
{
|
{
|
||||||
if (reverseFaceMap[oldFaces[faceI]] > -1)
|
if (reverseFaceMap[oldFaces[faceI]] > -1)
|
||||||
{
|
{
|
||||||
@ -109,7 +108,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
labelList& addr = *directAddrPtr_;
|
labelList& addr = *directAddrPtr_;
|
||||||
|
|
||||||
// Adjust for creation of a boundary face from an internal face
|
// Adjust for creation of a boundary face from an internal face
|
||||||
forAll (addr, faceI)
|
forAll(addr, faceI)
|
||||||
{
|
{
|
||||||
if (newFaceLabelsMap[faceI] < oldNInternal)
|
if (newFaceLabelsMap[faceI] < oldNInternal)
|
||||||
{
|
{
|
||||||
@ -132,7 +131,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
scalarListList& w = *weightsPtr_;
|
scalarListList& w = *weightsPtr_;
|
||||||
|
|
||||||
// Insert single addressing and weights
|
// 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]);
|
addr[addrI] = labelList(1, newFaceLabelsMap[addrI]);
|
||||||
w[addrI] = scalarList(1, scalar(1));
|
w[addrI] = scalarList(1, scalar(1));
|
||||||
@ -150,7 +149,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
|
|
||||||
const List<objectMap>& ffp = mpm_.facesFromPointsMap();
|
const List<objectMap>& ffp = mpm_.facesFromPointsMap();
|
||||||
|
|
||||||
forAll (ffp, ffpI)
|
forAll(ffp, ffpI)
|
||||||
{
|
{
|
||||||
// Get addressing
|
// Get addressing
|
||||||
const labelList& mo = ffp[ffpI].masterObjects();
|
const labelList& mo = ffp[ffpI].masterObjects();
|
||||||
@ -159,7 +158,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
labelList validMo(mo.size());
|
labelList validMo(mo.size());
|
||||||
label nValidMo = 0;
|
label nValidMo = 0;
|
||||||
|
|
||||||
forAll (mo, moI)
|
forAll(mo, moI)
|
||||||
{
|
{
|
||||||
if (oldFaceLookup.found(mo[moI]))
|
if (oldFaceLookup.found(mo[moI]))
|
||||||
{
|
{
|
||||||
@ -186,7 +185,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
|
|
||||||
const List<objectMap>& ffe = mpm_.facesFromEdgesMap();
|
const List<objectMap>& ffe = mpm_.facesFromEdgesMap();
|
||||||
|
|
||||||
forAll (ffe, ffeI)
|
forAll(ffe, ffeI)
|
||||||
{
|
{
|
||||||
// Get addressing
|
// Get addressing
|
||||||
const labelList& mo = ffe[ffeI].masterObjects();
|
const labelList& mo = ffe[ffeI].masterObjects();
|
||||||
@ -195,7 +194,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
labelList validMo(mo.size());
|
labelList validMo(mo.size());
|
||||||
label nValidMo = 0;
|
label nValidMo = 0;
|
||||||
|
|
||||||
forAll (mo, moI)
|
forAll(mo, moI)
|
||||||
{
|
{
|
||||||
if (oldFaceLookup.found(mo[moI]))
|
if (oldFaceLookup.found(mo[moI]))
|
||||||
{
|
{
|
||||||
@ -222,7 +221,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
|
|
||||||
const List<objectMap>& fff = mpm_.facesFromFacesMap();
|
const List<objectMap>& fff = mpm_.facesFromFacesMap();
|
||||||
|
|
||||||
forAll (fff, fffI)
|
forAll(fff, fffI)
|
||||||
{
|
{
|
||||||
// Get addressing
|
// Get addressing
|
||||||
const labelList& mo = fff[fffI].masterObjects();
|
const labelList& mo = fff[fffI].masterObjects();
|
||||||
@ -231,7 +230,7 @@ void Foam::faAreaMapper::calcAddressing() const
|
|||||||
labelList validMo(mo.size());
|
labelList validMo(mo.size());
|
||||||
label nValidMo = 0;
|
label nValidMo = 0;
|
||||||
|
|
||||||
forAll (mo, moI)
|
forAll(mo, moI)
|
||||||
{
|
{
|
||||||
if (oldFaceLookup.found(mo[moI]))
|
if (oldFaceLookup.found(mo[moI]))
|
||||||
{
|
{
|
||||||
@ -287,7 +286,6 @@ void Foam::faAreaMapper::clearOut()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::faAreaMapper::faAreaMapper
|
Foam::faAreaMapper::faAreaMapper
|
||||||
(
|
(
|
||||||
const faMesh& mesh,
|
const faMesh& mesh,
|
||||||
@ -300,12 +298,12 @@ Foam::faAreaMapper::faAreaMapper
|
|||||||
direct_(false),
|
direct_(false),
|
||||||
hasUnmapped_(false),
|
hasUnmapped_(false),
|
||||||
sizeBeforeMapping_(mesh.nFaces()),
|
sizeBeforeMapping_(mesh.nFaces()),
|
||||||
newFaceLabelsPtr_(NULL),
|
newFaceLabelsPtr_(nullptr),
|
||||||
newFaceLabelsMapPtr_(NULL),
|
newFaceLabelsMapPtr_(nullptr),
|
||||||
directAddrPtr_(NULL),
|
directAddrPtr_(nullptr),
|
||||||
interpolationAddrPtr_(NULL),
|
interpolationAddrPtr_(nullptr),
|
||||||
weightsPtr_(NULL),
|
weightsPtr_(nullptr),
|
||||||
insertedObjectLabelsPtr_(NULL)
|
insertedObjectLabelsPtr_(nullptr)
|
||||||
{
|
{
|
||||||
// Check for possibility of direct mapping
|
// Check for possibility of direct mapping
|
||||||
if
|
if
|
||||||
@ -323,7 +321,6 @@ Foam::faAreaMapper::faAreaMapper
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Inserted objects not suported: no master
|
// Inserted objects not suported: no master
|
||||||
// HJ, 10/Aug/2011
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -363,11 +360,8 @@ const Foam::labelUList& Foam::faAreaMapper::directAddressing() const
|
|||||||
{
|
{
|
||||||
if (!direct())
|
if (!direct())
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Requested direct addressing for an interpolative mapper."
|
||||||
"const labelUList& faAreaMapper::"
|
|
||||||
"directAddressing() const"
|
|
||||||
) << "Requested direct addressing for an interpolative mapper."
|
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -384,10 +378,8 @@ const Foam::labelListList& Foam::faAreaMapper::addressing() const
|
|||||||
{
|
{
|
||||||
if (direct())
|
if (direct())
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Requested interpolative addressing for a direct mapper."
|
||||||
"const labelListList& faAreaMapper::addressing() const"
|
|
||||||
) << "Requested interpolative addressing for a direct mapper."
|
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,10 +396,8 @@ const Foam::scalarListList& Foam::faAreaMapper::weights() const
|
|||||||
{
|
{
|
||||||
if (direct())
|
if (direct())
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Requested interpolative weights for a direct mapper."
|
||||||
"const scalarListList& faAreaMapper::weights() const"
|
|
||||||
) << "Requested interpolative weights for a direct mapper."
|
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -102,7 +102,6 @@ class faAreaMapper
|
|||||||
mutable labelList* insertedObjectLabelsPtr_;
|
mutable labelList* insertedObjectLabelsPtr_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
@ -111,7 +110,6 @@ class faAreaMapper
|
|||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const faAreaMapper&);
|
void operator=(const faAreaMapper&);
|
||||||
|
|
||||||
|
|
||||||
//- Calculate addressing
|
//- Calculate addressing
|
||||||
void calcAddressing() const;
|
void calcAddressing() const;
|
||||||
|
|
||||||
@ -121,19 +119,16 @@ class faAreaMapper
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
//- Construct from components
|
||||||
|
faAreaMapper
|
||||||
//- Construct from components
|
(
|
||||||
faAreaMapper
|
const faMesh& mesh,
|
||||||
(
|
const mapPolyMesh& mpm
|
||||||
const faMesh& mesh,
|
);
|
||||||
const mapPolyMesh& mpm
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~faAreaMapper();
|
||||||
virtual ~faAreaMapper();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -74,7 +74,7 @@ public:
|
|||||||
{
|
{
|
||||||
const faBoundaryMesh& patches = mesh.boundary();
|
const faBoundaryMesh& patches = mesh.boundary();
|
||||||
|
|
||||||
forAll (patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
(
|
(
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
Description
|
||||||
FV edge mapper.
|
FA edge mapper.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ void Foam::faEdgeMapper::calcAddressing() const
|
|||||||
{
|
{
|
||||||
if (directAddrPtr_)
|
if (directAddrPtr_)
|
||||||
{
|
{
|
||||||
FatalErrorIn("void faEdgeMapper::calcAddressing() const)")
|
FatalErrorInFunction
|
||||||
<< "Addressing already calculated"
|
<< "Addressing already calculated"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -58,7 +58,6 @@ void Foam::faEdgeMapper::clearOut()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::faEdgeMapper::faEdgeMapper
|
Foam::faEdgeMapper::faEdgeMapper
|
||||||
(
|
(
|
||||||
const faMesh& mesh,
|
const faMesh& mesh,
|
||||||
@ -69,7 +68,7 @@ Foam::faEdgeMapper::faEdgeMapper
|
|||||||
mpm_(mpm),
|
mpm_(mpm),
|
||||||
sizeBeforeMapping_(mesh.nInternalEdges()),
|
sizeBeforeMapping_(mesh.nInternalEdges()),
|
||||||
hasUnmapped_(false),
|
hasUnmapped_(false),
|
||||||
directAddrPtr_(NULL)
|
directAddrPtr_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -96,10 +95,8 @@ const Foam::labelUList& Foam::faEdgeMapper::directAddressing() const
|
|||||||
|
|
||||||
const Foam::labelListList& Foam::faEdgeMapper::addressing() const
|
const Foam::labelListList& Foam::faEdgeMapper::addressing() const
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Requested interpolative addressing for a direct mapper."
|
||||||
"const labelListList& faEdgeMapper::addressing() const"
|
|
||||||
) << "Requested interpolative addressing for a direct mapper."
|
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|
||||||
return labelListList::null();
|
return labelListList::null();
|
||||||
@ -108,10 +105,8 @@ const Foam::labelListList& Foam::faEdgeMapper::addressing() const
|
|||||||
|
|
||||||
const Foam::scalarListList& Foam::faEdgeMapper::weights() const
|
const Foam::scalarListList& Foam::faEdgeMapper::weights() const
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Requested interpolative weights for a direct mapper."
|
||||||
"const scalarListList& faEdgeMapper::weights() const"
|
|
||||||
) << "Requested interpolative weights for a direct mapper."
|
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|
||||||
return scalarListList::null();
|
return scalarListList::null();
|
||||||
|
|||||||
@ -89,7 +89,6 @@ class faEdgeMapper
|
|||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const faEdgeMapper&);
|
void operator=(const faEdgeMapper&);
|
||||||
|
|
||||||
|
|
||||||
//- Calculate addressing
|
//- Calculate addressing
|
||||||
void calcAddressing() const;
|
void calcAddressing() const;
|
||||||
|
|
||||||
@ -99,19 +98,16 @@ class faEdgeMapper
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
//- Construct from components
|
||||||
|
faEdgeMapper
|
||||||
//- Construct from components
|
(
|
||||||
faEdgeMapper
|
const faMesh& mesh,
|
||||||
(
|
const mapPolyMesh& mpm
|
||||||
const faMesh& mesh,
|
);
|
||||||
const mapPolyMesh& mpm
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~faEdgeMapper();
|
||||||
virtual ~faEdgeMapper();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -27,9 +27,6 @@ License
|
|||||||
|
|
||||||
#include "faMeshMapper.H"
|
#include "faMeshMapper.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::faMeshMapper::faMeshMapper
|
Foam::faMeshMapper::faMeshMapper
|
||||||
@ -53,7 +50,7 @@ Foam::faMeshMapper::faMeshMapper
|
|||||||
// Capture old patch information
|
// Capture old patch information
|
||||||
const faBoundaryMesh& patches = mesh.boundary();
|
const faBoundaryMesh& patches = mesh.boundary();
|
||||||
|
|
||||||
forAll (patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
oldPatchSizes_[patchI] = patches[patchI].size();
|
oldPatchSizes_[patchI] = patches[patchI].size();
|
||||||
oldPatchStarts_[patchI] = patches[patchI].start();
|
oldPatchStarts_[patchI] = patches[patchI].start();
|
||||||
|
|||||||
@ -38,10 +38,8 @@ void Foam::faPatchMapper::calcAddressing() const
|
|||||||
{
|
{
|
||||||
if (directAddrPtr_)
|
if (directAddrPtr_)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Addressing already calculated"
|
||||||
"void faPatchMapper::calcAddressing() const)"
|
|
||||||
) << "Addressing already calculated"
|
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +57,7 @@ void Foam::faPatchMapper::calcAddressing() const
|
|||||||
|
|
||||||
const labelList& reverseFaceMap = mpm_.reverseFaceMap();
|
const labelList& reverseFaceMap = mpm_.reverseFaceMap();
|
||||||
|
|
||||||
forAll (oldEdgeFaces_, oefI)
|
forAll(oldEdgeFaces_, oefI)
|
||||||
{
|
{
|
||||||
if (reverseFaceMap[oldEdgeFaces_[oefI]] > -1)
|
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
|
// Go through new edgeFaces and for each edge try to locate old index
|
||||||
const labelList& ef = patch_.edgeFaces();
|
const labelList& ef = patch_.edgeFaces();
|
||||||
|
|
||||||
forAll (ef, efI)
|
forAll(ef, efI)
|
||||||
{
|
{
|
||||||
if (edgeIndexLookup.found(ef[efI]))
|
if (edgeIndexLookup.found(ef[efI]))
|
||||||
{
|
{
|
||||||
@ -98,7 +96,6 @@ void Foam::faPatchMapper::clearOut()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::faPatchMapper::faPatchMapper
|
Foam::faPatchMapper::faPatchMapper
|
||||||
(
|
(
|
||||||
const faPatch& patch,
|
const faPatch& patch,
|
||||||
@ -110,7 +107,7 @@ Foam::faPatchMapper::faPatchMapper
|
|||||||
sizeBeforeMapping_(patch.size()),
|
sizeBeforeMapping_(patch.size()),
|
||||||
oldEdgeFaces_(patch.edgeFaces()),
|
oldEdgeFaces_(patch.edgeFaces()),
|
||||||
hasUnmapped_(false),
|
hasUnmapped_(false),
|
||||||
directAddrPtr_(NULL)
|
directAddrPtr_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -137,10 +134,8 @@ const Foam::labelUList& Foam::faPatchMapper::directAddressing() const
|
|||||||
|
|
||||||
const Foam::labelListList& Foam::faPatchMapper::addressing() const
|
const Foam::labelListList& Foam::faPatchMapper::addressing() const
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Requested interpolative addressing for a direct mapper."
|
||||||
"const labelListList& faPatchMapper::addressing() const"
|
|
||||||
) << "Requested interpolative addressing for a direct mapper."
|
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|
||||||
return labelListList::null();
|
return labelListList::null();
|
||||||
@ -149,10 +144,8 @@ const Foam::labelListList& Foam::faPatchMapper::addressing() const
|
|||||||
|
|
||||||
const Foam::scalarListList& Foam::faPatchMapper::weights() const
|
const Foam::scalarListList& Foam::faPatchMapper::weights() const
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Requested interpolative weights for a direct mapper."
|
||||||
"const scalarListList& faPatchMapper::weights() const"
|
|
||||||
) << "Requested interpolative weights for a direct mapper."
|
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|
||||||
return scalarListList::null();
|
return scalarListList::null();
|
||||||
|
|||||||
@ -105,14 +105,12 @@ class faPatchMapper
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
//- Construct from mappers
|
||||||
|
faPatchMapper
|
||||||
//- Construct from mappers
|
(
|
||||||
faPatchMapper
|
const faPatch& patch,
|
||||||
(
|
const mapPolyMesh& mpm
|
||||||
const faPatch& patch,
|
);
|
||||||
const mapPolyMesh& mpm
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faMesh.H"
|
#include "faMesh.H"
|
||||||
@ -83,7 +81,7 @@ void Foam::faMesh::updateMesh(const mapPolyMesh& mpm)
|
|||||||
|
|
||||||
const labelListList& oldPatchEdgeFaces = mapper.oldPatchEdgeFaces();
|
const labelListList& oldPatchEdgeFaces = mapper.oldPatchEdgeFaces();
|
||||||
|
|
||||||
forAll (oldPatchEdgeFaces, patchI)
|
forAll(oldPatchEdgeFaces, patchI)
|
||||||
{
|
{
|
||||||
labelList& curPatchEdges = patchEdges[patchI];
|
labelList& curPatchEdges = patchEdges[patchI];
|
||||||
curPatchEdges.setSize(nTotalEdges - nInternalEdges);
|
curPatchEdges.setSize(nTotalEdges - nInternalEdges);
|
||||||
@ -95,7 +93,7 @@ void Foam::faMesh::updateMesh(const mapPolyMesh& mpm)
|
|||||||
// Make a fast lookup
|
// Make a fast lookup
|
||||||
labelHashSet oldFaceLookup(oldPatchEdgeFaces[patchI]);
|
labelHashSet oldFaceLookup(oldPatchEdgeFaces[patchI]);
|
||||||
|
|
||||||
for (label edgeI = nInternalEdges; edgeI < nTotalEdges; edgeI++)
|
for (label edgeI = nInternalEdges; edgeI < nTotalEdges; ++edgeI)
|
||||||
{
|
{
|
||||||
if (edgeToPatch[edgeI - nInternalEdges] > -1)
|
if (edgeToPatch[edgeI - nInternalEdges] > -1)
|
||||||
{
|
{
|
||||||
@ -125,7 +123,7 @@ void Foam::faMesh::updateMesh(const mapPolyMesh& mpm)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set new edges for all patches
|
// Set new edges for all patches
|
||||||
forAll (m.boundary_, patchI)
|
forAll(m.boundary_, patchI)
|
||||||
{
|
{
|
||||||
m.boundary_[patchI].resetEdges(patchEdges[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();
|
const labelList& faceMap = mapper.areaMap().newFaceLabelsMap();
|
||||||
|
|
||||||
// Map existing old areas; for new faces set area to zero
|
// Map existing old areas; for new faces set area to zero
|
||||||
forAll (faceMap, faceI)
|
forAll(faceMap, faceI)
|
||||||
{
|
{
|
||||||
if (faceMap[faceI] > -1)
|
if (faceMap[faceI] > -1)
|
||||||
{
|
{
|
||||||
@ -227,7 +225,7 @@ void Foam::faMesh::mapOldAreas(const faMeshMapper& mapper) const
|
|||||||
const labelList& faceMap = mapper.areaMap().newFaceLabelsMap();
|
const labelList& faceMap = mapper.areaMap().newFaceLabelsMap();
|
||||||
|
|
||||||
// Map old areas for existing faces; for new faces, set area to zero
|
// Map old areas for existing faces; for new faces, set area to zero
|
||||||
forAll (faceMap, faceI)
|
forAll(faceMap, faceI)
|
||||||
{
|
{
|
||||||
if (faceMap[faceI] > -1)
|
if (faceMap[faceI] > -1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,14 +32,12 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
defineTypeNameAndDebug(coupledFaPatch, 0);
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
}
|
||||||
|
|
||||||
defineTypeNameAndDebug(coupledFaPatch, 0);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
void coupledFaPatch::calcTransformTensors
|
void Foam::coupledFaPatch::calcTransformTensors
|
||||||
(
|
(
|
||||||
const vector& Cf,
|
const vector& Cf,
|
||||||
const vector& Cr,
|
const vector& Cr,
|
||||||
@ -73,7 +71,7 @@ void coupledFaPatch::calcTransformTensors
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void coupledFaPatch::calcTransformTensors
|
void Foam::coupledFaPatch::calcTransformTensors
|
||||||
(
|
(
|
||||||
const vectorField& Cf,
|
const vectorField& Cf,
|
||||||
const vectorField& Cr,
|
const vectorField& Cr,
|
||||||
@ -88,7 +86,7 @@ void coupledFaPatch::calcTransformTensors
|
|||||||
forwardT_.setSize(size());
|
forwardT_.setSize(size());
|
||||||
reverseT_.setSize(size());
|
reverseT_.setSize(size());
|
||||||
|
|
||||||
forAll (forwardT_, facei)
|
forAll(forwardT_, facei)
|
||||||
{
|
{
|
||||||
forwardT_[facei] = rotationTensor(-nr[facei], nf[facei]);
|
forwardT_[facei] = rotationTensor(-nr[facei], nf[facei]);
|
||||||
reverseT_[facei] = rotationTensor(nf[facei], -nr[facei]);
|
reverseT_[facei] = rotationTensor(nf[facei], -nr[facei]);
|
||||||
@ -121,12 +119,8 @@ void coupledFaPatch::calcTransformTensors
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * 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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
coupledFaPatch
|
Foam::coupledFaPatch
|
||||||
|
|
||||||
Author
|
Author
|
||||||
Zeljko Tukovic and Hrvoje Jasak
|
Zeljko Tukovic and Hrvoje Jasak
|
||||||
@ -161,7 +161,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (!separation_.size())
|
if (!separation_.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn("coupledFaPatch::separation() const")
|
FatalErrorInFunction
|
||||||
<< "Coupled patches are not separated"
|
<< "Coupled patches are not separated"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (!forwardT_.size())
|
if (!forwardT_.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn("coupledFaPatch::forwardT() const")
|
FatalErrorInFunction
|
||||||
<< "Coupled planes do not need transformation"
|
<< "Coupled planes do not need transformation"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -187,7 +187,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (!reverseT_.size())
|
if (!reverseT_.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn("coupledFaPatch::forwardT() const")
|
FatalErrorInFunction
|
||||||
<< "Coupled planes do not need transformation"
|
<< "Coupled planes do not need transformation"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,13 +35,11 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
defineTypeNameAndDebug(cyclicFaPatch, 0);
|
||||||
|
addToRunTimeSelectionTable(faPatch, cyclicFaPatch, dictionary);
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
const Foam::scalar Foam::cyclicFaPatch::matchTol_ = 1e-3;
|
||||||
|
|
||||||
defineTypeNameAndDebug(cyclicFaPatch, 0);
|
|
||||||
addToRunTimeSelectionTable(faPatch, cyclicFaPatch, dictionary);
|
|
||||||
|
|
||||||
const Foam::scalar cyclicFaPatch::matchTol_ = 1e-3;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
@ -52,7 +50,7 @@ void Foam::cyclicFaPatch::calcTransforms()
|
|||||||
{
|
{
|
||||||
pointField half0Ctrs(size()/2);
|
pointField half0Ctrs(size()/2);
|
||||||
pointField half1Ctrs(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];
|
half0Ctrs[i] = this->edgeCentres()[i];
|
||||||
half1Ctrs[i] = this->edgeCentres()[i+size()/2];
|
half1Ctrs[i] = this->edgeCentres()[i+size()/2];
|
||||||
@ -66,7 +64,7 @@ void Foam::cyclicFaPatch::calcTransforms()
|
|||||||
scalar maxMatchError = 0;
|
scalar maxMatchError = 0;
|
||||||
label errorEdge = -1;
|
label errorEdge = -1;
|
||||||
|
|
||||||
for (label edgei = 0; edgei < size()/2; edgei++)
|
for (label edgei = 0; edgei < size()/2; ++edgei)
|
||||||
{
|
{
|
||||||
half0Normals[edgei] = eN[edgei];
|
half0Normals[edgei] = eN[edgei];
|
||||||
label nbrEdgei = edgei + size()/2;
|
label nbrEdgei = edgei + size()/2;
|
||||||
@ -84,7 +82,7 @@ void Foam::cyclicFaPatch::calcTransforms()
|
|||||||
half0Normals[edgei] = point(1, 0, 0);
|
half0Normals[edgei] = point(1, 0, 0);
|
||||||
half1Normals[edgei] = half0Normals[edgei];
|
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
|
// Error in area matching. Find largest error
|
||||||
maxMatchError =
|
maxMatchError =
|
||||||
@ -106,10 +104,8 @@ void Foam::cyclicFaPatch::calcTransforms()
|
|||||||
scalar nbrMagLe = mag(half1Normals[errorEdge]);
|
scalar nbrMagLe = mag(half1Normals[errorEdge]);
|
||||||
scalar avLe = (magLe + nbrMagLe)/2.0;
|
scalar avLe = (magLe + nbrMagLe)/2.0;
|
||||||
|
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "edge " << errorEdge
|
||||||
"cyclicFaPatch::calcTransforms()"
|
|
||||||
) << "edge " << errorEdge
|
|
||||||
<< " area does not match neighbour "
|
<< " area does not match neighbour "
|
||||||
<< nbrEdgei << " by "
|
<< nbrEdgei << " by "
|
||||||
<< 100*mag(magLe - nbrMagLe)/avLe
|
<< 100*mag(magLe - nbrMagLe)/avLe
|
||||||
@ -142,10 +138,8 @@ void Foam::cyclicFaPatch::calcTransforms()
|
|||||||
{
|
{
|
||||||
if (forwardT().size() > 1 || reverseT().size() > 1)
|
if (forwardT().size() > 1 || reverseT().size() > 1)
|
||||||
{
|
{
|
||||||
SeriousErrorIn
|
SeriousErrorInFunction
|
||||||
(
|
<< "Transformation tensor is not constant for the cyclic "
|
||||||
"void cyclicFaPatch::calcTransforms()"
|
|
||||||
) << "Transformation tensor is not constant for the cyclic "
|
|
||||||
<< "patch. Please reconsider your setup and definition of "
|
<< "patch. Please reconsider your setup and definition of "
|
||||||
<< "cyclic boundaries." << endl;
|
<< "cyclic boundaries." << endl;
|
||||||
}
|
}
|
||||||
@ -154,8 +148,7 @@ void Foam::cyclicFaPatch::calcTransforms()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Make patch weighting factors
|
void Foam::cyclicFaPatch::makeWeights(scalarField& w) const
|
||||||
void cyclicFaPatch::makeWeights(scalarField& w) const
|
|
||||||
{
|
{
|
||||||
const scalarField& magL = magEdgeLengths();
|
const scalarField& magL = magEdgeLengths();
|
||||||
|
|
||||||
@ -165,7 +158,7 @@ void cyclicFaPatch::makeWeights(scalarField& w) const
|
|||||||
scalar maxMatchError = 0;
|
scalar maxMatchError = 0;
|
||||||
label errorEdge = -1;
|
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;
|
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;
|
scalar avL = (magL[errorEdge] + magL[errorEdge + sizeby2])/2.0;
|
||||||
|
|
||||||
FatalErrorIn("cyclicFaPatch::makeWeights(scalarField& w) const")
|
FatalErrorInFunction
|
||||||
<< "edge " << errorEdge << " and " << errorEdge + sizeby2
|
<< "edge " << errorEdge << " and " << errorEdge + sizeby2
|
||||||
<< " areas do not match by "
|
<< " areas do not match by "
|
||||||
<< 100*mag(magL[errorEdge] - magL[errorEdge + sizeby2])/avL
|
<< 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 Foam::cyclicFaPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||||
void cyclicFaPatch::makeDeltaCoeffs(scalarField& dc) const
|
|
||||||
{
|
{
|
||||||
const scalarField deltas(edgeNormals() & faPatch::delta());
|
const scalarField deltas(edgeNormals() & faPatch::delta());
|
||||||
label sizeby2 = deltas.size()/2;
|
label sizeby2 = deltas.size()/2;
|
||||||
|
|
||||||
for (label edgei = 0; edgei < sizeby2; edgei++)
|
for (label edgei = 0; edgei < sizeby2; ++edgei)
|
||||||
{
|
{
|
||||||
scalar di = deltas[edgei];
|
scalar di = deltas[edgei];
|
||||||
scalar dni = deltas[edgei + sizeby2];
|
scalar dni = deltas[edgei + sizeby2];
|
||||||
@ -252,8 +244,8 @@ void Foam::cyclicFaPatch::movePoints(const pointField& p)
|
|||||||
calcTransforms();
|
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());
|
const vectorField patchD(faPatch::delta());
|
||||||
label sizeby2 = patchD.size()/2;
|
label sizeby2 = patchD.size()/2;
|
||||||
@ -264,9 +256,9 @@ tmp<vectorField> cyclicFaPatch::delta() const
|
|||||||
// Do the transformation if necessary
|
// Do the transformation if necessary
|
||||||
if (parallel())
|
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];
|
vector dni = patchD[edgei + sizeby2];
|
||||||
|
|
||||||
pdv[edgei] = ddi - dni;
|
pdv[edgei] = ddi - dni;
|
||||||
@ -275,9 +267,9 @@ tmp<vectorField> cyclicFaPatch::delta() const
|
|||||||
}
|
}
|
||||||
else
|
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];
|
vector dni = patchD[edgei + sizeby2];
|
||||||
|
|
||||||
pdv[edgei] = ddi - transform(forwardT()[0], dni);
|
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;
|
NotImplemented;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tmp<labelField> cyclicFaPatch::interfaceInternalField
|
Foam::tmp<Foam::labelField> Foam::cyclicFaPatch::interfaceInternalField
|
||||||
(
|
(
|
||||||
const labelUList& internalData
|
const labelUList& internalData
|
||||||
) const
|
) const
|
||||||
@ -305,7 +297,7 @@ tmp<labelField> cyclicFaPatch::interfaceInternalField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tmp<labelField> cyclicFaPatch::transfer
|
Foam::tmp<Foam::labelField> Foam::cyclicFaPatch::transfer
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes,
|
const Pstream::commsTypes,
|
||||||
const labelUList& interfaceData
|
const labelUList& interfaceData
|
||||||
@ -316,7 +308,7 @@ tmp<labelField> cyclicFaPatch::transfer
|
|||||||
|
|
||||||
label sizeby2 = this->size()/2;
|
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] = interfaceData[edgei + sizeby2];
|
||||||
pnf[edgei + sizeby2] = interfaceData[edgei];
|
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 Pstream::commsTypes commsType,
|
||||||
const labelUList& iF
|
const labelUList& iF
|
||||||
@ -339,7 +331,7 @@ tmp<labelField> cyclicFaPatch::internalFieldTransfer
|
|||||||
|
|
||||||
label sizeby2 = this->size()/2;
|
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] = iF[edgeCells[edgei + sizeby2]];
|
||||||
pnf[edgei + sizeby2] = iF[edgeCells[edgei]];
|
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 coupledFaPatch,
|
||||||
public cyclicLduInterface
|
public cyclicLduInterface
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
void calcTransforms();
|
void calcTransforms();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -73,6 +71,7 @@ protected:
|
|||||||
// maximum edge length per face.
|
// maximum edge length per face.
|
||||||
static const scalar matchTol_;
|
static const scalar matchTol_;
|
||||||
|
|
||||||
|
|
||||||
// Protected Member functions
|
// Protected Member functions
|
||||||
|
|
||||||
//- Make patch weighting factors
|
//- Make patch weighting factors
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "emptyFaPatch.H"
|
#include "emptyFaPatch.H"
|
||||||
@ -47,7 +45,7 @@ addToRunTimeSelectionTable(faPatch, emptyFaPatch, dictionary);
|
|||||||
// This is the only piece of info used out of the underlying primitivePatch
|
// 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
|
// 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
|
// 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
|
// a zero-sized field (it does not matter what the field is
|
||||||
//
|
//
|
||||||
// const vectorField& emptyFaPatch::edgeNormals() const
|
// const vectorField& emptyFaPatch::edgeNormals() const
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
emptyFaPatch
|
Foam::emptyFaPatch
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A patch which will not exist in the faMesh. Typical example is a front and
|
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)
|
faPatch(name, edgeLabels, index, bm, ngbPolyPatchIndex)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
emptyFaPatch
|
emptyFaPatch
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "processorFaPatch.H"
|
#include "processorFaPatch.H"
|
||||||
@ -40,21 +38,19 @@ Description
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
defineTypeNameAndDebug(processorFaPatch, 0);
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
addToRunTimeSelectionTable(faPatch, processorFaPatch, dictionary);
|
||||||
|
}
|
||||||
defineTypeNameAndDebug(processorFaPatch, 0);
|
|
||||||
addToRunTimeSelectionTable(faPatch, processorFaPatch, dictionary);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
processorFaPatch::~processorFaPatch()
|
Foam::processorFaPatch::~processorFaPatch()
|
||||||
{
|
{
|
||||||
deleteDemandDrivenData(neighbPointsPtr_);
|
deleteDemandDrivenData(neighbPointsPtr_);
|
||||||
deleteDemandDrivenData(nonGlobalPatchPointsPtr_);
|
deleteDemandDrivenData(nonGlobalPatchPointsPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::label Foam::processorFaPatch::comm() const
|
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
|
// If it is not runing parallel or there are no global points
|
||||||
// create a 1->1 map
|
// create a 1->1 map
|
||||||
@ -79,8 +75,8 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
!Pstream::parRun()
|
!Pstream::parRun()
|
||||||
|| !boundaryMesh().mesh()().globalData().nGlobalPoints()
|
|| !boundaryMesh().mesh()().globalData().nGlobalPoints()
|
||||||
// || !boundaryMesh().mesh().globalData().nGlobalPoints()
|
// || !boundaryMesh().mesh().globalData().nGlobalPoints()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
nonGlobalPatchPointsPtr_ = new labelList(nPoints());
|
nonGlobalPatchPointsPtr_ = new labelList(nPoints());
|
||||||
@ -92,7 +88,6 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
// Get reference to shared points
|
// Get reference to shared points
|
||||||
const labelList& sharedPoints =
|
const labelList& sharedPoints =
|
||||||
boundaryMesh().mesh()().globalData().sharedPointLabels();
|
boundaryMesh().mesh()().globalData().sharedPointLabels();
|
||||||
@ -107,13 +102,13 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
|||||||
|
|
||||||
label noFiltPoints = 0;
|
label noFiltPoints = 0;
|
||||||
|
|
||||||
forAll (faMeshPatchPoints, pointI)
|
forAll(faMeshPatchPoints, pointI)
|
||||||
{
|
{
|
||||||
label curP = meshPoints[faMeshPatchPoints[pointI]];
|
label curP = meshPoints[faMeshPatchPoints[pointI]];
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
forAll (sharedPoints, sharedI)
|
forAll(sharedPoints, sharedI)
|
||||||
{
|
{
|
||||||
if (sharedPoints[sharedI] == curP)
|
if (sharedPoints[sharedI] == curP)
|
||||||
{
|
{
|
||||||
@ -125,7 +120,7 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
|||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
ngpp[noFiltPoints] = pointI;
|
ngpp[noFiltPoints] = pointI;
|
||||||
noFiltPoints++;
|
++noFiltPoints;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,13 +138,13 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
|||||||
|
|
||||||
// label noFiltPoints = 0;
|
// label noFiltPoints = 0;
|
||||||
|
|
||||||
// forAll (patchPoints, pointI)
|
// forAll(patchPoints, pointI)
|
||||||
// {
|
// {
|
||||||
// label curP = patchPoints[pointI];
|
// label curP = patchPoints[pointI];
|
||||||
|
|
||||||
// bool found = false;
|
// bool found = false;
|
||||||
|
|
||||||
// forAll (sharedPoints, pI)
|
// forAll(sharedPoints, pI)
|
||||||
// {
|
// {
|
||||||
// if (sharedPoints[pI] == curP)
|
// if (sharedPoints[pI] == curP)
|
||||||
// {
|
// {
|
||||||
@ -170,7 +165,7 @@ void processorFaPatch::makeNonGlobalPatchPoints() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void processorFaPatch::initGeometry()
|
void Foam::processorFaPatch::initGeometry()
|
||||||
{
|
{
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
@ -189,7 +184,7 @@ void processorFaPatch::initGeometry()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void processorFaPatch::calcGeometry()
|
void Foam::processorFaPatch::calcGeometry()
|
||||||
{
|
{
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
@ -215,10 +210,8 @@ void processorFaPatch::calcGeometry()
|
|||||||
|
|
||||||
if (mag(magEl[edgei] - nmagEl)/avEl > 1e-6)
|
if (mag(magEl[edgei] - nmagEl)/avEl > 1e-6)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "edge " << edgei
|
||||||
"processorFvPatch::makeWeights(scalarField& w) const"
|
|
||||||
) << "edge " << edgei
|
|
||||||
<< " length does not match neighbour by "
|
<< " length does not match neighbour by "
|
||||||
<< 100*mag(magEl[edgei] - nmagEl)/avEl
|
<< 100*mag(magEl[edgei] - nmagEl)/avEl
|
||||||
<< "% -- possible edge ordering problem"
|
<< "% -- 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);
|
faPatch::movePoints(p);
|
||||||
initGeometry();
|
initGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void processorFaPatch::movePoints(const pointField&)
|
void Foam::processorFaPatch::movePoints(const pointField&)
|
||||||
{
|
{
|
||||||
calcGeometry();
|
calcGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void processorFaPatch::initUpdateMesh()
|
void Foam::processorFaPatch::initUpdateMesh()
|
||||||
{
|
{
|
||||||
// For completeness
|
// For completeness
|
||||||
faPatch::initUpdateMesh();
|
faPatch::initUpdateMesh();
|
||||||
@ -268,7 +261,7 @@ void processorFaPatch::initUpdateMesh()
|
|||||||
|
|
||||||
const labelListList& ptEdges = pointEdges();
|
const labelListList& ptEdges = pointEdges();
|
||||||
|
|
||||||
for (label patchPointI = 0; patchPointI < nPoints(); patchPointI++)
|
for (label patchPointI = 0; patchPointI < nPoints(); ++patchPointI)
|
||||||
{
|
{
|
||||||
label edgeI = ptEdges[patchPointI][0];
|
label edgeI = ptEdges[patchPointI][0];
|
||||||
|
|
||||||
@ -277,11 +270,7 @@ void processorFaPatch::initUpdateMesh()
|
|||||||
const edge& e = patchEdges[edgeI];
|
const edge& e = patchEdges[edgeI];
|
||||||
|
|
||||||
indexInEdge[patchPointI] =
|
indexInEdge[patchPointI] =
|
||||||
findIndex
|
findIndex(e, pointLabels()[patchPointI]);
|
||||||
(
|
|
||||||
e,
|
|
||||||
pointLabels()[patchPointI]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OPstream toNeighbProc
|
OPstream toNeighbProc
|
||||||
@ -298,7 +287,7 @@ void processorFaPatch::initUpdateMesh()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void processorFaPatch::updateMesh()
|
void Foam::processorFaPatch::updateMesh()
|
||||||
{
|
{
|
||||||
// For completeness
|
// For completeness
|
||||||
faPatch::updateMesh();
|
faPatch::updateMesh();
|
||||||
@ -348,13 +337,13 @@ void processorFaPatch::updateMesh()
|
|||||||
{
|
{
|
||||||
// Differing number of points. Probably patch includes
|
// Differing number of points. Probably patch includes
|
||||||
// part of a cyclic.
|
// part of a cyclic.
|
||||||
neighbPointsPtr_ = NULL;
|
neighbPointsPtr_ = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const labelList& processorFaPatch::neighbPoints() const
|
const Foam::labelList& Foam::processorFaPatch::neighbPoints() const
|
||||||
{
|
{
|
||||||
if (!neighbPointsPtr_)
|
if (!neighbPointsPtr_)
|
||||||
{
|
{
|
||||||
@ -363,7 +352,7 @@ const labelList& processorFaPatch::neighbPoints() const
|
|||||||
// sides of the processor patch since one side might have
|
// sides of the processor patch since one side might have
|
||||||
// it merged with another bit of geometry
|
// it merged with another bit of geometry
|
||||||
|
|
||||||
FatalErrorIn("processorFaPatch::neighbPoints() const")
|
FatalErrorInFunction
|
||||||
<< "No extended addressing calculated for patch " << name()
|
<< "No extended addressing calculated for patch " << name()
|
||||||
<< nl
|
<< nl
|
||||||
<< "This can happen if the number of points on both"
|
<< "This can happen if the number of points on both"
|
||||||
@ -377,8 +366,7 @@ const labelList& processorFaPatch::neighbPoints() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Make patch weighting factors
|
void Foam::processorFaPatch::makeWeights(scalarField& w) const
|
||||||
void processorFaPatch::makeWeights(scalarField& w) const
|
|
||||||
{
|
{
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
@ -391,7 +379,8 @@ void processorFaPatch::makeWeights(scalarField& w) const
|
|||||||
)
|
)
|
||||||
& (
|
& (
|
||||||
neighbEdgeCentres()
|
neighbEdgeCentres()
|
||||||
- neighbEdgeFaceCentres())
|
- neighbEdgeFaceCentres()
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
w = neighbEdgeCentresCn/
|
w = neighbEdgeCentresCn/
|
||||||
@ -407,8 +396,7 @@ void processorFaPatch::makeWeights(scalarField& w) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Make patch edge - neighbour face distances
|
void Foam::processorFaPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||||
void processorFaPatch::makeDeltaCoeffs(scalarField& dc) const
|
|
||||||
{
|
{
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
@ -421,8 +409,7 @@ void processorFaPatch::makeDeltaCoeffs(scalarField& dc) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return delta (P to N) vectors across coupled patch
|
Foam::tmp<Foam::vectorField> Foam::processorFaPatch::delta() const
|
||||||
tmp<vectorField> processorFaPatch::delta() const
|
|
||||||
{
|
{
|
||||||
if (Pstream::parRun())
|
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_)
|
if (!nonGlobalPatchPointsPtr_)
|
||||||
{
|
{
|
||||||
@ -467,7 +454,8 @@ const labelList& processorFaPatch::nonGlobalPatchPoints() const
|
|||||||
return *nonGlobalPatchPointsPtr_;
|
return *nonGlobalPatchPointsPtr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp<labelField> processorFaPatch::interfaceInternalField
|
|
||||||
|
Foam::tmp<Foam::labelField> Foam::processorFaPatch::interfaceInternalField
|
||||||
(
|
(
|
||||||
const labelUList& internalData
|
const labelUList& internalData
|
||||||
) const
|
) const
|
||||||
@ -476,7 +464,7 @@ tmp<labelField> processorFaPatch::interfaceInternalField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void processorFaPatch::initTransfer
|
void Foam::processorFaPatch::initTransfer
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType,
|
const Pstream::commsTypes commsType,
|
||||||
const labelUList& interfaceData
|
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 Pstream::commsTypes commsType,
|
||||||
const labelUList&
|
const labelUList&
|
||||||
@ -496,7 +484,7 @@ tmp<labelField> processorFaPatch::transfer
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void processorFaPatch::initInternalFieldTransfer
|
void Foam::processorFaPatch::initInternalFieldTransfer
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType,
|
const Pstream::commsTypes commsType,
|
||||||
const labelUList& iF
|
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 Pstream::commsTypes commsType,
|
||||||
const labelUList&
|
const labelUList&
|
||||||
@ -516,8 +504,7 @@ tmp<labelField> processorFaPatch::internalFieldTransfer
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Write
|
void Foam::processorFaPatch::write(Ostream& os) const
|
||||||
void processorFaPatch::write(Ostream& os) const
|
|
||||||
{
|
{
|
||||||
faPatch::write(os);
|
faPatch::write(os);
|
||||||
os.writeKeyword("myProcNo") << myProcNo_
|
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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
processorFaPatch
|
Foam::processorFaPatch
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Processor patch.
|
Processor patch.
|
||||||
@ -146,8 +146,8 @@ public:
|
|||||||
neighbEdgeCentres_(),
|
neighbEdgeCentres_(),
|
||||||
neighbEdgeLengths_(),
|
neighbEdgeLengths_(),
|
||||||
neighbEdgeFaceCentres_(),
|
neighbEdgeFaceCentres_(),
|
||||||
neighbPointsPtr_(NULL),
|
neighbPointsPtr_(nullptr),
|
||||||
nonGlobalPatchPointsPtr_(NULL)
|
nonGlobalPatchPointsPtr_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
@ -165,8 +165,8 @@ public:
|
|||||||
neighbEdgeCentres_(),
|
neighbEdgeCentres_(),
|
||||||
neighbEdgeLengths_(),
|
neighbEdgeLengths_(),
|
||||||
neighbEdgeFaceCentres_(),
|
neighbEdgeFaceCentres_(),
|
||||||
neighbPointsPtr_(NULL),
|
neighbPointsPtr_(nullptr),
|
||||||
nonGlobalPatchPointsPtr_(NULL)
|
nonGlobalPatchPointsPtr_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "symmetryFaPatch.H"
|
#include "symmetryFaPatch.H"
|
||||||
@ -34,25 +32,22 @@ Description
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
defineTypeNameAndDebug(symmetryFaPatch, 0);
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
addToRunTimeSelectionTable(faPatch, symmetryFaPatch, dictionary);
|
||||||
|
}
|
||||||
defineTypeNameAndDebug(symmetryFaPatch, 0);
|
|
||||||
addToRunTimeSelectionTable(faPatch, symmetryFaPatch, dictionary);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * 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;
|
cv = vector::zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
Foam::symmetryFaPatch::symmetryFaPatch
|
||||||
symmetryFaPatch::symmetryFaPatch
|
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const labelList& edgeLabels,
|
const labelList& edgeLabels,
|
||||||
@ -64,8 +59,8 @@ symmetryFaPatch::symmetryFaPatch
|
|||||||
faPatch(name, edgeLabels, index, bm, ngbPolyPatchIndex)
|
faPatch(name, edgeLabels, index, bm, ngbPolyPatchIndex)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Construct from dictionary
|
|
||||||
symmetryFaPatch::symmetryFaPatch
|
Foam::symmetryFaPatch::symmetryFaPatch
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
@ -75,18 +70,13 @@ symmetryFaPatch::symmetryFaPatch
|
|||||||
:
|
:
|
||||||
faPatch(name, dict, index, bm)
|
faPatch(name, dict, index, bm)
|
||||||
{
|
{
|
||||||
if(ngbPolyPatchIndex() == -1)
|
if (ngbPolyPatchIndex() == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Neighbour polyPatch index is not specified for faPatch "
|
||||||
"symmetryFaPatch::symmetryFaPatch(const word&, const dictionary&, const label, const faBoundaryMesh&)"
|
|
||||||
) << "Neighbour polyPatch index is not specified for faPatch "
|
|
||||||
<< this->name() << exit(FatalError);
|
<< this->name() << exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -112,10 +112,9 @@ public:
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~symmetryFaPatch()
|
||||||
virtual ~symmetryFaPatch()
|
{}
|
||||||
{}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "wedgeFaPatch.H"
|
#include "wedgeFaPatch.H"
|
||||||
@ -38,21 +36,19 @@ Description
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
defineTypeNameAndDebug(wedgeFaPatch, 0);
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
addToRunTimeSelectionTable(faPatch, wedgeFaPatch, dictionary);
|
||||||
|
}
|
||||||
defineTypeNameAndDebug(wedgeFaPatch, 0);
|
|
||||||
addToRunTimeSelectionTable(faPatch, wedgeFaPatch, dictionary);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
void wedgeFaPatch::findAxisPoint() const
|
void Foam::wedgeFaPatch::findAxisPoint() const
|
||||||
{
|
{
|
||||||
// Find axis point
|
// Find axis point
|
||||||
|
|
||||||
labelList ptLabels = pointLabels();
|
const labelList& ptLabels = pointLabels();
|
||||||
|
|
||||||
labelListList ptEdges = pointEdges();
|
const labelListList& ptEdges = pointEdges();
|
||||||
|
|
||||||
const vectorField& points = boundaryMesh().mesh().points();
|
const vectorField& points = boundaryMesh().mesh().points();
|
||||||
|
|
||||||
@ -60,11 +56,11 @@ void wedgeFaPatch::findAxisPoint() const
|
|||||||
|
|
||||||
forAll(ptEdges, pointI)
|
forAll(ptEdges, pointI)
|
||||||
{
|
{
|
||||||
if( ptEdges[pointI].size() == 1 )
|
if (ptEdges[pointI].size() == 1)
|
||||||
{
|
{
|
||||||
scalar r = mag((I-axis()*axis())&points[ptLabels[pointI]]);
|
scalar r = mag((I-axis()*axis())&points[ptLabels[pointI]]);
|
||||||
|
|
||||||
if( r < magL[ptEdges[pointI][0]] )
|
if (r < magL[ptEdges[pointI][0]])
|
||||||
{
|
{
|
||||||
axisPoint_ = ptLabels[pointI];
|
axisPoint_ = ptLabels[pointI];
|
||||||
break;
|
break;
|
||||||
@ -78,8 +74,7 @@ void wedgeFaPatch::findAxisPoint() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Construct from polyPatch
|
Foam::wedgeFaPatch::wedgeFaPatch
|
||||||
wedgeFaPatch::wedgeFaPatch
|
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
@ -88,24 +83,18 @@ wedgeFaPatch::wedgeFaPatch
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
faPatch(name, dict, index, bm),
|
faPatch(name, dict, index, bm),
|
||||||
wedgePolyPatchPtr_(NULL),
|
wedgePolyPatchPtr_(nullptr),
|
||||||
axisPoint_(-1),
|
axisPoint_(-1),
|
||||||
axisPointChecked_(false)
|
axisPointChecked_(false)
|
||||||
{
|
{
|
||||||
if(ngbPolyPatchIndex() == -1)
|
if (ngbPolyPatchIndex() == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Neighbour polyPatch index is not specified for faPatch "
|
||||||
"wedgeFaPatch::wedgeFaPatch(const word&, const dictionary&, const label, const faBoundaryMesh&)"
|
|
||||||
) << "Neighbour polyPatch index is not specified for faPatch "
|
|
||||||
<< this->name() << exit(FatalError);
|
<< this->name() << exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
if (isA<wedgePolyPatch>(bm.mesh()().boundaryMesh()[ngbPolyPatchIndex()]))
|
||||||
(
|
|
||||||
bm.mesh()().boundaryMesh()[ngbPolyPatchIndex()].type()
|
|
||||||
== wedgePolyPatch::typeName
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const wedgePolyPatch& wedge =
|
const wedgePolyPatch& wedge =
|
||||||
refCast<const wedgePolyPatch>
|
refCast<const wedgePolyPatch>
|
||||||
@ -117,18 +106,12 @@ wedgeFaPatch::wedgeFaPatch
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Neighbour polyPatch is not of type "
|
||||||
"wedgeFaPatch::wedgeFaPatch(const word&, const dictionary&, const label, const faBoundaryMesh&)"
|
|
||||||
) << "Neighbour polyPatch is not of type "
|
|
||||||
<< wedgePolyPatch::typeName
|
<< wedgePolyPatch::typeName
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
wedgeFaPatch
|
Foam::wedgeFaPatch
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Wedge front and back plane patch.
|
Wedge front and back plane patch.
|
||||||
@ -70,28 +70,25 @@ class wedgeFaPatch
|
|||||||
//- Finde axis point
|
//- Finde axis point
|
||||||
void findAxisPoint() const;
|
void findAxisPoint() const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("wedge");
|
TypeName("wedge");
|
||||||
|
|
||||||
|
//- Construct from dictionary
|
||||||
// Constructors
|
wedgeFaPatch
|
||||||
|
(
|
||||||
//- Construct from dictionary
|
const word& name,
|
||||||
wedgeFaPatch
|
const dictionary& dict,
|
||||||
(
|
const label index,
|
||||||
const word& name,
|
const faBoundaryMesh& bm
|
||||||
const dictionary& dict,
|
);
|
||||||
const label index,
|
|
||||||
const faBoundaryMesh& bm
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~wedgeFaPatch()
|
||||||
virtual ~wedgeFaPatch()
|
{}
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
@ -125,7 +122,7 @@ public:
|
|||||||
//- Return axis point label
|
//- Return axis point label
|
||||||
label axisPoint() const
|
label axisPoint() const
|
||||||
{
|
{
|
||||||
if(axisPoint_ == -1 && !axisPointChecked_)
|
if (axisPoint_ == -1 && !axisPointChecked_)
|
||||||
{
|
{
|
||||||
findAxisPoint();
|
findAxisPoint();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,7 +55,6 @@ void Foam::faPatch::clearOut()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::faPatch::faPatch
|
Foam::faPatch::faPatch
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
@ -69,13 +68,12 @@ Foam::faPatch::faPatch
|
|||||||
patchIdentifier(name, index),
|
patchIdentifier(name, index),
|
||||||
ngbPolyPatchIndex_(ngbPolyPatchIndex),
|
ngbPolyPatchIndex_(ngbPolyPatchIndex),
|
||||||
boundaryMesh_(bm),
|
boundaryMesh_(bm),
|
||||||
edgeFacesPtr_(NULL),
|
edgeFacesPtr_(nullptr),
|
||||||
pointLabelsPtr_(NULL),
|
pointLabelsPtr_(nullptr),
|
||||||
pointEdgesPtr_(NULL)
|
pointEdgesPtr_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// Construct from dictionary
|
|
||||||
Foam::faPatch::faPatch
|
Foam::faPatch::faPatch
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
@ -88,20 +86,21 @@ Foam::faPatch::faPatch
|
|||||||
patchIdentifier(name, dict, index),
|
patchIdentifier(name, dict, index),
|
||||||
ngbPolyPatchIndex_(readInt(dict.lookup("ngbPolyPatchIndex"))),
|
ngbPolyPatchIndex_(readInt(dict.lookup("ngbPolyPatchIndex"))),
|
||||||
boundaryMesh_(bm),
|
boundaryMesh_(bm),
|
||||||
edgeFacesPtr_(NULL),
|
edgeFacesPtr_(nullptr),
|
||||||
pointLabelsPtr_(NULL),
|
pointLabelsPtr_(nullptr),
|
||||||
pointEdgesPtr_(NULL)
|
pointEdgesPtr_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::faPatch::faPatch(const faPatch& p, const faBoundaryMesh& bm)
|
Foam::faPatch::faPatch(const faPatch& p, const faBoundaryMesh& bm)
|
||||||
:
|
:
|
||||||
labelList(p),
|
labelList(p),
|
||||||
patchIdentifier(p, p.index()),
|
patchIdentifier(p, p.index()),
|
||||||
ngbPolyPatchIndex_(p.ngbPolyPatchIndex_),
|
ngbPolyPatchIndex_(p.ngbPolyPatchIndex_),
|
||||||
boundaryMesh_(bm),
|
boundaryMesh_(bm),
|
||||||
edgeFacesPtr_(NULL),
|
edgeFacesPtr_(nullptr),
|
||||||
pointLabelsPtr_(NULL),
|
pointLabelsPtr_(nullptr),
|
||||||
pointEdgesPtr_(NULL)
|
pointEdgesPtr_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -120,6 +119,7 @@ Foam::label Foam::faPatch::ngbPolyPatchIndex() const
|
|||||||
return ngbPolyPatchIndex_;
|
return ngbPolyPatchIndex_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::faBoundaryMesh& Foam::faPatch::boundaryMesh() const
|
const Foam::faBoundaryMesh& Foam::faPatch::boundaryMesh() const
|
||||||
{
|
{
|
||||||
return boundaryMesh_;
|
return boundaryMesh_;
|
||||||
@ -147,38 +147,32 @@ void Foam::faPatch::calcPointLabels() const
|
|||||||
{
|
{
|
||||||
SLList<label> labels;
|
SLList<label> labels;
|
||||||
|
|
||||||
UList<edge> edges =
|
UList<edge> edges = patchSlice(boundaryMesh().mesh().edges());
|
||||||
patchSlice(boundaryMesh().mesh().edges());
|
|
||||||
|
|
||||||
forAll(edges, edgeI)
|
forAll(edges, edgeI)
|
||||||
{
|
{
|
||||||
bool existStart = false;
|
bool existStart = false;
|
||||||
bool existEnd = false;
|
bool existEnd = false;
|
||||||
|
|
||||||
for
|
forAllIters(labels, iter)
|
||||||
(
|
|
||||||
SLList<label>::iterator iter = labels.begin();
|
|
||||||
iter != labels.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if(*iter == edges[edgeI].start())
|
if (*iter == edges[edgeI].start())
|
||||||
{
|
{
|
||||||
existStart = true;
|
existStart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(*iter == edges[edgeI].end())
|
if (*iter == edges[edgeI].end())
|
||||||
{
|
{
|
||||||
existEnd = true;
|
existEnd = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!existStart)
|
if (!existStart)
|
||||||
{
|
{
|
||||||
labels.append(edges[edgeI].start());
|
labels.append(edges[edgeI].start());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!existEnd)
|
if (!existEnd)
|
||||||
{
|
{
|
||||||
labels.append(edges[edgeI].end());
|
labels.append(edges[edgeI].end());
|
||||||
}
|
}
|
||||||
@ -190,22 +184,20 @@ void Foam::faPatch::calcPointLabels() const
|
|||||||
|
|
||||||
void Foam::faPatch::calcPointEdges() const
|
void Foam::faPatch::calcPointEdges() const
|
||||||
{
|
{
|
||||||
labelList points = pointLabels();
|
const labelList& points = pointLabels();
|
||||||
|
|
||||||
const edgeList::subList e =
|
const edgeList::subList e = patchSlice(boundaryMesh().mesh().edges());
|
||||||
patchSlice(boundaryMesh().mesh().edges());
|
|
||||||
|
|
||||||
// set up storage for pointEdges
|
// 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];
|
const edge& curPoints = e[edgeI];
|
||||||
|
|
||||||
forAll (curPoints, pointI)
|
forAll(curPoints, pointI)
|
||||||
{
|
{
|
||||||
label localPointIndex =
|
label localPointIndex = findIndex(points, curPoints[pointI]);
|
||||||
findIndex(points, curPoints[pointI]);
|
|
||||||
|
|
||||||
pointEdgs[localPointIndex].append(edgeI);
|
pointEdgs[localPointIndex].append(edgeI);
|
||||||
}
|
}
|
||||||
@ -215,7 +207,7 @@ void Foam::faPatch::calcPointEdges() const
|
|||||||
pointEdgesPtr_ = new labelListList(pointEdgs.size());
|
pointEdgesPtr_ = new labelListList(pointEdgs.size());
|
||||||
labelListList& pEdges = *pointEdgesPtr_;
|
labelListList& pEdges = *pointEdgesPtr_;
|
||||||
|
|
||||||
forAll (pointEdgs, pointI)
|
forAll(pointEdgs, pointI)
|
||||||
{
|
{
|
||||||
pEdges[pointI].setSize(pointEdgs[pointI].size());
|
pEdges[pointI].setSize(pointEdgs[pointI].size());
|
||||||
|
|
||||||
@ -248,7 +240,7 @@ Foam::labelList Foam::faPatch::ngbPolyPatchFaces() const
|
|||||||
{
|
{
|
||||||
labelList ngbFaces;
|
labelList ngbFaces;
|
||||||
|
|
||||||
if(ngbPolyPatchIndex() == -1)
|
if (ngbPolyPatchIndex() == -1)
|
||||||
{
|
{
|
||||||
return ngbFaces;
|
return ngbFaces;
|
||||||
}
|
}
|
||||||
@ -261,22 +253,24 @@ Foam::labelList Foam::faPatch::ngbPolyPatchFaces() const
|
|||||||
|
|
||||||
const labelListList& edgeFaces = pMesh.edgeFaces();
|
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];
|
label faceID = aMesh.faceLabels()[faceI];
|
||||||
|
|
||||||
faceCells[faceI] = pMesh.faceOwner()[faceID];
|
faceCells[faceI] = pMesh.faceOwner()[faceID];
|
||||||
}
|
}
|
||||||
|
|
||||||
labelList meshEdges =
|
labelList meshEdges
|
||||||
|
(
|
||||||
patch.meshEdges
|
patch.meshEdges
|
||||||
(
|
(
|
||||||
pMesh.edges(),
|
pMesh.edges(),
|
||||||
pMesh.cellEdges(),
|
pMesh.cellEdges(),
|
||||||
faceCells
|
faceCells
|
||||||
);
|
)
|
||||||
|
);
|
||||||
|
|
||||||
forAll(ngbFaces, edgeI)
|
forAll(ngbFaces, edgeI)
|
||||||
{
|
{
|
||||||
@ -298,10 +292,11 @@ Foam::labelList Foam::faPatch::ngbPolyPatchFaces() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ngbFaces[edgeI] == -1)
|
if (ngbFaces[edgeI] == -1)
|
||||||
{
|
{
|
||||||
Info<< "faPatch::edgeNgbPolyPatchFaces(): "
|
WarningInFunction
|
||||||
<< "Problem with determination of edge ngb faces!" << endl;
|
<< "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());
|
return tmp<vectorField>(new vectorField());
|
||||||
}
|
}
|
||||||
|
|
||||||
labelListList pntEdges = pointEdges();
|
const labelListList& pntEdges = pointEdges();
|
||||||
|
|
||||||
tmp<vectorField> tpN(new vectorField(pntEdges.size(), vector::zero));
|
tmp<vectorField> tpN(new vectorField(pntEdges.size(), vector::zero));
|
||||||
vectorField& pN = tpN.ref();
|
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
|
const Foam::vectorField& Foam::faPatch::edgeCentres() const
|
||||||
{
|
{
|
||||||
return boundaryMesh().mesh().edgeCentres().boundaryField()[index()];
|
return boundaryMesh().mesh().edgeCentres().boundaryField()[index()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return the patch edges length vectors
|
|
||||||
const Foam::vectorField& Foam::faPatch::edgeLengths() const
|
const Foam::vectorField& Foam::faPatch::edgeLengths() const
|
||||||
{
|
{
|
||||||
return boundaryMesh().mesh().Le().boundaryField()[index()];
|
return boundaryMesh().mesh().Le().boundaryField()[index()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return the patch edge length magnitudes
|
|
||||||
const Foam::scalarField& Foam::faPatch::magEdgeLengths() const
|
const Foam::scalarField& Foam::faPatch::magEdgeLengths() const
|
||||||
{
|
{
|
||||||
return boundaryMesh().mesh().magLe().boundaryField()[index()];
|
return boundaryMesh().mesh().magLe().boundaryField()[index()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return the patch edge unit normals
|
|
||||||
Foam::tmp<Foam::vectorField> Foam::faPatch::edgeNormals() const
|
Foam::tmp<Foam::vectorField> Foam::faPatch::edgeNormals() const
|
||||||
{
|
{
|
||||||
tmp<vectorField> eN(new vectorField(size()));
|
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
|
Foam::tmp<Foam::vectorField> Foam::faPatch::edgeFaceCentres() const
|
||||||
{
|
{
|
||||||
tmp<vectorField> tfc(new vectorField(size()));
|
tmp<vectorField> tfc(new vectorField(size()));
|
||||||
@ -424,7 +414,7 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::edgeFaceCentres() const
|
|||||||
|
|
||||||
const labelUList& faceLabels = edgeFaces();
|
const labelUList& faceLabels = edgeFaces();
|
||||||
|
|
||||||
forAll (faceLabels, edgeI)
|
forAll(faceLabels, edgeI)
|
||||||
{
|
{
|
||||||
fc[edgeI] = gfc[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
|
Foam::tmp<Foam::vectorField> Foam::faPatch::delta() const
|
||||||
{
|
{
|
||||||
return edgeCentres() - edgeFaceCentres();
|
return edgeCentres() - edgeFaceCentres();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Make delta coefficients as patch face - neighbour cell distances
|
|
||||||
void Foam::faPatch::makeDeltaCoeffs(scalarField& dc) const
|
void Foam::faPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||||
{
|
{
|
||||||
dc = 1.0/(edgeNormals() & delta());
|
dc = 1.0/(edgeNormals() & delta());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return delta coefficients
|
|
||||||
const Foam::scalarField& Foam::faPatch::deltaCoeffs() const
|
const Foam::scalarField& Foam::faPatch::deltaCoeffs() const
|
||||||
{
|
{
|
||||||
return boundaryMesh().mesh().deltaCoeffs().boundaryField()[index()];
|
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)
|
Foam::Ostream& Foam::operator<<(Ostream& os, const faPatch& p)
|
||||||
{
|
{
|
||||||
p.write(os);
|
p.write(os);
|
||||||
os.check("Ostream& operator<<(Ostream& f, const faPatch& p)");
|
os.check(FUNCTION_NAME);
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
faPatch
|
Foam::faPatch
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Finite area patch class. Used for 2-D non-Euclidian finite area method.
|
Finite area patch class. Used for 2-D non-Euclidian finite area method.
|
||||||
@ -92,19 +92,19 @@ private:
|
|||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Disallow construct as copy
|
//- Disallow construct as copy
|
||||||
faPatch(const faPatch&);
|
faPatch(const faPatch&) = delete;
|
||||||
|
|
||||||
//- Disallow assignment
|
//- Disallow assignment
|
||||||
void operator=(const faPatch&);
|
void operator=(const faPatch&) = delete;
|
||||||
|
|
||||||
|
|
||||||
//- Clear out topological patch data
|
//- Clear out topological patch data
|
||||||
void clearOut();
|
void clearOut();
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// The faPatch geometry initialisation is called by faBoundaryMesh
|
//- The faPatch geometry initialisation is called by faBoundaryMesh
|
||||||
friend class faBoundaryMesh;
|
friend class faBoundaryMesh;
|
||||||
|
|
||||||
//- Calculate patch point labels
|
//- Calculate patch point labels
|
||||||
@ -216,9 +216,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~faPatch();
|
||||||
virtual ~faPatch();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -334,7 +333,7 @@ public:
|
|||||||
|
|
||||||
//- Return given internal field next to patch as patch field
|
//- Return given internal field next to patch as patch field
|
||||||
template<class Type>
|
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
|
//- Return the corresponding patchField of the named field
|
||||||
template<class GeometricField, class Type>
|
template<class GeometricField, class Type>
|
||||||
@ -352,8 +351,8 @@ public:
|
|||||||
const typename GeometricField::Patch& lookupPatchField
|
const typename GeometricField::Patch& lookupPatchField
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const GeometricField* = NULL,
|
const GeometricField* = nullptr,
|
||||||
const Type* = NULL
|
const Type* = nullptr
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
@ -370,7 +369,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "faPatchTemplates.C"
|
#include "faPatchTemplates.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -24,13 +24,11 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
faPatchData
|
Foam::faPatchData
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Class which holds data needed for faPatch construction
|
Class which holds data needed for faPatch construction
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef faPatchData_H
|
#ifndef faPatchData_H
|
||||||
@ -44,7 +42,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class faPatchData Declaration
|
Class faPatchData Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
struct faPatchData
|
struct faPatchData
|
||||||
@ -69,9 +67,6 @@ struct faPatchData
|
|||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Typedef
|
Typedef
|
||||||
faPatchList
|
foam::faPatchList
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Container classes for faPatch
|
Container classes for faPatch
|
||||||
|
|||||||
@ -23,21 +23,14 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faPatch.H"
|
#include "faPatch.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
autoPtr<faPatch> faPatch::New
|
Foam::autoPtr<Foam::faPatch> Foam::faPatch::New
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
@ -45,27 +38,18 @@ autoPtr<faPatch> faPatch::New
|
|||||||
const faBoundaryMesh& bm
|
const faBoundaryMesh& bm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "constructing faPatch" << endl;
|
||||||
Info<< "faPatch::New(const word&, const dictionary&, const label, "
|
|
||||||
"const faBoundaryMesh&) : constructing faPatch"
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
word patchType(dict.lookup("type"));
|
word patchType(dict.lookup("type"));
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchType);
|
||||||
dictionaryConstructorTablePtr_->find(patchType);
|
|
||||||
|
|
||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "Unknown faPatch type " << patchType << nl << nl
|
||||||
"faPatch::New(const word&, const dictionary&, "
|
<< "Valid faPatch types are :" << nl
|
||||||
"const label, const faBoundaryMesh&)",
|
|
||||||
dict
|
|
||||||
) << "Unknown faPatch type " << patchType << endl << endl
|
|
||||||
<< "Valid faPatch types are :" << endl
|
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
@ -74,8 +58,4 @@ autoPtr<faPatch> faPatch::New
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -30,12 +30,12 @@ License
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> > Foam::faPatch::patchInternalField
|
Foam::tmp<Foam::Field<Type>> Foam::faPatch::patchInternalField
|
||||||
(
|
(
|
||||||
const UList<Type>& f
|
const UList<Type>& f
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
tmp<Field<Type> > tpif(new Field<Type>(size()));
|
tmp<Field<Type>> tpif (new Field<Type>(size()));
|
||||||
Field<Type>& pif = tpif.ref();
|
Field<Type>& pif = tpif.ref();
|
||||||
|
|
||||||
const labelUList& edgeFaces = this->edgeFaces();
|
const labelUList& edgeFaces = this->edgeFaces();
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
faSolution
|
Foam::faSolution
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Selector class for finite area solution.
|
Selector class for finite area solution.
|
||||||
@ -64,13 +64,11 @@ class faSolution
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
//- Construct from objectRegistry
|
||||||
|
faSolution(const objectRegistry& obr)
|
||||||
//- Construct from objectRegistry
|
:
|
||||||
faSolution(const objectRegistry& obr)
|
solution(obr, "faSolution")
|
||||||
:
|
{}
|
||||||
solution(obr, "faSolution")
|
|
||||||
{}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faMesh.H"
|
#include "faMesh.H"
|
||||||
@ -50,7 +48,7 @@ defineTemplateTypeNameAndDebug(areaSymmTensorField, 0);
|
|||||||
defineTemplateTypeNameAndDebug(areaTensorField, 0);
|
defineTemplateTypeNameAndDebug(areaTensorField, 0);
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
tmp<GeometricField<scalar, faPatchField, areaMesh> >
|
tmp<GeometricField<scalar, faPatchField, areaMesh>>
|
||||||
GeometricField<scalar, faPatchField, areaMesh>::component
|
GeometricField<scalar, faPatchField, areaMesh>::component
|
||||||
(
|
(
|
||||||
const direction
|
const direction
|
||||||
@ -74,4 +72,3 @@ void GeometricField<scalar, faPatchField, areaMesh>::replace
|
|||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
areaFields
|
Foam::areaFields
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Finite area area (element) fields
|
Finite area area (element) fields
|
||||||
@ -57,7 +57,7 @@ namespace Foam
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
tmp<GeometricField<scalar, faPatchField, areaMesh> >
|
tmp<GeometricField<scalar, faPatchField, areaMesh>>
|
||||||
GeometricField<scalar, faPatchField, areaMesh>::component
|
GeometricField<scalar, faPatchField, areaMesh>::component
|
||||||
(
|
(
|
||||||
const direction
|
const direction
|
||||||
|
|||||||
@ -31,7 +31,6 @@ Description
|
|||||||
SourceFiles
|
SourceFiles
|
||||||
areaFields.C
|
areaFields.C
|
||||||
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef areaFieldsFwd_H
|
#ifndef areaFieldsFwd_H
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faMesh.H"
|
#include "faMesh.H"
|
||||||
@ -55,4 +53,3 @@ defineTemplateTypeNameAndDebug(edgeTensorField, 0);
|
|||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,6 @@ Description
|
|||||||
SourceFiles
|
SourceFiles
|
||||||
edgeFields.C
|
edgeFields.C
|
||||||
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef edgeFieldsFwd_H
|
#ifndef edgeFieldsFwd_H
|
||||||
|
|||||||
@ -28,15 +28,10 @@ License
|
|||||||
#include "basicSymmetryFaPatchField.H"
|
#include "basicSymmetryFaPatchField.H"
|
||||||
#include "symmTransformField.H"
|
#include "symmTransformField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
Foam::basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -47,7 +42,7 @@ basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
Foam::basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||||
(
|
(
|
||||||
const basicSymmetryFaPatchField<Type>& ptf,
|
const basicSymmetryFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -60,7 +55,7 @@ basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
Foam::basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -74,7 +69,7 @@ basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
Foam::basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||||
(
|
(
|
||||||
const basicSymmetryFaPatchField<Type>& ptf
|
const basicSymmetryFaPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -84,7 +79,7 @@ basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
Foam::basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
||||||
(
|
(
|
||||||
const basicSymmetryFaPatchField<Type>& ptf,
|
const basicSymmetryFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -96,9 +91,9 @@ basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Return gradient at boundary
|
|
||||||
template<class Type>
|
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());
|
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>
|
template<class Type>
|
||||||
void basicSymmetryFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
void Foam::basicSymmetryFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
{
|
{
|
||||||
if (!this->updated())
|
if (!this->updated())
|
||||||
{
|
{
|
||||||
@ -132,9 +126,9 @@ void basicSymmetryFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return defining fields
|
|
||||||
template<class Type>
|
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());
|
const vectorField nHat(this->patch().edgeNormals());
|
||||||
vectorField diag(nHat.size());
|
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>
|
template<class Type>
|
||||||
@ -61,10 +61,6 @@ class basicSymmetryFaPatchField
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName(symmetryFaPatch::typeName_());
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from patch and internal field
|
//- Construct from patch and internal field
|
||||||
@ -98,9 +94,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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)
|
new basicSymmetryFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -114,12 +110,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new basicSymmetryFaPatchField<Type>(*this, iF)
|
new basicSymmetryFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
@ -131,7 +127,7 @@ public:
|
|||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Return gradient at boundary
|
//- Return gradient at boundary
|
||||||
virtual tmp<Field<Type> > snGrad() const;
|
virtual tmp<Field<Type>> snGrad() const;
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
// Default argument needed to allow call in constructors
|
// Default argument needed to allow call in constructors
|
||||||
@ -142,14 +138,14 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
virtual tmp<Field<Type> > snGradTransformDiag() const;
|
virtual tmp<Field<Type>> snGradTransformDiag() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
|
// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
tmp<scalarField > basicSymmetryFaPatchField<scalar>::snGrad() const;
|
tmp<scalarField> basicSymmetryFaPatchField<scalar>::snGrad() const;
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void basicSymmetryFaPatchField<scalar>::evaluate
|
void basicSymmetryFaPatchField<scalar>::evaluate
|
||||||
@ -165,7 +161,7 @@ void basicSymmetryFaPatchField<scalar>::evaluate
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "basicSymmetryFaPatchField.C"
|
#include "basicSymmetryFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -28,22 +28,21 @@ License
|
|||||||
#include "basicSymmetryFaPatchField.H"
|
#include "basicSymmetryFaPatchField.H"
|
||||||
#include "areaFields.H"
|
#include "areaFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<>
|
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<>
|
template<>
|
||||||
void basicSymmetryFaPatchField<scalar>::evaluate(const Pstream::commsTypes)
|
void Foam::basicSymmetryFaPatchField<Foam::scalar>::evaluate
|
||||||
|
(
|
||||||
|
const Pstream::commsTypes
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (!updated())
|
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>
|
template<class Type>
|
||||||
const word& faPatchField<Type>::calculatedType()
|
const Foam::word& Foam::faPatchField<Type>::calculatedType()
|
||||||
{
|
{
|
||||||
return calculatedFaPatchField<Type>::typeName;
|
return calculatedFaPatchField<Type>::typeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
calculatedFaPatchField<Type>::calculatedFaPatchField
|
Foam::calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -53,7 +51,7 @@ calculatedFaPatchField<Type>::calculatedFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
calculatedFaPatchField<Type>::calculatedFaPatchField
|
Foam::calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||||
(
|
(
|
||||||
const calculatedFaPatchField<Type>& ptf,
|
const calculatedFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -66,7 +64,7 @@ calculatedFaPatchField<Type>::calculatedFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
calculatedFaPatchField<Type>::calculatedFaPatchField
|
Foam::calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -78,7 +76,7 @@ calculatedFaPatchField<Type>::calculatedFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
calculatedFaPatchField<Type>::calculatedFaPatchField
|
Foam::calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||||
(
|
(
|
||||||
const calculatedFaPatchField<Type>& ptf
|
const calculatedFaPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -88,7 +86,7 @@ calculatedFaPatchField<Type>::calculatedFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
calculatedFaPatchField<Type>::calculatedFaPatchField
|
Foam::calculatedFaPatchField<Type>::calculatedFaPatchField
|
||||||
(
|
(
|
||||||
const calculatedFaPatchField<Type>& ptf,
|
const calculatedFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -100,7 +98,7 @@ calculatedFaPatchField<Type>::calculatedFaPatchField
|
|||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
template<class Type2>
|
template<class Type2>
|
||||||
tmp<faPatchField<Type> > faPatchField<Type>::NewCalculatedType
|
Foam::tmp<Foam::faPatchField<Type>> Foam::faPatchField<Type>::NewCalculatedType
|
||||||
(
|
(
|
||||||
const faPatchField<Type2>& pf
|
const faPatchField<Type2>& pf
|
||||||
)
|
)
|
||||||
@ -108,7 +106,7 @@ tmp<faPatchField<Type> > faPatchField<Type>::NewCalculatedType
|
|||||||
typename patchConstructorTable::iterator patchTypeCstrIter =
|
typename patchConstructorTable::iterator patchTypeCstrIter =
|
||||||
patchConstructorTablePtr_->find(pf.patch().type());
|
patchConstructorTablePtr_->find(pf.patch().type());
|
||||||
|
|
||||||
if (patchTypeCstrIter != patchConstructorTablePtr_->end())
|
if (patchTypeCstrIter.found())
|
||||||
{
|
{
|
||||||
return patchTypeCstrIter()
|
return patchTypeCstrIter()
|
||||||
(
|
(
|
||||||
@ -118,7 +116,7 @@ tmp<faPatchField<Type> > faPatchField<Type>::NewCalculatedType
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new calculatedFaPatchField<Type>
|
new calculatedFaPatchField<Type>
|
||||||
(
|
(
|
||||||
@ -133,17 +131,14 @@ tmp<faPatchField<Type> > faPatchField<Type>::NewCalculatedType
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > calculatedFaPatchField<Type>::valueInternalCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::calculatedFaPatchField<Type>::valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "valueInternalCoeffs cannot be called for a calculatedFaPatchField"
|
||||||
"calculatedFaPatchField<Type>::"
|
|
||||||
"valueInternalCoeffs(const tmp<scalarField>&) const"
|
|
||||||
) << "\n "
|
|
||||||
"valueInternalCoeffs cannot be called for a calculatedFaPatchField"
|
|
||||||
<< "\n on patch " << this->patch().name()
|
<< "\n on patch " << this->patch().name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||||
@ -156,17 +151,14 @@ tmp<Field<Type> > calculatedFaPatchField<Type>::valueInternalCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > calculatedFaPatchField<Type>::valueBoundaryCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::calculatedFaPatchField<Type>::valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "valueBoundaryCoeffs cannot be called for a calculatedFaPatchField"
|
||||||
"calculatedFaPatchField<Type>::"
|
|
||||||
"valueBoundaryCoeffs(const tmp<scalarField>&) const"
|
|
||||||
) << "\n "
|
|
||||||
"valueBoundaryCoeffs cannot be called for a calculatedFaPatchField"
|
|
||||||
<< "\n on patch " << this->patch().name()
|
<< "\n on patch " << this->patch().name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||||
@ -179,14 +171,11 @@ tmp<Field<Type> > calculatedFaPatchField<Type>::valueBoundaryCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > calculatedFaPatchField<Type>::gradientInternalCoeffs() const
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::calculatedFaPatchField<Type>::gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "gradientInternalCoeffs cannot be called for a "
|
||||||
"calculatedFaPatchField<Type>::"
|
|
||||||
"gradientInternalCoeffs() const"
|
|
||||||
) << "\n "
|
|
||||||
"gradientInternalCoeffs cannot be called for a "
|
|
||||||
"calculatedFaPatchField"
|
"calculatedFaPatchField"
|
||||||
<< "\n on patch " << this->patch().name()
|
<< "\n on patch " << this->patch().name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
@ -200,13 +189,11 @@ tmp<Field<Type> > calculatedFaPatchField<Type>::gradientInternalCoeffs() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > calculatedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::calculatedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "\n "
|
||||||
"calculatedFaPatchField<Type>::"
|
|
||||||
"gradientBoundaryCoeffs() const"
|
|
||||||
) << "\n "
|
|
||||||
"gradientBoundaryCoeffs cannot be called for a "
|
"gradientBoundaryCoeffs cannot be called for a "
|
||||||
"calculatedFaPatchField"
|
"calculatedFaPatchField"
|
||||||
<< "\n on patch " << this->patch().name()
|
<< "\n on patch " << this->patch().name()
|
||||||
@ -220,17 +207,12 @@ tmp<Field<Type> > calculatedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Write
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void calculatedFaPatchField<Type>::write(Ostream& os) const
|
void Foam::calculatedFaPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
faPatchField<Type>::write(os);
|
faPatchField<Type>::write(os);
|
||||||
this->writeEntry("value", os);
|
this->writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
calculatedFaPatchField
|
Foam::calculatedFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -96,9 +96,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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)
|
new calculatedFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -112,12 +112,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new calculatedFaPatchField<Type>(*this, iF)
|
new calculatedFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
@ -141,25 +141,25 @@ public:
|
|||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// 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
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// evaluation of the gradient of this patchField
|
||||||
tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||||
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
@ -174,7 +174,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "calculatedFaPatchField.C"
|
#include "calculatedFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faPatchFields.H"
|
#include "faPatchFields.H"
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
calculatedFaPatchFields
|
Foam::calculatedFaPatchFields
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
calculatedFaPatchField
|
Foam::calculatedFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
|
|||||||
@ -27,15 +27,10 @@ License
|
|||||||
|
|
||||||
#include "coupledFaPatchField.H"
|
#include "coupledFaPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
coupledFaPatchField<Type>::coupledFaPatchField
|
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -47,7 +42,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
coupledFaPatchField<Type>::coupledFaPatchField
|
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -60,7 +55,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
coupledFaPatchField<Type>::coupledFaPatchField
|
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||||
(
|
(
|
||||||
const coupledFaPatchField<Type>& ptf,
|
const coupledFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -74,7 +69,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
coupledFaPatchField<Type>::coupledFaPatchField
|
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -87,7 +82,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
coupledFaPatchField<Type>::coupledFaPatchField
|
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||||
(
|
(
|
||||||
const coupledFaPatchField<Type>& ptf
|
const coupledFaPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -98,7 +93,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
coupledFaPatchField<Type>::coupledFaPatchField
|
Foam::coupledFaPatchField<Type>::coupledFaPatchField
|
||||||
(
|
(
|
||||||
const coupledFaPatchField<Type>& ptf,
|
const coupledFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -112,7 +107,7 @@ coupledFaPatchField<Type>::coupledFaPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > coupledFaPatchField<Type>::snGrad() const
|
Foam::tmp<Foam::Field<Type>> Foam::coupledFaPatchField<Type>::snGrad() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
(patchNeighbourField() - this->patchInternalField())
|
(patchNeighbourField() - this->patchInternalField())
|
||||||
@ -121,7 +116,7 @@ tmp<Field<Type> > coupledFaPatchField<Type>::snGrad() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void coupledFaPatchField<Type>::initEvaluate(const Pstream::commsTypes)
|
void Foam::coupledFaPatchField<Type>::initEvaluate(const Pstream::commsTypes)
|
||||||
{
|
{
|
||||||
if (!this->updated())
|
if (!this->updated())
|
||||||
{
|
{
|
||||||
@ -131,7 +126,7 @@ void coupledFaPatchField<Type>::initEvaluate(const Pstream::commsTypes)
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void coupledFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
void Foam::coupledFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
{
|
{
|
||||||
Field<Type>::operator=
|
Field<Type>::operator=
|
||||||
(
|
(
|
||||||
@ -142,7 +137,8 @@ void coupledFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > coupledFaPatchField<Type>::valueInternalCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::coupledFaPatchField<Type>::valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>& w
|
const tmp<scalarField>& w
|
||||||
) const
|
) const
|
||||||
@ -152,7 +148,8 @@ tmp<Field<Type> > coupledFaPatchField<Type>::valueInternalCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > coupledFaPatchField<Type>::valueBoundaryCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::coupledFaPatchField<Type>::valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>& w
|
const tmp<scalarField>& w
|
||||||
) const
|
) const
|
||||||
@ -162,29 +159,27 @@ tmp<Field<Type> > coupledFaPatchField<Type>::valueBoundaryCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
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();
|
return -Type(pTraits<Type>::one)*this->patch().deltaCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > coupledFaPatchField<Type>::gradientBoundaryCoeffs() const
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::coupledFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
return -gradientInternalCoeffs();
|
return -gradientInternalCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void coupledFaPatchField<Type>::write(Ostream& os) const
|
void Foam::coupledFaPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
faPatchField<Type>::write(os);
|
faPatchField<Type>::write(os);
|
||||||
this->writeEntry("value", os);
|
this->writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
coupledFaPatchField
|
Foam::coupledFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class coupledFaPatchField Declaration
|
Class coupledFaPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -107,7 +107,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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
|
//- Construct as copy setting internal field reference
|
||||||
coupledFaPatchField
|
coupledFaPatchField
|
||||||
@ -117,7 +117,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual tmp<faPatchField<Type> > clone
|
virtual tmp<faPatchField<Type>> clone
|
||||||
(
|
(
|
||||||
const DimensionedField<Type, areaMesh>&
|
const DimensionedField<Type, areaMesh>&
|
||||||
) const = 0;
|
) const = 0;
|
||||||
@ -135,13 +135,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//- Return neighbour field of internal field
|
//- Return neighbour field of internal field
|
||||||
virtual tmp<Field<Type> > patchNeighbourField() const = 0;
|
virtual tmp<Field<Type>> patchNeighbourField() const = 0;
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Return patch-normal gradient
|
//- Return patch-normal gradient
|
||||||
virtual tmp<Field<Type> > snGrad() const;
|
virtual tmp<Field<Type>> snGrad() const;
|
||||||
|
|
||||||
//- Initialise the evaluation of the patch field
|
//- Initialise the evaluation of the patch field
|
||||||
virtual void initEvaluate
|
virtual void initEvaluate
|
||||||
@ -157,25 +157,25 @@ public:
|
|||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// 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
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// evaluation of the gradient of this patchField
|
||||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||||
|
|
||||||
|
|
||||||
// Coupled interface functionality
|
// Coupled interface functionality
|
||||||
@ -220,7 +220,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "coupledFaPatchField.C"
|
#include "coupledFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -26,17 +26,11 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fixedGradientFaPatchField.H"
|
#include "fixedGradientFaPatchField.H"
|
||||||
#include "dictionary.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -48,7 +42,7 @@ fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||||
(
|
(
|
||||||
const fixedGradientFaPatchField<Type>& ptf,
|
const fixedGradientFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -62,7 +56,7 @@ fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -77,7 +71,7 @@ fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||||
(
|
(
|
||||||
const fixedGradientFaPatchField<Type>& ptf
|
const fixedGradientFaPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -88,7 +82,7 @@ fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
||||||
(
|
(
|
||||||
const fixedGradientFaPatchField<Type>& ptf,
|
const fixedGradientFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -102,7 +96,7 @@ fixedGradientFaPatchField<Type>::fixedGradientFaPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void fixedGradientFaPatchField<Type>::autoMap
|
void Foam::fixedGradientFaPatchField<Type>::autoMap
|
||||||
(
|
(
|
||||||
const faPatchFieldMapper& m
|
const faPatchFieldMapper& m
|
||||||
)
|
)
|
||||||
@ -113,7 +107,7 @@ void fixedGradientFaPatchField<Type>::autoMap
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void fixedGradientFaPatchField<Type>::rmap
|
void Foam::fixedGradientFaPatchField<Type>::rmap
|
||||||
(
|
(
|
||||||
const faPatchField<Type>& ptf,
|
const faPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const labelList& addr
|
||||||
@ -122,14 +116,14 @@ void fixedGradientFaPatchField<Type>::rmap
|
|||||||
faPatchField<Type>::rmap(ptf, addr);
|
faPatchField<Type>::rmap(ptf, addr);
|
||||||
|
|
||||||
const fixedGradientFaPatchField<Type>& fgptf =
|
const fixedGradientFaPatchField<Type>& fgptf =
|
||||||
refCast<const fixedGradientFaPatchField<Type> >(ptf);
|
refCast<const fixedGradientFaPatchField<Type>>(ptf);
|
||||||
|
|
||||||
gradient_.rmap(fgptf.gradient_, addr);
|
gradient_.rmap(fgptf.gradient_, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void fixedGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
void Foam::fixedGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
{
|
{
|
||||||
if (!this->updated())
|
if (!this->updated())
|
||||||
{
|
{
|
||||||
@ -146,17 +140,19 @@ void fixedGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > fixedGradientFaPatchField<Type>::valueInternalCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::fixedGradientFaPatchField<Type>::valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) 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>
|
template<class Type>
|
||||||
tmp<Field<Type> > fixedGradientFaPatchField<Type>::valueBoundaryCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::fixedGradientFaPatchField<Type>::valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
@ -166,10 +162,10 @@ tmp<Field<Type> > fixedGradientFaPatchField<Type>::valueBoundaryCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> >
|
Foam::tmp<Foam::Field<Type>>
|
||||||
fixedGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
Foam::fixedGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type> >
|
return tmp<Field<Type>>
|
||||||
(
|
(
|
||||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||||
);
|
);
|
||||||
@ -177,23 +173,19 @@ fixedGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> >
|
Foam::tmp<Foam::Field<Type>>
|
||||||
fixedGradientFaPatchField<Type>::gradientBoundaryCoeffs() const
|
Foam::fixedGradientFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
return gradient();
|
return gradient();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void fixedGradientFaPatchField<Type>::write(Ostream& os) const
|
void Foam::fixedGradientFaPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
faPatchField<Type>::write(os);
|
faPatchField<Type>::write(os);
|
||||||
gradient_.writeEntry("gradient", os);
|
gradient_.writeEntry("gradient", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
fixedGradientFaPatchField
|
Foam::fixedGradientFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fixedGradientFaPatch Declaration
|
Class fixedGradientFaPatch Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -101,9 +101,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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)
|
new fixedGradientFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -117,12 +117,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new fixedGradientFaPatchField<Type>(*this, iF)
|
new fixedGradientFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
@ -164,7 +164,7 @@ public:
|
|||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Return gradient at boundary
|
//- Return gradient at boundary
|
||||||
virtual tmp<Field<Type> > snGrad() const
|
virtual tmp<Field<Type>> snGrad() const
|
||||||
{
|
{
|
||||||
return gradient_;
|
return gradient_;
|
||||||
}
|
}
|
||||||
@ -172,31 +172,32 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
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
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// 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
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// evaluation of the gradient of this patchField
|
||||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||||
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
@ -211,7 +212,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "fixedGradientFaPatchField.C"
|
#include "fixedGradientFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faPatchFields.H"
|
#include "faPatchFields.H"
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
fixedGradientFaPatchFields
|
Foam::fixedGradientFaPatchFields
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
fixedGradientFaPatchField
|
Foam::fixedGradientFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
|
|||||||
@ -27,15 +27,10 @@ License
|
|||||||
|
|
||||||
#include "fixedValueFaPatchField.H"
|
#include "fixedValueFaPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
Foam::fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -46,7 +41,7 @@ fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
Foam::fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -58,7 +53,7 @@ fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
Foam::fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||||
(
|
(
|
||||||
const fixedValueFaPatchField<Type>& ptf,
|
const fixedValueFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -69,7 +64,7 @@ fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
Foam::fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||||
(
|
(
|
||||||
const fixedValueFaPatchField<Type>& ptf,
|
const fixedValueFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -82,7 +77,7 @@ fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
Foam::fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
||||||
(
|
(
|
||||||
const fixedValueFaPatchField<Type>& ptf
|
const fixedValueFaPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -94,12 +89,13 @@ fixedValueFaPatchField<Type>::fixedValueFaPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > fixedValueFaPatchField<Type>::valueInternalCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::fixedValueFaPatchField<Type>::valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type> >
|
return tmp<Field<Type>>
|
||||||
(
|
(
|
||||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||||
);
|
);
|
||||||
@ -107,7 +103,8 @@ tmp<Field<Type> > fixedValueFaPatchField<Type>::valueInternalCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > fixedValueFaPatchField<Type>::valueBoundaryCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::fixedValueFaPatchField<Type>::valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
@ -117,30 +114,28 @@ tmp<Field<Type> > fixedValueFaPatchField<Type>::valueBoundaryCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
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();
|
return -Type(pTraits<Type>::one)*this->patch().deltaCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
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);
|
return this->patch().deltaCoeffs()*(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Write
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void fixedValueFaPatchField<Type>::write(Ostream& os) const
|
void Foam::fixedValueFaPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
faPatchField<Type>::write(os);
|
faPatchField<Type>::write(os);
|
||||||
this->writeEntry("value", os);
|
this->writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
fixedValueFaPatchField
|
Foam::fixedValueFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fixedValueFaPatch Declaration
|
Class fixedValueFaPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -97,9 +97,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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)
|
new fixedValueFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -113,12 +113,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new fixedValueFaPatchField<Type>(*this, iF)
|
new fixedValueFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
@ -142,25 +142,25 @@ public:
|
|||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// 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
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// evaluation of the gradient of this patchField
|
||||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||||
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
@ -198,7 +198,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "fixedValueFaPatchField.C"
|
#include "fixedValueFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -27,15 +27,10 @@ License
|
|||||||
|
|
||||||
#include "mixedFaPatchField.H"
|
#include "mixedFaPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
mixedFaPatchField<Type>::mixedFaPatchField
|
Foam::mixedFaPatchField<Type>::mixedFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -49,7 +44,7 @@ mixedFaPatchField<Type>::mixedFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
mixedFaPatchField<Type>::mixedFaPatchField
|
Foam::mixedFaPatchField<Type>::mixedFaPatchField
|
||||||
(
|
(
|
||||||
const mixedFaPatchField<Type>& ptf,
|
const mixedFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -65,7 +60,7 @@ mixedFaPatchField<Type>::mixedFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
mixedFaPatchField<Type>::mixedFaPatchField
|
Foam::mixedFaPatchField<Type>::mixedFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -82,7 +77,7 @@ mixedFaPatchField<Type>::mixedFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
mixedFaPatchField<Type>::mixedFaPatchField
|
Foam::mixedFaPatchField<Type>::mixedFaPatchField
|
||||||
(
|
(
|
||||||
const mixedFaPatchField<Type>& ptf
|
const mixedFaPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -95,7 +90,7 @@ mixedFaPatchField<Type>::mixedFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
mixedFaPatchField<Type>::mixedFaPatchField
|
Foam::mixedFaPatchField<Type>::mixedFaPatchField
|
||||||
(
|
(
|
||||||
const mixedFaPatchField<Type>& ptf,
|
const mixedFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -111,7 +106,7 @@ mixedFaPatchField<Type>::mixedFaPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void mixedFaPatchField<Type>::autoMap
|
void Foam::mixedFaPatchField<Type>::autoMap
|
||||||
(
|
(
|
||||||
const faPatchFieldMapper& m
|
const faPatchFieldMapper& m
|
||||||
)
|
)
|
||||||
@ -124,7 +119,7 @@ void mixedFaPatchField<Type>::autoMap
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void mixedFaPatchField<Type>::rmap
|
void Foam::mixedFaPatchField<Type>::rmap
|
||||||
(
|
(
|
||||||
const faPatchField<Type>& ptf,
|
const faPatchField<Type>& ptf,
|
||||||
const labelList& addr
|
const labelList& addr
|
||||||
@ -133,7 +128,7 @@ void mixedFaPatchField<Type>::rmap
|
|||||||
faPatchField<Type>::rmap(ptf, addr);
|
faPatchField<Type>::rmap(ptf, addr);
|
||||||
|
|
||||||
const mixedFaPatchField<Type>& mptf =
|
const mixedFaPatchField<Type>& mptf =
|
||||||
refCast<const mixedFaPatchField<Type> >(ptf);
|
refCast<const mixedFaPatchField<Type>>(ptf);
|
||||||
|
|
||||||
refValue_.rmap(mptf.refValue_, addr);
|
refValue_.rmap(mptf.refValue_, addr);
|
||||||
refGrad_.rmap(mptf.refGrad_, addr);
|
refGrad_.rmap(mptf.refGrad_, addr);
|
||||||
@ -142,7 +137,7 @@ void mixedFaPatchField<Type>::rmap
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void mixedFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
void Foam::mixedFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
{
|
{
|
||||||
if (!this->updated())
|
if (!this->updated())
|
||||||
{
|
{
|
||||||
@ -165,7 +160,7 @@ void mixedFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > mixedFaPatchField<Type>::snGrad() const
|
Foam::tmp<Foam::Field<Type>> Foam::mixedFaPatchField<Type>::snGrad() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
valueFraction_
|
valueFraction_
|
||||||
@ -176,18 +171,17 @@ tmp<Field<Type> > mixedFaPatchField<Type>::snGrad() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > mixedFaPatchField<Type>::valueInternalCoeffs
|
Foam::tmp<Foam::Field<Type>> Foam::mixedFaPatchField<Type>::valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return Type(pTraits<Type>::one)*(1.0 - valueFraction_);
|
return Type(pTraits<Type>::one)*(1.0 - valueFraction_);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > mixedFaPatchField<Type>::valueBoundaryCoeffs
|
Foam::tmp<Foam::Field<Type>> Foam::mixedFaPatchField<Type>::valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
@ -199,14 +193,16 @@ tmp<Field<Type> > mixedFaPatchField<Type>::valueBoundaryCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
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();
|
return -Type(pTraits<Type>::one)*valueFraction_*this->patch().deltaCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > mixedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::mixedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
valueFraction_*this->patch().deltaCoeffs()*refValue_
|
valueFraction_*this->patch().deltaCoeffs()*refValue_
|
||||||
@ -215,7 +211,7 @@ tmp<Field<Type> > mixedFaPatchField<Type>::gradientBoundaryCoeffs() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void mixedFaPatchField<Type>::write(Ostream& os) const
|
void Foam::mixedFaPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
faPatchField<Type>::write(os);
|
faPatchField<Type>::write(os);
|
||||||
refValue_.writeEntry("refValue", 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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
mixedFaPatchField
|
Foam::mixedFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class mixedFaPatchField Declaration
|
Class mixedFaPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -107,9 +107,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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)
|
new mixedFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -123,12 +123,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new mixedFaPatchField<Type>(*this, iF)
|
new mixedFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
@ -200,7 +200,7 @@ public:
|
|||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Return gradient at boundary
|
//- Return gradient at boundary
|
||||||
virtual tmp<Field<Type> > snGrad() const;
|
virtual tmp<Field<Type>> snGrad() const;
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
@ -210,25 +210,25 @@ public:
|
|||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// 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
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// evaluation of the gradient of this patchField
|
||||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||||
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
@ -266,7 +266,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "mixedFaPatchField.C"
|
#include "mixedFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -26,18 +26,12 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "transformFaPatchField.H"
|
#include "transformFaPatchField.H"
|
||||||
#include "IOstreams.H"
|
|
||||||
#include "transformField.H"
|
#include "transformField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
transformFaPatchField<Type>::transformFaPatchField
|
Foam::transformFaPatchField<Type>::transformFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -48,7 +42,7 @@ transformFaPatchField<Type>::transformFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
transformFaPatchField<Type>::transformFaPatchField
|
Foam::transformFaPatchField<Type>::transformFaPatchField
|
||||||
(
|
(
|
||||||
const transformFaPatchField<Type>& ptf,
|
const transformFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -61,7 +55,7 @@ transformFaPatchField<Type>::transformFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
transformFaPatchField<Type>::transformFaPatchField
|
Foam::transformFaPatchField<Type>::transformFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -73,7 +67,7 @@ transformFaPatchField<Type>::transformFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
transformFaPatchField<Type>::transformFaPatchField
|
Foam::transformFaPatchField<Type>::transformFaPatchField
|
||||||
(
|
(
|
||||||
const transformFaPatchField<Type>& ptf,
|
const transformFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -85,10 +79,9 @@ transformFaPatchField<Type>::transformFaPatchField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Return the matrix diagonal coefficients corresponding to the
|
|
||||||
// evaluation of the value of this patchField
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > transformFaPatchField<Type>::valueInternalCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::transformFaPatchField<Type>::valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) 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>
|
template<class Type>
|
||||||
tmp<Field<Type> > transformFaPatchField<Type>::valueBoundaryCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::transformFaPatchField<Type>::valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) 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>
|
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 -this->patch().deltaCoeffs()*snGradTransformDiag();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return the matrix source coefficients corresponding to the
|
|
||||||
// evaluation of the gradient of this patchField
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > transformFaPatchField<Type>::gradientBoundaryCoeffs() const
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::transformFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
snGrad()
|
snGrad()
|
||||||
@ -138,7 +128,7 @@ tmp<Field<Type> > transformFaPatchField<Type>::gradientBoundaryCoeffs() const
|
|||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void transformFaPatchField<Type>::operator=
|
void Foam::transformFaPatchField<Type>::operator=
|
||||||
(
|
(
|
||||||
const faPatchField<Type>& ptf
|
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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
transformFaPatchField
|
Foam::transformFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class transformFvPatch Declaration
|
Class transformFaPatch Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -92,7 +92,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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
|
//- Construct as copy setting internal field reference
|
||||||
transformFaPatchField
|
transformFaPatchField
|
||||||
@ -102,7 +102,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- Construct and return a clone setting internal field reference
|
||||||
virtual tmp<faPatchField<Type> > clone
|
virtual tmp<faPatchField<Type>> clone
|
||||||
(
|
(
|
||||||
const DimensionedField<Type, areaMesh>&
|
const DimensionedField<Type, areaMesh>&
|
||||||
) const = 0;
|
) const = 0;
|
||||||
@ -113,32 +113,32 @@ public:
|
|||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Return gradient at boundary
|
//- Return gradient at boundary
|
||||||
virtual tmp<Field<Type> > snGrad() const = 0;
|
virtual tmp<Field<Type>> snGrad() const = 0;
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- 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
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// 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
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// evaluation of the gradient of this patchField
|
||||||
virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
|
virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
@ -150,7 +150,7 @@ public:
|
|||||||
// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
|
// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<>
|
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
|
#ifdef NoRepository
|
||||||
# include "transformFaPatchField.C"
|
#include "transformFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faPatchFields.H"
|
#include "faPatchFields.H"
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
transformFaPatchFields
|
Foam::transformFaPatchFields
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
|
|||||||
@ -23,9 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
|
||||||
transformFvPatchField
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef transformFaPatchFieldsFwd_H
|
#ifndef transformFaPatchFieldsFwd_H
|
||||||
|
|||||||
@ -23,29 +23,18 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "transformFaPatchField.H"
|
#include "transformFaPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Return the matrix diagonal coefficients corresponding to the
|
|
||||||
// evaluation of the gradient of this patchField
|
|
||||||
template<>
|
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 "zeroGradientFaPatchField.H"
|
||||||
#include "faPatchFieldMapper.H"
|
#include "faPatchFieldMapper.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
Foam::zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -47,7 +42,7 @@ zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
Foam::zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||||
(
|
(
|
||||||
const zeroGradientFaPatchField<Type>& ptf,
|
const zeroGradientFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -60,7 +55,7 @@ zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
Foam::zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -74,7 +69,7 @@ zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
Foam::zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||||
(
|
(
|
||||||
const zeroGradientFaPatchField& zgpf
|
const zeroGradientFaPatchField& zgpf
|
||||||
)
|
)
|
||||||
@ -84,7 +79,7 @@ zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
Foam::zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
||||||
(
|
(
|
||||||
const zeroGradientFaPatchField& zgpf,
|
const zeroGradientFaPatchField& zgpf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -97,7 +92,7 @@ zeroGradientFaPatchField<Type>::zeroGradientFaPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void zeroGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
void Foam::zeroGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
{
|
{
|
||||||
if (!this->updated())
|
if (!this->updated())
|
||||||
{
|
{
|
||||||
@ -110,12 +105,13 @@ void zeroGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > zeroGradientFaPatchField<Type>::valueInternalCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::zeroGradientFaPatchField<Type>::valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type> >
|
return tmp<Field<Type>>
|
||||||
(
|
(
|
||||||
new Field<Type>(this->size(), pTraits<Type>::one)
|
new Field<Type>(this->size(), pTraits<Type>::one)
|
||||||
);
|
);
|
||||||
@ -123,12 +119,13 @@ tmp<Field<Type> > zeroGradientFaPatchField<Type>::valueInternalCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > zeroGradientFaPatchField<Type>::valueBoundaryCoeffs
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::zeroGradientFaPatchField<Type>::valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type> >
|
return tmp<Field<Type>>
|
||||||
(
|
(
|
||||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||||
);
|
);
|
||||||
@ -136,9 +133,10 @@ tmp<Field<Type> > zeroGradientFaPatchField<Type>::valueBoundaryCoeffs
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
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)
|
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||||
);
|
);
|
||||||
@ -146,17 +144,14 @@ tmp<Field<Type> > zeroGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
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)
|
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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
zeroGradientFaPatchField
|
Foam::zeroGradientFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class zeroGradientFaPatchField Declaration
|
Class zeroGradientFaPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -97,9 +97,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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)
|
new zeroGradientFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -113,12 +113,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new zeroGradientFaPatchField<Type>(*this, iF)
|
new zeroGradientFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
@ -135,9 +135,9 @@ public:
|
|||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Return gradient at boundary
|
//- 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)
|
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||||
);
|
);
|
||||||
@ -151,25 +151,25 @@ public:
|
|||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// 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
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// 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
|
#ifdef NoRepository
|
||||||
# include "zeroGradientFaPatchField.C"
|
#include "zeroGradientFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faPatchFields.H"
|
#include "faPatchFields.H"
|
||||||
|
|||||||
@ -23,9 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
|
||||||
zeroGradientFaPatchFields
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
|
|||||||
@ -23,11 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
|
||||||
zeroGradientFaPatchField
|
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef zeroGradientFaPatchFieldsFwd_H
|
#ifndef zeroGradientFaPatchFieldsFwd_H
|
||||||
|
|||||||
@ -27,15 +27,10 @@ License
|
|||||||
|
|
||||||
#include "cyclicFaPatchField.H"
|
#include "cyclicFaPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
cyclicFaPatchField<Type>::cyclicFaPatchField
|
Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -47,7 +42,7 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
cyclicFaPatchField<Type>::cyclicFaPatchField
|
Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||||
(
|
(
|
||||||
const cyclicFaPatchField<Type>& ptf,
|
const cyclicFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -58,18 +53,10 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
|||||||
coupledFaPatchField<Type>(ptf, p, iF, mapper),
|
coupledFaPatchField<Type>(ptf, p, iF, mapper),
|
||||||
cyclicPatch_(refCast<const cyclicFaPatch>(p))
|
cyclicPatch_(refCast<const cyclicFaPatch>(p))
|
||||||
{
|
{
|
||||||
if (!isType<cyclicFaPatch>(this->patch()))
|
if (!isA<cyclicFaPatch>(this->patch()))
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "\n patch type '" << p.type()
|
||||||
"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()
|
|
||||||
<< "' not constraint type '" << typeName << "'"
|
<< "' not constraint type '" << typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
@ -80,7 +67,7 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
cyclicFaPatchField<Type>::cyclicFaPatchField
|
Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -90,18 +77,10 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
|||||||
coupledFaPatchField<Type>(p, iF, dict),
|
coupledFaPatchField<Type>(p, iF, dict),
|
||||||
cyclicPatch_(refCast<const cyclicFaPatch>(p))
|
cyclicPatch_(refCast<const cyclicFaPatch>(p))
|
||||||
{
|
{
|
||||||
if (!isType<cyclicFaPatch>(p))
|
if (!isA<cyclicFaPatch>(p))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "\n patch type '" << p.type()
|
||||||
"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()
|
|
||||||
<< "' not constraint type '" << typeName << "'"
|
<< "' not constraint type '" << typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
@ -114,7 +93,7 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
cyclicFaPatchField<Type>::cyclicFaPatchField
|
Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||||
(
|
(
|
||||||
const cyclicFaPatchField<Type>& ptf
|
const cyclicFaPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -126,7 +105,7 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
cyclicFaPatchField<Type>::cyclicFaPatchField
|
Foam::cyclicFaPatchField<Type>::cyclicFaPatchField
|
||||||
(
|
(
|
||||||
const cyclicFaPatchField<Type>& ptf,
|
const cyclicFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -140,19 +119,20 @@ cyclicFaPatchField<Type>::cyclicFaPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
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 Field<Type>& iField = this->internalField();
|
||||||
const labelUList& faceCells = cyclicPatch_.faceCells();
|
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();
|
Field<Type>& pnf = tpnf.ref();
|
||||||
|
|
||||||
label sizeby2 = this->size()/2;
|
label sizeby2 = this->size()/2;
|
||||||
|
|
||||||
if (doTransform())
|
if (doTransform())
|
||||||
{
|
{
|
||||||
for (label facei=0; facei<sizeby2; facei++)
|
for (label facei=0; facei<sizeby2; ++facei)
|
||||||
{
|
{
|
||||||
pnf[facei] = transform
|
pnf[facei] = transform
|
||||||
(
|
(
|
||||||
@ -167,7 +147,7 @@ tmp<Field<Type> > cyclicFaPatchField<Type>::patchNeighbourField() const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (label facei=0; facei<sizeby2; facei++)
|
for (label facei=0; facei<sizeby2; ++facei)
|
||||||
{
|
{
|
||||||
pnf[facei] = iField[faceCells[facei + sizeby2]];
|
pnf[facei] = iField[faceCells[facei + sizeby2]];
|
||||||
pnf[facei + sizeby2] = iField[faceCells[facei]];
|
pnf[facei + sizeby2] = iField[faceCells[facei]];
|
||||||
@ -179,7 +159,7 @@ tmp<Field<Type> > cyclicFaPatchField<Type>::patchNeighbourField() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
void Foam::cyclicFaPatchField<Type>::updateInterfaceMatrix
|
||||||
(
|
(
|
||||||
scalarField& result,
|
scalarField& result,
|
||||||
const bool add,
|
const bool add,
|
||||||
@ -194,7 +174,7 @@ void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
|||||||
label sizeby2 = this->size()/2;
|
label sizeby2 = this->size()/2;
|
||||||
const labelUList& faceCells = cyclicPatch_.faceCells();
|
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] = psiInternal[faceCells[facei + sizeby2]];
|
||||||
pnf[facei + sizeby2] = psiInternal[faceCells[facei]];
|
pnf[facei + sizeby2] = psiInternal[faceCells[facei]];
|
||||||
@ -222,7 +202,7 @@ void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
void Foam::cyclicFaPatchField<Type>::updateInterfaceMatrix
|
||||||
(
|
(
|
||||||
Field<Type>& result,
|
Field<Type>& result,
|
||||||
const bool add,
|
const bool add,
|
||||||
@ -236,7 +216,7 @@ void cyclicFaPatchField<Type>::updateInterfaceMatrix
|
|||||||
label sizeby2 = this->size()/2;
|
label sizeby2 = this->size()/2;
|
||||||
const labelUList& faceCells = cyclicPatch_.faceCells();
|
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] = psiInternal[faceCells[facei + sizeby2]];
|
||||||
pnf[facei + sizeby2] = psiInternal[faceCells[facei]];
|
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>
|
template<class Type>
|
||||||
@ -71,7 +71,7 @@ class cyclicFaPatchField
|
|||||||
|
|
||||||
//- Return neighbour side field given internal fields
|
//- Return neighbour side field given internal fields
|
||||||
template<class Type2>
|
template<class Type2>
|
||||||
tmp<Field<Type2> > neighbourSideField
|
tmp<Field<Type2>> neighbourSideField
|
||||||
(
|
(
|
||||||
const Field<Type2>&
|
const Field<Type2>&
|
||||||
) const;
|
) const;
|
||||||
@ -116,9 +116,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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)
|
new cyclicFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -132,12 +132,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new cyclicFaPatchField<Type>(*this, iF)
|
new cyclicFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
@ -158,7 +158,7 @@ public:
|
|||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Return neighbour coupled given internal cell data
|
//- Return neighbour coupled given internal cell data
|
||||||
virtual tmp<Field<Type> > patchNeighbourField() const;
|
virtual tmp<Field<Type>> patchNeighbourField() const;
|
||||||
|
|
||||||
|
|
||||||
// Coupled interface functionality
|
// Coupled interface functionality
|
||||||
@ -230,7 +230,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "cyclicFaPatchField.C"
|
#include "cyclicFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -29,15 +29,10 @@ License
|
|||||||
#include "faPatchFieldMapper.H"
|
#include "faPatchFieldMapper.H"
|
||||||
#include "areaFaMesh.H"
|
#include "areaFaMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
emptyFaPatchField<Type>::emptyFaPatchField
|
Foam::emptyFaPatchField<Type>::emptyFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -48,7 +43,7 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
emptyFaPatchField<Type>::emptyFaPatchField
|
Foam::emptyFaPatchField<Type>::emptyFaPatchField
|
||||||
(
|
(
|
||||||
const emptyFaPatchField<Type>&,
|
const emptyFaPatchField<Type>&,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -60,16 +55,8 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
|||||||
{
|
{
|
||||||
if (!isType<emptyFaPatch>(p))
|
if (!isType<emptyFaPatch>(p))
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "\n patch type '" << p.type()
|
||||||
"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()
|
|
||||||
<< "' not constraint type '" << typeName << "'"
|
<< "' not constraint type '" << typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
@ -80,7 +67,7 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
emptyFaPatchField<Type>::emptyFaPatchField
|
Foam::emptyFaPatchField<Type>::emptyFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -89,18 +76,10 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
|||||||
:
|
:
|
||||||
faPatchField<Type>(p, iF, Field<Type>(0))
|
faPatchField<Type>(p, iF, Field<Type>(0))
|
||||||
{
|
{
|
||||||
if (typeid(p) != typeid(emptyFaPatch))
|
if (!isA<emptyFaPatch>(p))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "\n patch type '" << p.type()
|
||||||
"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()
|
|
||||||
<< "' not constraint type '" << typeName << "'"
|
<< "' not constraint type '" << typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
@ -111,7 +90,7 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
emptyFaPatchField<Type>::emptyFaPatchField
|
Foam::emptyFaPatchField<Type>::emptyFaPatchField
|
||||||
(
|
(
|
||||||
const emptyFaPatchField<Type>& ptf
|
const emptyFaPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -126,7 +105,7 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
emptyFaPatchField<Type>::emptyFaPatchField
|
Foam::emptyFaPatchField<Type>::emptyFaPatchField
|
||||||
(
|
(
|
||||||
const emptyFaPatchField<Type>& ptf,
|
const emptyFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -139,9 +118,8 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
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 (this->dimensionedInternalField().mesh().nFaces())
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
@ -150,18 +128,15 @@ void emptyFaPatchField<Type>::updateCoeffs()
|
|||||||
% this->dimensionedInternalField().mesh().nFaces()
|
% this->dimensionedInternalField().mesh().nFaces()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalErrorIn("emptyFaPatchField<Type>::updateCoeffs()")
|
FatalErrorInFunction
|
||||||
<< "This mesh contains patches of type empty but is not 1D or 2D\n"
|
<< "This mesh contains patches of type empty but is "
|
||||||
" by virtue of the fact that the number of faces of this\n"
|
<< "not 1D or 2D by virtue of the fact that the number of "
|
||||||
" empty patch is not divisible by the number of cells."
|
<< "faces of this empty patch is not divisible by the number "
|
||||||
<< exit(FatalError);
|
<< "of cells."
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
emptyFaPatchField
|
Foam::emptyFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class emptyFaPatch Declaration
|
Class emptyFaPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -97,9 +97,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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)
|
new emptyFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -113,18 +113,23 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new emptyFaPatchField<Type>(*this, iF)
|
new emptyFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~emptyFaPatchField()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
@ -155,36 +160,36 @@ public:
|
|||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueInternalCoeffs
|
virtual tmp<Field<Type>> valueInternalCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) 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
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the value of this patchField with given weights
|
// evaluation of the value of this patchField with given weights
|
||||||
virtual tmp<Field<Type> > valueBoundaryCoeffs
|
virtual tmp<Field<Type>> valueBoundaryCoeffs
|
||||||
(
|
(
|
||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) 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
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// 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
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// 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
|
#ifdef NoRepository
|
||||||
# include "emptyFaPatchField.C"
|
#include "emptyFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faPatchFields.H"
|
#include "faPatchFields.H"
|
||||||
|
|||||||
@ -23,15 +23,11 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
|
||||||
emptyFaPatchFields
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
emptyFaPatchFields.C
|
emptyFaPatchFields.C
|
||||||
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef emptyFaPatchFields_H
|
#ifndef emptyFaPatchFields_H
|
||||||
|
|||||||
@ -23,11 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
|
||||||
emptyFaPatchField
|
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef emptyFaPatchFieldsFwd_H
|
#ifndef emptyFaPatchFieldsFwd_H
|
||||||
|
|||||||
@ -29,18 +29,12 @@ License
|
|||||||
#include "processorFaPatch.H"
|
#include "processorFaPatch.H"
|
||||||
#include "IPstream.H"
|
#include "IPstream.H"
|
||||||
#include "OPstream.H"
|
#include "OPstream.H"
|
||||||
#include "demandDrivenData.H"
|
|
||||||
#include "transformField.H"
|
#include "transformField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
processorFaPatchField<Type>::processorFaPatchField
|
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -52,7 +46,7 @@ processorFaPatchField<Type>::processorFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
processorFaPatchField<Type>::processorFaPatchField
|
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -64,9 +58,8 @@ processorFaPatchField<Type>::processorFaPatchField
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// Construct by mapping given processorFaPatchField<Type>
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
processorFaPatchField<Type>::processorFaPatchField
|
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||||
(
|
(
|
||||||
const processorFaPatchField<Type>& ptf,
|
const processorFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -79,16 +72,8 @@ processorFaPatchField<Type>::processorFaPatchField
|
|||||||
{
|
{
|
||||||
if (!isType<processorFaPatch>(this->patch()))
|
if (!isType<processorFaPatch>(this->patch()))
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "\n patch type '" << p.type()
|
||||||
"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()
|
|
||||||
<< "' not constraint type '" << typeName << "'"
|
<< "' not constraint type '" << typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
@ -99,7 +84,7 @@ processorFaPatchField<Type>::processorFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
processorFaPatchField<Type>::processorFaPatchField
|
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -111,16 +96,8 @@ processorFaPatchField<Type>::processorFaPatchField
|
|||||||
{
|
{
|
||||||
if (!isType<processorFaPatch>(p))
|
if (!isType<processorFaPatch>(p))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "\n patch type '" << p.type()
|
||||||
"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()
|
|
||||||
<< "' not constraint type '" << typeName << "'"
|
<< "' not constraint type '" << typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
@ -131,7 +108,7 @@ processorFaPatchField<Type>::processorFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
processorFaPatchField<Type>::processorFaPatchField
|
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||||
(
|
(
|
||||||
const processorFaPatchField<Type>& ptf
|
const processorFaPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -143,7 +120,7 @@ processorFaPatchField<Type>::processorFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
processorFaPatchField<Type>::processorFaPatchField
|
Foam::processorFaPatchField<Type>::processorFaPatchField
|
||||||
(
|
(
|
||||||
const processorFaPatchField<Type>& ptf,
|
const processorFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -157,21 +134,22 @@ processorFaPatchField<Type>::processorFaPatchField
|
|||||||
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
processorFaPatchField<Type>::~processorFaPatchField()
|
Foam::processorFaPatchField<Type>::~processorFaPatchField()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > processorFaPatchField<Type>::patchNeighbourField() const
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::processorFaPatchField<Type>::patchNeighbourField() const
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void processorFaPatchField<Type>::initEvaluate
|
void Foam::processorFaPatchField<Type>::initEvaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType
|
const Pstream::commsTypes commsType
|
||||||
)
|
)
|
||||||
@ -184,7 +162,7 @@ void processorFaPatchField<Type>::initEvaluate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void processorFaPatchField<Type>::evaluate
|
void Foam::processorFaPatchField<Type>::evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType
|
const Pstream::commsTypes commsType
|
||||||
)
|
)
|
||||||
@ -202,14 +180,14 @@ void processorFaPatchField<Type>::evaluate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
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());
|
return this->patch().deltaCoeffs()*(*this - this->patchInternalField());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
void Foam::processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
||||||
(
|
(
|
||||||
scalarField& result,
|
scalarField& result,
|
||||||
const bool add,
|
const bool add,
|
||||||
@ -228,7 +206,7 @@ void processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void processorFaPatchField<Type>::updateInterfaceMatrix
|
void Foam::processorFaPatchField<Type>::updateInterfaceMatrix
|
||||||
(
|
(
|
||||||
scalarField& result,
|
scalarField& result,
|
||||||
const bool add,
|
const bool add,
|
||||||
@ -268,7 +246,7 @@ void processorFaPatchField<Type>::updateInterfaceMatrix
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
void Foam::processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
||||||
(
|
(
|
||||||
Field<Type>& result,
|
Field<Type>& result,
|
||||||
const bool add,
|
const bool add,
|
||||||
@ -286,7 +264,7 @@ void processorFaPatchField<Type>::initInterfaceMatrixUpdate
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void processorFaPatchField<Type>::updateInterfaceMatrix
|
void Foam::processorFaPatchField<Type>::updateInterfaceMatrix
|
||||||
(
|
(
|
||||||
Field<Type>& result,
|
Field<Type>& result,
|
||||||
const bool add,
|
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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
processorFvPatchField
|
Foam::processorFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class processorFaPatchField Declaration
|
Class processorFaPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -110,9 +110,9 @@ public:
|
|||||||
processorFaPatchField(const processorFaPatchField<Type>&);
|
processorFaPatchField(const processorFaPatchField<Type>&);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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)
|
new processorFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -126,12 +126,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new processorFaPatchField<Type>(*this, iF)
|
new processorFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
@ -161,7 +161,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//- Return neighbour field given internal field
|
//- Return neighbour field given internal field
|
||||||
tmp<Field<Type> > patchNeighbourField() const;
|
tmp<Field<Type>> patchNeighbourField() const;
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
@ -173,7 +173,7 @@ public:
|
|||||||
virtual void evaluate(const Pstream::commsTypes commsType);
|
virtual void evaluate(const Pstream::commsTypes commsType);
|
||||||
|
|
||||||
//- Return patch-normal gradient
|
//- Return patch-normal gradient
|
||||||
virtual tmp<Field<Type> > snGrad() const;
|
virtual tmp<Field<Type>> snGrad() const;
|
||||||
|
|
||||||
// Coupled interface functionality
|
// Coupled interface functionality
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "processorFaPatchField.C"
|
#include "processorFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -27,23 +27,19 @@ License
|
|||||||
|
|
||||||
#include "processorFaPatchScalarField.H"
|
#include "processorFaPatchScalarField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void processorFaPatchField<scalar>::transformCoupleField
|
void Foam::processorFaPatchField<Foam::scalar>::transformCoupleField
|
||||||
(
|
(
|
||||||
scalarField& f,
|
scalarField& f,
|
||||||
const direction cmpt
|
const direction cmpt
|
||||||
) const
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void processorFaPatchField<scalar>::initInterfaceMatrixUpdate
|
void Foam::processorFaPatchField<Foam::scalar>::initInterfaceMatrixUpdate
|
||||||
(
|
(
|
||||||
scalarField& result,
|
scalarField& result,
|
||||||
const bool add,
|
const bool add,
|
||||||
@ -62,7 +58,7 @@ void processorFaPatchField<scalar>::initInterfaceMatrixUpdate
|
|||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void processorFaPatchField<scalar>::updateInterfaceMatrix
|
void Foam::processorFaPatchField<Foam::scalar>::updateInterfaceMatrix
|
||||||
(
|
(
|
||||||
scalarField& result,
|
scalarField& result,
|
||||||
const bool add,
|
const bool add,
|
||||||
@ -96,8 +92,4 @@ void processorFaPatchField<scalar>::updateInterfaceMatrix
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -27,15 +27,10 @@ License
|
|||||||
|
|
||||||
#include "symmetryFaPatchField.H"
|
#include "symmetryFaPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
symmetryFaPatchField<Type>::symmetryFaPatchField
|
Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -46,7 +41,7 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
symmetryFaPatchField<Type>::symmetryFaPatchField
|
Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||||
(
|
(
|
||||||
const symmetryFaPatchField<Type>& ptf,
|
const symmetryFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -58,16 +53,8 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
|||||||
{
|
{
|
||||||
if (!isType<symmetryFaPatch>(this->patch()))
|
if (!isType<symmetryFaPatch>(this->patch()))
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "\n patch type '" << p.type()
|
||||||
"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()
|
|
||||||
<< "' not constraint type '" << typeName << "'"
|
<< "' not constraint type '" << typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
@ -78,7 +65,7 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
symmetryFaPatchField<Type>::symmetryFaPatchField
|
Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -89,16 +76,8 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
|||||||
{
|
{
|
||||||
if (!isType<symmetryFaPatch>(p))
|
if (!isType<symmetryFaPatch>(p))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "\n patch type '" << p.type()
|
||||||
"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()
|
|
||||||
<< "' not constraint type '" << typeName << "'"
|
<< "' not constraint type '" << typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << this->dimensionedInternalField().name()
|
<< " of field " << this->dimensionedInternalField().name()
|
||||||
@ -109,7 +88,7 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
symmetryFaPatchField<Type>::symmetryFaPatchField
|
Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||||
(
|
(
|
||||||
const symmetryFaPatchField<Type>& ptf
|
const symmetryFaPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -119,7 +98,7 @@ symmetryFaPatchField<Type>::symmetryFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
symmetryFaPatchField<Type>::symmetryFaPatchField
|
Foam::symmetryFaPatchField<Type>::symmetryFaPatchField
|
||||||
(
|
(
|
||||||
const symmetryFaPatchField<Type>& ptf,
|
const symmetryFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
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
|
//- 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)
|
new symmetryFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -114,12 +114,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new symmetryFaPatchField<Type>(*this, iF)
|
new symmetryFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
@ -134,7 +134,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "symmetryFaPatchField.C"
|
#include "symmetryFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -31,15 +31,10 @@ License
|
|||||||
#include "symmTransform.H"
|
#include "symmTransform.H"
|
||||||
#include "diagTensor.H"
|
#include "diagTensor.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
wedgeFaPatchField<Type>::wedgeFaPatchField
|
Foam::wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -50,7 +45,7 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
wedgeFaPatchField<Type>::wedgeFaPatchField
|
Foam::wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||||
(
|
(
|
||||||
const wedgeFaPatchField<Type>& ptf,
|
const wedgeFaPatchField<Type>& ptf,
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
@ -62,16 +57,8 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
|||||||
{
|
{
|
||||||
if (!isType<wedgeFaPatch>(this->patch()))
|
if (!isType<wedgeFaPatch>(this->patch()))
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorInFunction
|
||||||
(
|
<< "Field type does not correspond to patch type for patch "
|
||||||
"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 "
|
|
||||||
<< this->patch().index() << "." << endl
|
<< this->patch().index() << "." << endl
|
||||||
<< "Field type: " << typeName << endl
|
<< "Field type: " << typeName << endl
|
||||||
<< "Patch type: " << this->patch().type()
|
<< "Patch type: " << this->patch().type()
|
||||||
@ -81,7 +68,7 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
wedgeFaPatchField<Type>::wedgeFaPatchField
|
Foam::wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||||
(
|
(
|
||||||
const faPatch& p,
|
const faPatch& p,
|
||||||
const DimensionedField<Type, areaMesh>& iF,
|
const DimensionedField<Type, areaMesh>& iF,
|
||||||
@ -92,16 +79,8 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
|||||||
{
|
{
|
||||||
if (!isType<wedgeFaPatch>(p))
|
if (!isType<wedgeFaPatch>(p))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorInFunction(dict)
|
||||||
(
|
<< "patch " << this->patch().index() << " not wedge type. "
|
||||||
"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. "
|
|
||||||
<< "Patch type = " << p.type()
|
<< "Patch type = " << p.type()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
@ -111,7 +90,7 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
wedgeFaPatchField<Type>::wedgeFaPatchField
|
Foam::wedgeFaPatchField<Type>::wedgeFaPatchField
|
||||||
(
|
(
|
||||||
const wedgeFaPatchField<Type>& ptf,
|
const wedgeFaPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, areaMesh>& iF
|
const DimensionedField<Type, areaMesh>& iF
|
||||||
@ -123,11 +102,10 @@ wedgeFaPatchField<Type>::wedgeFaPatchField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Return gradient at boundary
|
|
||||||
template<class Type>
|
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
|
return
|
||||||
(
|
(
|
||||||
@ -137,9 +115,8 @@ tmp<Field<Type> > wedgeFaPatchField<Type>::snGrad() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Evaluate the patch field
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void wedgeFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
void Foam::wedgeFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
{
|
{
|
||||||
if (!this->updated())
|
if (!this->updated())
|
||||||
{
|
{
|
||||||
@ -157,16 +134,16 @@ void wedgeFaPatchField<Type>::evaluate(const Pstream::commsTypes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Return defining fields
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > wedgeFaPatchField<Type>::snGradTransformDiag() const
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::wedgeFaPatchField<Type>::snGradTransformDiag() const
|
||||||
{
|
{
|
||||||
const diagTensor diagT =
|
const diagTensor diagT =
|
||||||
0.5*diag(I - refCast<const wedgeFaPatch>(this->patch()).faceT());
|
0.5*diag(I - refCast<const wedgeFaPatch>(this->patch()).faceT());
|
||||||
|
|
||||||
const vector diagV(diagT.xx(), diagT.yy(), diagT.zz());
|
const vector diagV(diagT.xx(), diagT.yy(), diagT.zz());
|
||||||
|
|
||||||
return tmp<Field<Type> >
|
return tmp<Field<Type>>
|
||||||
(
|
(
|
||||||
new 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/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
wedgeFaPatchField
|
Foam::wedgeFaPatchField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class wedgeFaPatch Declaration
|
Class wedgeFaPatch Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -92,9 +92,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- 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)
|
new wedgeFaPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -108,12 +108,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- 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 DimensionedField<Type, areaMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<faPatchField<Type> >
|
return tmp<faPatchField<Type>>
|
||||||
(
|
(
|
||||||
new wedgeFaPatchField<Type>(*this, iF)
|
new wedgeFaPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
@ -125,7 +125,7 @@ public:
|
|||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Return gradient at boundary
|
//- Return gradient at boundary
|
||||||
virtual tmp<Field<Type> > snGrad() const;
|
virtual tmp<Field<Type>> snGrad() const;
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
@ -135,7 +135,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- 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
|
#ifdef NoRepository
|
||||||
# include "wedgeFaPatchField.C"
|
#include "wedgeFaPatchField.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -23,8 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "faPatchFields.H"
|
#include "faPatchFields.H"
|
||||||
|
|||||||
@ -23,14 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
|
||||||
wedgeFaPatchFields
|
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
wedgeFaPatchFields.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef wedgeFaPatchFields_H
|
#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