cape.pyover.options.meshopts
: OVERFLOW mesh options¶
This module provides options for OVERFLOW grid systems. OVERFLOW grid
systems have a complex file structure, but the pyOver options are
relatively simple. First the user specifies either dcf
, peg5
, or
another overall interpolation type using MeshOpts.get_MeshType()
.
The user then specifies a home folder for the mesh files. Finally, the
user specifies the names of various mesh (and related) files to copy or
link (relative to the ConfigDir) into the case folder.
A typical example JSON section is showed below.
"Mesh": { "ConfigDir": "common", "Type": "dcf", "LinkFiles": [ "grid.in", "xrays.in", "fomo/grid.ibi", "fomo/panel_weights.dat" ], "CopyFiles": [ "fomo/mixsur.fmp" ] }
- See Also:
cape.pyfun.options.overnmlopts
- class cape.pyover.options.meshopts.MeshOpts(*args, **kw)¶
- get_MeshConfigDir(j=None, i=None, **kw)¶
Get folder from which to copy/link mesh files
- Call:
>>> ConfigDir = opts.get_MeshConfigDir(j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- j: {
None
} |int
Phase index; use
None
to just return v- i: {
None
} |int
|np.ndarray
opts.x index(es) to use with
@expr
,@map
, etc.- vdef: {
None
} |object
Manual default
- mode: {
None
} |0
|1
|2
|3
Warning mode code
0
:no checks
1
:validate silently
2
:validate and show warnings
3
:raise an exception if invalid
- ring: {opts._optring[key]} |
True
|False
Override option to loop through phase inputs
- listdepth: {
0
} |int
> 0 Depth of list to treat as a scalar
- x: {
None
} |dict
Ref conditions to use with
@expr
,@map
, etc.; often a run matrix; used in combination with i- sample: {
True
} |False
Apply j, i, and other settings recursively if output is a
list
ordict
- Outputs:
- ConfigDir: {
None
} |str
folder from which to copy/link mesh files
- ConfigDir: {
- get_MeshCopyFiles(j=None, i=None, **kw)¶
Get list of files to copy into case folder
- Call:
>>> CopyFiles = opts.get_MeshCopyFiles(j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- j: {
None
} |int
Phase index; use
None
to just return v- i: {
None
} |int
|np.ndarray
opts.x index(es) to use with
@expr
,@map
, etc.- vdef: {
None
} |object
Manual default
- mode: {
None
} |0
|1
|2
|3
Warning mode code
0
:no checks
1
:validate silently
2
:validate and show warnings
3
:raise an exception if invalid
- ring: {opts._optring[key]} |
True
|False
Override option to loop through phase inputs
- listdepth: {
0
} |int
> 0 Depth of list to treat as a scalar
- x: {
None
} |dict
Ref conditions to use with
@expr
,@map
, etc.; often a run matrix; used in combination with i- sample: {
True
} |False
Apply j, i, and other settings recursively if output is a
list
ordict
- Outputs:
- get_MeshFiles(**kw)¶
Return full list of mesh file names
- Call:
>>> fnames = opts.get_MeshFiles(**kw)
- Inputs:
- opts:
cape.pyover.options.Options
Options interface
- opts:
- Outputs:
- Versions:
2015-12-29
@ddalle
: v1.02023-03-17
@ddalle
: v2.0; useOptionsDict
- get_MeshLinkFiles(j=None, i=None, **kw)¶
Get list of files to link into case folder
- Call:
>>> LinkFiles = opts.get_MeshLinkFiles(j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- j: {
None
} |int
Phase index; use
None
to just return v- i: {
None
} |int
|np.ndarray
opts.x index(es) to use with
@expr
,@map
, etc.- vdef: {
None
} |object
Manual default
- mode: {
None
} |0
|1
|2
|3
Warning mode code
0
:no checks
1
:validate silently
2
:validate and show warnings
3
:raise an exception if invalid
- ring: {opts._optring[key]} |
True
|False
Override option to loop through phase inputs
- listdepth: {
0
} |int
> 0 Depth of list to treat as a scalar
- x: {
None
} |dict
Ref conditions to use with
@expr
,@map
, etc.; often a run matrix; used in combination with i- sample: {
True
} |False
Apply j, i, and other settings recursively if output is a
list
ordict
- Outputs:
- get_MeshType(j=None, i=None, **kw)¶
Get overall meshing stragety
- Call:
>>> Type = opts.get_MeshType(j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- j: {
None
} |int
Phase index; use
None
to just return v- i: {
None
} |int
|np.ndarray
opts.x index(es) to use with
@expr
,@map
, etc.- vdef: {
None
} |object
Manual default
- mode: {
None
} |0
|1
|2
|3
Warning mode code
0
:no checks
1
:validate silently
2
:validate and show warnings
3
:raise an exception if invalid
- ring: {opts._optring[key]} |
True
|False
Override option to loop through phase inputs
- listdepth: {
0
} |int
> 0 Depth of list to treat as a scalar
- x: {
None
} |dict
Ref conditions to use with
@expr
,@map
, etc.; often a run matrix; used in combination with i- sample: {
True
} |False
Apply j, i, and other settings recursively if output is a
list
ordict
- Outputs:
- Type:
'dcf'
|'peg5'
overall meshing stragety
- Type:
- set_MeshConfigDir(v, j=None, mode=None)¶
Get folder from which to copy/link mesh files
- Call:
>>> opts.set_MeshConfigDir(ConfigDir, j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- ConfigDir: {
None
} |str
folder from which to copy/link mesh files
- j: {
None
} |int
Phase index; use
None
to just return v- mode: {
None
} |0
|1
|2
|3
Warning mode code
0
:no checks
1
:validate silently
2
:validate and show warnings
3
:raise an exception if invalid
- listdepth: {
0
} |int
> 0 Depth of list to treat as a scalar
- set_MeshCopyFiles(v, j=None, mode=None)¶
Get list of files to copy into case folder
- Call:
>>> opts.set_MeshCopyFiles(CopyFiles, j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- CopyFiles: {
[]
} |list
[str
] list of files to copy into case folder
- j: {
None
} |int
Phase index; use
None
to just return v- mode: {
None
} |0
|1
|2
|3
Warning mode code
0
:no checks
1
:validate silently
2
:validate and show warnings
3
:raise an exception if invalid
- listdepth: {
0
} |int
> 0 Depth of list to treat as a scalar
- set_MeshLinkFiles(v, j=None, mode=None)¶
Get list of files to link into case folder
- Call:
>>> opts.set_MeshLinkFiles(LinkFiles, j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- LinkFiles: {
['grid.in', 'xrays.in', 'fomo/grid.ibi', 'fomo/grid.nsf', 'fomo/grid.ptv', 'fomo/mixsur.fmp']
} |list
[str
] list of files to link into case folder
- j: {
None
} |int
Phase index; use
None
to just return v- mode: {
None
} |0
|1
|2
|3
Warning mode code
0
:no checks
1
:validate silently
2
:validate and show warnings
3
:raise an exception if invalid
- listdepth: {
0
} |int
> 0 Depth of list to treat as a scalar
- set_MeshType(v, j=None, mode=None)¶
Get overall meshing stragety
- Call:
>>> opts.set_MeshType(Type, j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- Type:
'dcf'
|'peg5'
overall meshing stragety
- j: {
None
} |int
Phase index; use
None
to just return v- mode: {
None
} |0
|1
|2
|3
Warning mode code
0
:no checks
1
:validate silently
2
:validate and show warnings
3
:raise an exception if invalid
- listdepth: {
0
} |int
> 0 Depth of list to treat as a scalar