The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
|
CAD utility functions and class definition for reconstruction of non-uniform rational bezier CAD objects.
This module supports internal refinement of CUBIT generated meshes while maintaining the true CAD boundary. Refinement uses MINPACK to minimize the weighted sum of distances between constraint points with the point constrained to the CAD object. Evaluation of CAD objects is provided by an interface to the OpenNURBS library.
Data Types | |
type | nurbs_curve |
CAD curve class. More... | |
interface | nurbs_curve_domain |
Get the parametric domain of a NURBS curve. More... | |
interface | nurbs_curve_linear |
Test if NURBS curve is straight. More... | |
interface | nurbs_curve_name |
Get the name of a OpenNURBS curve. More... | |
interface | nurbs_curve_periodic |
Test periodicity of a NURBS curve. More... | |
interface | nurbs_dummy_eval |
Evaluate position from a NURBS object. More... | |
interface | nurbs_dummy_find |
Find the nearest location on a NURBS object to a given point. More... | |
interface | nurbs_dummy_grid |
Create a grid of points evenly spaced in parametric space. More... | |
interface | nurbs_dummy_unwrap |
Unwrap the periodic coordinates of a NURBS object to avoid parameter cuts. More... | |
interface | nurbs_dummy_wrap |
Wrap the periodic coordinates of a NURBS object into a single span. More... | |
type | nurbs_entity |
CAD entity class. More... | |
type | nurbs_entity_ptr |
List of CAD entities. More... | |
interface | nurbs_eval_curve |
Evalute the position along a NURBS curve. More... | |
interface | nurbs_eval_surf |
Evalute the position on a NURBS surface. More... | |
interface | nurbs_finalize |
Finalize the OpenNURBS library. More... | |
interface | nurbs_get_count |
Get a count of OpenNURBS objects in current file. More... | |
interface | nurbs_init |
Initialize the OpenNURBS library. More... | |
interface | nurbs_read_in |
Read-in a OpenNURBS *.3dm geometry file set objects as active. More... | |
type | nurbs_surf |
CAD surface class. More... | |
interface | nurbs_surf_domain |
Get the parametric domain of a NURBS surface. More... | |
interface | nurbs_surf_name |
Get the name of a OpenNURBS surface. More... | |
interface | nurbs_surf_periodic |
Test periodicity of a NURBS surface. More... | |
interface | nurbs_surf_planar |
Test if NURBS surface is planar. More... | |
interface | nurbs_surf_singular |
Test if edges of a NURBS surface are degenerate. More... | |
Functions/Subroutines | |
subroutine | nurbs_cmid_error (m, n, uv, err, iflag) |
Evalute the error between a curve point and the current active points used in a 2 point minimization. | |
subroutine | nurbs_curve_eval (self, pt, u, v) |
Map the parametric position on a curve to physical coordinates. | |
subroutine | nurbs_curve_find (self, pt, u, v, ierr) |
Find the parametric representation of a boundary point in CAD representation on a curve. | |
subroutine | nurbs_curve_grid (self) |
Evalute a grid of points evenly spaced in parametric space. | |
subroutine, public | nurbs_curve_midpoint (self, pt, pt1, pt2, wt1, wt2, ierr) |
Compute the weighted midpoint of a curve edge. | |
subroutine | nurbs_curve_unwrap (self, u1, u2, v1, v2) |
Unwrap the coordinate of a periodic NURBS curve to avoid parameter cuts. | |
subroutine | nurbs_curve_wrap (self, u, v) |
Wrap the coordinate of a periodic NURBS curve into a single span. | |
subroutine | nurbs_scenter_error (m, n, uv, err, iflag) |
Evalute the error between a surface point and the current active points used in a 3 point minimization. | |
subroutine | nurbs_smid_error (m, n, uv, err, iflag) |
Evalute the error between a surface point and the current active points used in a 2 point minimization. | |
logical function | nurbs_surf_atsingular (self, u, v) |
Detect if parametric location is at singular point. | |
subroutine, public | nurbs_surf_avg (self, n, uin, vin, uavg, vavg) |
Needs docs? | |
subroutine, public | nurbs_surf_center (self, pt, pt1, pt2, pt3, wt1, wt2, wt3, ierr) |
Compute the weighted center point of a surface triangle. | |
subroutine | nurbs_surf_error (m, n, uv, err, iflag) |
Evalute the error between a surface point and the current active point used in a minimization. | |
subroutine | nurbs_surf_eval (self, pt, u, v) |
Map the parametric position on a surface to physical coordinates. | |
subroutine | nurbs_surf_find (self, pt, u, v, ierr) |
Find the parametric representation of a boundary point in CAD representation on a surface. | |
subroutine | nurbs_surf_grid (self) |
Evalute a grid of points evenly spaced in parametric space. | |
subroutine, public | nurbs_surf_midpoint (self, pt, pt1, pt2, wt1, wt2, ierr) |
Compute the weighted midpoint of a surface edge. | |
subroutine | nurbs_surf_unwrap (self, u1, u2, v1, v2) |
Unwrap the periodic coordinates of a NURBS surface to avoid parameter cuts. | |
subroutine | nurbs_surf_wrap (self, u, v) |
Wrap the periodic coordinates of a NURBS surface into a single span. | |
Variables | |
class(nurbs_curve), pointer | active_curve => NULL() |
Active curve for MINPACK fitting. | |
real(r8), dimension(3, 3) | active_endpts |
Active constraint points for MINPACK fitting. | |
real(r8), dimension(3) | active_pt |
Active fit point for MINPACK fitting. | |
class(nurbs_surf), pointer | active_surf => NULL() |
Active surface for MINPACK fitting. | |
real(r8), dimension(3) | active_wts |
Active constraint weights for MINPACK fitting. | |
integer(i4), parameter | nurbs_ngrid = 20 |
Number of grid points to use for object meshes. | |
real(r8), parameter | nurbs_singstep = .1d0 |
Distance to offset guesses from singular edges. | |
|
private |
Evalute the error between a curve point and the current active points used in a 2 point minimization.
[in] | m | Number of spatial dimensions (3) |
[in] | n | Number of parametric dimensions (2) |
[in] | uv | Parametric position [n] |
[out] | err | Error vector between current and desired point [3] |
[in,out] | iflag | Unused flag |
|
private |
Map the parametric position on a curve to physical coordinates.
[out] | pt | Position vector [3] |
[in] | u | Parametric coordinate 1 |
[in] | v | Parametric coordinate 2 (ignored) |
|
private |
Find the parametric representation of a boundary point in CAD representation on a curve.
[in] | pt | Position vector [3] |
[out] | u | Parametric coordinate 1 |
[out] | v | Parametric coordinate 2 (ignored) |
[out] | ierr | Error status |
|
private |
Evalute a grid of points evenly spaced in parametric space.
[in,out] | self | Curve object |
subroutine, public nurbs_curve_midpoint | ( | class(nurbs_curve), intent(in), target | self, |
real(r8), dimension(3), intent(inout) | pt, | ||
real(r8), dimension(3), intent(in) | pt1, | ||
real(r8), dimension(3), intent(in) | pt2, | ||
real(r8), intent(in) | wt1, | ||
real(r8), intent(in) | wt2, | ||
integer(i4), intent(out) | ierr | ||
) |
Compute the weighted midpoint of a curve edge.
Locates the point on a given CAD curve which minimizes the weighted sum of distances to 2 constraint points.
\[ \sum_i w_i*(r_n - p_i)^2 \]
[in] | self | Curve object |
[in,out] | pt | Solution point |
[in] | pt1 | Constraint point 1 |
[in] | pt2 | Constraint point 2 |
[in] | wt1 | Constraint weight 1 |
[in] | wt2 | Constraint weight 2 |
[out] | ierr | Error flag |
|
private |
Unwrap the coordinate of a periodic NURBS curve to avoid parameter cuts.
[in] | self | Curve object |
[in,out] | u1 | Parametric coordinate 1 of first point |
[in,out] | u2 | Parametric coordinate 2 of first point (unused) |
[in,out] | v1 | Parametric coordinate 1 of second point |
[in,out] | v2 | Parametric coordinate 2 of second point (unused) |
|
private |
Wrap the coordinate of a periodic NURBS curve into a single span.
[in,out] | u | Parametric coordinate 1 |
[in,out] | v | Parametric coordinate 2 (unused) |
[in] | self | Curve object |
[in,out] | u | Parametric coordinate 1 |
[in,out] | v | Parametric coordinate 2 (unused) |
|
private |
Evalute the error between a surface point and the current active points used in a 3 point minimization.
[in] | m | Number of spatial dimensions (3) |
[in] | n | Number of parametric dimensions (2) |
[in] | uv | Parametric position [n] |
[out] | err | Error vector between current and desired point [3] |
[in,out] | iflag | Unused flag |
|
private |
Evalute the error between a surface point and the current active points used in a 2 point minimization.
[in] | m | Number of spatial dimensions (3) |
[in] | n | Number of parametric dimensions (2) |
[in] | uv | Parametric position [n] |
[out] | err | Error vector between current and desired point [3] |
[in,out] | iflag | Unused flag |
|
private |
Detect if parametric location is at singular point.
[in] | self | Surface object |
[in,out] | u | Parametric coordinate 1 |
[in,out] | v | Parametric coordinate 2 |
subroutine, public nurbs_surf_avg | ( | class(nurbs_entity), intent(in), target | self, |
integer(i4), intent(in) | n, | ||
real(r8), dimension(n), intent(in) | uin, | ||
real(r8), dimension(n), intent(in) | vin, | ||
real(r8), intent(out) | uavg, | ||
real(r8), intent(out) | vavg | ||
) |
Needs docs?
[in] | self | Surface object |
[in] | n | Needs docs |
[in] | uin | Needs docs |
[in] | vin | Needs docs |
[out] | uavg | Needs docs |
[out] | vavg | Needs docs |
subroutine, public nurbs_surf_center | ( | class(nurbs_surf), intent(in), target | self, |
real(r8), dimension(3), intent(inout) | pt, | ||
real(r8), dimension(3), intent(in) | pt1, | ||
real(r8), dimension(3), intent(in) | pt2, | ||
real(r8), dimension(3), intent(in) | pt3, | ||
real(r8), intent(in) | wt1, | ||
real(r8), intent(in) | wt2, | ||
real(r8), intent(in) | wt3, | ||
integer(i4), intent(out) | ierr | ||
) |
Compute the weighted center point of a surface triangle.
Locates the point on a given CAD surface which minimizes the weighted sum of distances to 3 constraint points.
\[ \sum_i w_i*(r_n - p_i)^2 \]
[in] | self | Surface object |
[in,out] | pt | Solution point |
[in] | pt1 | Constraint point 1 |
[in] | pt2 | Constraint point 2 |
[in] | pt3 | Constraint point 3 |
[in] | wt1 | Constraint weight 1 |
[in] | wt2 | Constraint weight 2 |
[in] | wt3 | Constraint weight 3 |
[out] | ierr | Error flag |
|
private |
Evalute the error between a surface point and the current active point used in a minimization.
[in] | m | Number of spatial dimensions (3) |
[in] | n | Number of parametric dimensions (2) |
[in] | uv | Parametric position [n] |
[out] | err | Error vector between current and desired point [3] |
[in,out] | iflag | Unused flag |
|
private |
Map the parametric position on a surface to physical coordinates.
[in] | self | Surface object |
[out] | pt | Physical position [3] |
[in] | u | Parametric coordinate 1 |
[in] | v | Parametric coordinate 2 |
|
private |
Find the parametric representation of a boundary point in CAD representation on a surface.
[in] | self | Surface object |
[in] | pt | Position vector [3] |
[out] | u | Parametric coordinate 1 |
[out] | v | Parametric coordinate 2 |
|
private |
Evalute a grid of points evenly spaced in parametric space.
[in,out] | self | Surface object |
subroutine, public nurbs_surf_midpoint | ( | class(nurbs_surf), intent(in), target | self, |
real(r8), dimension(3), intent(inout) | pt, | ||
real(r8), dimension(3), intent(in) | pt1, | ||
real(r8), dimension(3), intent(in) | pt2, | ||
real(r8), intent(in) | wt1, | ||
real(r8), intent(in) | wt2, | ||
integer(i4), intent(out) | ierr | ||
) |
Compute the weighted midpoint of a surface edge.
Locates the point on a given CAD surface which minimizes the weighted sum of distances to 2 constraint points.
\[ \sum_i w_i*(r_n - p_i)^2 \]
[in] | self | Surface object |
[in,out] | pt | Solution point |
[in] | pt1 | Constraint point 1 |
[in] | pt2 | Constraint point 2 |
[in] | wt1 | Constraint weight 1 |
[in] | wt2 | Constraint weight 2 |
[out] | ierr | Error flag |
|
private |
Unwrap the periodic coordinates of a NURBS surface to avoid parameter cuts.
[in] | self | Surface object |
[in,out] | u1 | Parametric coordinate 1 of first point |
[in,out] | u2 | Parametric coordinate 2 of first point |
[in,out] | v1 | Parametric coordinate 1 of second point |
[in,out] | v2 | Parametric coordinate 2 of second point |
|
private |
Wrap the periodic coordinates of a NURBS surface into a single span.
[in] | self | Surface object |
[in,out] | u | Parametric coordinate 1 |
[in,out] | v | Parametric coordinate 2 |
|
private |
Active curve for MINPACK fitting.
|
private |
Active constraint points for MINPACK fitting.
|
private |
Active fit point for MINPACK fitting.
|
private |
Active surface for MINPACK fitting.
|
private |
Active constraint weights for MINPACK fitting.
|
private |
Number of grid points to use for object meshes.
|
private |
Distance to offset guesses from singular edges.