Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions components/eamxx/src/share/field/field_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define SCREAM_FIELD_UTILS_HPP

#include "share/field/field_utils_impl.hpp"
#include "share/field/field_utils_impl_dot.hpp"

namespace scream {

Expand Down Expand Up @@ -111,6 +112,12 @@ void perturb (const Field& f,
impl::perturb<ST>(f, engine, pdf, base_seed, level_mask, dof_gids);
}

template <typename ST>
Field dot_along_rank1_dim(const int &pd, const Field &f1, const Field &f2,
const ekat::Comm *co = nullptr) {
return do_dot_along_rank1_dim<ST>(pd, f1, f2, co);
Copy link
Contributor

@tcclevenger tcclevenger Oct 31, 2024

Choose a reason for hiding this comment

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

I would say add the implementation to the impl namespace like is done with the other utils, and just give the same name as this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I considered namespacing impl, impl_dot and nothing, and chose nothing for no particular reason, but I will revisit. Let's see what Luca suggests. If he doesn't have a preference, I will go with impl as you suggested

Copy link
Contributor

Choose a reason for hiding this comment

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

I also vote for using the impl namespace and keep the same signature.

}

template<typename ST>
ST frobenius_norm(const Field& f, const ekat::Comm* comm = nullptr)
{
Expand Down
Loading
Loading