yt.frontends.boxlib.fields module

BoxLib code fields

class yt.frontends.boxlib.fields.BoxlibFieldInfo(ds, field_list, slice_info=None)[source]

Bases: yt.fields.field_info_container.FieldInfoContainer

add_field(name, sampling_type, function=None, **kwargs)

Add a new field, along with supplemental metadata, to the list of available fields. This respects a number of arguments, all of which are passed on to the constructor for DerivedField.

Parameters:
  • name (str) – is the name of the field.
  • function (callable) – A function handle that defines the field. Should accept arguments (field, data)
  • units (str) – A plain text string encoding the unit. Powers must be in python syntax (** instead of ^). If set to “auto” the units will be inferred from the return value of the field function.
  • take_log (bool) – Describes whether the field should be logged
  • validators (list) – A list of FieldValidator objects
  • particle_type (bool) – Is this a particle (1D) field?
  • vector_field (bool) – Describes the dimensionality of the field. Currently unused.
  • display_name (str) – A name used in the plots
add_output_field(name, sampling_type, **kwargs)
alias(alias_name, original_name, units=None)
check_derived_fields(fields_to_check=None)
clear() → None. Remove all items from D.
copy() → a shallow copy of D
create_with_fallback(fallback, name='')
extra_union_fields = ()
fallback = None
find_dependencies(loaded)
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
has_key(key)
items() → a set-like object providing a view on D's items
keys()
known_other_fields = (('density', ('code_mass / code_length**3', ['density'], None)), ('eden', ('code_mass / (code_time**2 * code_length)', ['energy_density'], None)), ('xmom', ('code_mass / (code_time * code_length**2)', ['momentum_x'], None)), ('ymom', ('code_mass / (code_time * code_length**2)', ['momentum_y'], None)), ('zmom', ('code_mass / (code_time * code_length**2)', ['momentum_z'], None)), ('temperature', ('K', ['temperature'], None)), ('Temp', ('K', ['temperature'], None)), ('x_velocity', ('cm/s', ['velocity_x'], None)), ('y_velocity', ('cm/s', ['velocity_y'], None)), ('z_velocity', ('cm/s', ['velocity_z'], None)), ('xvel', ('cm/s', ['velocity_x'], None)), ('yvel', ('cm/s', ['velocity_y'], None)), ('zvel', ('cm/s', ['velocity_z'], None)))
known_particle_fields = (('particle_mass', ('code_mass', [], None)), ('particle_position_x', ('code_length', [], None)), ('particle_position_y', ('code_length', [], None)), ('particle_position_z', ('code_length', [], None)), ('particle_momentum_x', ('code_mass*code_length/code_time', [], None)), ('particle_momentum_y', ('code_mass*code_length/code_time', [], None)), ('particle_momentum_z', ('code_mass*code_length/code_time', [], None)), ('particle_angmomen_x', ('code_length**2/code_time', [], None)), ('particle_angmomen_y', ('code_length**2/code_time', [], None)), ('particle_angmomen_z', ('code_length**2/code_time', [], None)), ('particle_id', ('', ['particle_index'], None)), ('particle_mdot', ('code_mass/code_time', [], None)))
load_all_plugins(ftype='gas')
load_plugin(plugin_name, ftype='gas', skip_check=False)
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
setup_extra_union_fields(ptype='all')
setup_fluid_aliases(ftype='gas')
setup_fluid_fields()[source]
setup_fluid_index_fields()
setup_momentum_to_velocity()[source]
setup_particle_fields(ptype)[source]
setup_smoothed_fields(ptype, num_neighbors=64, ftype='gas')
setup_velocity_to_momentum()[source]
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D's values
class yt.frontends.boxlib.fields.CastroFieldInfo(ds, field_list, slice_info=None)[source]

Bases: yt.fields.field_info_container.FieldInfoContainer

add_field(name, sampling_type, function=None, **kwargs)

