Skip to content

Nonconforming container + kernel in 3D#1941

Merged
lsawade merged 10 commits into
PrincetonUniversity:nci3dfrom
int-ptr-ptr:nci3d
Jul 22, 2026
Merged

Nonconforming container + kernel in 3D#1941
lsawade merged 10 commits into
PrincetonUniversity:nci3dfrom
int-ptr-ptr:nci3d

Conversation

@int-ptr-ptr

Copy link
Copy Markdown
Collaborator

Description

This PR pulls from #1908, with the intersection override removed.

  • dim3/assembly now includes nonconforming_interfaces
  • chunk_face load specializations filled
  • dim3/nonconforming_interfaces filled (minor #include modification to dim2 to use forward declarations file).
    • fwd.hpp is used for forward declarations so that specific dim2 or dim3 files can be imported without the other (and removes the red squiggles when looking at the impl files, which is arguably more important).
  • update to compute/impl/compute_coupling kernel to allow the interpolative (pointwise) coupling.
  • migrated coupling_terms_pack to element_coupling/accessor, which template-dispatches based on tags.

Issue Number

If there is an issue created for these changes, link it here

Checklist

Please make sure to check developer documentation on specfem docs.

  • I ran the code through pre-commit to check style
  • THE DOCUMENTATION BUILDS WITHOUT WARNINGS/ERRORS
  • I have added labels to the PR (see right hand side of the PR page)
  • My code passes all the integration tests
  • I have added sufficient unittests to test my changes
  • I have added/updated documentation for the changes I am proposing
  • I have updated CMakeLists to ensure my code builds
  • My code builds across all platforms

@lsawade lsawade left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor changes, otherwise lgtm

#include "specfem/mesh.hpp"
#include "specfem/receivers.hpp"
#include "specfem/source.hpp"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment on lines +17 to +22
template <specfem::element::dimension_tag DimensionTag,
specfem::element_coupling::interface_tag InterfaceTag,
specfem::element::boundary_tag BoundaryTag,
specfem::element_connections::type ConnectionTag,
specfem::element_coupling::flux_scheme_tag FluxSchemeTag>
struct interface_container;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why import the fwd.hpp if you define this guy again? this file is not using the definition of the other struct in the forward header.

Also I would suggest -- if you really need it -- to call this base.hpp or template.hpp. because fwd.hpp is usually supposed to be ingested by other implementations or headers outside of this directory.

@@ -0,0 +1,27 @@
#pragma once

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This naming is misleading because fwd.hpp are usually used to be public and ingested by outside headers/implementations.

create

  • nonconforming_interfaces/nonconforming_interfaces_base.hpp
  • nonconforming_interfaces/impl/interface_container_base.hpp

then import these in the in the respective specialization

  • nonconforming_interfaces/dim3/nonconforming_interfaces.hpp
  • nonconforming_interfaces/dim3/impl/interface_container.hpp

Then you should remove some of the redundant forward declerations.

specfem::data_access::DataClassType::nonconforming_interface,
specfem::element::dimension_tag::dim3> {
public:
/** @brief Dimension tag for 2D specialization */

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/** @brief Dimension tag for 2D specialization */
/** @brief Dimension tag for 3D specialization */

Comment thread core/specfem/data_access/accessor.hpp Outdated
struct EmptyAccessor {

/**
* @brief Capture any constructer configuration. Should do nothing.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Capture any constructer configuration. Should do nothing.
* @brief Capture any constructor configuration. Should do nothing.

Comment on lines +98 to +99
* @param ngllz Number of GLL points in z-direction
* @param ngllx Number of GLL points in x-direction

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param ngllz Number of GLL points in z-direction
* @param ngllx Number of GLL points in x-direction
* @param ngllz Number of GLL points in z-direction
* @param nglly Number of GLL points in y-direction
* @param ngllx Number of GLL points in x-direction

@Rohit-Kakodkar

Copy link
Copy Markdown
Collaborator

@int-ptr-ptr Can you have a look Lucas's comments

@lsawade

lsawade commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

@int-ptr-ptr ping

@int-ptr-ptr

Copy link
Copy Markdown
Collaborator Author

Compiling right now to ensure review changes didn't break.

Since there are bugs still being worked out, would it make sense to target into a different issue branch, or is devel fine?

@int-ptr-ptr
int-ptr-ptr requested a review from lsawade July 13, 2026 18:16
@lsawade

lsawade commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Maybe target issue branch I'll create one.

@lsawade
lsawade changed the base branch from devel to nci3d July 22, 2026 13:47
@lsawade
lsawade merged commit 0482d51 into PrincetonUniversity:nci3d Jul 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants