mirror of
				https://github.com/OPM/opm-simulators.git
				synced 2025-02-25 18:55:30 -06:00 
			
		
		
		
	Ensure non-null model in constructor.
This commit is contained in:
		@@ -37,6 +37,9 @@ namespace Opm
 | 
			
		||||
          nonlinearIterationsLast_(0),
 | 
			
		||||
          linearIterationsLast_(0)
 | 
			
		||||
    {
 | 
			
		||||
        if (!model_) {
 | 
			
		||||
            OPM_THROW(std::logic_error, "Must provide a non-null model argument for NonlinearSolver.");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    template <class PhysicalModel>
 | 
			
		||||
@@ -54,7 +57,6 @@ namespace Opm
 | 
			
		||||
    template <class PhysicalModel>
 | 
			
		||||
    const PhysicalModel& NonlinearSolver<PhysicalModel>::model() const
 | 
			
		||||
    {
 | 
			
		||||
        assert( model_ );
 | 
			
		||||
        return *model_;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user