Skip to content

Commit 51ccec6

Browse files
authored
Merge pull request #447 from pdziekan/virt_calc_drag
make it possible to override drag calculation in compact formulation
2 parents e1207a2 + 7f7b2c1 commit 51ccec6

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

libmpdata++/solvers/detail/mpdata_rhs_vip_prs_sgs_common.hpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ namespace libmpdataxx
5555

5656
virtual void multiply_sgs_visc() = 0;
5757

58+
virtual void calc_drag_cmpct()
59+
{
60+
formulae::stress::calc_drag_cmpct<ct_params_t::n_dims, ct_params_t::opts>(tau_srfc,
61+
this->vips(),
62+
*this->mem->G,
63+
cdrag,
64+
this->ijk,
65+
ijkm);
66+
}
67+
5868
// apply pade scheme to the d-th element of the drv array
5969
void pade_deriv(int d)
6070
{
@@ -86,12 +96,7 @@ namespace libmpdataxx
8696

8797
if (static_cast<stress_diff_t>(ct_params_t::stress_diff) == compact)
8898
{
89-
formulae::stress::calc_drag_cmpct<ct_params_t::n_dims, ct_params_t::opts>(tau_srfc,
90-
this->vips(),
91-
*this->mem->G,
92-
cdrag,
93-
this->ijk,
94-
ijkm);
99+
calc_drag_cmpct();
95100

96101
if (this->mem->G)
97102
{

0 commit comments

Comments
 (0)