question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

coordinate-dependent Dirichlet data for other than P1

See original GitHub issue

The specification of inhomogeneous Dirichlet data for the Laplace equation is demonstrated in ex14.py for ElementTriP1: https://github.com/kinnala/scikit-fem/blob/9c0cf416745941abd72f70865351ef0e095f83b2/docs/examples/ex14.py#L37

however, Mesh.p only contains the nodal coordinates, so this doesn’t work if the element is changed to say ElementTriP2.

How might one go about specifying inhomogeneous Dirichlet data for elements with degrees of freedom that aren’t all located at nodes of the mesh? Does this relate to #84? The P2 degrees of freedom on the boundary are available through basis.get_dofs().all().

I suppose one could fall back on other techniques like:

  • penalization, i.e. approximating the Dirichlet condition with a Robin condition (Ern & Guermond 2002, §9.5.5)
  • Lagrange multiplier (Stenberg 1995)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
kinnalacommented, Feb 9, 2019

Yes this is L^2 projection on the boundary. Consistency error in the sense that in this case we would know exactly the value for the degree-of-freedom but when using L^2 projection you are unlikely to get the exact correct value. This is probably just fine for any practical applications and has only some theoretical implications.

1reaction
kinnalacommented, Feb 9, 2019

Have you tried doing something like

fb = FacetBasis(m, ElementTriP2())

@linear_form
def fv(v, dv, w):
    x, y = w[0]
    return 4.0*y*(1-y)

u[I] = solve(asm(mass, fb), asm(fv, fb), I=I)

where I contains the DOF indices belonging to the respective boundary. I didn’t try it but I think it should work fine. This must be of course adapted to the vectorial case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Finding dof locations · Issue #84 · kinnala/scikit-fem - GitHub
Make local DOF locations to each element Map these to global coordinates Make nice interface ... coordinate-dependent Dirichlet data for other than P1...
Read more >
The Dependent Dirichlet Process and Related Models - arXiv
We review the popular class of dependent Dirichlet process (DDP) models. These define a widely used fully nonparametric Bayesian regression for ...
Read more >
Order-Based Dependent Dirichlet Processes - JStor
We focus mostly on the class of random distributions that induces a Dirichlet process at each covariate value.
Read more >
A vector of Dirichlet processes - Project Euclid
accommodating for forms of dependence more general than exchangeability and able to capture the “heterogeneity” featured by the data. Here we shall focus....
Read more >
Order-Based Dependent Dirichlet Processes - CiteSeerX
In this paper we propose a new framework for Bayesian nonparametric modelling with continuous covariates. In particular, we allow the nonparametric ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found