Skip to content

Commit

Permalink
Use c++ value semantics for nodes in smspec
Browse files Browse the repository at this point in the history
  • Loading branch information
joakim-hove committed Nov 27, 2018
1 parent 1752277 commit c123416
Show file tree
Hide file tree
Showing 29 changed files with 1,217 additions and 1,078 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ endif()
# Treat warnings as errors if not on Windows
if (NOT ERT_WINDOWS)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wno-unknown-pragmas ")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas -Wno-unused-result -Wno-unused-parameter" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wfatal-errors -Wall -Wno-unknown-pragmas -Wno-unused-result -Wno-unused-parameter" )
endif()

if (MSVC)
Expand Down
10 changes: 5 additions & 5 deletions applications/ecl/sum_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ int main( int argc , char ** argv) {

/*
The return value from the ecl_sum_add_var() function is an
ecl::smspec_node_type instance (implemented in file smspec_node.c);
ecl::smspec_node instance (implemented in file smspec_node.c);
which is essentially a struct holding header information about
this varible. There are several options on how to handle the
return value from the ecl_sum_add_var() function; which affect how
Expand All @@ -243,8 +243,8 @@ int main( int argc , char ** argv) {
*/

ecl::smspec_node_type * wwct_wellx = ecl_sum_add_var( ecl_sum , "WWCT" , NULL , 0 , "(1)" , 0.0);
ecl::smspec_node_type * wopr_wellx = ecl_sum_add_var( ecl_sum , "WOPR" , NULL , 0 , "Barrels" , 0.0);
const ecl::smspec_node * wwct_wellx = ecl_sum_add_var( ecl_sum , "WWCT" , NULL , 0 , "(1)" , 0.0);
const ecl::smspec_node * wopr_wellx = ecl_sum_add_var( ecl_sum , "WOPR" , NULL , 0 , "Barrels" , 0.0);


{
Expand Down Expand Up @@ -297,8 +297,8 @@ int main( int argc , char ** argv) {
We can use the smspec_node value from the
ecl_sum_add_var() function directly:
*/
ecl_sum_tstep_set_from_node( tstep , wwct_wellx , sim_days );
ecl_sum_tstep_set_from_node( tstep, wopr_wellx, sim_days * 100);
ecl_sum_tstep_set_from_node( tstep , *wwct_wellx , sim_days );
ecl_sum_tstep_set_from_node( tstep, *wopr_wellx, sim_days * 100);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion bin/summary_resample
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ else:
end_time = input_case.get_end_time()
time_points = TimeVector.create_linear(CTime(start_time), CTime(end_time), args.num_timestep)


sys.stderr.write("The summary_resample code is partly broken as of October 24.th 2018. Should be fixed\n")
output_case = input_case.resample(args.output_case, time_points)
output_case.fwrite( )
Loading

0 comments on commit c123416

Please sign in to comment.