Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
34 changes: 17 additions & 17 deletions libmpdata++-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ set(libmpdataxx_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include/")

############################################################################################
# debug mode compiler flags
set(libmpdataxx_CXX_FLAGS_DEBUG "${libmpdataxx_CXX_FLAGS_DEBUG} -std=c++14 -DBZ_DEBUG -g -Wno-enum-compare -Wfatal-errors") #TODO: -Og if compiler supports it?
set(libmpdataxx_CXX_FLAGS_DEBUG "${libmpdataxx_CXX_FLAGS_DEBUG} -std=c++17 -DBZ_DEBUG -g -Wno-enum-compare -Wfatal-errors") #TODO: -Og if compiler supports it?


############################################################################################
Expand All @@ -42,7 +42,7 @@ if(
CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"
)
set(libmpdataxx_CXX_FLAGS_RELEASE "${libmpdataxx_CXX_FLAGS_RELEASE} -std=c++14 -DNDEBUG -Ofast -march=native -Wno-enum-compare")
set(libmpdataxx_CXX_FLAGS_RELEASE "${libmpdataxx_CXX_FLAGS_RELEASE} -std=c++17 -DNDEBUG -Ofast -march=native -Wno-enum-compare")

# preventing Kahan summation from being optimised out
if (
Expand All @@ -58,25 +58,25 @@ if(
CMAKE_CXX_COMPILER_ID STREQUAL "Intel"
)
# flags taken from -fast but without -static
set(libmpdataxx_CXX_FLAGS_RELEASE "${libmpdataxx_CXX_FLAGS_RELEASE} -std=gnu++14 -DNDEBUG -xHOST -O3 -ipo -no-prec-div -fp-model fast=2")
set(libmpdataxx_CXX_FLAGS_RELEASE "${libmpdataxx_CXX_FLAGS_RELEASE} -std=gnu++17 -DNDEBUG -xHOST -O3 -ipo -no-prec-div -fp-model fast=2")
endif()


############################################################################################
# C++14
include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_FLAGS "-std=c++14")
check_cxx_source_compiles("
#include <type_traits>
auto f() { return 1;}
template <bool a, class b> using ei=std::enable_if<a,b>;
struct a {a(int){}};struct b:a {using a::a;};
int main(){b i(1);}
" CXX14_SUPPORTED)
if (NOT CXX14_SUPPORTED)
message(FATAL_ERROR "C++14 compatibility test failed - please update your compiler or point CMake to another one with -DCMAKE_CXX_COMPILER=...")
endif()
unset(CMAKE_REQUIRED_FLAGS)
## C++14
#include(CheckCXXSourceCompiles)
#set(CMAKE_REQUIRED_FLAGS "-std=c++14")
#check_cxx_source_compiles("
# #include <type_traits>
# auto f() { return 1;}
# template <bool a, class b> using ei=std::enable_if<a,b>;
# struct a {a(int){}};struct b:a {using a::a;};
# int main(){b i(1);}
#" CXX14_SUPPORTED)
#if (NOT CXX14_SUPPORTED)
# message(FATAL_ERROR "C++14 compatibility test failed - please update your compiler or point CMake to another one with -DCMAKE_CXX_COMPILER=...")
#endif()
#unset(CMAKE_REQUIRED_FLAGS)
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Commented-out code section should be removed. Lines 66-79 contain a commented-out C++14 compatibility check that is no longer needed since the codebase has been upgraded to C++17. Instead of commenting out this code, it should be completely removed to improve code maintainability and reduce clutter.

Suggested change
## C++14
#include(CheckCXXSourceCompiles)
#set(CMAKE_REQUIRED_FLAGS "-std=c++14")
#check_cxx_source_compiles("
# #include <type_traits>
# auto f() { return 1;}
# template <bool a, class b> using ei=std::enable_if<a,b>;
# struct a {a(int){}};struct b:a {using a::a;};
# int main(){b i(1);}
#" CXX14_SUPPORTED)
#if (NOT CXX14_SUPPORTED)
# message(FATAL_ERROR "C++14 compatibility test failed - please update your compiler or point CMake to another one with -DCMAKE_CXX_COMPILER=...")
#endif()
#unset(CMAKE_REQUIRED_FLAGS)

Copilot uses AI. Check for mistakes.


############################################################################################
Expand Down
4 changes: 4 additions & 0 deletions libmpdata++/bcond/cyclic_2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ namespace libmpdataxx

void save_edge_vel(const arr_t &, const rng_t &) {}

void save_edge_val(const arr_t &, const arr_t &, const rng_t &) {}

void set_edge_pres(arr_t &, const rng_t &, int) {}

void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const rng_t &j, const bool ad = false)
Expand Down Expand Up @@ -131,6 +133,8 @@ namespace libmpdataxx

void save_edge_vel(const arr_t &, const rng_t &) {}

void save_edge_val(const arr_t &, const arr_t &, const rng_t &) {}

void set_edge_pres(arr_t &, const rng_t &, int) {}

void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const rng_t &j, const bool ad = false)
Expand Down
4 changes: 4 additions & 0 deletions libmpdata++/bcond/cyclic_3d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ namespace libmpdataxx

