Skip to content

Assemble the stiffness matrix as a Tpetra::CrsMatrix<float> #1982

Description

@Rohit-Kakodkar

New files under core/specfem/linear_system/ (namespace specfem::linear_system).

  1. dof_map.hpp — build the Tpetra::Map of owned global ids and the gid(iglob,icomp)
    helper from get_iglob/get_nglob. Owned iglob → owned GIDs; shared-interface points →
    column/overlap map; fillComplete's Export(ADD) reproduces the matrix-free assembly sum.
  2. element_stiffness.hpp/.tpp — per element, form the small dense block K_e
    (size (NGLL³·ncomp)²) by probing the single-element operator with local unit vectors,
    reusing element_gradient/compute_stress/element_divergence, velocity ≡ 0 (pure K),
    no mass division. Scalar = float.
  3. tpetra_assembler.hpp/.cpp — build Tpetra::CrsGraph from element connectivity,
    then fill Tpetra::CrsMatrix<float> directly by scattering each K_e (batched row
    inserts; only the small K_e block is ever materialized — no global dense matrix),
    fillComplete().

Scope guards: 3D single-medium elastic isotropic, attenuation_tag::none,
boundary_tag::none/free-surface only. Defer Stacey (C) and fluid-solid coupling.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions