Postprocess framework

- Executed has been completed and testd.
- regions multipleSpheres are compelete
- Docs for regions is comelete.
This commit is contained in:
Hamidreza
2025-04-15 21:27:49 +03:30
parent 077f25842a
commit 093160ba32
21 changed files with 762 additions and 171 deletions

View File

@ -33,11 +33,21 @@ pFlow::includeMask::includeMask
database_(fieldDB)
{}
pFlow::includeMask::includeMask
(
const word &type,
const dictionary &opDict,
fieldsDataBase &fieldsDB
)
:
database_(fieldsDB)
{
}
pFlow::uniquePtr<pFlow::includeMask> pFlow::includeMask::create
(
const dictionary& opDict,
fieldsDataBase& feildsDB
fieldsDataBase& fieldsDB
)
{
word mask = opDict.getValOrSet<word>("includeMask", "all");
@ -47,7 +57,7 @@ pFlow::uniquePtr<pFlow::includeMask> pFlow::includeMask::create
auto& maskDict = opDict.subDict(mask+"Info");
word maskField = maskDict.getVal<word>("field");
if( !feildsDB.getPointFieldType(maskField, fieldType) )
if( !fieldsDB.getPointFieldType(maskField, fieldType) )
{
fatalErrorInFunction<<"Error in retriving the type of field"
<< maskField <<" from dictionary "
@ -68,7 +78,7 @@ pFlow::uniquePtr<pFlow::includeMask> pFlow::includeMask::create
{
auto objPtr =
dictionaryvCtorSelector_[method]
(opDict, feildsDB);
(opDict, fieldsDB);
return objPtr;
}
else
@ -87,5 +97,56 @@ pFlow::uniquePtr<pFlow::includeMask> pFlow::includeMask::create
return nullptr;
}
pFlow::uniquePtr<pFlow::includeMask>
pFlow::includeMask::create
(
const word &type,
const dictionary &opDict,
fieldsDataBase &fieldsDB
)
{
word fieldType;
if( type != "all")
{
auto& maskDict = opDict.subDict(type+"Info");
word maskField = maskDict.getVal<word>("field");
if( !fieldsDB.getPointFieldType(maskField, fieldType) )
{
fatalErrorInFunction<<"Error in retriving the type of field"
<< maskField <<" from dictionary "
<< maskDict.globalName()
<< endl;
fatalExit;
return nullptr;
}
}
else
{
fieldType = getTypeName<real>();
}
word method = angleBracketsNames2("IncludeMask", fieldType, type);
if( wordvCtorSelector_.search(method) )
{
auto objPtr =
wordvCtorSelector_[method]
(type, opDict, fieldsDB);
return objPtr;
}
else
{
printKeys
(
fatalError << "Ctor Selector "<<
method << " dose not exist. \n"
<<"Avaiable ones are: \n\n"
,
dictionaryvCtorSelector_
);
fatalExit;
return nullptr;
}
return nullptr;
}

View File

@ -74,6 +74,8 @@ public:
includeMask(const dictionary& opDict, fieldsDataBase& feildsDB);
includeMask(const word& type, const dictionary& opDict, fieldsDataBase& feildsDB);
virtual ~includeMask() = default;
create_vCtor
@ -85,6 +87,18 @@ public:
),
(opDict, feildsDB)
);
create_vCtor
(
includeMask,
word,
(
const word& type,
const dictionary& opDict,
fieldsDataBase& feildsDB
),
(type, opDict, feildsDB)
);
const fieldsDataBase& database()const
{
@ -103,6 +117,12 @@ public:
uniquePtr<includeMask> create(
const dictionary& opDict,
fieldsDataBase& feildsDB);
static
uniquePtr<includeMask> create(
const word& type,
const dictionary& opDict,
fieldsDataBase& feildsDB);
};