diff --git a/ProcessLib/AbstractJacobianAssembler.h b/ProcessLib/AbstractJacobianAssembler.h index f23d09b12c65739286e3a5abd19f4d474b57bbb4..50dde014d8a95ae0baac4bbdcfefd5b9c9fb1fd8 100644 --- a/ProcessLib/AbstractJacobianAssembler.h +++ b/ProcessLib/AbstractJacobianAssembler.h @@ -40,7 +40,7 @@ public: std::vector<double>& /*local_K_data*/, std::vector<double>& /*local_b_data*/, std::vector<double>& /*local_Jac_data*/, - LocalCoupledSolutions const& /*coupling_term*/) + LocalCoupledSolutions const& /*coupled_solutions*/) { } diff --git a/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp b/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp index fa23c26a5bcac8694bf7b01f25bd11e79dd70198..bf446dacc2712176765335525a566d72b611d420 100644 --- a/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp +++ b/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp @@ -63,7 +63,7 @@ void ComponentTransportProcess::assembleConcreteProcess( // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void ComponentTransportProcess::assembleWithJacobianConcreteProcess( @@ -77,7 +77,7 @@ void ComponentTransportProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } } // namespace ComponentTransport diff --git a/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.cpp b/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.cpp index 51a7bbf2ba6e40e084e024a9628c774935670e08..68d90027557df7a5fcf1cc383236f7df361cddd4 100644 --- a/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.cpp +++ b/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.cpp @@ -68,7 +68,7 @@ void GroundwaterFlowProcess::assembleConcreteProcess(const double t, // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void GroundwaterFlowProcess::assembleWithJacobianConcreteProcess( @@ -82,7 +82,7 @@ void GroundwaterFlowProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } } // namespace GroundwaterFlow diff --git a/ProcessLib/HT/HTProcess.cpp b/ProcessLib/HT/HTProcess.cpp index d371b551706a58e455da2879c71f4d62617d55f3..307e9cc46fd64fc659823d6db160b2ae2c265f9c 100644 --- a/ProcessLib/HT/HTProcess.cpp +++ b/ProcessLib/HT/HTProcess.cpp @@ -62,7 +62,7 @@ void HTProcess::assembleConcreteProcess(const double t, // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void HTProcess::assembleWithJacobianConcreteProcess( @@ -76,7 +76,7 @@ void HTProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } } // namespace HT diff --git a/ProcessLib/HeatConduction/HeatConductionProcess.cpp b/ProcessLib/HeatConduction/HeatConductionProcess.cpp index 7e6ce63d9921c47cbe01feb48643e13e0bb66d03..0813b7b703ee54625cf668a16f0d0460d75cbdd3 100644 --- a/ProcessLib/HeatConduction/HeatConductionProcess.cpp +++ b/ProcessLib/HeatConduction/HeatConductionProcess.cpp @@ -95,7 +95,7 @@ void HeatConductionProcess::assembleConcreteProcess(const double t, // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void HeatConductionProcess::assembleWithJacobianConcreteProcess( @@ -109,7 +109,7 @@ void HeatConductionProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } void HeatConductionProcess::computeSecondaryVariableConcrete( @@ -119,7 +119,7 @@ void HeatConductionProcess::computeSecondaryVariableConcrete( GlobalExecutor::executeMemberOnDereferenced( &HeatConductionLocalAssemblerInterface::computeSecondaryVariable, _local_assemblers, *_local_to_global_index_map, t, x, - _coupling_term); + _coupled_solutions); } } // namespace HeatConduction diff --git a/ProcessLib/HydroMechanics/HydroMechanicsProcess-impl.h b/ProcessLib/HydroMechanics/HydroMechanicsProcess-impl.h index a84d9389bcef9e1f230084ebe49e1bdc5602c236..cbdbe6e6f4020003a94c694a55ce606e190ee015 100644 --- a/ProcessLib/HydroMechanics/HydroMechanicsProcess-impl.h +++ b/ProcessLib/HydroMechanics/HydroMechanicsProcess-impl.h @@ -180,7 +180,7 @@ void HydroMechanicsProcess<DisplacementDim>::assembleConcreteProcess( // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } template <int DisplacementDim> @@ -196,7 +196,7 @@ void HydroMechanicsProcess<DisplacementDim>:: GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } template <int DisplacementDim> void HydroMechanicsProcess<DisplacementDim>::preTimestepConcreteProcess( diff --git a/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp b/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp index 8be9402bbe8c82c81df4444e49f79f736cf22173..898b4e6f4877c3fa5f47115879c26ee932b4ebc9 100644 --- a/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp +++ b/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp @@ -408,7 +408,7 @@ void HydroMechanicsProcess<GlobalDim>::computeSecondaryVariableConcrete( GlobalExecutor::executeMemberOnDereferenced( &HydroMechanicsLocalAssemblerInterface::computeSecondaryVariable, _local_assemblers, *_local_to_global_index_map, t, x, - _coupling_term); + _coupled_solutions); // Copy displacement jumps in a solution vector to mesh property // Remark: the copy is required because mesh properties for primary diff --git a/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.h b/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.h index 92bce62c4e0e64e42b34bc533e33fbc6cfa1482d..ba65735a500412757b59612757a2cf43e9166147 100644 --- a/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.h +++ b/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.h @@ -75,7 +75,7 @@ private: GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, *_local_to_global_index_map, t, x, M, K, b, - _coupling_term); + _coupled_solutions); } void assembleWithJacobianConcreteProcess( @@ -89,7 +89,7 @@ private: GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, - dxdot_dx, dx_dx, M, K, b, Jac, _coupling_term); + dxdot_dx, dx_dx, M, K, b, Jac, _coupled_solutions); } void preTimestepConcreteProcess(GlobalVector const& x, double const t, diff --git a/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.h b/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.h index 5679efc544e806079deb4b76ad532f3434ae59ee..588270daacf869eb0886ab9c933cf9a5c1004cce 100644 --- a/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.h +++ b/ProcessLib/LIE/SmallDeformation/SmallDeformationProcess.h @@ -73,7 +73,7 @@ private: GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, *_local_to_global_index_map, t, x, M, K, b, - _coupling_term); + _coupled_solutions); } void assembleWithJacobianConcreteProcess( @@ -87,7 +87,7 @@ private: GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, - dxdot_dx, dx_dx, M, K, b, Jac, _coupling_term); + dxdot_dx, dx_dx, M, K, b, Jac, _coupled_solutions); } void preTimestepConcreteProcess(GlobalVector const& x, double const t, diff --git a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h index 34f505ea76f36485b31a9dadbffa81002eefff37..6e6c923c5ddfddba549ec1adb416fd709275b93d 100644 --- a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h +++ b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h @@ -268,7 +268,7 @@ LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>:: // the assert must be changed to perm.rows() == _element->getDimension() assert(permeability.rows() == GlobalDim || permeability.rows() == 1); - if (!_coupling_term) + if (!_coupled_solutions) { computeDarcyVelocity(permeability, local_x, veloctiy_cache_vectors); } @@ -276,7 +276,7 @@ LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>:: { auto const local_coupled_xs = getCurrentLocalSolutionsOfCoupledProcesses( - _coupling_term->coupled_xs, indices); + _coupled_solutions->coupled_xs, indices); if (local_coupled_xs.empty()) computeDarcyVelocity(permeability, local_x, veloctiy_cache_vectors); else diff --git a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h index 9e7ac66aed880edef4963836cab16acde914d6df..a5b29cf92816f9b4157722360e2c9abcc6ad112b 100644 --- a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h +++ b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h @@ -43,15 +43,16 @@ class LiquidFlowLocalAssemblerInterface { public: LiquidFlowLocalAssemblerInterface( - CoupledSolutionsForStaggeredScheme* const coupling_term) - : _coupling_term(coupling_term) + CoupledSolutionsForStaggeredScheme* const coupled_solutions) + : _coupled_solutions(coupled_solutions) { } - void setCoupledSolutionsForStaggeredScheme(std::size_t const /*mesh_item_id*/, - CoupledSolutionsForStaggeredScheme* const coupling_term) + void setCoupledSolutionsForStaggeredScheme( + std::size_t const /*mesh_item_id*/, + CoupledSolutionsForStaggeredScheme* const coupled_solutions) { - _coupling_term = coupling_term; + _coupled_solutions = coupled_solutions; } virtual std::vector<double> const& getIntPtDarcyVelocity( @@ -61,11 +62,8 @@ public: std::vector<double>& /*cache*/) const = 0; protected: - // TODO: remove _coupling_term or move integration point data from local - // assembler class to a new class to make local assembler unique for each - //process. /// Pointer that is set from a Process class. - CoupledSolutionsForStaggeredScheme* _coupling_term; + CoupledSolutionsForStaggeredScheme* _coupled_solutions; }; template <typename ShapeFunction, typename IntegrationMethod, @@ -95,8 +93,8 @@ public: double const gravitational_acceleration, double const reference_temperature, LiquidFlowMaterialProperties const& material_propertries, - CoupledSolutionsForStaggeredScheme* coupling_term) - : LiquidFlowLocalAssemblerInterface(coupling_term), + CoupledSolutionsForStaggeredScheme* coupled_solutions) + : LiquidFlowLocalAssemblerInterface(coupled_solutions), _element(element), _integration_method(integration_order), _shape_matrices(initShapeMatrices<ShapeFunction, ShapeMatricesType, diff --git a/ProcessLib/LiquidFlow/LiquidFlowProcess.cpp b/ProcessLib/LiquidFlow/LiquidFlowProcess.cpp index eb7147daf8e4022989573d1754f1e424436f1c72..7eba951fcbefa57ab5e79a750db085511c025bf6 100644 --- a/ProcessLib/LiquidFlow/LiquidFlowProcess.cpp +++ b/ProcessLib/LiquidFlow/LiquidFlowProcess.cpp @@ -66,7 +66,7 @@ void LiquidFlowProcess::initializeConcreteProcess( pv.getShapeFunctionOrder(), _local_assemblers, mesh.isAxiallySymmetric(), integration_order, _gravitational_axis_id, _gravitational_acceleration, _reference_temperature, - *_material_properties, _coupling_term); + *_material_properties, _coupled_solutions); _secondary_variables.addSecondaryVariable( "darcy_velocity", @@ -85,7 +85,7 @@ void LiquidFlowProcess::assembleConcreteProcess(const double t, // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void LiquidFlowProcess::assembleWithJacobianConcreteProcess( @@ -99,7 +99,7 @@ void LiquidFlowProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } void LiquidFlowProcess::computeSecondaryVariableConcrete(const double t, @@ -108,15 +108,16 @@ void LiquidFlowProcess::computeSecondaryVariableConcrete(const double t, DBUG("Compute the velocity for LiquidFlowProcess."); GlobalExecutor::executeMemberOnDereferenced( &LiquidFlowLocalAssemblerInterface::computeSecondaryVariable, - _local_assemblers, *_local_to_global_index_map, t, x, _coupling_term); + _local_assemblers, *_local_to_global_index_map, t, x, _coupled_solutions); } void LiquidFlowProcess::setCoupledSolutionsForStaggeredSchemeToLocalAssemblers() { DBUG("Compute the velocity for LiquidFlowProcess."); GlobalExecutor::executeMemberOnDereferenced( - &LiquidFlowLocalAssemblerInterface::setCoupledSolutionsForStaggeredScheme, - _local_assemblers, _coupling_term); + &LiquidFlowLocalAssemblerInterface:: + setCoupledSolutionsForStaggeredScheme, + _local_assemblers, _coupled_solutions); } } // end of namespace diff --git a/ProcessLib/LocalAssemblerInterface.cpp b/ProcessLib/LocalAssemblerInterface.cpp index 09320cdf6aad61a878a8d25a8488582533583426..c9c6876dab4805b0fdcf7f82c8818a397012a95e 100644 --- a/ProcessLib/LocalAssemblerInterface.cpp +++ b/ProcessLib/LocalAssemblerInterface.cpp @@ -20,7 +20,7 @@ void LocalAssemblerInterface::assembleWithCoupledTerm( std::vector<double>& /*local_M_data*/, std::vector<double>& /*local_K_data*/, std::vector<double>& /*local_b_data*/, - LocalCoupledSolutions const& /*coupling_term*/) + LocalCoupledSolutions const& /*coupled_solutions*/) { OGS_FATAL( "The assembleWithCoupledTerm() function is not implemented in the " @@ -47,7 +47,7 @@ void LocalAssemblerInterface::assembleWithJacobianAndCoupling( std::vector<double>& /*local_K_data*/, std::vector<double>& /*local_b_data*/, std::vector<double>& /*local_Jac_data*/, - LocalCoupledSolutions const& /*coupling_term*/) + LocalCoupledSolutions const& /*coupled_solutions*/) { OGS_FATAL( "The assembleWithJacobianAndCoupling() function is not implemented in" diff --git a/ProcessLib/LocalAssemblerInterface.h b/ProcessLib/LocalAssemblerInterface.h index e906d3de6890f696e31eeef0180961b71cf08ae4..28bf1188f213a10d4d57b2555bfc879a0f179c6c 100644 --- a/ProcessLib/LocalAssemblerInterface.h +++ b/ProcessLib/LocalAssemblerInterface.h @@ -46,7 +46,7 @@ public: std::vector<double>& local_M_data, std::vector<double>& local_K_data, std::vector<double>& local_b_data, - LocalCoupledSolutions const& coupling_term); + LocalCoupledSolutions const& coupled_solutions); virtual void assembleWithJacobian(double const t, std::vector<double> const& local_x, @@ -63,7 +63,7 @@ public: const double dx_dx, std::vector<double>& local_M_data, std::vector<double>& local_K_data, std::vector<double>& local_b_data, std::vector<double>& local_Jac_data, - LocalCoupledSolutions const& coupling_term); + LocalCoupledSolutions const& coupled_solutions); virtual void computeSecondaryVariable(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const& dof_table, diff --git a/ProcessLib/PhaseField/PhaseFieldProcess-impl.h b/ProcessLib/PhaseField/PhaseFieldProcess-impl.h index ddb38a15d0933841e9f585b1cb98b31939311733..527c935d52a57eb59dc5cd200c73638bc90ac890 100644 --- a/ProcessLib/PhaseField/PhaseFieldProcess-impl.h +++ b/ProcessLib/PhaseField/PhaseFieldProcess-impl.h @@ -142,7 +142,7 @@ void PhaseFieldProcess<DisplacementDim>::assembleConcreteProcess( // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } template <int DisplacementDim> @@ -157,7 +157,7 @@ void PhaseFieldProcess<DisplacementDim>::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } template <int DisplacementDim> diff --git a/ProcessLib/Process.cpp b/ProcessLib/Process.cpp index 706425cb1725bc61f99fb66597130889d2e59167..69b15f52b2a53e7a6be893e7fc00058ddd8188ad 100644 --- a/ProcessLib/Process.cpp +++ b/ProcessLib/Process.cpp @@ -31,7 +31,7 @@ Process::Process( _secondary_variables(std::move(secondary_variables)), _named_function_caller(std::move(named_function_caller)), _global_assembler(std::move(jacobian_assembler)), - _coupling_term(nullptr), + _coupled_solutions(nullptr), _integration_order(integration_order), _process_variables(std::move(process_variables)), _boundary_conditions(parameters) diff --git a/ProcessLib/Process.h b/ProcessLib/Process.h index 68cdb64457f62c6c235a8b331321e175874cb7ad..e2ec183a5963390c5bd2bb8822cc4947dc1456f3 100644 --- a/ProcessLib/Process.h +++ b/ProcessLib/Process.h @@ -71,9 +71,9 @@ public: MathLib::MatrixSpecifications getMatrixSpecifications() const final; - void setCoupledSolutionsForStaggeredScheme(CoupledSolutionsForStaggeredScheme* const coupling_term) + void setCoupledSolutionsForStaggeredScheme(CoupledSolutionsForStaggeredScheme* const coupled_solutions) { - _coupling_term = coupling_term; + _coupled_solutions = coupled_solutions; } virtual void setCoupledSolutionsForStaggeredSchemeToLocalAssemblers() {} @@ -205,7 +205,7 @@ protected: /// Pointer to CoupledSolutionsForStaggeredScheme, which contains the references to the /// coupled processes and the references to the solutions of the coupled /// processes. - CoupledSolutionsForStaggeredScheme* _coupling_term; + CoupledSolutionsForStaggeredScheme* _coupled_solutions; /// Order of the integration method for element-wise integration. /// The Gauss-Legendre integration method and available orders is diff --git a/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcess.cpp b/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcess.cpp index 67a93c25251d40ca8553e8b6f500677980f454c6..00f5dcd9e537722832a40c0b6d2a96de8bf5390e 100644 --- a/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcess.cpp +++ b/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcess.cpp @@ -70,7 +70,7 @@ void RichardsComponentTransportProcess::assembleConcreteProcess( // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void RichardsComponentTransportProcess::assembleWithJacobianConcreteProcess( @@ -84,7 +84,7 @@ void RichardsComponentTransportProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } } // namespace RichardsComponentTransport diff --git a/ProcessLib/RichardsFlow/RichardsFlowProcess.cpp b/ProcessLib/RichardsFlow/RichardsFlowProcess.cpp index 612dc11b1251953f324334d80dd488af8304d6f9..40740755ae204fc050115efb4b9d6695b0000cc8 100644 --- a/ProcessLib/RichardsFlow/RichardsFlowProcess.cpp +++ b/ProcessLib/RichardsFlow/RichardsFlowProcess.cpp @@ -73,7 +73,7 @@ void RichardsFlowProcess::assembleConcreteProcess( // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void RichardsFlowProcess::assembleWithJacobianConcreteProcess( @@ -87,7 +87,7 @@ void RichardsFlowProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } } // namespace RichardsFlow diff --git a/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h b/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h index eac1b1ec5c929e379a000618d100c17cc8cff95f..5c4f86d9109a1dacfced5e93d472f58dc883107f 100644 --- a/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h +++ b/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h @@ -150,7 +150,7 @@ void SmallDeformationProcess<DisplacementDim>::assembleConcreteProcess( // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } template <int DisplacementDim> @@ -166,7 +166,7 @@ void SmallDeformationProcess<DisplacementDim>:: GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); b.copyValues(*_nodal_forces); std::transform(_nodal_forces->begin(), _nodal_forces->end(), diff --git a/ProcessLib/TES/TESProcess.cpp b/ProcessLib/TES/TESProcess.cpp index f1efbc72faff6cdc23fada43b888a9fe22240bd5..5afdac5595105ffaaa3729db872149354bc70576 100644 --- a/ProcessLib/TES/TESProcess.cpp +++ b/ProcessLib/TES/TESProcess.cpp @@ -232,7 +232,7 @@ void TESProcess::assembleConcreteProcess(const double t, // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void TESProcess::assembleWithJacobianConcreteProcess( @@ -243,7 +243,7 @@ void TESProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } void TESProcess::preTimestepConcreteProcess(GlobalVector const& x, diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp index 33a72db4761920709054de61c2d702ecf11b8a89..e6e86b688943d3c1a5e9213c0b0d0ef2ad2d8789 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp @@ -80,7 +80,7 @@ void ThermalTwoPhaseFlowWithPPProcess::assembleConcreteProcess( // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void ThermalTwoPhaseFlowWithPPProcess::assembleWithJacobianConcreteProcess( @@ -94,7 +94,7 @@ void ThermalTwoPhaseFlowWithPPProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } void ThermalTwoPhaseFlowWithPPProcess::preTimestepConcreteProcess( GlobalVector const& x, double const t, double const delta_t) diff --git a/ProcessLib/ThermoMechanics/ThermoMechanicsProcess-impl.h b/ProcessLib/ThermoMechanics/ThermoMechanicsProcess-impl.h index 25fc9223234b694adda3952887e932355f1f6486..493b6b1fb5b12e2f98f4587f93490991dd2a930c 100644 --- a/ProcessLib/ThermoMechanics/ThermoMechanicsProcess-impl.h +++ b/ProcessLib/ThermoMechanics/ThermoMechanicsProcess-impl.h @@ -154,7 +154,7 @@ void ThermoMechanicsProcess<DisplacementDim>::assembleConcreteProcess( // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } template <int DisplacementDim> @@ -172,7 +172,7 @@ void ThermoMechanicsProcess<DisplacementDim>:: GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } template <int DisplacementDim> diff --git a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp index d64c5e6a9adbbf67a7291f919a927f696b9044ea..ef7cfdfcb05c83e7de1b821599cd9fa684645056 100644 --- a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp @@ -78,7 +78,7 @@ void TwoPhaseFlowWithPPProcess::assembleConcreteProcess(const double t, // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void TwoPhaseFlowWithPPProcess::assembleWithJacobianConcreteProcess( @@ -92,7 +92,7 @@ void TwoPhaseFlowWithPPProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } } // end of namespace diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp index a1a4f37bb2ec4d5f43540b584d7622f9b3848721..16e4b985f70ebb96a5066f840d06d8c96aa3ca1b 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp +++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp @@ -78,7 +78,7 @@ void TwoPhaseFlowWithPrhoProcess::assembleConcreteProcess(const double t, // Call global assembler for each local assembly item. GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, - *_local_to_global_index_map, t, x, M, K, b, _coupling_term); + *_local_to_global_index_map, t, x, M, K, b, _coupled_solutions); } void TwoPhaseFlowWithPrhoProcess::assembleWithJacobianConcreteProcess( @@ -92,7 +92,7 @@ void TwoPhaseFlowWithPrhoProcess::assembleWithJacobianConcreteProcess( GlobalExecutor::executeMemberDereferenced( _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, - dx_dx, M, K, b, Jac, _coupling_term); + dx_dx, M, K, b, Jac, _coupled_solutions); } void TwoPhaseFlowWithPrhoProcess::preTimestepConcreteProcess( GlobalVector const& x, double const t, double const dt) diff --git a/ProcessLib/UncoupledProcessesTimeLoop.cpp b/ProcessLib/UncoupledProcessesTimeLoop.cpp index 2cfb840612e9b9749037ed6f3d7b88a0f1e7d252..f7fbd419d8a70d5c341334bea129ffb58495310a 100644 --- a/ProcessLib/UncoupledProcessesTimeLoop.cpp +++ b/ProcessLib/UncoupledProcessesTimeLoop.cpp @@ -916,11 +916,11 @@ bool UncoupledProcessesTimeLoop::solveCoupledEquationSystemsByStaggeredScheme( spd->process.preTimestep(x, t, dt); } - CoupledSolutionsForStaggeredScheme coupling_term( + CoupledSolutionsForStaggeredScheme coupled_solutions( spd->coupled_processes, _solutions_of_coupled_processes[pcs_idx], dt); - spd->process.setCoupledSolutionsForStaggeredScheme(&coupling_term); + spd->process.setCoupledSolutionsForStaggeredScheme(&coupled_solutions); const auto nonlinear_solver_succeeded = solveOneTimeStepOneProcess( x, timestep_id, t, dt, *spd, *_output); @@ -1034,12 +1034,13 @@ void UncoupledProcessesTimeLoop::outputSolutions( spd->timestepper->getTimeStep().dt()); if (is_staggered_coupling) { - CoupledSolutionsForStaggeredScheme coupling_term( + CoupledSolutionsForStaggeredScheme coupled_solutions( spd->coupled_processes, _solutions_of_coupled_processes[pcs_idx], 0.0); - spd->process.setCoupledSolutionsForStaggeredScheme(&coupling_term); - spd->process.setCoupledSolutionsForStaggeredSchemeToLocalAssemblers(); + spd->process.setCoupledSolutionsForStaggeredScheme(&coupled_solutions); + spd->process + .setCoupledSolutionsForStaggeredSchemeToLocalAssemblers(); (output_object.*output_class_member)(pcs, spd->process_output, timestep, t, x); } diff --git a/ProcessLib/VectorMatrixAssembler.cpp b/ProcessLib/VectorMatrixAssembler.cpp index 563d899b80b49bcbb508f490ef35ad56935195f6..398c7a5d45bc84d7ae2b429ee0ccc66a579cfe2f 100644 --- a/ProcessLib/VectorMatrixAssembler.cpp +++ b/ProcessLib/VectorMatrixAssembler.cpp @@ -21,13 +21,13 @@ namespace ProcessLib { static std::unordered_map<std::type_index, const std::vector<double>> getPreviousLocalSolutionsOfCoupledProcesses( - const CoupledSolutionsForStaggeredScheme& coupling_term, + const CoupledSolutionsForStaggeredScheme& coupled_solutions, const std::vector<GlobalIndexType>& indices) { std::unordered_map<std::type_index, const std::vector<double>> local_coupled_xs0; - for (auto const& coupled_process_pair : coupling_term.coupled_processes) + for (auto const& coupled_process_pair : coupled_solutions.coupled_processes) { auto const& coupled_pcs = coupled_process_pair.second; auto const prevous_time_x = coupled_pcs.getPreviousTimeStepSolution(); @@ -59,7 +59,7 @@ void VectorMatrixAssembler::assemble( const std::size_t mesh_item_id, LocalAssemblerInterface& local_assembler, const NumLib::LocalToGlobalIndexMap& dof_table, const double t, const GlobalVector& x, GlobalMatrix& M, GlobalMatrix& K, GlobalVector& b, - const CoupledSolutionsForStaggeredScheme* coupling_term) + const CoupledSolutionsForStaggeredScheme* coupled_solutions) { auto const indices = NumLib::getIndices(mesh_item_id, dof_table); auto const local_x = x.get(indices); @@ -68,7 +68,7 @@ void VectorMatrixAssembler::assemble( _local_K_data.clear(); _local_b_data.clear(); - if (!coupling_term) + if (!coupled_solutions) { local_assembler.assemble(t, local_x, _local_M_data, _local_K_data, _local_b_data); @@ -76,9 +76,9 @@ void VectorMatrixAssembler::assemble( else { auto local_coupled_xs0 = getPreviousLocalSolutionsOfCoupledProcesses( - *coupling_term, indices); + *coupled_solutions, indices); auto local_coupled_xs = getCurrentLocalSolutionsOfCoupledProcesses( - coupling_term->coupled_xs, indices); + coupled_solutions->coupled_xs, indices); if (local_coupled_xs0.empty() || local_coupled_xs.empty()) { @@ -87,13 +87,13 @@ void VectorMatrixAssembler::assemble( } else { - ProcessLib::LocalCoupledSolutions local_coupling_term( - coupling_term->dt, coupling_term->coupled_processes, + ProcessLib::LocalCoupledSolutions local_coupled_solutions( + coupled_solutions->dt, coupled_solutions->coupled_processes, std::move(local_coupled_xs0), std::move(local_coupled_xs)); local_assembler.assembleWithCoupledTerm( t, local_x, _local_M_data, _local_K_data, _local_b_data, - local_coupling_term); + local_coupled_solutions); } } @@ -123,7 +123,7 @@ void VectorMatrixAssembler::assembleWithJacobian( NumLib::LocalToGlobalIndexMap const& dof_table, const double t, GlobalVector const& x, GlobalVector const& xdot, const double dxdot_dx, const double dx_dx, GlobalMatrix& M, GlobalMatrix& K, GlobalVector& b, - GlobalMatrix& Jac, const CoupledSolutionsForStaggeredScheme* coupling_term) + GlobalMatrix& Jac, const CoupledSolutionsForStaggeredScheme* coupled_solutions) { auto const indices = NumLib::getIndices(mesh_item_id, dof_table); auto const local_x = x.get(indices); @@ -134,7 +134,7 @@ void VectorMatrixAssembler::assembleWithJacobian( _local_b_data.clear(); _local_Jac_data.clear(); - if (!coupling_term) + if (!coupled_solutions) { _jacobian_assembler->assembleWithJacobian( local_assembler, t, local_x, local_xdot, dxdot_dx, dx_dx, @@ -143,9 +143,9 @@ void VectorMatrixAssembler::assembleWithJacobian( else { auto local_coupled_xs0 = getPreviousLocalSolutionsOfCoupledProcesses( - *coupling_term, indices); + *coupled_solutions, indices); auto local_coupled_xs = getCurrentLocalSolutionsOfCoupledProcesses( - coupling_term->coupled_xs, indices); + coupled_solutions->coupled_xs, indices); if (local_coupled_xs0.empty() || local_coupled_xs.empty()) { _jacobian_assembler->assembleWithJacobian( @@ -154,14 +154,14 @@ void VectorMatrixAssembler::assembleWithJacobian( } else { - ProcessLib::LocalCoupledSolutions local_coupling_term( - coupling_term->dt, coupling_term->coupled_processes, + ProcessLib::LocalCoupledSolutions local_coupled_solutions( + coupled_solutions->dt, coupled_solutions->coupled_processes, std::move(local_coupled_xs0), std::move(local_coupled_xs)); _jacobian_assembler->assembleWithJacobianAndCoupling( local_assembler, t, local_x, local_xdot, dxdot_dx, dx_dx, _local_M_data, _local_K_data, _local_b_data, _local_Jac_data, - local_coupling_term); + local_coupled_solutions); } } diff --git a/ProcessLib/VectorMatrixAssembler.h b/ProcessLib/VectorMatrixAssembler.h index 2c2b087fbc6ac2c1700889b2d46709986f52457f..5f305cc482b328e08c8f9231efbcb1dcb2c8e04a 100644 --- a/ProcessLib/VectorMatrixAssembler.h +++ b/ProcessLib/VectorMatrixAssembler.h @@ -40,7 +40,7 @@ public: NumLib::LocalToGlobalIndexMap const& dof_table, double const t, GlobalVector const& x, GlobalMatrix& M, GlobalMatrix& K, GlobalVector& b, - const CoupledSolutionsForStaggeredScheme* coupling_term); + const CoupledSolutionsForStaggeredScheme* coupled_solutions); //! Assembles \c M, \c K, \c b, and the Jacobian \c Jac of the residual. //! \note The Jacobian must be assembled. @@ -52,7 +52,7 @@ public: const double dx_dx, GlobalMatrix& M, GlobalMatrix& K, GlobalVector& b, GlobalMatrix& Jac, - const CoupledSolutionsForStaggeredScheme* coupling_term); + const CoupledSolutionsForStaggeredScheme* coupled_solutions); private: // temporary data only stored here in order to avoid frequent memory