Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kirill Terekhov
INMOST
Commits
911013ed
Commit
911013ed
authored
Nov 02, 2016
by
tgaripov
Browse files
Fixes for gcc
parent
52d28d52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/Headers/inmost_variable.h
View file @
911013ed
...
...
@@ -527,7 +527,7 @@ namespace INMOST
/// Build an expression associated with variable expression on provided element e.
multivar_expression
operator
[](
const
Storage
&
e
)
const
{
if
(
isPrivate
Marker
(
marker
)
?
e
->
GetPrivateMarker
(
marker
)
:
e
->
GetMarker
(
marker
)
)
if
(
isPrivate
(
marker
)
?
e
->
GetPrivateMarker
(
marker
)
:
e
->
GetMarker
(
marker
)
)
return
ArgA
[
e
];
else
return
ArgB
[
e
];
}
...
...
Source/IO/mesh_ecl_file.cpp
View file @
911013ed
...
...
@@ -1169,7 +1169,7 @@ ecl_exit_loop:
for
(
int
l
=
0
;
l
<
num
;
++
l
)
pillar_node_number
[
l
]
=
itemporary
[
indices_sort
[
l
]];
for
(
int
l
=
0
;
l
<
num
;
++
l
)
rtemporary
[
l
]
=
pillar_node_depth
[
l
];
for
(
int
l
=
0
;
l
<
num
;
++
l
)
pillar_node_depth
[
l
]
=
rtemporary
[
indices_sort
[
l
]];
assert
(
std
::
is_sorted
(
&
pillar_node_depth
[
0
],
&
pillar_node_depth
[
num
]));
//
assert(std::is_sorted(&pillar_node_depth[0],&pillar_node_depth[num]));
//retrive pillar info
xmin
=
xyz
[
ECL_IJK_COORDS
(
i
,
j
,
0
,
0
)];
xmax
=
xyz
[
ECL_IJK_COORDS
(
i
,
j
,
1
,
0
)];
...
...
@@ -1263,7 +1263,7 @@ ecl_exit_loop:
//then e array
for
(
int
l
=
0
;
l
<
(
int
)
e
.
size
();
++
l
)
itemporary
[
l
]
=
e
[
l
];
for
(
int
l
=
0
;
l
<
(
int
)
e
.
size
();
++
l
)
e
[
l
]
=
itemporary
[
indices_sort
[
l
]];
assert
(
std
::
is_sorted
(
b
.
begin
(),
b
.
end
()));
//
assert(std::is_sorted(b.begin(),b.end()));
}
//l
//create edges
ElementArray
<
Edge
>
&
p_edges
=
pillar_edges
[
i
*
(
dims
[
1
]
+
1
)
+
j
];
...
...
@@ -1325,7 +1325,7 @@ ecl_exit_loop:
//then e array
for
(
int
l
=
0
;
l
<
(
int
)
e
.
size
();
++
l
)
itemporary
[
l
]
=
e
[
l
];
for
(
int
l
=
0
;
l
<
(
int
)
e
.
size
();
++
l
)
e
[
l
]
=
itemporary
[
indices_sort
[
l
]];
assert
(
std
::
is_sorted
(
b
.
begin
(),
b
.
end
()));
//
assert(std::is_sorted(b.begin(),b.end()));
}
//find out who shares each node along the pillar
for
(
int
l
=
0
;
l
<
num_nodes
;
++
l
)
...
...
@@ -1590,7 +1590,7 @@ ecl_exit_loop:
//then e array
for
(
int
l
=
0
;
l
<
(
int
)
e
.
size
();
++
l
)
temporary
[
l
]
=
e
[
l
];
for
(
int
l
=
0
;
l
<
(
int
)
e
.
size
();
++
l
)
e
[
l
]
=
temporary
[
indices_sort
[
l
]];
assert
(
std
::
is_sorted
(
b
.
begin
(),
b
.
end
()));
//
assert(std::is_sorted(b.begin(),b.end()));
}
//add vertical edges along pillars
ElementArray
<
Edge
>
&
p0_edges
=
pillar_edges
[(
i
+
0
)
*
(
dims
[
1
]
+
1
)
+
j
+
0
];
...
...
@@ -1753,7 +1753,7 @@ ecl_exit_loop:
{
//move marked edges to the end
std
::
sort
(
bedges
.
begin
(),
bedges
.
end
(),
Mesh
::
PrivateMarkerComparator
(
this
,
outer
));
assert
(
std
::
is_sorted
(
bedges
.
begin
(),
bedges
.
end
(),
Mesh
::
PrivateMarkerComparator
(
this
,
outer
)));
//
assert(std::is_sorted(bedges.begin(),bedges.end(),Mesh::PrivateMarkerComparator(this,outer)));
if
(
print_bedges
)
{
std
::
cout
<<
(
m
?
"front "
:
"back "
)
<<
"depth "
<<
k
<<
" block "
<<
ECL_IJK_DATA
(
blocki
[
m
],
blockj
[
m
],
k
)
<<
" edges ["
<<
bedges
.
size
()
<<
"]:"
<<
std
::
endl
;
...
...
@@ -2463,4 +2463,4 @@ ecl_exit_loop:
}
//LoadECL
}
//namespace
#endif
\ No newline at end of file
#endif
Source/IO/mesh_vtk_file.cpp
View file @
911013ed
...
...
@@ -27,10 +27,10 @@
#define R_QUIT 100
static
int
isnan
(
double
x
)
{
return
x
!=
x
;
}
static
int
__
isnan
__
(
double
x
)
{
return
x
!=
x
;
}
//static int isinf(double x) { return !isnan(x) && isnan(x - x); }
static
int
isinf
(
double
x
)
{
return
fabs
(
x
)
>
DBL_MAX
;
}
static
int
isbad
(
double
x
)
{
return
isnan
(
x
)
||
isinf
(
x
);
}
static
int
__
isinf
__
(
double
x
)
{
return
fabs
(
x
)
>
DBL_MAX
;
}
static
int
__
isbad
(
double
x
)
{
return
__
isnan
__
(
x
)
||
__
isinf
__
(
x
);
}
template
<
typename
T
>
void
ReadCoords
(
FILE
*
f
,
INMOST_DATA_REAL_TYPE
c
[
3
])
...
...
@@ -352,7 +352,7 @@ safe_output:
for
(
unsigned
int
m
=
0
;
m
<
comps
;
m
++
)
{
double
val
=
static_cast
<
double
>
(
arr
[
m
]);
fprintf
(
f
,
"%14e "
,
isbad
(
val
)
?
-
0.9999E30
:
val
);
fprintf
(
f
,
"%14e "
,
__
isbad
(
val
)
?
-
0.9999E30
:
val
);
}
}
else
for
(
unsigned
int
m
=
0
;
m
<
comps
;
m
++
)
fprintf
(
f
,
"%14e "
,
-
0.9999E30
);
...
...
@@ -379,7 +379,7 @@ safe_output:
for
(
unsigned
int
m
=
0
;
m
<
comps
;
m
++
)
{
double
val
=
static_cast
<
double
>
(
arr
[
m
].
GetValue
());
fprintf
(
f
,
"%14e "
,
isbad
(
val
)
?
-
0.9999E30
:
val
);
fprintf
(
f
,
"%14e "
,
__
isbad
(
val
)
?
-
0.9999E30
:
val
);
}
}
else
for
(
unsigned
int
m
=
0
;
m
<
comps
;
m
++
)
fprintf
(
f
,
"%14e "
,
-
0.9999E30
);
...
...
@@ -429,7 +429,7 @@ safe_output:
for
(
unsigned
int
m
=
0
;
m
<
comps
;
m
++
)
{
double
val
=
static_cast
<
double
>
(
arr
[
m
].
GetValue
());
fprintf
(
f
,
"%14e "
,
isbad
(
val
)
?
-
0.9999E30
:
val
);
fprintf
(
f
,
"%14e "
,
__
isbad
(
val
)
?
-
0.9999E30
:
val
);
}
}
else
for
(
unsigned
int
m
=
0
;
m
<
comps
;
m
++
)
fprintf
(
f
,
"%14e "
,
-
0.9999E30
);
...
...
@@ -494,7 +494,7 @@ safe_output:
for
(
unsigned
int
m
=
0
;
m
<
comps
;
m
++
)
{
double
val
=
static_cast
<
double
>
(
arr
[
m
]);
fprintf
(
f
,
"%14e "
,(
isbad
(
val
)
?
-
0.9999E30
:
val
));
fprintf
(
f
,
"%14e "
,(
__
isbad
(
val
)
?
-
0.9999E30
:
val
));
}
fprintf
(
f
,
"
\n
"
);
}
...
...
@@ -513,7 +513,7 @@ safe_output:
for
(
unsigned
int
m
=
0
;
m
<
comps
;
m
++
)
{
double
val
=
static_cast
<
double
>
(
arr
[
m
].
GetValue
());
fprintf
(
f
,
"%14e "
,(
isbad
(
val
)
?
-
0.9999E30
:
val
));
fprintf
(
f
,
"%14e "
,(
__
isbad
(
val
)
?
-
0.9999E30
:
val
));
}
fprintf
(
f
,
"
\n
"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment