This resolves an incompatibility when using conservative transport and a physics scheme. The conservative transport needs a mass weighted (multiplied by density) form of the mass and transport terms, whilst a physics scheme does not use these. To resolve this, we introduce a mass_weighted label. When there is a term with both transport and mass_weighted labels, then we firstly check if there is a physics scheme, and raise an error if so (this means we are solving all the terms at once, when we need to split the transport and physics e.g. use SplitPrescribedTransport instead of PrescribedTransport). Else, we replace the terms with their mass-weighted counterparts to enable conservative transport.
A test of this functionality is added in the integration-tests/model/test_coupled_transport_with_physics.py file.
This resolves an incompatibility when using conservative transport and a physics scheme. The conservative transport needs a mass weighted (multiplied by density) form of the mass and transport terms, whilst a physics scheme does not use these. To resolve this, we introduce a mass_weighted label. When there is a term with both transport and mass_weighted labels, then we firstly check if there is a physics scheme, and raise an error if so (this means we are solving all the terms at once, when we need to split the transport and physics e.g. use SplitPrescribedTransport instead of PrescribedTransport). Else, we replace the terms with their mass-weighted counterparts to enable conservative transport. A test of this functionality is added in the integration-tests/model/test_coupled_transport_with_physics.py file.