MFEM v4.9.0
Finite element discretization library
Loading...
Searching...
No Matches
derefmat_op.hpp
Go to the documentation of this file.
1// Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
2// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3// LICENSE and NOTICE for details. LLNL-CODE-806117.
4//
5// This file is part of the MFEM library. For more information and source code
6// availability visit https://mfem.org.
7//
8// MFEM is free software; you can redistribute it and/or modify it under the
9// terms of the BSD-3 license. We welcome feedback and contributions, see file
10// CONTRIBUTING.md for details.
11
12#ifndef MFEM_DEREFMAT_OP
13#define MFEM_DEREFMAT_OP
14
15#include "fespace.hpp"
16
17#include "kernel_dispatch.hpp"
18
19namespace mfem
20{
21
22/// \cond DO_NOT_DOCUMENT
23
24struct DerefineMatrixOp : public Operator
25{
26 FiniteElementSpace *fespace;
27 /// offsets into block_storage
28 Array<int> block_offsets;
29 /// offsets into row_idcs
30 Array<int> block_row_idcs_offsets;
31 /// offsets into col_idcs
32 Array<int> block_col_idcs_offsets;
33 /// mapping for row dofs, INT_MAX indicates the block row should be ignored.
34 /// negative means the row data should be negated.
35 Array<int> row_idcs;
36 /// mapping for col dofs, negative means the col data should be negated.
37 Array<int> col_idcs;
38 /// dense block matrices which can be reused to construct the full matrix
39 /// operation. These are stored contiguously and blocks have no restrictions
40 /// on shape (can be rectangle and differ from block to block).
41 Vector block_storage;
42 /// maximum height of any block in block_storage for GPU
43 /// parallelization, or 1 for CPU runs.
44 int max_rows;
45
46 using MultKernelType = void (*)(const DerefineMatrixOp &, const Vector &,
47 Vector &);
48 /// template args: ordering, atomic
49 MFEM_REGISTER_KERNELS(MultKernel, MultKernelType, (Ordering::Type, bool));
50
51 struct Kernels
52 {
53 Kernels();
54 };
55
56 void Mult(const Vector &x, Vector &y) const;
57
58 DerefineMatrixOp(FiniteElementSpace &fespace_, int old_ndofs,
59 const Table *old_elem_dof, const Table *old_elem_fos);
60};
61
62/// \endcond DO_NOT_DOCUMENT
63
64} // namespace mfem
65#endif
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
Definition table.cpp:505
SchrodingerBaseKernels< ParMesh, ParFiniteElementSpace, ParComplexGridFunction, ParGridFunction, ParBilinearForm, ParMixedBilinearForm, ParLinearForm > Kernels