Skip to content

Conversation

@jtgrasb
Copy link
Contributor

@jtgrasb jtgrasb commented May 17, 2022

This PR is in reference to Issue #864 and updates the saveViz feature to work with the v5.0 release.

@akeeste akeeste self-requested a review May 17, 2022 16:55
@akeeste akeeste added the Bug bug in WEC-Sim source, high priority label May 17, 2022
Copy link
Contributor

@akeeste akeeste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtgrasb Thanks for this fix, this works fine as is. But let's use the import body geometry function that is already in the bodyClass. This way we can also take advantage of the geometry checks that are contained there. Then we can use the geometry.vertex and geometry.face as is. Alternatively we could run importBodyGeometry in the pre-processing for all cases, instead of just for the nonlinear hydro ones.

I'll change this to be into master as well since it's a bug fix.

Adam

% Read and assign geometry data
bodyMesh(ibod).Points = body(ibod).geometry.vertex;
bodyMesh(ibod).Conns = body(ibod).geometry.faces;
readBodyMesh = stlread(body(ibod).geometryFile);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternate option:

            if isempty(body(ibod).geometry.vertex)
                % Import body geometry for linear hydro cases
                body(ibod).importBodyGeometry(simu.domainSize);
            end
            bodyMesh(ibod).Points = body(ibod).geometry.vertex;
            bodyMesh(ibod).Conns = body(ibod).geometry.face;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion @akeeste! I do think it may be useful to import geometry for all cases to have those checks. We can discuss further with the team in our next meeting.

@akeeste akeeste changed the base branch from dev to master May 17, 2022 16:59
@akeeste akeeste linked an issue May 17, 2022 that may be closed by this pull request
@kmruehl kmruehl merged commit 9839e3f into WEC-Sim:master May 18, 2022
@jtgrasb jtgrasb deleted the WaveVizFix branch July 5, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug bug in WEC-Sim source, high priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] saveViz variable names

3 participants