Skip to content
Back to skills

Deep Ritz Stochastic Quadrature Sampling

ASecurity

Generate stochastic interior and boundary quadrature samples for Deep Ritz variational PDE training.

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
toolspythonbash

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill deep_ritz_stochastic_quadrature_sampling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Deep Ritz Stochastic Quadrature Sampling?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Deep Ritz Stochastic Quadrature Sampling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-deep-ritz-stochastic-quadrature-sampling/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-deep-ritz-stochastic-quadrature-sampling)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: deep_ritz_stochastic_quadrature_sampling
description: Generate stochastic interior and boundary quadrature samples for Deep Ritz variational PDE training.
---

# Deep Ritz Stochastic Quadrature Sampling

## When To Use

Use this skill when implementing a Deep Ritz or variational neural PDE experiment that needs Monte Carlo estimates of domain and boundary integrals. Do not use it for fixed-grid finite differences or finite elements.

## Inputs

- `dimension`: positive integer spatial dimension.
- `lower`, `upper`: scalar hypercube bounds.
- `interior_count`: number of interior samples.
- `boundary_count`: number of boundary samples.
- `seed`: optional deterministic seed.

## Outputs

- Interior points inside `[lower, upper]^dimension`.
- Boundary points with at least one coordinate fixed to a lower or upper face.
- Face metadata for each boundary point.

## Workflow

1. Use fresh random interior points for each training iteration.
2. Sample boundary faces uniformly across dimensions and low/high sides.
3. Use simple batch means as equal-weight Monte Carlo quadrature estimates.
4. Use fixed seeds only for validation, tests, and reproducible reduced recovery.

## Validation

Run:

```bash
python tests/test_sampler.py
```

## Limitations

The helper targets hypercube domains, matching the paper's high-dimensional Poisson recovery. L-shaped domains require a custom rejection sampler.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.