cape.cfdx.options.intersect
: Triangulation intersect
options¶
This module interfaces options for two Cart3D triangulation tools called
intersect
and verify
. This allows the user to intersect overlapping
triangulated bodies and create a single water-tight body. The verify
script
then tests for a well-defined water-tight triangulation. Intersections, missing
triangles, holes, etc. all cause verify
to fail.
The main option for both intersect
and verify
is simply whether or not
to use them. The user can specify the following in the "RunControl"
section
of the JSON file.
"RunControl": { "intersect": True, "verfiy": False }
There are a variety of input flags to those utilities, which are interfaced via
the cape.options.intersect.intersect
and
cape.options.intersect.verify
classes defined here.
- class cape.cfdx.options.intersect.intersect¶
Class for Cart3D
intersect
command-line settings- Call:
>>> opts = intersect(**kw)
- Inputs:
- kw:
dict
Dictionary of
intersect
command-line options
- kw:
- Outputs:
- opts:
cape.options.intersect.intersect
Intersect utility options interface
- opts:
- Versions:
2016-04-05
@ddalle
: First version
- get_ascii(j=0)¶
Get the ASCII setting for the input file
- Call:
>>> ascii = opts.get_ascii(j)
- Inputs:
- opts:
cape.options.Options
Options interface
- j:
int
|None
Phase number
- opts:
- Outputs:
- ascii:
bool
Whether or not input file is ASCII
- ascii:
- Versions:
2016-04-05
@ddalle
: First version
- get_cutout(j=0)¶
Get the number of the component to subtract (cut out)
- Call:
>>> cutout = opts.get_cutout(j=0)
- Inputs:
- opts:
cape.options.Options
Options interface
- j:
int
Phase number
- opts:
- Outputs:
- cutout:
int
Component ID
- cutout:
- Versions:
2016-04-05
@ddalle
: First version
- get_intersect_i(j=0)¶
Get the input file for
intersect
- Call:
>>> fname = opts.get_intersect_i(j=0)
- Inputs:
- opts:
cape.options.Options
Options interface
- j:
int
|None
Phase number
- opts:
- Outputs:
- fname:
str
Name of input file
- fname:
- Versions:
2016-04-05
@ddalle
: First version
- get_intersect_o(j=0)¶
Get the output file for
intersect
- Call:
>>> fname = opts.get_intersect_o(j=0)
- Inputs:
- opts:
cape.options.Options
Options interface
- j:
int
|None
Phase number
- opts:
- Outputs:
- fname:
str
Name of output file
- fname:
- Versions:
2016-04-05
@ddalle
: First version
- get_intersect_rm()¶
Get the option to remove small triangles
- Call:
>>> q = opts.get_intersect_rm()
- Inputs:
- opts:
cape.options.Options
Options interface
- opts:
- Outputs:
- q:
True
|False
Whether or not to remove small triangles
- q:
- Versions:
2017-06-24
@ddalle
: First version
- get_intersect_smalltri()¶
Get the cutoff size for small triangles
- Call:
>>> A = opts.get_intersect_smalltri()
- Inputs:
- opts:
cape.options.Options
Options interface
- opts:
- Outputs:
- A:
float
Small area cutoff
- A:
- Versions:
2017-06-24
@ddalle
: First version
- get_intersect_triged()¶
Get the option to use or not use
triged
from CGT- Call:
>>> q = opts.get_intersect_triged()
- Inputs:
- opts:
cape.options.Options
Options interface
- opts:
- Outputs:
- q:
True
|False
Whether or not to allow
triged
to be used
- q:
- Versions:
2019-06-11
@ddalle
: First version
- set_ascii(ascii, j=None)¶
Set the ASCII setting for the input file
- Call:
>>> opts.get_ascii(ascii, j)
- Inputs:
- opts:
cape.options.Options
Options interface
- ascii:
bool
Whether or not input file is ASCII
- j:
int
|None
Phase number
- opts:
- Versions:
2016-04-05
@ddalle
: First version
- set_cutout(cutout, j=None)¶
Set the component ID to subtract (cut out)
- Call:
>>> opts.set_cutout(cutout, j=0)
- Inputs:
- opts:
cape.options.Options
Options interface
- cutout:
int
Component ID
- j:
int
Phase number
- opts:
- Versions:
2016-04-05
@ddalle
: First version
- set_intersect_i(fname, j=None)¶
Set the input file for
intersect
- Call:
>>> opts.set_intersect_i(fname, j=0)
- Inputs:
- opts:
cape.options.Options
Options interface
- fname:
str
Name of input file (usually
.surf
)- j:
int
|None
Phase number
- opts:
- Versions:
2016-04-05
@ddalle
: First version
- set_intersect_o(fname, j=None)¶
Set the output file for
intersect
- Call:
>>> opts.set_intersect_o(fname, j=0)
- Inputs:
- opts:
cape.options.Options
Options interface
- fname:
str
Name of output file
- j:
int
|None
Phase number
- opts:
- Versions:
2016-04-05
@ddalle
: First version
- set_intersect_rm(q=False)¶
Set the option to remove small triangles
- Call:
>>> opts.set_intersect_rm(q)
- Inputs:
- opts:
cape.options.Options
Options interface
- q:
True
|False
Whether or not to remove small triangles
- opts:
- Versions:
2017-06-24
@ddalle
: First version
- set_intersect_smalltri(smalltri=0.0001)¶
Get the cutoff size for small triangles
- Call:
>>> opts.get_intersect_smalltri(A)
- Inputs:
- opts:
cape.options.Options
Options interface
- A:
float
Small area cutoff
- opts:
- Versions:
2017-06-24
@ddalle
: First version
- set_intersect_triged(q=True)¶
Get the option to use or not use
triged
from CGT- Call:
>>> opts.set_intersect_triged(q)
- Inputs:
- opts:
cape.options.Options
Options interface
- q:
True
|False
Whether or not to allow
triged
to be used
- opts:
- Versions:
2019-06-11
@ddalle
: First version
- class cape.cfdx.options.intersect.verify¶
Class for Cart3D
verify
command-line settings- Call:
>>> opts = verify(**kw)
- Inputs:
- kw:
dict
Dictionary of
verify
command-line options
- kw:
- Outputs:
- opts:
cape.options.intersect.verify
Intersect utility options interface
- opts:
- Versions:
2016-04-05
@ddalle
: First version
- get_ascii(j=0)¶
Get the ASCII setting for the input file
- Call:
>>> ascii = opts.get_ascii(j)
- Inputs:
- opts:
cape.options.Options
Options interface
- j:
int
|None
Phase number
- opts:
- Outputs:
- ascii:
bool
Whether or not input file is ASCII
- ascii:
- Versions:
2016-04-05
@ddalle
: First version
- get_verify_i(j=0)¶
Get the input file for
verify
- Call:
>>> fname = opts.get_verify_i(j=0)
- Inputs:
- opts:
cape.options.Options
Options interface
- j:
int
|None
Phase number
- opts:
- Outputs:
- fname:
str
Name of input file
- fname:
- Versions:
2016-04-05
@ddalle
: First version
- set_ascii(ascii, j=None)¶
Set the ASCII setting for the input file
- Call:
>>> opts.get_ascii(ascii, j)
- Inputs:
- opts:
cape.options.Options
Options interface
- ascii:
bool
Whether or not input file is ASCII
- j:
int
|None
Phase number
- opts:
- Versions:
2016-04-05
@ddalle
: First version
- set_verify_i(fname, j=None)¶
Set the input file for
verify
- Call:
>>> opts.set_verify_i(fname, j=0)
- Inputs:
- opts:
cape.options.Options
Options interface
- fname:
str
Name of input file
- j:
int
|None
Phase number
- opts:
- Versions:
2016-04-05
@ddalle
: First version