void save_edge_vel(const arr_t &, const rng_t &, const rng_t &) {}

void save_edge_val(const arr_t &, const arr_t &, const rng_t &, const rng_t &) {}

void set_edge_pres(arr_t &, const rng_t &, const rng_t &, int) {}

void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const rng_t &j, const rng_t &k, const bool ad = false)
Expand Down Expand Up @@ -130,6 +132,8 @@ namespace libmpdataxx

void save_edge_vel(const arr_t &, const rng_t &, const rng_t &) {}

void save_edge_val(const arr_t &, const arr_t &, const rng_t &, const rng_t &) {}

void set_edge_pres(arr_t &, const rng_t &, const rng_t &, int) {}

void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const rng_t &j, const rng_t &k, const bool ad = false)
Expand Down
12 changes: 11 additions & 1 deletion libmpdata++/bcond/detail/bcond_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace libmpdataxx
{
using namespace arakawa_c;

enum bcond_e { null, cyclic, polar, open, rigid, remote, gndsky, custom };
enum bcond_e { null, cyclic, polar, open, rigid, remote, gndsky, fixed, custom };
enum drctn_e { left, rght };

template<
Expand Down Expand Up @@ -81,6 +81,11 @@ namespace libmpdataxx
assert(false && "bcond::save_edge_vel() called!");
};

virtual void save_edge_val(const arr_2d_t &, const arr_2d_t &, const rng_t &)
{
assert(false && "bcond::save_edge_vel() called!");
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Inconsistent error message in assertion. The assertion message says "bcond::save_edge_vel() called!" but this is actually the save_edge_val function. The error message should be "bcond::save_edge_val() called!" to accurately reflect which function was called.

Suggested change
assert(false && "bcond::save_edge_vel() called!");
assert(false && "bcond::save_edge_val() called!");

Copilot uses AI. Check for mistakes.
};

virtual void set_edge_pres(arr_2d_t &, const rng_t &, int)
{
assert(false && "bcond::set_edge() called!");
Expand Down Expand Up @@ -147,6 +152,11 @@ namespace libmpdataxx
assert(false && "bcond::save_edge_vel() called!");
};

virtual void save_edge_val(const arr_3d_t &, const rng_t &, const rng_t &)
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Missing parameter name in virtual function signature. The second parameter "const arr_3d_t &" lacks a descriptive name, making the function signature less readable. While this is valid C++, adding a parameter name like "val" would improve code documentation and consistency with the actual implementations in fixed_3d.hpp.

Suggested change
virtual void save_edge_val(const arr_3d_t &, const rng_t &, const rng_t &)
virtual void save_edge_val(const arr_3d_t &val, const rng_t &i, const rng_t &j)