Add a new field, along with supplemental metadata, to the list of available fields. This respects a number of arguments, all of which are passed on to the constructor for DerivedField.

Parameters:
  • name (str) – is the name of the field.
  • function (callable) – A function handle that defines the field. Should accept arguments (field, data)
  • units (str) – A plain text string encoding the unit. Powers must be in python syntax (** instead of ^). If set to “auto” the units will be inferred from the return value of the field function.
  • take_log (bool) – Describes whether the field should be logged
  • validators (list) – A list of FieldValidator objects
  • particle_type (bool) – Is this a particle (1D) field?
  • vector_field (bool) – Describes the dimensionality of the field. Currently unused.
  • display_name (str) – A name used in the plots
add_output_field(name, sampling_type, **kwargs)
alias(alias_name, original_name, units=None)
check_derived_fields(fields_to_check=None)
clear() → None. Remove all items from D.
copy() → a shallow copy of D
create_with_fallback(fallback, name='')
extra_union_fields = ()
fallback = None
find_dependencies(loaded)
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
has_key(key)
items() → a set-like object providing a view on D's items
keys()
known_other_fields = (('density', ('g/cm**3', ['density'], '\\rho')), ('xmom', ('g/(cm**2 * s)', ['momentum_x'], '\\rho u')), ('ymom', ('g/(cm**2 * s)', ['momentum_y'], '\\rho v')), ('zmom', ('g/(cm**2 * s)', ['momentum_z'], '\\rho w')), ('x_velocity', ('cm/s', ['velocity_x'], 'u')), ('y_velocity', ('cm/s', ['velocity_y'], 'v')), ('z_velocity', ('cm/s', ['velocity_z'], 'w')), ('rho_E', ('erg/cm**3', ['energy_density'], '\\rho E')), ('rho_e', ('erg/cm**3', [], '\\rho e')), ('Temp', ('K', ['temperature'], 'T')), ('grav_x', ('cm/s**2', [], '\\mathbf{g} \\cdot \\mathbf{e}_x')), ('grav_y', ('cm/s**2', [], '\\mathbf{g} \\cdot \\mathbf{e}_y')), ('grav_z', ('cm/s**2', [], '\\mathbf{g} \\cdot \\mathbf{e}_z')), ('pressure', ('dyne/cm**2', [], 'p')), ('kineng', ('erg/cm**3', ['kinetic_energy'], '\\frac{1}{2}\\rho|\\mathbf{U}|^2')), ('soundspeed', ('cm/s', ['sound_speed'], 'Sound Speed')), ('Machnumber', ('', ['mach_number'], 'Mach Number')), ('entropy', ('erg/(g*K)', ['entropy'], 's')), ('magvort', ('1/s', ['vorticity_magnitude'], '|\\nabla \\times \\mathbf{U}|')), ('divu', ('1/s', ['velocity_divergence'], '\\nabla \\cdot \\mathbf{U}')), ('eint_E', ('erg/g', [], 'e(E,U)')), ('eint_e', ('erg/g', [], 'e')), ('magvel', ('cm/s', ['velocity_magnitude'], '|\\mathbf{U}|')), ('radvel', ('cm/s', ['radial_velocity'], '\\mathbf{U} \\cdot \\mathbf{e}_r')), ('magmom', ('g*cm/s', ['momentum_magnitude'], '\\rho |\\mathbf{U}|')), ('maggrav', ('cm/s**2', [], '|\\mathbf{g}|')), ('phiGrav', ('erg/g', [], '\\Phi')), ('enuc', ('erg/(g*s)', [], '\\dot{e}_{\\rm{nuc}}')), ('rho_enuc', ('erg/(cm**3*s)', [], '\\rho \\dot{e}_{\\rm{nuc}}')), ('angular_momentum_x', ('g/(cm*s)', [], '\\ell_x')), ('angular_momentum_y', ('g/(cm*s)', [], '\\ell_y')), ('angular_momentum_z', ('g/(cm*s)', [], '\\ell_z')), ('phiRot', ('erg/g', [], '\\Phi_{\\rm{rot}}')), ('rot_x', ('cm/s**2', [], '\\mathbf{f}_{\\rm{rot}} \\cdot \\mathbf{e}_x')), ('rot_y', ('cm/s**2', [], '\\mathbf{f}_{\\rm{rot}} \\cdot \\mathbf{e}_y')), ('rot_z', ('cm/s**2', [], '\\mathbf{f}_{\\rm{rot}} \\cdot \\mathbf{e}_z')))
known_particle_fields = (('particle_position_x', ('code_length', [], None)), ('particle_position_y', ('code_length', [], None)), ('particle_position_z', ('code_length', [], None)))
load_all_plugins(ftype='gas')
load_plugin(plugin_name, ftype='gas', skip_check=False)
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
setup_extra_union_fields(ptype='all')
setup_fluid_aliases(ftype='gas')
setup_fluid_fields()[source]
setup_fluid_index_fields()
setup_particle_fields(ptype, ftype='gas', num_neighbors=64)
setup_smoothed_fields(ptype, num_neighbors=64, ftype='gas')
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D's values
class yt.frontends.boxlib.fields.MaestroFieldInfo(ds, field_list, slice_info=None)[source]

