diff --git a/ProcessLib/StaggeredCouplingTerm.cpp b/ProcessLib/StaggeredCouplingTerm.cpp index 99e207857d53da8cea559e068b16a7dc022fef27..5cf8ed0aa773c4e2e1986b5ee3994cc74b43d26a 100644 --- a/ProcessLib/StaggeredCouplingTerm.cpp +++ b/ProcessLib/StaggeredCouplingTerm.cpp @@ -1,6 +1,6 @@ /** * \copyright - * Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org) + * Copyright (c) 2012-2017, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license @@ -19,14 +19,8 @@ const StaggeredCouplingTerm createVoidStaggeredCouplingTerm() { std::map<ProcessType, Process const&> coupled_pcsss; std::map<ProcessType, GlobalVector const*> coupled_xs; - return StaggeredCouplingTerm(coupled_pcsss, coupled_xs); -} - -const LocalCouplingTerm createVoidLocalCouplingTerm() -{ - std::map<ProcessType, Process const&> coupled_pcsss; - std::map<ProcessType, const std::vector<double>> local_coupled_xs; - return LocalCouplingTerm(coupled_pcsss, std::move(local_coupled_xs)); + const bool empty = true; + return StaggeredCouplingTerm(coupled_pcsss, coupled_xs, empty); } } // end of ProcessLib diff --git a/ProcessLib/StaggeredCouplingTerm.h b/ProcessLib/StaggeredCouplingTerm.h index 76d056f14cba05808a5666617f6d97e11cf6105c..c488fa38eb7e6a44edec6948bcda23576a5ac722 100644 --- a/ProcessLib/StaggeredCouplingTerm.h +++ b/ProcessLib/StaggeredCouplingTerm.h @@ -1,6 +1,6 @@ /** * \copyright - * Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org) + * Copyright (c) 2012-2017, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license @@ -10,8 +10,7 @@ * Created on November 7, 2016, 12:14 PM */ -#ifndef OGS_STAGGERED_COUPLING_TERM_H -#define OGS_STAGGERED_COUPLING_TERM_H +#pragma once #include <map> @@ -26,13 +25,16 @@ struct StaggeredCouplingTerm { StaggeredCouplingTerm( std::map<ProcessType, Process const&> const& coupled_processes_, - std::map<ProcessType, GlobalVector const*> const& coupled_xs_) - : coupled_processes(coupled_processes_), coupled_xs(coupled_xs_) + std::map<ProcessType, GlobalVector const*> const& coupled_xs_, + const bool empty_ = false) + : coupled_processes(coupled_processes_), coupled_xs(coupled_xs_), + empty(empty_) { } std::map<ProcessType, Process const&> const& coupled_processes; std::map<ProcessType, GlobalVector const*> const& coupled_xs; + const bool empty; }; struct LocalCouplingTerm @@ -50,8 +52,6 @@ struct LocalCouplingTerm }; const StaggeredCouplingTerm createVoidStaggeredCouplingTerm(); -const LocalCouplingTerm createVoidLocalCouplingTerm(); } // end of ProcessLib -#endif /* OGS_STAGGERED_COUPLING_TERM_H */ diff --git a/ProcessLib/VectorMatrixAssembler.cpp b/ProcessLib/VectorMatrixAssembler.cpp index 313ac0e03016601e23140bc62b8e4f14045b8a64..73f6681f00b7beb0e3627a81586d0e05e83893e0 100644 --- a/ProcessLib/VectorMatrixAssembler.cpp +++ b/ProcessLib/VectorMatrixAssembler.cpp @@ -38,7 +38,7 @@ void VectorMatrixAssembler::assemble( _local_K_data.clear(); _local_b_data.clear(); - if (coupled_term.coupled_processes.empty()) + if (coupled_term.empty) { local_assembler.assemble(t, local_x, _local_M_data, _local_K_data, _local_b_data); @@ -103,7 +103,7 @@ void VectorMatrixAssembler::assembleWithJacobian( _local_b_data.clear(); _local_Jac_data.clear(); - if (coupled_term.coupled_processes.empty()) + if (coupled_term.empty) { _jacobian_assembler->assembleWithJacobian( local_assembler, t, local_x, local_xdot, dxdot_dx, dx_dx,