diff --git a/ProcessLib/Assembly/ParallelVectorMatrixAssembler.cpp b/ProcessLib/Assembly/ParallelVectorMatrixAssembler.cpp index 5b070cb55db6ba52dc49a86e3632f6875ca1f603..293db233fdced90de476f6b48f1579bd55afabb1 100644 --- a/ProcessLib/Assembly/ParallelVectorMatrixAssembler.cpp +++ b/ProcessLib/Assembly/ParallelVectorMatrixAssembler.cpp @@ -120,28 +120,14 @@ void ParallelVectorMatrixAssembler::assembleWithJacobian( GlobalVector& b, GlobalMatrix& Jac) { // checks ////////////////////////////////////////////////////////////////// - if (process_id != 0) + if (dof_tables.size() != xs.size()) { - OGS_FATAL("Process id is not 0 but {}", process_id); + OGS_FATAL("Different number of DOF tables and solution vectors."); } - if (dof_tables.size() != 1) - { - OGS_FATAL("More than 1 dof table"); - } - auto const& dof_table = *(dof_tables.front()); - - if (xs.size() != 1) - { - OGS_FATAL("More than 1 solution vector"); - } - auto const& x = *xs.front(); - - if (x_prevs.size() != 1) - { - OGS_FATAL("More than 1 x_prev vector"); - } - auto const& x_prev = *x_prevs.front(); + auto const& dof_table = *dof_tables[process_id]; + auto const& x = *xs[process_id]; + auto const& x_prev = *x_prevs[process_id]; // algorithm /////////////////////////////////////////////////////////////// diff --git a/ProcessLib/AssemblyMixin.h b/ProcessLib/AssemblyMixin.h index 920d9272011373abf9099595385536daebd828d0..c68fb644e36603d067886217d60964c5e7b84279 100644 --- a/ProcessLib/AssemblyMixin.h +++ b/ProcessLib/AssemblyMixin.h @@ -161,9 +161,8 @@ public: DBUG("AssemblyMixin assembleWithJacobian(t={}, dt={}, process_id={}).", t, dt, process_id); - // TODO why not getDOFTables(x.size()); ? - std::vector<NumLib::LocalToGlobalIndexMap const*> const dof_tables{ - derived()._local_to_global_index_map.get()}; + std::vector<NumLib::LocalToGlobalIndexMap const*> const dof_tables = + derived().getDOFTables(x.size()); auto const& loc_asms = derived().local_assemblers_;