Bases: yt.fields.field_info_container.FieldInfoContainer

add_field(name, sampling_type, function=None, **kwargs)

Add a new field, along with supplemental metadata, to the list of available fields. This respects a number of arguments, all of which are passed on to the constructor for DerivedField.

Parameters:
  • name (str) – is the name of the field.
  • function (callable) – A function handle that defines the field. Should accept arguments (field, data)
  • units (str) – A plain text string encoding the unit. Powers must be in python syntax (** instead of ^). If set to “auto” the units will be inferred from the return value of the field function.
  • take_log (bool) – Describes whether the field should be logged
  • validators (list) – A list of FieldValidator objects
  • particle_type (bool) – Is this a particle (1D) field?
  • vector_field (bool) – Describes the dimensionality of the field. Currently unused.
  • display_name (str) – A name used in the plots
add_output_field(name, sampling_type, **kwargs)
alias(alias_name, original_name, units=None)
check_derived_fields(fields_to_check=None)
clear() → None. Remove all items from D.
copy() → a shallow copy of D
create_with_fallback(fallback, name='')
extra_union_fields = ()
fallback = None
find_dependencies(loaded)
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
has_key(key)
items() → a set-like object providing a view on D's items
keys()
known_other_fields = (('density', ('g/cm**3', ['density'], None)), ('x_vel', ('cm/s', ['velocity_x'], '\\tilde{u}')), ('y_vel', ('cm/s', ['velocity_y'], '\\tilde{v}')), ('z_vel', ('cm/s', ['velocity_z'], '\\tilde{w}')), ('magvel', ('cm/s', ['velocity_magnitude'], '|\\tilde{\\mathbf{U}} + w_0 \\mathbf{e}_r|')), ('radial_velocity', ('cm/s', ['radial_velocity'], '\\mathbf{U}\\cdot \\mathbf{e}_r')), ('circum_velocity', ('cm/s', ['tangential_velocity'], 'U - U\\cdot e_r')), ('tfromp', ('K', [], 'T(\\rho,p,X)')), ('tfromh', ('K', [], 'T(\\rho,h,X)')), ('Machnumber', ('', ['mach_number'], 'M')), ('S', ('1/s', [], None)), ('ad_excess', ('', [], '\\nabla - \\nabla_\\mathrm{ad}')), ('deltaT', ('', [], '[T(\\rho,h,X) - T(\\rho,p,X)]/T(\\rho,h,X)')), ('deltagamma', ('', [], '\\Gamma_1 - \\overline{\\Gamma_1}')), ('deltap', ('', [], '[p(\\rho,h,X) - p_0] / p_0')), ('divw0', ('1/s', [], '\\nabla \\cdot \\mathbf{w}_0')), ('entropy', ('erg/(g*K)', ['entropy'], 's')), ('entropypert', ('', [], '[s - \\overline{s}] / \\overline{s}')), ('enucdot', ('erg/(g*s)', [], '\\dot{\\epsilon}_{nuc}')), ('Hext', ('erg/(g*s)', [], 'H_{ext}')), ('gpi_x', ('dyne/cm**3', [], '\\left(\\nabla\\pi\\right)_x')), ('gpi_y', ('dyne/cm**3', [], '\\left(\\nabla\\pi\\right)_y')), ('gpi_z', ('dyne/cm**3', [], '\\left(\\nabla\\pi\\right)_z')), ('h', ('erg/g', [], 'h')), ('h0', ('erg/g', [], 'h_0')), ('momentum', ('g*cm/s', ['momentum_magnitude'], '\\rho |\\mathbf{U}|')), ('p0', ('erg/cm**3', [], 'p_0')), ('p0pluspi', ('erg/cm**3', [], 'p_0 + \\pi')), ('pi', ('erg/cm**3', [], '\\pi')), ('pioverp0', ('', [], '\\pi/p_0')), ('rho0', ('g/cm**3', [], '\\rho_0')), ('rhoh', ('erg/cm**3', ['enthalpy_density'], '(\\rho h)')), ('rhoh0', ('erg/cm**3', [], '(\\rho h)_0')), ('rhohpert', ('erg/cm**3', [], '(\\rho h)^\\prime')), ('rhopert', ('g/cm**3', [], '\\rho^\\prime')), ('soundspeed', ('cm/s', ['sound_speed'], None)), ('sponge', ('', [], None)), ('tpert', ('K', [], 'T - \\overline{T}')), ('vort', ('1/s', ['vorticity_magnitude'], '|\\nabla\\times\\tilde{U}|')), ('w0_x', ('cm/s', [], '(w_0)_x')), ('w0_y', ('cm/s', [], '(w_0)_y')), ('w0_z', ('cm/s', [], '(w_0)_z')))
known_particle_fields = ()
load_all_plugins(ftype='gas')
load_plugin(plugin_name, ftype='gas', skip_check=False)
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
setup_extra_union_fields(ptype='all')
setup_fluid_aliases(ftype='gas')
setup_fluid_fields()[source]
setup_fluid_index_fields()
setup_particle_fields(ptype, ftype='gas', num_neighbors=64)
setup_smoothed_fields(ptype, num_neighbors=64, ftype='gas')
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D's values
class yt.frontends.boxlib.fields.NyxFieldInfo(ds, field_list, slice_info=None)[source]