Copilot uses AI. Check for mistakes.
{
assert(false && "bcond::save_edge_vel() called!");
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Inconsistent error message in assertion. The assertion message says "bcond::save_edge_vel() called!" but this is actually the save_edge_val function. The error message should be "bcond::save_edge_val() called!" to accurately reflect which function was called.

Suggested change
assert(false && "bcond::save_edge_vel() called!");
assert(false && "bcond::save_edge_val() called!");

Copilot uses AI. Check for mistakes.
};

virtual void set_edge_pres(arr_3d_t &, const rng_t &, const rng_t &, int)
{
assert(false && "bcond::set_edge() called!");
Expand Down
98 changes: 98 additions & 0 deletions libmpdata++/bcond/fixed_2d.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// 2D fixed (Dirichlet) boundary conditions for libmpdata++
//
// licensing: GPU GPL v3
// copyright: University of Warsaw

#pragma once

#include <libmpdata++/bcond/detail/bcond_common.hpp>

namespace libmpdataxx
{
namespace bcond
{
template <typename real_t, int halo, bcond_e knd, drctn_e dir, int n_dims, int d>
class bcond< real_t, halo, knd, dir, n_dims, d,
typename std::enable_if<
knd == fixed &&
dir == left &&
n_dims == 2
>::type
> : public bcond<real_t, halo, open, dir, n_dims, d> // TODO: in some cases (e.g. cloud chamber) we might want to inherit from rigid?
{
using parent_t = bcond<real_t, halo, open, dir, n_dims, d>;
using arr_t = blitz::Array<real_t, 2>;
using parent_t::parent_t; // inheriting ctor

// holds fixed wall values (equal to initial edge values)
std::unordered_map<const arr_t*, arr_t> edge_values;

public:

void fill_halos_sclr(arr_t &a, const rng_t &j, const bool deriv = false)
{
#if !defined(NDEBUG)
assert(edge_values.find(&a) != edge_values.end() && "fixed bcond: edge values not saved before filling halos");
#endif

using namespace idxperm;
for (int i = this->left_halo_sclr.first(); i <= this->left_halo_sclr.last(); ++i)
{
a(pi<d>(i, j)) = edge_values[&a](pi<d>(0, j));
}
}

void save_edge_val(const arr_t &a, const arr_t &val, const rng_t &j)
{
using namespace idxperm;
// assert(a.shape() == val.shape());
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Commented-out assertion should be either enabled or removed. Line 48 contains a commented assertion to verify that array shapes match. If this check is needed, it should be enabled within an #if !defined(NDEBUG) block like the assertion on line 35. If the check is not needed, the commented code should be removed to reduce clutter and improve maintainability.

Copilot uses AI. Check for mistakes.
auto s = a.shape();
s[d] = 1;
edge_values.emplace(&a, arr_t(s));
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Potential memory leak or redundant allocation with emplace. The code uses emplace(&a, arr_t(s)) which always tries to insert a new element even if the key already exists. If save_edge_val is called multiple times with the same array pointer, emplace will fail to insert but the temporary arr_t(s) is still constructed. Consider using try_emplace or checking if the key exists before creating the array, or using insert_or_assign if re-initialization is intended.

Copilot uses AI. Check for mistakes.
if constexpr(d == 0) edge_values[&a].reindexSelf({0, a.lbound(1)});
else if constexpr(d == 1) edge_values[&a].reindexSelf({a.lbound(0), 0});
edge_values[&a](pi<d>(0, j)) = val(pi<d>(this->left_edge_sclr, j));
}
};

template <typename real_t, int halo, bcond_e knd, drctn_e dir, int n_dims, int d>
class bcond< real_t, halo, knd, dir, n_dims, d,
typename std::enable_if<
knd == fixed &&
dir == rght &&
n_dims == 2
>::type
> : public bcond<real_t, halo, open, dir, n_dims, d>
{
using parent_t = bcond<real_t, halo, open, dir, n_dims, d>;
using arr_t = blitz::Array<real_t, 2>;
using parent_t::parent_t; // inheriting ctor

// holds fixed wall values (equal to initial edge values)
std::unordered_map<const arr_t*, arr_t> edge_values;

public:

void fill_halos_sclr(arr_t &a, const rng_t &j, const bool deriv = false)
{
using namespace idxperm;
for (int i = this->rght_halo_sclr.first(); i <= this->rght_halo_sclr.last(); ++i)
{
a(pi<d>(i, j)) = edge_values[&a](pi<d>(0, j));
}
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Missing assertion check for edge values in debug mode. The left direction implementation (lines 34-36) includes an assert to verify that edge values were saved before filling halos, but this right direction implementation is missing the same check. This inconsistency could make debugging more difficult if edge values are not properly initialized.

Copilot uses AI. Check for mistakes.
}

void save_edge_val(const arr_t &a, const arr_t &val, const rng_t &j)
{
using namespace idxperm;
// assert(a.shape() == val.shape());
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Commented-out assertion should be either enabled or removed. Line 88 contains a commented assertion to verify that array shapes match. If this check is needed, it should be enabled within an #if !defined(NDEBUG) block like the assertion in the left direction implementation. If the check is not needed, the commented code should be removed to reduce clutter and improve maintainability.

Copilot uses AI. Check for mistakes.
auto s = a.shape();
s[d] = 1;
edge_values.emplace(&a, arr_t(s));
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Potential memory leak or redundant allocation with emplace. The code uses emplace(&a, arr_t(s)) which always tries to insert a new element even if the key already exists. If save_edge_val is called multiple times with the same array pointer, emplace will fail to insert but the temporary arr_t(s) is still constructed. Consider using try_emplace or checking if the key exists before creating the array, or using insert_or_assign if re-initialization is intended.

Copilot uses AI. Check for mistakes.
if constexpr (d == 0) edge_values[&a].reindexSelf({0, a.lbound(1)});
else if constexpr(d == 1) edge_values[&a].reindexSelf({a.lbound(0), 0});
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Inconsistent spacing in constexpr conditionals. Line 52 uses "constexpr(d == 0)" without a space after constexpr, while lines 53 and 93 use "if constexpr" with a space. This inconsistency should be standardized for better code maintainability.

Copilot uses AI. Check for mistakes.
edge_values[&a](pi<d>(0, j)) = val(pi<d>(this->rght_edge_sclr, j));
}
};
} // namespace bcond
} // namespace libmpdataxx
105 changes: 105 additions & 0 deletions libmpdata++/bcond/fixed_3d.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// 3D fixed (Dirichlet) boundary conditions for libmpdata++
//
// licensing: GPU GPL v3
// copyright: University of Warsaw

#pragma once

#include <libmpdata++/bcond/detail/bcond_common.hpp>

namespace libmpdataxx
{
namespace bcond
{
template <typename real_t, int halo, bcond_e knd, drctn_e dir, int n_dims, int d>
class bcond< real_t, halo, knd, dir, n_dims, d,
typename std::enable_if<
knd == fixed &&
dir == left &&
n_dims == 3
>::type
> : public bcond<real_t, halo, open, dir, n_dims, d> // TODO: in some cases (e.g. cloud chamber) we might want to inherit from rigid?
{
using parent_t = bcond<real_t, halo, open, dir, n_dims, d>;
using arr_t = blitz::Array<real_t, 3>;
using parent_t::parent_t; // inheriting ctor

// holds fixed wall values (equal to initial edge values)
std::unordered_map<const arr_t*, arr_t> edge_values;

public:

void fill_halos_sclr(arr_t &a, const rng_t &j, const rng_t &k, const bool deriv = false)
{
#if !defined(NDEBUG)
assert(edge_values.find(&a) != edge_values.end() && "fixed bcond: edge values not saved before filling halos");
#endif

using namespace idxperm;
for (int i = this->left_halo_sclr.first(); i <= this->left_halo_sclr.last(); ++i)
{
a(pi<d>(i, j, k)) = edge_values[&a](pi<d>(0, j, k));
}
}

void save_edge_val(const arr_t &a, const arr_t &val, const rng_t &j, const rng_t &k)
{
using namespace idxperm;
// assert(a.shape() == val.shape());
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Commented-out assertion should be either enabled or removed. Line 48 contains a commented assertion to verify that array shapes match. If this check is needed, it should be enabled within an #if !defined(NDEBUG) block like the assertion in the left direction implementation. If the check is not needed, the commented code should be removed to reduce clutter and improve maintainability.

Suggested change
// assert(a.shape() == val.shape());
#if !defined(NDEBUG)
assert(a.shape() == val.shape());
#endif

Copilot uses AI. Check for mistakes.
auto s = a.shape();
s[d] = 1;
edge_values.emplace(&a, arr_t(s));
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Potential memory leak or redundant allocation with emplace. The code uses emplace(&a, arr_t(s)) which always tries to insert a new element even if the key already exists. If save_edge_val is called multiple times with the same array pointer, emplace will fail to insert but the temporary arr_t(s) is still constructed. Consider using try_emplace or checking if the key exists before creating the array, or using insert_or_assign if re-initialization is intended.

Suggested change
edge_values.emplace(&a, arr_t(s));
if (edge_values.find(&a) == edge_values.end())
edge_values.emplace(&a, arr_t(s));

Copilot uses AI. Check for mistakes.
if constexpr (d == 0) edge_values[&a].reindexSelf({0, a.lbound(1), a.lbound(2)});
else if constexpr (d == 1) edge_values[&a].reindexSelf({a.lbound(0), 0, a.lbound(2)});
else if constexpr (d == 2) edge_values[&a].reindexSelf({a.lbound(0), a.lbound(1), 0});
edge_values[&a](pi<d>(0, j, k)) = val(pi<d>(this->left_edge_sclr, j, k));
}
};


template <typename real_t, int halo, bcond_e knd, drctn_e dir, int n_dims, int d>
class bcond< real_t, halo, knd, dir, n_dims, d,
typename std::enable_if<
knd == fixed &&
dir == rght &&
n_dims == 3
>::type
> : public bcond<real_t, halo, open, dir, n_dims, d> // TODO: in some cases (e.g. cloud chamber) we might want to inherit from rigid?
{
using parent_t = bcond<real_t, halo, open, dir, n_dims, d>;
using arr_t = blitz::Array<real_t, 3>;
using parent_t::parent_t; // inheriting ctor

// holds fixed wall values (equal to initial edge values)
std::unordered_map<const arr_t*, arr_t> edge_values;

public:

void fill_halos_sclr(arr_t &a, const rng_t &j, const rng_t &k, const bool deriv = false)
{
#if !defined(NDEBUG)
assert(edge_values.find(&a) != edge_values.end() && "fixed bcond: edge values not saved before filling halos");
#endif

using namespace idxperm;
for (int i = this->rght_halo_sclr.first(); i <= this->rght_halo_sclr.last(); ++i)
{
a(pi<d>(i, j, k)) = edge_values[&a](pi<d>(0, j, k));
}
}

void save_edge_val(const arr_t &a, const arr_t &val, const rng_t &j, const rng_t &k)
{
using namespace idxperm;
// assert(a.shape() == val.shape());
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Commented-out assertion should be either enabled or removed. Line 94 contains a commented assertion to verify that array shapes match. If this check is needed, it should be enabled within an #if !defined(NDEBUG) block like the assertion in the left direction implementation. If the check is not needed, the commented code should be removed to reduce clutter and improve maintainability.

Suggested change
// assert(a.shape() == val.shape());
#if !defined(NDEBUG)
assert(a.shape() == val.shape());
#endif

Copilot uses AI. Check for mistakes.
auto s = a.shape();
s[d] = 1;
edge_values.emplace(&a, arr_t(s));
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

Potential memory leak or redundant allocation with emplace. The code uses emplace(&a, arr_t(s)) which always tries to insert a new element even if the key already exists. If save_edge_val is called multiple times with the same array pointer, emplace will fail to insert but the temporary arr_t(s) is still constructed. Consider using try_emplace or checking if the key exists before creating the array, or using insert_or_assign if re-initialization is intended.

Suggested change
edge_values.emplace(&a, arr_t(s));
edge_values.try_emplace(&a, s);

Copilot uses AI. Check for mistakes.
if constexpr (d == 0) edge_values[&a].reindexSelf({0, a.lbound(1), a.lbound(2)});
else if constexpr (d == 1) edge_values[&a].reindexSelf({a.lbound(0), 0, a.lbound(2)});
else if constexpr (d == 2) edge_values[&a].reindexSelf({a.lbound(0), a.lbound(1), 0});
edge_values[&a](pi<d>(0, j, k)) = val(pi<d>(this->rght_edge_sclr, j, k));
}
};
} // namespace bcond
} // namespace libmpdataxx
4 changes: 4 additions & 0 deletions libmpdata++/bcond/open_2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ namespace libmpdataxx
edge_velocity(pi<d>(0, j)) = a(pi<d>(this->left_edge_sclr, j));
}

