mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-22 16:28:30 +00:00
keepHistory for integration to automatically remove the fields related to integration. The default is no save on the disk
This commit is contained in:
@ -97,10 +97,11 @@ pFlow::AdamsBashforth2::AdamsBashforth2
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory
|
||||
)
|
||||
:
|
||||
integration(baseName, pStruct, method, initialValField),
|
||||
integration(baseName, pStruct, method, initialValField, keepHistory),
|
||||
realx3PointField_D
|
||||
(
|
||||
objectFile
|
||||
@ -108,7 +109,7 @@ pFlow::AdamsBashforth2::AdamsBashforth2
|
||||
groupNames(baseName,"dy1"),
|
||||
pStruct.time().integrationFolder(),
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
keepHistory?objectFile::WRITE_ALWAYS:objectFile::WRITE_NEVER
|
||||
),
|
||||
pStruct,
|
||||
zero3,
|
||||
|
@ -81,7 +81,8 @@ public:
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField);
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory);
|
||||
|
||||
/// Destructor
|
||||
~AdamsBashforth2()override = default;
|
||||
|
@ -109,10 +109,11 @@ pFlow::AdamsBashforth3::AdamsBashforth3
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory
|
||||
)
|
||||
:
|
||||
AdamsBashforth2(baseName, pStruct, method, initialValField),
|
||||
AdamsBashforth2(baseName, pStruct, method, initialValField, keepHistory),
|
||||
dy2_
|
||||
(
|
||||
objectFile
|
||||
@ -120,7 +121,7 @@ pFlow::AdamsBashforth3::AdamsBashforth3
|
||||
groupNames(baseName,"dy2"),
|
||||
pStruct.time().integrationFolder(),
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
keepHistory ? objectFile::WRITE_ALWAYS : objectFile::WRITE_NEVER
|
||||
),
|
||||
pStruct,
|
||||
zero3,
|
||||
|
@ -71,7 +71,8 @@ public:
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField);
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory);
|
||||
|
||||
|
||||
/// Destructor
|
||||
|
@ -115,10 +115,11 @@ pFlow::AdamsBashforth4::AdamsBashforth4
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory
|
||||
)
|
||||
:
|
||||
AdamsBashforth3(baseName, pStruct, method, initialValField),
|
||||
AdamsBashforth3(baseName, pStruct, method, initialValField, keepHistory),
|
||||
dy3_
|
||||
(
|
||||
objectFile
|
||||
@ -126,7 +127,7 @@ pFlow::AdamsBashforth4::AdamsBashforth4
|
||||
groupNames(baseName,"dy3"),
|
||||
pStruct.time().integrationFolder(),
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
keepHistory?objectFile::WRITE_ALWAYS:objectFile::WRITE_NEVER
|
||||
),
|
||||
pStruct,
|
||||
zero3,
|
||||
|
@ -69,7 +69,8 @@ public:
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField);
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory);
|
||||
|
||||
|
||||
|
||||
|
@ -123,10 +123,11 @@ pFlow::AdamsBashforth5::AdamsBashforth5
|
||||
const word &baseName,
|
||||
pointStructure &pStruct,
|
||||
const word &method,
|
||||
const realx3Field_D &initialValField
|
||||
const realx3Field_D &initialValField,
|
||||
bool keepHistory
|
||||
)
|
||||
:
|
||||
AdamsBashforth4(baseName, pStruct, method, initialValField),
|
||||
AdamsBashforth4(baseName, pStruct, method, initialValField, keepHistory),
|
||||
dy4_
|
||||
(
|
||||
objectFile
|
||||
@ -134,7 +135,7 @@ pFlow::AdamsBashforth5::AdamsBashforth5
|
||||
groupNames(baseName,"dy4"),
|
||||
pStruct.time().integrationFolder(),
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
keepHistory?objectFile::WRITE_ALWAYS:objectFile::WRITE_NEVER
|
||||
),
|
||||
pStruct,
|
||||
zero3,
|
||||
|
@ -68,7 +68,8 @@ public:
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField);
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory);
|
||||
|
||||
|
||||
|
||||
|
@ -51,10 +51,12 @@ pFlow::integration::integration(
|
||||
const word &baseName,
|
||||
pointStructure &pStruct,
|
||||
const word &,
|
||||
const realx3Field_D &)
|
||||
const realx3Field_D &,
|
||||
bool keepHistory)
|
||||
: owner_(*pStruct.owner()),
|
||||
pStruct_(pStruct),
|
||||
baseName_(baseName)
|
||||
baseName_(baseName),
|
||||
keepHistory_(keepHistory)
|
||||
{}
|
||||
|
||||
|
||||
@ -64,12 +66,13 @@ pFlow::uniquePtr<pFlow::integration>
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory
|
||||
)
|
||||
{
|
||||
if( wordvCtorSelector_.search(method) )
|
||||
{
|
||||
return wordvCtorSelector_[method] (baseName, pStruct, method, initialValField);
|
||||
return wordvCtorSelector_[method] (baseName, pStruct, method, initialValField, keepHistory);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ Licence:
|
||||
|
||||
#include "virtualConstructor.hpp"
|
||||
#include "pointFields.hpp"
|
||||
#include "Logical.hpp"
|
||||
|
||||
|
||||
namespace pFlow
|
||||
@ -63,6 +64,8 @@ private:
|
||||
/// The base name for integration
|
||||
const word baseName_;
|
||||
|
||||
bool keepHistory_;
|
||||
|
||||
protected:
|
||||
|
||||
bool insertValues(
|
||||
@ -83,7 +86,8 @@ public:
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField);
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory);
|
||||
|
||||
/// Copy constructor
|
||||
integration(const integration&) = default;
|
||||
@ -109,9 +113,10 @@ public:
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory
|
||||
),
|
||||
(baseName, pStruct, method, initialValField)
|
||||
(baseName, pStruct, method, initialValField, keepHistory)
|
||||
);
|
||||
|
||||
|
||||
@ -138,6 +143,11 @@ public:
|
||||
return owner_;
|
||||
}
|
||||
|
||||
bool keepHistory()const
|
||||
{
|
||||
return keepHistory_;
|
||||
}
|
||||
|
||||
virtual
|
||||
void updateBoundariesSlaveToMasterIfRequested() = 0;
|
||||
/// return integration method
|
||||
@ -164,7 +174,8 @@ public:
|
||||
const word& baseName,
|
||||
pointStructure& pStruct,
|
||||
const word& method,
|
||||
const realx3Field_D& initialValField);
|
||||
const realx3Field_D& initialValField,
|
||||
bool keepHistory);
|
||||
|
||||
}; // integration
|
||||
|
||||
|
Reference in New Issue
Block a user