mirror of
				https://github.com/OPM/opm-simulators.git
				synced 2025-02-25 18:55:30 -06:00 
			
		
		
		
	Refactored parts needed for Blackoil in autodiff to get rid of UG dependency.
This patch refactors (hopefully) all parts of opm-core that are needed by the fully implicite black oil solver in opm-autodiff and that inherently relied on UnstructuredGrid. We added a new simple grid interface consisting out of free functions that will allow us to use CpGrid without copying it to an UnstructuredGrid by the means of the GridAdapter. Using this interface we have add methods that allow specifying the grid information (global_cell, cartdims, etc.) wherever possible to prevent introducing grid parameters for the type of the grid. Unfortunately this was not possible everywhere.
This commit is contained in:
		@@ -43,6 +43,16 @@ namespace Opm
 | 
			
		||||
        void init(const EclipseGridParser& deck,
 | 
			
		||||
                  const UnstructuredGrid& grid);
 | 
			
		||||
 | 
			
		||||
        /// Initialize from deck and cell mapping.
 | 
			
		||||
        /// \param  deck            Deck input parser
 | 
			
		||||
        /// \param  number_of_cells The number of cells in the grid.
 | 
			
		||||
        /// \param  global_cell     The mapping fom local to global cell indices.
 | 
			
		||||
        ///                         global_cell[i] is the corresponding global index of i.
 | 
			
		||||
        /// \param  cart_dims       The size of the underlying cartesian grid.
 | 
			
		||||
        void init(const EclipseGridParser& deck,
 | 
			
		||||
                  int number_of_cells, const int* global_cell,
 | 
			
		||||
                  const int* cart_dims);
 | 
			
		||||
        
 | 
			
		||||
        /// \return   D, the number of spatial dimensions. Always 3 for deck input.
 | 
			
		||||
        int numDimensions() const
 | 
			
		||||
        {
 | 
			
		||||
@@ -71,9 +81,12 @@ namespace Opm
 | 
			
		||||
 | 
			
		||||
    private:
 | 
			
		||||
        void assignPorosity(const EclipseGridParser& parser,
 | 
			
		||||
                            const UnstructuredGrid& grid);
 | 
			
		||||
                            int number_of_cells,
 | 
			
		||||
                            const int* global_cell);
 | 
			
		||||
        void assignPermeability(const EclipseGridParser& parser,
 | 
			
		||||
                                const UnstructuredGrid& grid,
 | 
			
		||||
                                int number_of_cells,
 | 
			
		||||
                                const int* global_cell,
 | 
			
		||||
                                const int* cart_dims,
 | 
			
		||||
                                const double perm_threshold);
 | 
			
		||||
 | 
			
		||||
        std::vector<double> porosity_;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user