void save_edge_val(const arr_t &, const arr_t &, const rng_t &) {}

void set_edge_pres(arr_t &a, const rng_t &j, int sign)
{
using namespace idxperm;
Expand Down Expand Up @@ -158,6 +160,8 @@ namespace libmpdataxx
edge_velocity(pi<d>(0, j)) = a(pi<d>(this->rght_edge_sclr, j));
}

void save_edge_val(const arr_t &, const arr_t &, const rng_t &) {}

void set_edge_pres(arr_t &a, const rng_t &j, int sign)
{
using namespace idxperm;
Expand Down
4 changes: 4 additions & 0 deletions libmpdata++/bcond/open_3d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ namespace libmpdataxx
edge_velocity(pi<d>(0, j, k)) = a(pi<d>(this->left_edge_sclr, j, k));
}

void save_edge_val(const arr_t &, const arr_t &, const rng_t &, const rng_t &) {}

void set_edge_pres(arr_t &a, const rng_t &j, const rng_t &k, int sign)
{
using namespace idxperm;
Expand Down Expand Up @@ -187,6 +189,8 @@ namespace libmpdataxx
edge_velocity(pi<d>(0, j, k)) = a(pi<d>(this->rght_edge_sclr, j, k));
}

void save_edge_val(const arr_t &, const arr_t &, const rng_t &, const rng_t &) {}

void set_edge_pres(arr_t &a, const rng_t &j, const rng_t &k, int sign)
{
using namespace idxperm;
Expand Down
4 changes: 4 additions & 0 deletions libmpdata++/bcond/remote_2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ namespace libmpdataxx

void save_edge_vel(const arr_t &, const rng_t &) {}

void save_edge_val(const arr_t &, const arr_t &, const rng_t &) {}

void set_edge_pres(arr_t &, const rng_t &, int) {}

// we require that given process calculates its internal vectors + the nearest vector to the left, TODO: how to enforce this?
Expand Down Expand Up @@ -159,6 +161,8 @@ namespace libmpdataxx

void save_edge_vel(const arr_t &, const rng_t &) {}

void save_edge_val(const arr_t &, const arr_t &, const rng_t &) {}

void set_edge_pres(arr_t &, const rng_t &, int) {}

void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const rng_t &j, const bool ad = false)
Expand Down
Loading
Loading