2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								/////////////////////////////////////////////////////////////////////////////////
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//
 
							 
						 
					
						
							
								
									
										
										
										
											2014-09-23 15:04:57 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								//  Copyright (C) 2011-     Statoil ASA
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  Copyright (C) 2013-     Ceetron Solutions AS
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  Copyright (C) 2011-2012 Ceetron AS
 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  ResInsight is free software: you can redistribute it and/or modify
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  it under the terms of the GNU General Public License as published by
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  the Free Software Foundation, either version 3 of the License, or
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  (at your option) any later version.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  FITNESS FOR A PARTICULAR PURPOSE.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//  for more details.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/////////////////////////////////////////////////////////////////////////////////
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 13:36:15 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  "RimEclipseWellCollection.h" 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-10-01 11:13:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  "RiaApplication.h" 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# include  "RiaPreferences.h" 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-07-24 10:11:43 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  "RigSingleWellResultsData.h" 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-05-21 10:34:38 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  "RimEclipseView.h" 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 13:36:15 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  "RimEclipseWell.h" 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-07-24 10:11:43 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  "RivReservoirViewPartMgr.h" 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-05-06 10:55:00 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								namespace  caf 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    template < > 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    void  RimEclipseWellCollection : : WellVisibilityEnum : : setUp ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : PIPES_FORCE_ALL_OFF ,        " FORCE_ALL_OFF " ,       " All Off " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : PIPES_INDIVIDUALLY ,         " ALL_ON " ,              " Individual " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : PIPES_OPEN_IN_VISIBLE_CELLS , " OPEN_IN_VISIBLE_CELLS " ,  " Visible cells filtered " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : PIPES_FORCE_ALL_ON ,         " FORCE_ALL_ON " ,        " All On " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-22 09:13:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								namespace  caf 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    template < > 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    void  RimEclipseWellCollection : : WellCellsRangeFilterEnum : : setUp ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-22 09:13:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : RANGE_ADD_NONE ,        " FORCE_ALL_OFF " ,       " All Off " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : RANGE_ADD_INDIVIDUAL ,  " ALL_ON " ,              " Individually " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : RANGE_ADD_ALL ,         " FORCE_ALL_ON " ,        " All On " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								namespace  caf 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    template < > 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    void  RimEclipseWellCollection : : WellFenceEnum : : setUp ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : K_DIRECTION ,  " K_DIRECTION " ,     " K - Direction " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : J_DIRECTION ,  " J_DIRECTION " ,     " J - Direction " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : I_DIRECTION ,  " I_DIRECTION " ,     " I - Direction " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        setDefault ( RimEclipseWellCollection : : K_DIRECTION ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 21:56:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								namespace  caf 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    template < > 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    void  RimEclipseWellCollection : : WellHeadPositionEnum : : setUp ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 21:56:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : WELLHEAD_POS_ACTIVE_CELLS_BB ,     " WELLHEAD_POS_ACTIVE_CELLS_BB " ,  " Top of active cells BB " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        addItem ( RimEclipseWellCollection : : WELLHEAD_POS_TOP_COLUMN ,          " WELLHEAD_POS_TOP_COLUMN " ,       " Top of active cells IJ-column " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        setDefault ( RimEclipseWellCollection : : WELLHEAD_POS_TOP_COLUMN ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 21:56:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								CAF_PDM_SOURCE_INIT ( RimEclipseWellCollection ,  " Wells " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								RimEclipseWellCollection : : RimEclipseWellCollection ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-10 08:00:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitObject ( " Simulation Wells " ,  " :/WellCollection.png " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 21:56:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & isActive ,               " Active " ,         true ,    " Active " ,  " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-05 13:27:36 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    isActive . uiCapability ( ) - > setUiHidden ( true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-25 09:07:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & showWellHead ,         " ShowWellHead " ,      true ,    " Show well heads " ,  " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-24 10:38:50 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & showWellLabel ,        " ShowWellLabel " ,     true ,    " Show well labels " ,  " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & wellHeadScaleFactor ,  " WellHeadScale " ,     1.0 ,     " Well head scale " ,  " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 21:56:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & wellHeadPosition ,     " WellHeadPosition " ,  WellHeadPositionEnum ( WELLHEAD_POS_TOP_COLUMN ) ,  " Well head position " ,   " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-10-01 11:13:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    cvf : : Color3f  defWellLabelColor  =  RiaApplication : : instance ( ) - > preferences ( ) - > defaultWellLabelColor ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & wellLabelColor ,       " WellLabelColor " ,    defWellLabelColor ,  " Well label color " ,   " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-04-30 14:55:59 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & wellPipeVisibility ,   " GlobalWellPipeVisibility " ,  WellVisibilityEnum ( PIPES_OPEN_IN_VISIBLE_CELLS ) ,  " Global well pipe visibility " ,   " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-26 16:10:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-04-24 10:38:50 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & pipeRadiusScaleFactor ,        " WellPipeRadiusScale " ,     0.1 ,                         " Pipe radius scale " ,  " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-26 16:10:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & pipeCrossSectionVertexCount ,  " WellPipeVertexCount " ,  12 ,  " Pipe vertex count " ,  " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-05 13:27:36 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    pipeCrossSectionVertexCount . uiCapability ( ) - > setUiHidden ( true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-04-22 09:13:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & wellCellsToRangeFilterMode ,   " GlobalWellCellVisibility " ,  WellCellsRangeFilterEnum ( RANGE_ADD_NONE ) ,   " Add cells to range filter " ,  " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-24 10:38:50 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & showWellCellFences ,   " ShowWellFences " ,            false ,                               " Use well fence " ,  " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & wellCellFenceType ,    " DefaultWellFenceDirection " ,  WellFenceEnum ( K_DIRECTION ) ,         " Well Fence direction " ,  " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & wellCellTransparencyLevel ,  " WellCellTransparency " ,  0.5 ,  " Well cell transparency " ,  " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-06-26 16:10:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitField ( & isAutoDetectingBranches ,  " IsAutoDetectingBranches " ,  true ,  " Geometry based branch detection " ,  " " ,  " Toggle wether the well pipe visualization will try to detect when a part of the well  \n is really a branch, and thus is starting from wellhead " ,  " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    CAF_PDM_InitFieldNoDefault ( & wells ,  " Wells " ,  " Wells " ,   " " ,  " " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-10 08:00:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    wells . uiCapability ( ) - > setUiHidden ( true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    m_reservoirView  =  NULL ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								RimEclipseWellCollection : : ~ RimEclipseWellCollection ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-26 16:10:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								   wells . deleteAllChildObjects ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								RimEclipseWell *  RimEclipseWellCollection : : findWell ( QString  name ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    for  ( size_t  i  =  0 ;  i  <  this - > wells ( ) . size ( ) ;  + + i ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( this - > wells ( ) [ i ] - > name ( )  = =  name ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            return  this - > wells ( ) [ i ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  NULL ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								bool  RimEclipseWellCollection : : hasVisibleWellCells ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 21:56:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( ! this - > isActive ( ) )  return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-22 09:13:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( this - > wellCellsToRangeFilterMode ( )  = =  RANGE_ADD_NONE )  return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    if  ( this - > wells ( ) . size ( )  = =  0  )  return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    bool  hasCells  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    for  ( size_t  i  =  0  ;  ! hasCells  & &  i  <  this - > wells ( ) . size ( ) ;  + + i ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:08:00 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        RimEclipseWell *  well  =  this - > wells ( ) [ i ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-09-06 15:45:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        if  (  well  & &  well - > wellResults ( )  & &  ( ( well - > showWell ( )  & &  well - > showWellCells ( ) )  | |  this - > wellCellsToRangeFilterMode ( )  = =  RANGE_ADD_ALL )  ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            for  ( size_t  tIdx  =  0 ;  ! hasCells  & &   tIdx  <  well - > wellResults ( ) - > m_wellCellsTimeSteps . size ( ) ;  + + tIdx  ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                const  RigWellResultFrame &  wellResultFrame  =  well - > wellResults ( ) - > m_wellCellsTimeSteps [ tIdx ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                for  ( size_t  wsIdx  =  0 ;  ! hasCells  & &   wsIdx  <  wellResultFrame . m_wellResultBranches . size ( ) ;  + + wsIdx ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                { 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 14:03:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    if  ( wellResultFrame . m_wellResultBranches [ wsIdx ] . m_branchResultPoints . size ( )  >  0   )  hasCells  =  true ;  
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( ! hasCells )  return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-04-22 09:13:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( this - > wellCellsToRangeFilterMode ( )  = =  RANGE_ADD_INDIVIDUAL  | |  this - > wellCellsToRangeFilterMode ( )  = =  RANGE_ADD_ALL )  return  true ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    // Todo: Handle range filter intersection
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// Used to know if we need animation of timesteps due to the wells
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								bool  RimEclipseWellCollection : : hasVisibleWellPipes ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 21:56:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( ! this - > isActive ( ) )  return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-22 09:13:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( this - > wellPipeVisibility ( )  = =  PIPES_FORCE_ALL_OFF )  return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    if  ( this - > wells ( ) . size ( )  = =  0  )  return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-22 09:13:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( this - > wellPipeVisibility ( )  = =  PIPES_FORCE_ALL_ON )  return  true ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								void  RimEclipseWellCollection : : fieldChangedByUi ( const  caf : : PdmFieldHandle *  changedField ,  const  QVariant &  oldValue ,  const  QVariant &  newValue ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 21:56:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( & showWellLabel  = =  changedField  | |  & isActive  = =  changedField ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
									
										
										
										
											2014-08-01 13:35:52 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        this - > updateUiIconFromToggleField ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-25 11:09:34 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        if  ( m_reservoirView )  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-18 13:09:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleGeometryRegen ( VISIBLE_WELL_CELLS ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-09-08 22:59:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleCreateDisplayModelAndRedraw ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-22 09:13:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( & wellCellsToRangeFilterMode  = =  changedField ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( m_reservoirView )  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-18 13:09:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleGeometryRegen ( VISIBLE_WELL_CELLS ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-09-08 22:59:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleCreateDisplayModelAndRedraw ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else  if  ( & showWellCellFences  = =  changedField ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( m_reservoirView )  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        {    
							 
						 
					
						
							
								
									
										
										
										
											2015-06-18 13:09:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleGeometryRegen ( VISIBLE_WELL_CELLS ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-09-08 22:59:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleCreateDisplayModelAndRedraw ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else  if  ( & wellCellTransparencyLevel  = =  changedField ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( m_reservoirView )  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        {    
							 
						 
					
						
							
								
									
										
										
										
											2013-09-08 22:59:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleCreateDisplayModelAndRedraw ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else  if  ( & wellCellFenceType  = =  changedField ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( m_reservoirView )  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        {    
							 
						 
					
						
							
								
									
										
										
										
											2015-06-18 13:09:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleGeometryRegen ( VISIBLE_WELL_CELLS ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-09-08 22:59:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleCreateDisplayModelAndRedraw ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else  if  ( & wellPipeVisibility  = =  changedField ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( m_reservoirView )  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        {    
							 
						 
					
						
							
								
									
										
										
										
											2013-09-08 22:59:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleCreateDisplayModelAndRedraw ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-26 16:10:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    else  if  (   & pipeCrossSectionVertexCount  = =  changedField  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            | |  & pipeRadiusScaleFactor  = =  changedField  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            | |  & wellHeadScaleFactor  = =  changedField  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            | |  & showWellHead  = =  changedField 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 21:56:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            | |  & isAutoDetectingBranches  = =  changedField 
							 
						 
					
						
							
								
									
										
										
										
											2013-10-01 11:13:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            | |  & wellHeadPosition  = =  changedField 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            | |  & wellLabelColor  = =  changedField ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( m_reservoirView )  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            m_reservoirView - > schedulePipeGeometryRegen ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-09-08 22:59:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            m_reservoirView - > scheduleCreateDisplayModelAndRedraw ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								void  RimEclipseWellCollection : : setReservoirView ( RimEclipseView *  ownerReservoirView ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-18 09:45:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    m_reservoirView  =  ownerReservoirView ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-24 10:38:50 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								void  RimEclipseWellCollection : : defineUiOrdering ( QString  uiConfigName ,  caf : : PdmUiOrdering &  uiOrdering ) 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-24 10:38:50 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2013-10-23 15:51:30 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    caf : : PdmUiGroup *  filterGroup  =  uiOrdering . addNewGroup ( " Well range filter " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-24 10:38:50 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    filterGroup - > add ( & wellCellsToRangeFilterMode ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    filterGroup - > add ( & showWellCellFences ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    filterGroup - > add ( & wellCellFenceType ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    caf : : PdmUiGroup *  wellHeadGroup  =  uiOrdering . addNewGroup ( " Well head " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    wellHeadGroup - > add ( & showWellHead ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    wellHeadGroup - > add ( & wellHeadScaleFactor ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    wellHeadGroup - > add ( & showWellLabel ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-09-06 15:45:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    wellHeadGroup - > add ( & wellHeadPosition ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-10-01 11:13:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    wellHeadGroup - > add ( & wellLabelColor ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-24 10:38:50 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    caf : : PdmUiGroup *  wellPipe  =  uiOrdering . addNewGroup ( " Well pipe " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    wellPipe - > add ( & wellPipeVisibility ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    wellPipe - > add ( & pipeRadiusScaleFactor ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-04-25 06:33:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    caf : : PdmUiGroup *  advancedGroup  =  uiOrdering . addNewGroup ( " Advanced " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    advancedGroup - > add ( & wellCellTransparencyLevel ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    advancedGroup - > add ( & isAutoDetectingBranches ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-24 10:38:50 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-25 09:07:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								caf : : PdmFieldHandle *  RimEclipseWellCollection : : objectToggleField ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-25 09:07:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-26 21:56:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  & isActive ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-25 11:09:34 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-04-26 16:46:38 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  std : : vector < cvf : : ubyte > &  RimEclipseWellCollection : : isWellPipesVisible ( size_t  frameIndex ) 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-26 16:46:38 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    calculateIsWellPipesVisible ( frameIndex ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  m_isWellPipesVisible [ frameIndex ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								void  RimEclipseWellCollection : : scheduleIsWellPipesVisibleRecalculation ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-26 16:46:38 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    m_isWellPipesVisible . clear ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								/// 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//--------------------------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-25 12:09:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								void  RimEclipseWellCollection : : calculateIsWellPipesVisible ( size_t  frameIndex ) 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-26 16:46:38 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( m_isWellPipesVisible . size ( )  >  frameIndex  & &  m_isWellPipesVisible [ frameIndex ] . size ( ) )  return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( m_isWellPipesVisible . size ( )  < =  frameIndex ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        m_isWellPipesVisible . resize ( frameIndex + 1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( m_isWellPipesVisible [ frameIndex ] . size ( )  < =  wells ( ) . size ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        m_isWellPipesVisible [ frameIndex ] . resize ( wells ( ) . size ( ) ,  false ) ;  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    for  ( size_t  i  =  0 ;  i  <  wells ( ) . size ( ) ;  + + i ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        m_isWellPipesVisible [ frameIndex ] [ i ]  =  wells [ i ] - > calculateWellPipeVisibility ( frameIndex ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								}