MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
ex37p.cpp File Reference

Go to the source code of this file.

Functions

real_t proj (ParGridFunction &psi, real_t target_volume, real_t tol=1e-12, int max_its=10)
 Bregman projection of ρ = sigmoid(ψ) onto the subspace ∫_Ω ρ dx = θ vol(Ω) as follows:
 
int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 184 of file ex37p.cpp.

◆ proj()

real_t proj ( ParGridFunction & psi,
real_t target_volume,
real_t tol = 1e-12,
int max_its = 10 )

Bregman projection of ρ = sigmoid(ψ) onto the subspace ∫_Ω ρ dx = θ vol(Ω) as follows:

  1. Compute the root of the R → R function f(c) = ∫_Ω sigmoid(ψ + c) dx - θ vol(Ω)
  2. Set ψ ← ψ + c.
Parameters
psia GridFunction to be updated
target_volumeθ vol(Ω)
tolNewton iteration tolerance
max_itsNewton maximum iteration number
Returns
real_t Final volume, ∫_Ω sigmoid(ψ)

Definition at line 71 of file ex37p.cpp.