Bases: yt.fields.field_info_container.FieldInfoContainer

add_field(name, sampling_type, function=None, **kwargs)

Add a new field, along with supplemental metadata, to the list of available fields. This respects a number of arguments, all of which are passed on to the constructor for DerivedField.

Parameters:
  • name (str) – is the name of the field.
  • function (callable) – A function handle that defines the field. Should accept arguments (field, data)
  • units (str) – A plain text string encoding the unit. Powers must be in python syntax (** instead of ^). If set to “auto” the units will be inferred from the return value of the field function.
  • take_log (bool) – Describes whether the field should be logged
  • validators (list) – A list of FieldValidator objects
  • particle_type (bool) – Is this a particle (1D) field?
  • vector_field (bool) – Describes the dimensionality of the field. Currently unused.
  • display_name (str) – A name used in the plots
add_output_field(name, sampling_type, **kwargs)
alias(alias_name, original_name, units=None)
check_derived_fields(fields_to_check=None)
clear() → None. Remove all items from D.
copy() → a shallow copy of D
create_with_fallback(fallback, name='')
extra_union_fields = ()
fallback = None
find_dependencies(loaded)
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
has_key(key)
items() → a set-like object providing a view on D's items
keys()
known_other_fields = ()
known_particle_fields = (('particle_position_x', ('code_length', [], None)), ('particle_position_y', ('code_length', [], None)), ('particle_position_z', ('code_length', [], None)))
load_all_plugins(ftype='gas')
load_plugin(plugin_name, ftype='gas', skip_check=False)
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
setup_extra_union_fields(ptype='all')
setup_fluid_aliases(ftype='gas')
setup_fluid_fields()
setup_fluid_index_fields()
setup_particle_fields(ptype, ftype='gas', num_neighbors=64)
setup_smoothed_fields(ptype, num_neighbors=64, ftype='gas')
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D's values
class yt.frontends.boxlib.fields.WarpXFieldInfo(ds, field_list)[source]

