BUG: fixed subset action in topoSet; renamed sourceDict keyword to sourceInfo.
This commit is contained in:
parent
9f2e06ed55
commit
7507b5f6bd
@ -140,6 +140,23 @@ int main(int argc, char *argv[])
|
||||
case topoSetSource::NEW:
|
||||
case topoSetSource::ADD:
|
||||
case topoSetSource::DELETE:
|
||||
{
|
||||
Info<< " Applying source " << word(dict.lookup("source"))
|
||||
<< endl;
|
||||
autoPtr<topoSetSource> source = topoSetSource::New
|
||||
(
|
||||
dict.lookup("source"),
|
||||
mesh,
|
||||
dict.subDict("sourceInfo")
|
||||
);
|
||||
|
||||
source().applyToSet(action, currentSet());
|
||||
// Synchronize for coupled patches.
|
||||
currentSet().sync(mesh);
|
||||
currentSet().write();
|
||||
}
|
||||
break;
|
||||
|
||||
case topoSetSource::SUBSET:
|
||||
{
|
||||
Info<< " Applying source " << word(dict.lookup("source"))
|
||||
@ -148,10 +165,26 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
dict.lookup("source"),
|
||||
mesh,
|
||||
dict.subDict("sourceDict")
|
||||
dict.subDict("sourceInfo")
|
||||
);
|
||||
|
||||
source().applyToSet(action, currentSet());
|
||||
// Backup current set.
|
||||
autoPtr<topoSet> oldSet
|
||||
(
|
||||
topoSet::New
|
||||
(
|
||||
setType,
|
||||
mesh,
|
||||
currentSet().name() + "_old2",
|
||||
currentSet()
|
||||
)
|
||||
);
|
||||
|
||||
currentSet().clear();
|
||||
source().applyToSet(topoSetSource::NEW, currentSet());
|
||||
|
||||
// Combine new value of currentSet with old one.
|
||||
currentSet().subset(oldSet());
|
||||
// Synchronize for coupled patches.
|
||||
currentSet().sync(mesh);
|
||||
currentSet().write();
|
||||
|
@ -301,31 +301,61 @@ FoamFile
|
||||
|
||||
actions
|
||||
(
|
||||
// Example:pick up internal faces on outside of cellSet
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Load initial cellSet
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source labelToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
value (12 13 56);
|
||||
}
|
||||
}
|
||||
|
||||
// Get all faces in cellSet
|
||||
{
|
||||
name c0;
|
||||
name f0;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set c0;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// Determine inverse cellSet
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set c0;
|
||||
}
|
||||
}
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
// Keep in f0 all faces in c1
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action delete;
|
||||
source labelToCell;
|
||||
sourceDict
|
||||
name f0;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
value (1 2 3);
|
||||
set c1;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -23,7 +23,7 @@ actions
|
||||
action new;
|
||||
|
||||
source sphereToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
centre ( 0.125 0.375 0.05 );
|
||||
radius 0.005;
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box (0.004 -0.001 -1) (0.012 0.001 1);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box (0.0045 -0.00075 -1) (0.0095 0.00075 1);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box (0.00475 -0.000375 -1) (0.009 0.000375 1);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 );
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 );
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 );
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ) ;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 ) ;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 ) ;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ) ;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box (0.35 0.35 0.44) (0.65 0.65 0.56);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source zoneToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
name rotor;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box ( 0 0 -2e-05 ) ( 0.0036 0.0003 2e-05 );
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box ( 0 0 -2e-05 ) ( 0.0036 0.0008 4e-05 ) ;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ actions
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
sourceInfo
|
||||
{
|
||||
box ( 0 0 -2e-05 ) ( 0.0036 0.0003 2e-05 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user