mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
mapFields: Reinstated mapFields from OpenFOAM-2.2.x and renamed the current mapFields -> mapFieldsPar
This required the addition of the meshToMesh class in the sampling library from OpenFOAM-2.2.x which is now named meshToMesh0.
This commit is contained in:
@ -0,0 +1,33 @@
|
||||
{
|
||||
instantList sourceTimes = runTimeSource.times();
|
||||
label sourceTimeIndex = runTimeSource.timeIndex();
|
||||
if (args.optionFound("sourceTime"))
|
||||
{
|
||||
if (args["sourceTime"] == "latestTime")
|
||||
{
|
||||
sourceTimeIndex = sourceTimes.size() - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sourceTimeIndex = Time::findClosestTimeIndex
|
||||
(
|
||||
sourceTimes,
|
||||
args.optionRead<scalar>("sourceTime")
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sourceTimeIndex = Time::findClosestTimeIndex
|
||||
(
|
||||
sourceTimes,
|
||||
runTimeTarget.time().value()
|
||||
);
|
||||
}
|
||||
|
||||
runTimeSource.setTime(sourceTimes[sourceTimeIndex], sourceTimeIndex);
|
||||
|
||||
Info<< "\nSource time: " << runTimeSource.value()
|
||||
<< "\nTarget time: " << runTimeTarget.value()
|
||||
<< endl;
|
||||
}
|
||||
Reference in New Issue
Block a user