Skip to content

Conversation

@knelli2
Copy link
Contributor

@knelli2 knelli2 commented Jun 23, 2023

Proposed changes

Also replace some interpolated quantities in the CharSpeed measurement. The current ones are no longer necessary. And some other small miscellaneous changes.

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

@knelli2 knelli2 added the priority critical for progress label Jun 23, 2023
@knelli2 knelli2 requested a review from wthrowe June 23, 2023 02:33
@knelli2 knelli2 force-pushed the size_control_system branch 2 times, most recently from 038facb to db0cada Compare June 23, 2023 16:36

public:
using IdType = Id;
using QueueTagsList = tmpl::list<QueueTags...>;
Copy link
Member

Choose a reason for hiding this comment

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

Snake case for a metavariable.


static std::string name() { return "Size"s + ::domain::name(Horizon); }

static std::optional<std::string> component_name(
Copy link
Member

Choose a reason for hiding this comment

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

Why is this an optional? I know the protocol says it is, but I can't find any documentation on what an empty return would mean.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because of shape control. I added a new commit that adds some docs to the protocol.

Copy link
Member

@wthrowe wthrowe left a comment

Choose a reason for hiding this comment

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

Missed a commit in my previous review.

namespace control_system::size {
// tt::is_a doesn't work because of domain::ObjectLabel and size_t
template <template <domain::ObjectLabel, size_t> class U, typename T>
struct is_size : std::false_type {};
Copy link
Member

Choose a reason for hiding this comment

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

Do you need the first template parameter? Looks like it's always the same, and it would make is_size and is_size_v consistent.

@knelli2 knelli2 force-pushed the size_control_system branch from db0cada to bbeada2 Compare June 23, 2023 17:31
@knelli2
Copy link
Contributor Author

knelli2 commented Jun 23, 2023

Squashed in the changes and added a new commit (the most recent one)

Copy link
Member

@nilsvu nilsvu left a comment

Choose a reason for hiding this comment

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

Just questions, don't hold up this PR

measurement_id.id);

// excision strahlkorper
Parallel::simple_action<::Actions::UpdateMessageQueue<
Copy link
Member

Choose a reason for hiding this comment

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

Why are there so many messages sent? Can't the data be sent in one message?

Copy link
Member

Choose a reason for hiding this comment

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

It didn't occur to me that these were all triggering separate messages. While that's not as critical for control systems, you're right, they should be merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The UpdateMessageQueue action currently only takes one queue tag at a time. This can of course be changed, but I'll do that in a separate PR.

Copy link
Member

Choose a reason for hiding this comment

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

I was thinking just storing a tuple.

Copy link
Member

Choose a reason for hiding this comment

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

@wthrowe are you requesting changes for this PR?

Copy link
Member

Choose a reason for hiding this comment

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

Instead of having five separate entries in the queue, have one that stores a tagged tuple or a struct or something.

* - Currently this control system can only be used with the \link
* control_system::ControlErrors::Size Size \endlink control error
*/
template <::domain::ObjectLabel Horizon, size_t DerivOrder>
Copy link
Member

Choose a reason for hiding this comment

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

How would I choose the deriv order? Maybe add docs here or to the protocol (can be another PR)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By trial and error basically. Or know that deriv order 2 was found to work well in spec for most control systems (except a notable couple). Either way, I'll do this in another PR. I know I need to add an entire explanation on how to control system communication works anyways.

measurement_id.id);

// excision strahlkorper
Parallel::simple_action<::Actions::UpdateMessageQueue<
Copy link
Member

Choose a reason for hiding this comment

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

It didn't occur to me that these were all triggering separate messages. While that's not as critical for control systems, you're right, they should be merged.

@knelli2 knelli2 force-pushed the size_control_system branch from bbeada2 to 1921ad8 Compare June 27, 2023 22:44
@knelli2
Copy link
Contributor Author

knelli2 commented Jun 27, 2023

@wthrowe Added new queue tags that hold TaggedTuples of the other tags. Now size only sends one message per submeasurement.

@wthrowe
Copy link
Member

wthrowe commented Jun 27, 2023

Looks good. Squash.

@knelli2 knelli2 force-pushed the size_control_system branch from 1921ad8 to d7afb57 Compare June 27, 2023 23:21
@nilsvu nilsvu merged commit 3360891 into sxs-collaboration:develop Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority critical for progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants