diff --git a/ChemistryLib/ChemicalSolverInterface.h b/ChemistryLib/ChemicalSolverInterface.h index 3d5c45e79a74d4eff46affb3d9e733a0a8e6408f..50a123cf0a36635edf3a0d4fc847d07914fd7910 100644 --- a/ChemistryLib/ChemicalSolverInterface.h +++ b/ChemistryLib/ChemicalSolverInterface.h @@ -33,7 +33,7 @@ public: virtual void initializeChemicalSystemConcrete( std::vector<double> const& /*concentrations*/, GlobalIndexType const& /*chemical_system_id*/, - MaterialPropertyLib::Medium const* /*medium*/, + MaterialPropertyLib::Medium const& /*medium*/, ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/) { } diff --git a/ChemistryLib/PhreeqcIO.cpp b/ChemistryLib/PhreeqcIO.cpp index 0991c5b63afa6b4348a2cdf9db7618c5abb30390..a93dda604377772d05b0a7f273d14452be3d30de 100644 --- a/ChemistryLib/PhreeqcIO.cpp +++ b/ChemistryLib/PhreeqcIO.cpp @@ -70,21 +70,20 @@ void setAqueousSolution(std::vector<double> const& concentrations, template <typename Reactant> void initializeReactantMolality(Reactant& reactant, GlobalIndexType const& chemical_system_id, - MaterialPropertyLib::Medium const* medium, + MaterialPropertyLib::Medium const& medium, ParameterLib::SpatialPosition const& pos, double const t) { - auto const& solid_phase = medium->phase("Solid"); + auto const& solid_phase = medium.phase("Solid"); auto const& solid_constituent = solid_phase.component(reactant.name); - auto const& liquid_phase = medium->phase("AqueousLiquid"); + auto const& liquid_phase = medium.phase("AqueousLiquid"); if (solid_constituent.hasProperty( MaterialPropertyLib::PropertyType::molality)) { auto const molality = - solid_constituent - .property(MaterialPropertyLib::PropertyType::molality) + solid_constituent[MaterialPropertyLib::PropertyType::molality] .template initialValue<double>(pos, t); (*reactant.molality)[chemical_system_id] = molality; @@ -94,24 +93,23 @@ void initializeReactantMolality(Reactant& reactant, { auto const volume_fraction = solid_constituent - .property(MaterialPropertyLib::PropertyType::volume_fraction) - .template initialValue<double>(pos, t); + [MaterialPropertyLib::PropertyType::volume_fraction] + .template initialValue<double>(pos, t); (*reactant.volume_fraction)[chemical_system_id] = volume_fraction; (*reactant.volume_fraction_prev)[chemical_system_id] = volume_fraction; auto const fluid_density = - liquid_phase.property(MaterialPropertyLib::PropertyType::density) + liquid_phase[MaterialPropertyLib::PropertyType::density] .template initialValue<double>(pos, t); auto const porosity = - medium->property(MaterialPropertyLib::PropertyType::porosity) + medium[MaterialPropertyLib::PropertyType::porosity] .template initialValue<double>(pos, t); auto const molar_volume = - solid_constituent - .property(MaterialPropertyLib::PropertyType::molar_volume) + solid_constituent[MaterialPropertyLib::PropertyType::molar_volume] .template initialValue<double>(pos, t); (*reactant.molality)[chemical_system_id] = @@ -150,15 +148,14 @@ void setReactantMolality(Reactant& reactant, auto const& liquid_phase = medium->phase("AqueousLiquid"); auto const fluid_density = - liquid_phase.property(MaterialPropertyLib::PropertyType::density) + liquid_phase[MaterialPropertyLib::PropertyType::density] .template value<double>(vars, pos, t, dt); auto const porosity = std::get<double>( vars[static_cast<int>(MaterialPropertyLib::Variable::porosity)]); auto const molar_volume = - solid_constituent - .property(MaterialPropertyLib::PropertyType::molar_volume) + solid_constituent[MaterialPropertyLib::PropertyType::molar_volume] .template value<double>(vars, pos, t, dt); (*reactant.molality)[chemical_system_id] = @@ -249,7 +246,7 @@ void PhreeqcIO::initialize() void PhreeqcIO::initializeChemicalSystemConcrete( std::vector<double> const& concentrations, GlobalIndexType const& chemical_system_id, - MaterialPropertyLib::Medium const* medium, + MaterialPropertyLib::Medium const& medium, ParameterLib::SpatialPosition const& pos, double const t) { @@ -683,7 +680,7 @@ void PhreeqcIO::updateVolumeFractionPostReaction( MaterialPropertyLib::VariableArray vars; auto const liquid_density = - liquid_phase.property(MaterialPropertyLib::PropertyType::density) + liquid_phase[MaterialPropertyLib::PropertyType::density] .template value<double>(vars, pos, t, dt); for (auto& kinetic_reactant : _chemical_system->kinetic_reactants) @@ -698,8 +695,7 @@ void PhreeqcIO::updateVolumeFractionPostReaction( } auto const molar_volume = - solid_constituent - .property(MaterialPropertyLib::PropertyType::molar_volume) + solid_constituent[MaterialPropertyLib::PropertyType::molar_volume] .template value<double>(vars, pos, t, dt); (*kinetic_reactant.volume_fraction)[chemical_system_id] += diff --git a/ChemistryLib/PhreeqcIO.h b/ChemistryLib/PhreeqcIO.h index 14f88196b421cb6e7d979f7217a99314ab71ac6e..2981106c3717bd7ca06f3784b7ca11686c311dca 100644 --- a/ChemistryLib/PhreeqcIO.h +++ b/ChemistryLib/PhreeqcIO.h @@ -49,7 +49,7 @@ public: void initializeChemicalSystemConcrete( std::vector<double> const& concentrations, GlobalIndexType const& chemical_system_id, - MaterialPropertyLib::Medium const* medium, + MaterialPropertyLib::Medium const& medium, ParameterLib::SpatialPosition const& pos, double const t) override; diff --git a/ProcessLib/ComponentTransport/ComponentTransportFEM.h b/ProcessLib/ComponentTransport/ComponentTransportFEM.h index 76fc6bdd6a5f9af990e356fdff3bdbdab540c131..f5740eb98a4d4dd5f74dfa68c9d0b8ec2cb98649 100644 --- a/ProcessLib/ComponentTransport/ComponentTransportFEM.h +++ b/ProcessLib/ComponentTransport/ComponentTransportFEM.h @@ -250,7 +250,7 @@ public: assert(_process_data.chemical_solver_interface); auto const& medium = - _process_data.media_map->getMedium(_element.getID()); + *_process_data.media_map->getMedium(_element.getID()); ParameterLib::SpatialPosition pos; pos.setElementID(_element.getID());