@@ -294,15 +294,15 @@ end
294294function setup_submodels (inputparams:: MatlabInputParams ;
295295 use_groups:: Bool = false ,
296296 use_p2d:: Bool = true ,
297- general_ad:: Bool = false ,
297+ general_ad:: Bool = true ,
298298 kwarg... )
299299
300300 include_cc = include_current_collectors (inputparams)
301301
302302 function setup_component (obj:: Dict ,
303- sys,
304- bcfaces = nothing ,
305- general_ad :: Bool = false )
303+ sys,
304+ general_ad :: Bool ,
305+ bcfaces = nothing )
306306
307307 domain = exported_model_to_domain (obj, bcfaces = bcfaces, general_ad= general_ad)
308308 G = MRSTWrapMesh (obj[" G" ])
@@ -362,9 +362,9 @@ function setup_submodels(inputparams::MatlabInputParams;
362362
363363 if ! include_cc && name == :NeAm
364364 bcfaces = convert_to_int_vector (inputparams_co[" externalCouplingTerm" ][" couplingfaces" ])
365- model_am = setup_component (inputparams_co, sys_am, bcfaces, general_ad )
365+ model_am = setup_component (inputparams_co, sys_am, general_ad, bcfaces )
366366 else
367- model_am = setup_component (inputparams_co, sys_am, nothing , general_ad )
367+ model_am = setup_component (inputparams_co, sys_am, general_ad, nothing )
368368 end
369369
370370 return model_am
@@ -386,7 +386,7 @@ function setup_submodels(inputparams::MatlabInputParams;
386386
387387 bcfaces = convert_to_int_vector (inputparams_necc[" externalCouplingTerm" ][" couplingfaces" ])
388388
389- model_necc = setup_component (inputparams_necc, sys_necc, bcfaces, general_ad )
389+ model_necc = setup_component (inputparams_necc, sys_necc, general_ad, bcfaces )
390390
391391
392392 end
@@ -422,7 +422,7 @@ function setup_submodels(inputparams::MatlabInputParams;
422422
423423 elyte = Electrolyte (params)
424424 model_elyte = setup_component (inputparams[" Electrolyte" ],
425- elyte, nothing , general_ad )
425+ elyte, general_ad, nothing )
426426
427427 # #############
428428 # Setup PeAm #
@@ -444,7 +444,7 @@ function setup_submodels(inputparams::MatlabInputParams;
444444 sys_pecc = CurrentCollector (pecc_params)
445445
446446
447- model_pecc = setup_component (inputparams_pecc, sys_pecc, nothing , general_ad )
447+ model_pecc = setup_component (inputparams_pecc, sys_pecc, general_ad, nothing )
448448
449449 end
450450
@@ -723,7 +723,7 @@ function setup_initial_state(inputparams::MatlabInputParams,
723723end
724724
725725function exported_model_to_domain (exported; bcfaces = nothing ,
726- general_ad = false )
726+ general_ad = true )
727727
728728 """ Returns domain"""
729729
0 commit comments