mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
Conflicts: src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C
This commit is contained in:
@ -6,7 +6,7 @@ wmake libso field
|
||||
wmake libso forces
|
||||
wmake libso IO
|
||||
wmake libso utilities
|
||||
wmake libso residualControl
|
||||
wmake libso jobControl
|
||||
wmake libso systemCall
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -29,10 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(writeRegisteredObject, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::writeRegisteredObject, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -36,29 +36,29 @@ writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
fieldAverage1
|
||||
{
|
||||
// Type of functionObject
|
||||
type fieldAverage;
|
||||
type fieldAverage;
|
||||
|
||||
// Where to load it from (if not already in solver)
|
||||
functionObjectLibs ("libfieldAverage.so");
|
||||
|
||||
// Function object enabled flag
|
||||
enabled true;
|
||||
enabled true;
|
||||
|
||||
// When to output the average fields
|
||||
outputControl outputTime;
|
||||
outputControl outputTime;
|
||||
|
||||
// Fields to be averaged - runTime modifiable
|
||||
fields
|
||||
|
||||
@ -31,10 +31,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(fieldMinMax, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::fieldMinMax, 0);
|
||||
|
||||
|
||||
template<>
|
||||
|
||||
@ -29,32 +29,28 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
defineTypeNameAndDebug(Foam::fieldValues::cellSource, 0);
|
||||
|
||||
template<>
|
||||
const char* Foam::NamedEnum<Foam::fieldValues::cellSource::sourceType, 1>::
|
||||
names[] =
|
||||
{
|
||||
namespace fieldValues
|
||||
{
|
||||
defineTypeNameAndDebug(cellSource, 0);
|
||||
}
|
||||
"cellZone"
|
||||
};
|
||||
|
||||
template<>
|
||||
const char* NamedEnum<fieldValues::cellSource::sourceType, 1>::
|
||||
names[] = {"cellZone"};
|
||||
const Foam::NamedEnum<Foam::fieldValues::cellSource::sourceType, 1>
|
||||
Foam::fieldValues::cellSource::sourceTypeNames_;
|
||||
|
||||
const NamedEnum<fieldValues::cellSource::sourceType, 1>
|
||||
fieldValues::cellSource::sourceTypeNames_;
|
||||
template<>
|
||||
const char* Foam::NamedEnum<Foam::fieldValues::cellSource::operationType, 7>::
|
||||
names[] =
|
||||
{
|
||||
"none", "sum", "volAverage",
|
||||
"volIntegrate", "weightedAverage", "min", "max"
|
||||
};
|
||||
|
||||
template<>
|
||||
const char* NamedEnum<fieldValues::cellSource::operationType, 7>::
|
||||
names[] =
|
||||
{
|
||||
"none", "sum", "volAverage",
|
||||
"volIntegrate", "weightedAverage", "min", "max"
|
||||
};
|
||||
|
||||
const NamedEnum<fieldValues::cellSource::operationType, 7>
|
||||
fieldValues::cellSource::operationTypeNames_;
|
||||
|
||||
}
|
||||
const Foam::NamedEnum<Foam::fieldValues::cellSource::operationType, 7>
|
||||
Foam::fieldValues::cellSource::operationTypeNames_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
@ -238,4 +234,3 @@ void Foam::fieldValues::cellSource::write()
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -37,16 +37,16 @@ writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
(
|
||||
{
|
||||
faceObj1
|
||||
{
|
||||
type faceSource;
|
||||
@ -69,6 +69,7 @@ functions
|
||||
|
||||
// Operation: areaAverage/sum/weightedAverage ...
|
||||
operation areaAverage;
|
||||
|
||||
fields
|
||||
(
|
||||
p
|
||||
@ -88,6 +89,7 @@ functions
|
||||
source faceZone;
|
||||
sourceName f0;
|
||||
operation sum;
|
||||
|
||||
fields
|
||||
(
|
||||
phi
|
||||
@ -105,13 +107,13 @@ functions
|
||||
source cellZone;
|
||||
sourceName c0;
|
||||
operation volAverage;
|
||||
|
||||
fields
|
||||
(
|
||||
p
|
||||
U
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -33,32 +33,25 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
defineTypeNameAndDebug(Foam::fieldValues::faceSource, 0);
|
||||
|
||||
template<>
|
||||
const char* Foam::NamedEnum<Foam::fieldValues::faceSource::sourceType, 2>::
|
||||
names[] =
|
||||
{
|
||||
namespace fieldValues
|
||||
{
|
||||
defineTypeNameAndDebug(faceSource, 0);
|
||||
}
|
||||
"faceZone", "patch"
|
||||
};
|
||||
|
||||
template<>
|
||||
const char* NamedEnum<fieldValues::faceSource::sourceType, 2>::
|
||||
names[] = {"faceZone", "patch"};
|
||||
template<>
|
||||
const char* Foam::NamedEnum<Foam::fieldValues::faceSource::operationType, 7>::
|
||||
names[] =
|
||||
{
|
||||
"none", "sum", "areaAverage",
|
||||
"areaIntegrate", "weightedAverage", "min", "max"
|
||||
};
|
||||
|
||||
const NamedEnum<fieldValues::faceSource::sourceType, 2>
|
||||
fieldValues::faceSource::sourceTypeNames_;
|
||||
|
||||
template<>
|
||||
const char* NamedEnum<fieldValues::faceSource::operationType, 7>::
|
||||
names[] =
|
||||
{
|
||||
"none", "sum", "areaAverage",
|
||||
"areaIntegrate", "weightedAverage", "min", "max"
|
||||
};
|
||||
|
||||
const NamedEnum<fieldValues::faceSource::operationType, 7>
|
||||
fieldValues::faceSource::operationTypeNames_;
|
||||
|
||||
}
|
||||
const Foam::NamedEnum<Foam::fieldValues::faceSource::operationType, 7>
|
||||
Foam::fieldValues::faceSource::operationTypeNames_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
functions
|
||||
(
|
||||
{
|
||||
readFields1
|
||||
{
|
||||
type readFields;
|
||||
@ -24,11 +24,13 @@ functions
|
||||
enabled true;
|
||||
outputControl timeStep;
|
||||
outputInterval 1;
|
||||
|
||||
fields
|
||||
(
|
||||
interpolateU
|
||||
);
|
||||
}
|
||||
|
||||
faceObj2
|
||||
{
|
||||
type faceSource;
|
||||
@ -41,12 +43,12 @@ functions
|
||||
source faceZone;
|
||||
sourceName f0;
|
||||
operation areaAverage;
|
||||
|
||||
fields
|
||||
(
|
||||
interpolateU
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -28,10 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(readFields, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::readFields, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -166,8 +166,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
virtual ~streamLine();
|
||||
virtual ~streamLine();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -31,14 +31,17 @@ License
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(streamLineParticle, 0);
|
||||
|
||||
defineParticleTypeNameAndDebug(streamLineParticle, 0);
|
||||
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
IOField<vectorField>,
|
||||
"vectorFieldField",
|
||||
0
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ License
|
||||
namespace Foam
|
||||
{
|
||||
defineTemplateTypeNameAndDebug(Cloud<streamLineParticle>, 0);
|
||||
};
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -30,10 +30,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(forceCoeffs, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::forceCoeffs, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -39,10 +39,8 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(forces, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::forces, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -34,14 +34,15 @@ namespace Foam
|
||||
namespace sixDoFRigidBodyMotionConstraints
|
||||
{
|
||||
defineTypeNameAndDebug(fixedAxis, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
sixDoFRigidBodyMotionConstraint,
|
||||
fixedAxis,
|
||||
dictionary
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -87,9 +87,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~fixedAxis();
|
||||
//- Destructor
|
||||
virtual ~fixedAxis();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -34,14 +34,15 @@ namespace Foam
|
||||
namespace sixDoFRigidBodyMotionConstraints
|
||||
{
|
||||
defineTypeNameAndDebug(fixedLine, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
sixDoFRigidBodyMotionConstraint,
|
||||
fixedLine,
|
||||
dictionary
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -88,9 +88,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~fixedLine();
|
||||
//- Destructor
|
||||
virtual ~fixedLine();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -34,14 +34,15 @@ namespace Foam
|
||||
namespace sixDoFRigidBodyMotionConstraints
|
||||
{
|
||||
defineTypeNameAndDebug(fixedOrientation, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
sixDoFRigidBodyMotionConstraint,
|
||||
fixedOrientation,
|
||||
dictionary
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -82,9 +82,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~fixedOrientation();
|
||||
//- Destructor
|
||||
virtual ~fixedOrientation();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -34,14 +34,15 @@ namespace Foam
|
||||
namespace sixDoFRigidBodyMotionConstraints
|
||||
{
|
||||
defineTypeNameAndDebug(fixedPlane, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
sixDoFRigidBodyMotionConstraint,
|
||||
fixedPlane,
|
||||
dictionary
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -86,9 +86,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~fixedPlane();
|
||||
//- Destructor
|
||||
virtual ~fixedPlane();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -34,14 +34,15 @@ namespace Foam
|
||||
namespace sixDoFRigidBodyMotionConstraints
|
||||
{
|
||||
defineTypeNameAndDebug(fixedPoint, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
sixDoFRigidBodyMotionConstraint,
|
||||
fixedPoint,
|
||||
dictionary
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -87,9 +87,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~fixedPoint();
|
||||
//- Destructor
|
||||
virtual ~fixedPoint();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -119,9 +119,8 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~sixDoFRigidBodyMotionConstraint();
|
||||
//- Destructor
|
||||
virtual ~sixDoFRigidBodyMotionConstraint();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -35,14 +35,15 @@ namespace Foam
|
||||
namespace sixDoFRigidBodyMotionRestraints
|
||||
{
|
||||
defineTypeNameAndDebug(linearAxialAngularSpring, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
sixDoFRigidBodyMotionRestraint,
|
||||
linearAxialAngularSpring,
|
||||
dictionary
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -94,9 +94,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~linearAxialAngularSpring();
|
||||
//- Destructor
|
||||
virtual ~linearAxialAngularSpring();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -34,14 +34,15 @@ namespace Foam
|
||||
namespace sixDoFRigidBodyMotionRestraints
|
||||
{
|
||||
defineTypeNameAndDebug(linearSpring, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
sixDoFRigidBodyMotionRestraint,
|
||||
linearSpring,
|
||||
dictionary
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -97,9 +97,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~linearSpring();
|
||||
//- Destructor
|
||||
virtual ~linearSpring();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -112,9 +112,8 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~sixDoFRigidBodyMotionRestraint();
|
||||
//- Destructor
|
||||
virtual ~sixDoFRigidBodyMotionRestraint();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -34,14 +34,15 @@ namespace Foam
|
||||
namespace sixDoFRigidBodyMotionRestraints
|
||||
{
|
||||
defineTypeNameAndDebug(sphericalAngularSpring, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
sixDoFRigidBodyMotionRestraint,
|
||||
sphericalAngularSpring,
|
||||
dictionary
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -91,9 +91,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~sphericalAngularSpring();
|
||||
//- Destructor
|
||||
virtual ~sphericalAngularSpring();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -36,14 +36,15 @@ namespace Foam
|
||||
namespace sixDoFRigidBodyMotionRestraints
|
||||
{
|
||||
defineTypeNameAndDebug(tabulatedAxialAngularSpring, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
sixDoFRigidBodyMotionRestraint,
|
||||
tabulatedAxialAngularSpring,
|
||||
dictionary
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -101,9 +101,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~tabulatedAxialAngularSpring();
|
||||
//- Destructor
|
||||
virtual ~tabulatedAxialAngularSpring();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
7
src/postProcessing/functionObjects/jobControl/Make/files
Normal file
7
src/postProcessing/functionObjects/jobControl/Make/files
Normal file
@ -0,0 +1,7 @@
|
||||
abortCalculation/abortCalculation.C
|
||||
abortCalculation/abortCalculationFunctionObject.C
|
||||
|
||||
residualControl/residualControl.C
|
||||
residualControl/residualControlFunctionObject.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libjobControl
|
||||
@ -31,10 +31,8 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(abortCalculation, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::abortCalculation, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*--------------------------------*- C++ -*----------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
@ -37,31 +37,32 @@ writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
(
|
||||
{
|
||||
convergenceChecks
|
||||
{
|
||||
type residualControl;
|
||||
functionObjectLibs ( "libresidualControl.so" );
|
||||
outputControl timeStep;
|
||||
outputInterval 1;
|
||||
type residualControl;
|
||||
functionObjectLibs ( "libjobControl.so" );
|
||||
outputControl timeStep;
|
||||
outputInterval 1;
|
||||
|
||||
maxResiduals
|
||||
(
|
||||
(p 5e-4)
|
||||
(U 1e-3)
|
||||
);
|
||||
}
|
||||
);
|
||||
{
|
||||
p 5e-4;
|
||||
U 1e-3;
|
||||
|
||||
// possibly check turbulence fields
|
||||
"(k|epsilon|omega)" 1e-3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -24,40 +24,35 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "residualControl.H"
|
||||
#include "dictionary.H"
|
||||
#include "fvMesh.H"
|
||||
#include "Time.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(residualControl, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::residualControl, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
bool Foam::residualControl::checkCriteria(const bool output) const
|
||||
bool Foam::residualControl::checkCriteria(const bool verbose) const
|
||||
{
|
||||
bool achieved = true;
|
||||
const fvMesh& mesh = static_cast<const fvMesh&>(obr_);
|
||||
const dictionary& solverDict = mesh.solverPerformanceDict();
|
||||
forAll(maxResiduals_, i)
|
||||
|
||||
forAllConstIter(dictionary, solverDict, iter)
|
||||
{
|
||||
const word& variableName = maxResiduals_[i].first();
|
||||
if (solverDict.found(variableName))
|
||||
const word& variableName = iter().keyword();
|
||||
scalar maxResidual;
|
||||
|
||||
if (maxResiduals_.readIfPresent(variableName, maxResidual))
|
||||
{
|
||||
const scalar maxResidual = maxResiduals_[i].second();
|
||||
|
||||
const lduMatrix::solverPerformance
|
||||
sp(solverDict.lookup(variableName));
|
||||
|
||||
const scalar eqnResidual = sp.initialResidual();
|
||||
const scalar eqnResidual =
|
||||
lduMatrix::solverPerformance(iter().stream()).initialResidual();
|
||||
|
||||
achieved = achieved && (eqnResidual < maxResidual);
|
||||
|
||||
if (output)
|
||||
if (verbose)
|
||||
{
|
||||
Info<< " " << variableName
|
||||
<< ": requested max residual = " << maxResidual
|
||||
@ -121,7 +116,7 @@ void Foam::residualControl::read(const dictionary& dict)
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
dict.lookup("maxResiduals") >> maxResiduals_;
|
||||
maxResiduals_ = dict.subDict("maxResiduals");
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,8 +37,8 @@ SourceFiles
|
||||
#ifndef residualControl_H
|
||||
#define residualControl_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "pointFieldFwd.H"
|
||||
#include "Tuple2.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -69,8 +69,8 @@ protected:
|
||||
//- On/off switch - on if obr_ is an fvMesh object
|
||||
bool active_;
|
||||
|
||||
//- List of variable name vs max residual
|
||||
List<Tuple2<word, scalar> > maxResiduals_;
|
||||
//- Dictionary of variable names vs max residual
|
||||
dictionary maxResiduals_;
|
||||
|
||||
//- Flag to indicate whether convergence criteria have been met
|
||||
bool criteriaSatisfied_;
|
||||
@ -79,7 +79,7 @@ protected:
|
||||
// Protected Member Functions
|
||||
|
||||
//- Perform residual control checks
|
||||
bool checkCriteria(const bool output) const;
|
||||
bool checkCriteria(const bool verbose) const;
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
residualControl(const residualControl&);
|
||||
@ -113,7 +113,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return name of the system call set
|
||||
//- Return name of the residual criteria check name
|
||||
virtual const word& name() const
|
||||
{
|
||||
return name_;
|
||||
@ -122,13 +122,13 @@ public:
|
||||
//- Read the system calls
|
||||
virtual void read(const dictionary&);
|
||||
|
||||
//- Execute the "executeCalls" at each time-step
|
||||
//- Check the residual criteria at each time-step
|
||||
virtual void execute();
|
||||
|
||||
//- Execute the "endCalls" at the final time-loop
|
||||
//- Report residual criteria check at the final time-loop
|
||||
virtual void end();
|
||||
|
||||
//- Write, execute the "writeCalls"
|
||||
//- Write, not used
|
||||
virtual void write();
|
||||
|
||||
//- Update for changes of mesh
|
||||
@ -1,4 +0,0 @@
|
||||
residualControl.C
|
||||
residualControlFunctionObject.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libresidualControl
|
||||
@ -29,10 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(systemCall, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::systemCall, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
abortCalculation/abortCalculation.C
|
||||
abortCalculation/abortCalculationFunctionObject.C
|
||||
|
||||
staticPressure/staticPressure.C
|
||||
staticPressure/staticPressureFunctionObject.C
|
||||
|
||||
|
||||
@ -34,10 +34,7 @@ using namespace Foam::constant;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(dsmcFields, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::dsmcFields, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -29,10 +29,8 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(staticPressure, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::staticPressure, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -37,29 +37,30 @@ writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
fileUpdate1
|
||||
{
|
||||
type timeActivatedFileUpdate;
|
||||
type timeActivatedFileUpdate;
|
||||
functionObjectLibs ("libutilityFunctionObjects.so");
|
||||
outputControl timeStep;
|
||||
outputInterval 1;
|
||||
fileToUpdate "$FOAM_CASE/system/fvSolution";
|
||||
outputControl timeStep;
|
||||
outputInterval 1;
|
||||
fileToUpdate "$FOAM_CASE/system/fvSolution";
|
||||
|
||||
timeVsFile
|
||||
(
|
||||
(-1 "$FOAM_CASE/system/fvSolution.0")
|
||||
(0.10 "$FOAM_CASE/system/fvSolution.10")
|
||||
(0.20 "$FOAM_CASE/system/fvSolution.20")
|
||||
(0.35 "$FOAM_CASE/system/fvSolution.35")
|
||||
( -1 "$FOAM_CASE/system/fvSolution.0" )
|
||||
( 0.10 "$FOAM_CASE/system/fvSolution.10" )
|
||||
( 0.20 "$FOAM_CASE/system/fvSolution.20" )
|
||||
( 0.35 "$FOAM_CASE/system/fvSolution.35" )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,10 +30,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(timeActivatedFileUpdate, 0);
|
||||
}
|
||||
defineTypeNameAndDebug(Foam::timeActivatedFileUpdate, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
Reference in New Issue
Block a user