27 std::vector<std::vector<
35 std::vector<std::reference_wrapper<MeshLib::PropertyVector<double>>>>
52 :
pvma_{jacobian_assembler} {};
56 std::vector<std::reference_wrapper<MeshLib::Mesh>>
const& submeshes,
57 std::vector<std::vector<std::string>>
const& residuum_names,
58 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
const&
81 std::vector<std::reference_wrapper<MeshLib::PropertyVector<double>>>>
98template <
typename Process>
129 std::vector<std::reference_wrapper<MeshLib::Mesh>>
const& submeshes,
130 std::vector<std::vector<std::string>>
const& residuum_names)
134 derived().getProcessVariables());
144 std::vector<GlobalVector*>
const& ,
145 std::vector<GlobalVector*>
const& ,
149 DBUG(
"AssemblyMixin assemble(t={}, dt={}, process_id={}).", t, dt,
155 OGS_FATAL(
"AssemblyMixin for Picard scheme is not yet implemented.");
159 std::vector<GlobalVector*>
const& x,
160 std::vector<GlobalVector*>
const& x_prev,
164 DBUG(
"AssemblyMixin assembleWithJacobian(t={}, dt={}, process_id={}).",
167 std::vector<NumLib::LocalToGlobalIndexMap const*>
const dof_tables =
170 auto const& loc_asms =
derived().local_assemblers_;
182 dof_tables, t, dt, x, x_prev,
183 process_id, b_submesh, Jac);
188 process_id, b_submesh, *(dof_tables[process_id]), sad);
196 loc_asms,
derived().getActiveElementIDs(), dof_tables, t, dt, x,
197 x_prev, process_id, b, Jac);
208 return static_cast<Process const&
>(*this);
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Global vector based on Eigen vector.
virtual GlobalVector & getVector(std::size_t &id)=0
Get an uninitialized vector with the given id.
virtual void releaseVector(GlobalVector const &x)=0
Base class for Jacobian assemblers.
void initializeAssemblyOnSubmeshes(MeshLib::Mesh &bulk_mesh, std::vector< std::reference_wrapper< MeshLib::Mesh > > const &submeshes, std::vector< std::vector< std::string > > const &residuum_names, std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > const &pvs)
AssemblyMixinBase(AbstractJacobianAssembler &jacobian_assembler)
Assembly::ParallelVectorMatrixAssembler pvma_
static void copyResiduumVectorsToBulkMesh(GlobalVector const &rhs, NumLib::LocalToGlobalIndexMap const &local_to_global_index_map, std::vector< std::reference_wrapper< MeshLib::PropertyVector< double > > > residuum_vectors)
@ NO_DEACTIVATED_SUBDOMAINS
@ HAS_DEACTIVATED_SUBDOMAINS
void updateActiveElementsImpl(Process const &process)
std::size_t b_submesh_id_
ID of the b vector on submeshes, cf. NumLib::VectorProvider.
ActiveElementIDsState ids_state_
void updateActiveElements(ProcessLib::Process const &process)
static void copyResiduumVectorsToSubmesh(int const process_id, GlobalVector const &rhs, NumLib::LocalToGlobalIndexMap const &local_to_global_index_map, SubmeshAssemblyData const &sad)
std::vector< SubmeshAssemblyData > submesh_assembly_data_
std::vector< std::vector< std::reference_wrapper< MeshLib::PropertyVector< double > > > > residuum_vectors_bulk_
void assemble(double const t, double const dt, std::vector< GlobalVector * > const &, std::vector< GlobalVector * > const &, int const process_id, GlobalMatrix &, GlobalMatrix &, GlobalVector &)
Process const & derived() const
void updateActiveElements()
void initializeAssemblyOnSubmeshes(std::vector< std::reference_wrapper< MeshLib::Mesh > > const &submeshes, std::vector< std::vector< std::string > > const &residuum_names)
void assembleWithJacobian(double const t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalVector &b, GlobalMatrix &Jac)
void assembleWithJacobian(BaseLib::PolymorphicRandomAccessContainerView< LocalAssemblerInterface > const &local_assemblers, std::vector< std::size_t > const &active_elements, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, const double t, double const dt, std::vector< GlobalVector * > const &xs, std::vector< GlobalVector * > const &x_prevs, int const process_id, GlobalVector &b, GlobalMatrix &Jac)
std::vector< NumLib::LocalToGlobalIndexMap const * > getDOFTables(int const number_of_processes) const
void axpy(PETScVector &y, PetscScalar const a, PETScVector const &x)
OGSMesh getMesh(std::string const &name)
static NUMLIB_EXPORT VectorProvider & provider
std::vector< std::vector< std::reference_wrapper< MeshLib::PropertyVector< double > > > > residuum_vectors
MeshLib::PropertyVector< std::size_t > const & bulk_node_ids
MeshLib::PropertyVector< std::size_t > const & bulk_element_ids
std::vector< std::size_t > active_element_ids
SubmeshAssemblyData(MeshLib::Mesh const &mesh, std::vector< std::vector< std::reference_wrapper< MeshLib::PropertyVector< double > > > > &&residuum_vectors)