Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for global Lagrange multipliers in initElement() #735

Merged
merged 4 commits into from
Feb 3, 2025

Conversation

kmokstad
Copy link
Contributor

@kmokstad kmokstad commented Jan 31, 2025

We do this by providing an additional argument to the utl::gather() methods, telling how many (if any) nodes to omit from the MNPC array when extracting the element vectors. A virtual method getNoGLMs() is then used for the apps to define this value according the the chosen solution scheme.

The static evaluation methods are then put in the Lagrange namespace.
Lagrange::computeBasis() should resize the output arrays only if to small.
@kmokstad
Copy link
Contributor Author

jenkins build this with downstreams ifem-poisson=64 please

If nonzero, the last nskip entries in the index array are skipped.
@kmokstad kmokstad changed the title Account for global Lagrange multipliers in Lagrange patches (single-field) Account for global Lagrange multipliers in initElement() Feb 3, 2025
@kmokstad
Copy link
Contributor Author

kmokstad commented Feb 3, 2025

jenkins build this with downstreams ifem-poisson=64 ifem-stokes=318 please

This is used to specify how many nodes to drop from the MNPC list in
the utl::gather() call, in case of global Lagrange multipliers (GLM)
or mixed basis interpolation. In case of GLMs, a virtual method
IntegrandBase::getNoGLMs() needs to be overridden by the app.

Added: protected method IntegrandBase::initElement2() with optional
argument nskip. Use this method (instead of making a local reduced copy
of MNPC) in sub-classes, when some of the nodal indices should be left
out from MNPC when extracting element-level primary solution vectors.
Method IntegrandBase::initElement1() is also protected, for consistency.

Added: Optional argument nskip to initElement1() and evalSol1()
with similar interpretation as for initElement2()
@kmokstad
Copy link
Contributor Author

kmokstad commented Feb 3, 2025

jenkins build this with downstreams ifem-poisson=65 ifem-stokes=318 please

1 similar comment
@kmokstad
Copy link
Contributor Author

kmokstad commented Feb 3, 2025

jenkins build this with downstreams ifem-poisson=65 ifem-stokes=318 please

@kmokstad
Copy link
Contributor Author

kmokstad commented Feb 3, 2025

The last failure was only due to lag in the Jenkins build not using the latest force-push in the Poisson repo. Therefore merging anyways.

@kmokstad kmokstad merged commit 88c429a into OPM:master Feb 3, 2025
1 check failed
@kmokstad kmokstad deleted the glm-fix branch February 3, 2025 14:37
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.

1 participant