mdolab / pyspline

pySpline produces B-spline curves, surfaces, and volumes
Other
39 stars 26 forks source link

Add sol time #40

Closed joanibal closed 2 years ago

joanibal commented 2 years ago

Purpose

Adds solution time as an optional parameter when writing out files to tecplot.

Adds an option to recompute the data of a volume. This is useful when looking at how the embedding volume of an FFD has changed as the points move.

It is related to this pyGeo PR

Expected time until merged

1 week

Type of change

Testing

Checklist

codecov[bot] commented 2 years ago

Codecov Report

Merging #40 (4c84bcf) into main (147579c) will decrease coverage by 0.03%. The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
- Coverage   60.55%   60.51%   -0.04%     
==========================================
  Files           5        5              
  Lines        1610     1616       +6     
==========================================
+ Hits          975      978       +3     
- Misses        635      638       +3     
Impacted Files Coverage Δ
pyspline/utils.py 48.36% <66.66%> (+0.06%) :arrow_up:
pyspline/pyCurve.py 51.87% <100.00%> (ø)
pyspline/pySurface.py 63.24% <100.00%> (ø)
pyspline/pyVolume.py 68.07% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

joanibal commented 2 years ago
joanibal commented 2 years ago

@nwu63 I have added the recompute arg to the other data types now

joanibal commented 2 years ago

computeData() gets the data for the Greville points on the splined object (curve, surface, or volume). These points are used to find a good initial guess for the point projection routines. When we use the splined volume for an FFD we embed many points without changing the volume. So you don't need to recompute the Greville points for each point, so pySpline saves the data and doesn't recompute it after the first call. I can't say I totally agree with the naming and how the program was implemented, but I believe that was the original thinking.

I use computeData(recompute=True) here in the related PR for pyGeo.
If you are writing the embedding volume out at each iteration, then you need to recompute the Greville points since the volume has been deformed. This way you are writing out the updated embedding volume.