Bases: yt.fields.field_info_container.FieldInfoContainer

add_field(name, sampling_type, function=None, **kwargs)

Add a new field, along with supplemental metadata, to the list of available fields. This respects a number of arguments, all of which are passed on to the constructor for DerivedField.

Parameters:
  • name (str) – is the name of the field.
  • function (callable) – A function handle that defines the field. Should accept arguments (field, data)
  • units (str) – A plain text string encoding the unit. Powers must be in python syntax (** instead of ^). If set to “auto” the units will be inferred from the return value of the field function.
  • take_log (bool) – Describes whether the field should be logged
  • validators (list) – A list of FieldValidator objects
  • particle_type (bool) – Is this a particle (1D) field?
  • vector_field (bool) – Describes the dimensionality of the field. Currently unused.
  • display_name (str) – A name used in the plots
add_output_field(name, sampling_type, **kwargs)
alias(alias_name, original_name, units=None)
check_derived_fields(fields_to_check=None)
clear() → None. Remove all items from D.
copy() → a shallow copy of D
create_with_fallback(fallback, name='')
extra_union_fields = (('kg', 'particle_mass'), ('C', 'particle_charge'), ('', 'particle_ones'))
fallback = None
find_dependencies(loaded)
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
has_key(key)
items() → a set-like object providing a view on D's items
keys()
known_other_fields = (('Bx', ('T', ['magnetic_field_x', 'B_x'], None)), ('By', ('T', ['magnetic_field_y', 'B_y'], None)), ('Bz', ('T', ['magnetic_field_z', 'B_z'], None)), ('Ex', ('V/m', ['electric_field_x', 'E_x'], None)), ('Ey', ('V/m', ['electric_field_y', 'E_y'], None)), ('Ez', ('V/m', ['electric_field_z', 'E_z'], None)), ('jx', ('A', ['current_x', 'Jx', 'J_x'], None)), ('jy', ('A', ['current_y', 'Jy', 'J_y'], None)), ('jz', ('A', ['current_z', 'Jz', 'J_z'], None)))
known_particle_fields = (('particle_weight', ('', ['particle_weighting'], None)), ('particle_position_x', ('m', [], None)), ('particle_position_y', ('m', [], None)), ('particle_position_z', ('m', [], None)), ('particle_velocity_x', ('m/s', [], None)), ('particle_velocity_y', ('m/s', [], None)), ('particle_velocity_z', ('m/s', [], None)), ('particle_momentum_x', ('kg*m/s', [], None)), ('particle_momentum_y', ('kg*m/s', [], None)), ('particle_momentum_z', ('kg*m/s', [], None)))
load_all_plugins(ftype='gas')
load_plugin(plugin_name, ftype='gas', skip_check=False)
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
setup_extra_union_fields(ptype='all')
setup_fluid_aliases()[source]
setup_fluid_fields()[source]
setup_fluid_index_fields()
setup_particle_fields(ptype)[source]
setup_smoothed_fields(ptype, num_neighbors=64, ftype='gas')
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D's values