fix a few CLang warnings
most of them quite insignificant, but still annoying. The only exception is the warning about the changed alignment for the 'work' argument of spu_implicit_assemble(). AFAICT, the only reason why it worked was that the pointer produced by malloc() was passed directly. (malloc() seems to fulfill all alignment criteria.) To fix this, I've changed that argument's type from char* to double*.
This commit is contained in:
parent
054b764224
commit
5a7992fc56
@ -316,7 +316,7 @@ compute_cell_geometry_3d(double *coords,
|
||||
}
|
||||
|
||||
if(subnormal_sign < 0.0){
|
||||
tet_volume =- tet_volume;
|
||||
tet_volume = -tet_volume;
|
||||
}
|
||||
if(!(neighbors[2*face+0]==c)){
|
||||
tet_volume = -tet_volume;
|
||||
|
@ -23,7 +23,7 @@
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
class PhaseUsage;
|
||||
struct PhaseUsage;
|
||||
|
||||
/// Abstract base class for blackoil fluid and reservoir properties.
|
||||
/// Supports variable number of spatial dimensions, called D.
|
||||
|
@ -96,8 +96,8 @@ namespace Opm
|
||||
const RockCompressibility* rock_comp_props_;
|
||||
WellsManager& wells_manager_;
|
||||
const Wells* wells_;
|
||||
const std::vector<double>& src_;
|
||||
const FlowBoundaryConditions* bcs_;
|
||||
//const std::vector<double>& src_;
|
||||
//const FlowBoundaryConditions* bcs_;
|
||||
const double* gravity_;
|
||||
// Solvers
|
||||
CompressibleTpfa psolver_;
|
||||
@ -245,8 +245,8 @@ namespace Opm
|
||||
rock_comp_props_(rock_comp_props),
|
||||
wells_manager_(wells_manager),
|
||||
wells_(wells_manager.c_wells()),
|
||||
src_(src),
|
||||
bcs_(bcs),
|
||||
//src_(src),
|
||||
//bcs_(bcs),
|
||||
gravity_(gravity),
|
||||
psolver_(grid, props, rock_comp_props, linsolver,
|
||||
param.getDefault("nl_pressure_residual_tolerance", 0.0),
|
||||
|
@ -118,7 +118,7 @@ namespace Opm
|
||||
void connect_timestep (T& t);
|
||||
|
||||
private:
|
||||
class Impl;
|
||||
struct Impl;
|
||||
// Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl.
|
||||
boost::shared_ptr<Impl> pimpl_;
|
||||
|
||||
|
@ -139,7 +139,7 @@ spu_implicit(struct UnstructuredGrid *g, double *s0, double *s, double h, double
|
||||
double infnorm;
|
||||
double *b;
|
||||
double *x;
|
||||
char *work;
|
||||
double *work;
|
||||
double *mob, *dmob;
|
||||
int i;
|
||||
int it;
|
||||
@ -277,12 +277,12 @@ phase_upwind_mobility(double darcyflux, double gravityflux, int i, int c,
|
||||
void
|
||||
spu_implicit_assemble(struct UnstructuredGrid *g, double *s0, double *s, double *mob, double *dmob,
|
||||
double *dflux, double *gflux, double *src, double dt, sparse_t *S,
|
||||
double *b, char *work)
|
||||
double *b, double *work)
|
||||
{
|
||||
int i, k, f, c1, c2, c;
|
||||
int nc = g->number_of_cells;
|
||||
|
||||
double *m = (double*)work;
|
||||
double *m = (double*) work;
|
||||
double *dm = m + 2;
|
||||
int *cix = (int*)(dm + 2);
|
||||
double m1, m2, dm1, dm2, mt2;
|
||||
|
@ -19,7 +19,7 @@ typedef struct Sparse {
|
||||
void
|
||||
spu_implicit_assemble(struct UnstructuredGrid *g, double *s0, double *s, double *mob, double *dmob,
|
||||
double *dflux, double *gflux, double *src, double dt, sparse_t *S,
|
||||
double *b, char *work);
|
||||
double *b, double *work);
|
||||
|
||||
double
|
||||
spu_implicit(struct UnstructuredGrid *g, double *s0, double *s, double h, double x0, int ntab, double *tab,
|
||||
|
Loading…
Reference in New Issue
Block a user