C++ 编译错误:error: invalid operands of types 'double***' and 'double' to binary 'operator/'?

error: invalid operands of types 'double***' and 'double' to binary 'operator/'

源代码是这样的:
void Porous::Compute_Force(Flow_solver* Flow, Parallel_MPI* MPI_parallel) {

int X, Y, Z;
double F_epsilon;
if (processor_id != MASTER) {
    for (X = 2; X <= MPI_parallel->actual_rows_XYZ[0]+1; ++X) {
        for (Y = 2; Y <= MPI_parallel->actual_rows_XYZ[1]+1; ++Y) {
            for (Z = 2; Z <= MPI_parallel->end_XYZ2[2]+1; ++Z) {
                F_epsilon = 1.75 / sqrt( 150 * pow(Porosity[X][Y][Z],3) );
                Flow->force[X][Y][Z][0] = Porosity[X][Y][Z] * (Flow->viscosity/Permeability[X][Y][Z]
                                        - F_epsilon * Flow->velocity_magnitude[X][Y][Z]/sqrt(Permeability[X][Y][Z]) ) * Flow->velocity[X][Y][Z][0]
                                        + Porosity[X][Y][Z] * Flow->force[X][Y][Z][0];
                Flow->force[X][Y][Z][1] = Porosity[X][Y][Z] * ( Flow->viscosity/Permeability[X][Y][Z]
                                        - F_epsilon * Flow->velocity_magnitude[X][Y][Z] / sqrt(Permeability[X][Y][Z]) ) * Flow->velocity[X][Y][Z][1]
                                        + Porosity[X][Y][Z] * Flow->force[X][Y][Z][1];
                Flow->force[X][Y][Z][2] = Porosity[X][Y][Z] * ( Flow->viscosity / Permeability[X][Y][Z]
                                        - F_epsilon * Flow->velocity_magnitude[X][Y][Z] / sqrt(Permeability[X][Y][Z]) ) * Flow->velocity[X][Y][Z][2]
                                        + Porosity[X][Y][Z] * Flow->force[X][Y][Z][2];
                }
            }
        }
    }

}

c++

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问