Home > Back-end >  Novice, C compiler error, a great god
Novice, C compiler error, a great god

Time:11-11

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


Flow void Porous: : Compute_Force (Flow_solver * and * MPI_parallel Parallel_MPI) {
Int X, Y, Z;
Double F_epsilon;
If (processor_id!=MASTER) {
For (X=2; X & lt;=MPI_parallel - & gt; Actual_rows_XYZ [0] + 1; + + X) {
For (Y=2; Y & lt;=MPI_parallel - & gt; Actual_rows_XYZ [1] + 1; + + Y) {
For (Z=2; Z & lt;=MPI_parallel - & gt; End_XYZ2 [2] + 1; + + Z) {
F_epsilon=1.75/SQRT (150 * pow (Porosity [X] [Y] [Z], 3));
The Flow - & gt; The force [X] [Y] [Z] [0]=Porosity [X] [Y] [Z] * (Flow - & gt; Viscosity/Permeability [X] [Y] [Z]
- F_epsilon * Flow - & gt; Velocity_magnitude [X] [Y] [Z]/SQRT (Permeability [X] [Y] [Z])) * Flow - & gt; Velocity [X] [Y] [Z] [0]
+ Porosity [X] [Y] [Z] * Flow - & gt; The force [X] [Y] [Z] [0];
The Flow - & gt; The force [X] [Y] [Z] [1]=Porosity [X] [Y] [Z] * (Flow - & gt; Viscosity/Permeability [X] [Y] [Z]
- F_epsilon * Flow - & gt; Velocity_magnitude [X] [Y] [Z]/SQRT (Permeability [X] [Y] [Z])) * Flow - & gt; Velocity [X] [Y] [Z] [1]
+ Porosity [X] [Y] [Z] * Flow - & gt; The force [X] [Y] [Z] [1].
The Flow - & gt; The force [X] [Y] [Z] [2]=Porosity [X] [Y] [Z] * (Flow - & gt; Viscosity/Permeability [X] [Y] [Z]
- F_epsilon * Flow - & gt; Velocity_magnitude [X] [Y] [Z]/SQRT (Permeability [X] [Y] [Z])) * Flow - & gt; Velocity [X] [Y] [Z] [2]
+ Porosity [X] [Y] [Z] * Flow - & gt; The force [X] [Y] [Z] [2];
}
}
}
}
}

CodePudding user response:

F_epsilon is clear about the type double
The Flow is Flow_solver * type

F_epsilon * Flow, the operation, and, even if Flow_solver is type double is not established, and the overloaded operators aren't you??

The compiler error is a very basic mistakes,,