|
NEML2 2.1.0
|
Classes | |
| class | StereographicProjection |
| class | LambertProjection |
| class | IPFReduction |
Functions | |
| arbitrary_hemispherical_quadrature (points, rtol=1e-5, atol=1e-8) | |
| symmetry_operators_as_R2 (orbifold, device=torch.device("cpu")) | |
| pole_figure_odf (odf, pole, projection="stereographic", crystal_symmetry="1", nradial=20, ntheta=40, nquad=50, nchunk=1000, offset_fraction=1e-2) | |
| pretty_plot_pole_figure_odf (odf, pole, projection="stereographic", crystal_symmetry="1", nradial=20, ntheta=40, nquad=50, nchunk=1000, limits=None, ncontour=20) | |
| pole_figure_points (orientations, pole, projection="stereographic", crystal_symmetry="1", sample_symmetry="1") | |
| cart2polar (v) | |
| pretty_plot_pole_figure_points (orientations, pole, projection="stereographic", crystal_symmetry="1", sample_symmetry="1", point_size=10.0) | |
| inverse_pole_figure_points (orientations, direction, projection="stereographic", crystal_symmetry="1", sample_symmetry="1", reduction=IPFReduction()) | |
| pretty_plot_inverse_pole_figure (orientations, direction, projection="stereographic", crystal_symmetry="1", sample_symmetry="1", reduction=IPFReduction(), point_size=10.0, axis_labels=["100", "110", "111"], nline=100, lw=2.0) | |
Variables | |
| dict | available_projections |
| arbitrary_hemispherical_quadrature | ( | points, | |
| rtol = 1e-5, | |||
| atol = 1e-8 ) |
Calculate the weights for a spherical quadrature rule on the upper hemisphere
Args:
points (torch.tensor): tensor of shape (..., 3) of cartesian points on the upper hemisphere
Keyword Args:
rtol (float): relative tolerance for determining if points are on the equator
atol (float): absolute tolerance for determining if points are on the equator
Returns:
torch.tensor: tensor of shape (...) giving the weights
| cart2polar | ( | v | ) |
Convert cartesian 2D points to polar coordinates
Args:
v (torch.tensor): tensor of shape (...,2)
| inverse_pole_figure_points | ( | orientations, | |
| direction, | |||
| projection = "stereographic", | |||
| crystal_symmetry = "1", | |||
| sample_symmetry = "1", | |||
| reduction = IPFReduction() ) |
Project points onto an inverse pole figure
Args:
orientations (torch.tensor or neml2.tensors.Rot): tensor of orientation as *modified* Rodrigues
parameters in the *active* convention with arbitrary batch shape
direction (torch.tensor or neml2.tensors.Vec): pole to project, must broadcast with orientations
Keyword Args:
projection (str): which projection to use
crystal_symmetry (str): crystal symmetry to apply
sample_symmetry (str): sample symmetry to appy
reduction (IPFReduction): function to reduce the poles to a fundamental region
| pole_figure_odf | ( | odf, | |
| pole, | |||
| projection = "stereographic", | |||
| crystal_symmetry = "1", | |||
| nradial = 20, | |||
| ntheta = 40, | |||
| nquad = 50, | |||
| nchunk = 1000, | |||
| offset_fraction = 1e-2 ) |
Project an ODF onto a pole figure
Args:
odf (neml2.odf.ODF): ODF to project
pole (torch.tensor or neml2.tensors.Vec): pole to project
Keyword Args:
projection (str): which polar projection to use, options are "stereographic" and "lambert"
crystal_symmetry (str): string giving the orbifold notation for the crystal symmetry to apply to the base orientations, default "1"
nradial (int): number of radial points to use
ntheta (int): number of angular points to use
nquad (int): number of points to integrate the pole figure
nchunk (int): subbatch size to use in evaluating odf
offset_fraction (float): fraction of the radial range to offset the pole figure to avoid singularities
Returns:
(values, mesh): tuple of the projected values and the (theta, R) mesh points used to make a contour plot
| pole_figure_points | ( | orientations, | |
| pole, | |||
| projection = "stereographic", | |||
| crystal_symmetry = "1", | |||
| sample_symmetry = "1" ) |
Project crystal orientations to points on a pole figure
Args:
orientations (torch.tensor or neml2.tensors.Rot): tensor of orientations as *modified* Rodrigues
parameters in the *active* convention with arbitrary batch shape.
pole (torch.tensor or neml2.tensors.Vec): pole to project, must broadcast with orientations
Keyword Args:
projection (str): which polar projection to use, options are "stereographic" and "lambert"
crystal_symmetry (str): string giving the orbifold notation for the crystal symmetry to apply to the base orientations, default "1"
sample_symmetry (str): string giving the orbifold notation for the sample symmetry to apply to the projected points, default "1"
Returns:
torch.tensor: tensor with same batch shape as orientations but with end dimension (2,) giving each point
| pretty_plot_inverse_pole_figure | ( | orientations, | |
| direction, | |||
| projection = "stereographic", | |||
| crystal_symmetry = "1", | |||
| sample_symmetry = "1", | |||
| reduction = IPFReduction(), | |||
| point_size = 10.0, | |||
| axis_labels = ["100", "110", "111"], | |||
| nline = 100, | |||
| lw = 2.0 ) |
Project and then make a pretty plot for an inverse pole figure
Args:
orientations (torch.tensor or neml2.tensors.Rot): tensor of orientation as *modified* Rodrigues
parameters in the *active* convention with arbitrary batch shape
direction (torch.tensor or neml2.tensors.Vec): pole to project, must broadcast with orientations
Keyword Args:
projection (str): which projection to use
crystal_symmetry (str): crystal symmetry to apply
sample_symmetry (str): sample symmetry to appy
reduction (IPFReduction): function to reduce the poles to a fundamental region
point_size (float): size of points
axis_labels (list of str): labels for the three corners
nline (int): resolution for drawing lines
lw (float): line width for lines
| pretty_plot_pole_figure_odf | ( | odf, | |
| pole, | |||
| projection = "stereographic", | |||
| crystal_symmetry = "1", | |||
| nradial = 20, | |||
| ntheta = 40, | |||
| nquad = 50, | |||
| nchunk = 1000, | |||
| limits = None, | |||
| ncontour = 20 ) |
Project an ODF onto a pole figure
Args:
odf (neml2.odf.ODF): ODF to project
pole (torch.tensor or neml2.tensors.Vec): pole to project
Keyword Args:
projection (str): which polar projection to use, options are "stereographic" and "lambert"
crystal_symmetry (str): string giving the orbifold notation for the crystal symmetry to apply to the base orientations, default "1"
nradial (int): number of radial points to use
ntheta (int): number of angular points to use
nquad (int): number of points to integrate the pole figure
nchunk (int): subbatch size to use in evaluating odf
limits ((float,float)): (vmin, vmax) to pass to contourf
ncontour (int): number of contours to use, only used if limits is provided
| pretty_plot_pole_figure_points | ( | orientations, | |
| pole, | |||
| projection = "stereographic", | |||
| crystal_symmetry = "1", | |||
| sample_symmetry = "1", | |||
| point_size = 10.0 ) |
Project and then make a pretty plot for a pole figure given points as input
Args:
orientations (torch.tensor or neml2.tensors.Rot): tensor of orientations as *modified* Rodrigues
parameters in the *active* convention with arbitrary batch shape.
pole (torch.tensor or neml2.tensors.Vec): pole to project, must broadcast with orientations
Keyword Args:
projection (str): which polar projection to use, options are "stereographic" and "lambert"
crystal_symmetry (str): string giving the orbifold notation for the crystal symmetry to apply to the base orientations, default "1"
sample_symmetry (str): string giving the orbifold notation for the sample symmetry to apply to the projected points, default "1"
point_size (float): size of matplotlib points to plot
| symmetry_operators_as_R2 | ( | orbifold, | |
| device = torch.device("cpu") ) |
Return the symmetry operators for a given symmetry group as a batch of rank two tensors
Args:
orbifold (str): symmetry group in orbifold notation
Keyword Args:
device (torch.device): which device to place the tensors
| dict available_projections |