Dear DuMux,

I generally used CO2model for my simulations. Inside this model I added a 
function that calculates the advective flux across different layers Alexander 
sent me kindly this function (attached files) and it works perfectly when I use 
CO2model.
I recently tried to run the same simulations but using CO2ni model. When I 
compile my code I receive this error :

test_boxco2ni.cc:76:58:   required from here
heterogeneousproblemni.hh:309:9: error: no matching function for call to 
'Dumux::CO2NIModel<Dumux::Properties::TTag::HeterogeneousNIBoxProblem>:: 
calculateFluxAcrossLayer (Dune::FieldVector<double, 2>&, int, double)'
         this->model().calculateFluxAcrossLayer (fA, 2, 206.5);
         ^
heterogeneousproblemni.hh:309:9: note: candidate is:
In file included from ../../../dumux/implicit/co2ni/co2nimodel.hh:27:0,
                 from heterogeneousproblemni.hh:30,
                 from test_boxco2ni.cc:25:
../../../dumux/implicit/co2/co2model.hh:181:8: note: void 
Dumux::CO2Model<TypeTag>:: calculateFluxAcrossLayer 
(Dumux::CO2Model<TypeTag>::PrimaryVariables&, int, 
Dumux::CO2Model<TypeTag>::Scalar) [with TypeTag = 
Dumux::Properties::TTag::HeterogeneousNIBoxProblem; 
Dumux::CO2Model<TypeTag>::PrimaryVariables = Dune::FieldVector<double, 3>; 
Dumux::CO2Model<TypeTag>::Scalar = double]
   void calculateFluxAcrossLayer (PrimaryVariables &flux, int coord,
        ^
../../../dumux/implicit/co2/co2model.hh:181:8: note:   no known conversion for 
argument 1 from 'Dune::FieldVector<double, 2>' to 
'Dumux::CO2Model<Dumux::Properties::TTag::HeterogeneousNIBoxProblem>::PrimaryVariables&
 {aka Dune::FieldVector<double, 3>&}'

I think CO2nimodel is derived from CO2model and therefore, we have access to 
all functions in this model.  So I can call calculateFluxAcrossLayer in my code 
at the end of each timestep in the following  manner:

void postTimeStep()
    {
        Dune::FieldVector<Scalar, 2> fA(0.0);
        this->model().calculateFluxAcrossLayer (fA, 2, 206.5);
    }

Can you please help me with this problem?

Best regards
Ali Nowamooz

Attachment: eco2model.hh
Description: eco2model.hh

Attachment: eco2problem.hh
Description: eco2problem.hh

_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to