ug4
conv_rates_static.lua File Reference

Functions

function util rates static compute (ConvRateSetup)
 
function util rates static StdLabel MeasLatexP (disc, p)
 
function util rates static StdLabel MeasLatexQ (disc, p)
 
function util rates static StdLabel MeasPdfP (disc, p)
 
function util rates static StdLabel MeasPdfQ (disc, p)
 
function util rates static NoMaxLevelPadding (p)
 
function util rates static NoMinLevelPadding (p)
 
function util rates static replot (gpOptions, file)
 
function util rates static StdComputeLinearSolution (u, domainDisc, solver)
 
function util rates static StdComputeNonLinearSolution (u, domainDisc, solver)
 
function util rates static StdMaxLevelPadding (p)
 
function util rates static StdMinLevelPadding (p)
 
function util rates static StdPrepareInitialGuess (u, lev, minLev, maxLev, domainDisc, solver)
 
function util rates static StdLabel XLatex (x)
 
function util rates static StdLabel XPdf (x)
 
function util rates static StdLabel YLatex (f, t, n)
 
function util rates static StdLabel YPdf (f, t, n)
 

Function Documentation

◆ compute()

function util rates static compute ( ConvRateSetup  )

Computes convergence rates for a static problem

In the convergence rate setup the following parameters can be passed:

  • (required) CreateDomain()
    function used to create Domain
  • (required) CreateApproxSpace(dom, discType, p)
    function used to create ApproximationSpace
  • (required) CreateDomainDisc(approxSpace, discType, p)
    function used to create Domain Discretization
  • (required) CreateSolver(approxSpace, discType, p)
    function used to create Solver
  • (required) DiscTypes
    Array containing types, orders and level to be looped
  • (optional) ComputeSolution(u, domainDisc, solver)
    function used to compute solution
  • (optional) PrepareInitialGuess
    function used to prepare Initial Guess
  • (optional) ExactSol
    Array containing exact solution as a function
  • (optional) ExactGrad
    Array containing exact gradients as a function
Parameters
ConvRateSetup setup used

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :193-731

◆ MeasLatexP()

function util rates static StdLabel MeasLatexP ( disc  ,
p   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :110-112

function util.rates.static.StdLabel.MeasLatexP(disc, p)
return disc.." $\\mathbb{P}_{"..p.."}$"
end
parameterString p

◆ MeasLatexQ()

function util rates static StdLabel MeasLatexQ ( disc  ,
p   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :114-116

function util.rates.static.StdLabel.MeasLatexQ(disc, p)
return disc.." $\\mathbb{Q}_{"..p.."}$"
end

◆ MeasPdfP()

function util rates static StdLabel MeasPdfP ( disc  ,
p   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :137-139

function util.rates.static.StdLabel.MeasPdfP(disc, p)
return disc.." $P_"..p.."$"
end

References p.

◆ MeasPdfQ()

function util rates static StdLabel MeasPdfQ ( disc  ,
p   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :141-143

function util.rates.static.StdLabel.MeasPdfQ(disc, p)
return disc.." $Q_"..p.."$"
end

◆ NoMaxLevelPadding()

function util rates static NoMaxLevelPadding ( p  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :96-98

function util.rates.static.NoMaxLevelPadding(p)
return 0
end

◆ NoMinLevelPadding()

function util rates static NoMinLevelPadding ( p  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :100-102

function util.rates.static.NoMinLevelPadding(p)
return 0
end

◆ replot()

function util rates static replot ( gpOptions  ,
file   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :734-761

References CreateApproxSpace(), and CreateDomainDisc().

◆ StdComputeLinearSolution()

function util rates static StdComputeLinearSolution ( ,
domainDisc  ,
solver   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :53-76

◆ StdComputeNonLinearSolution()

function util rates static StdComputeNonLinearSolution ( ,
domainDisc  ,
solver   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :78-85

function util.rates.static.StdComputeNonLinearSolution(u, domainDisc, solver)
solver:init(AssembledOperator(domainDisc, u:grid_level()))
if solver:apply(u) == false then
print (">> Newton solver apply failed."); exit();
end
write(">> Newton Solver done.\n")
end
function table print(data, style)
function util FileDummy write(...) end
virtual void init()
if(!(yy_init))
Definition: lexer.cpp:997

◆ StdMaxLevelPadding()

function util rates static StdMaxLevelPadding ( p  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :87-89

function util.rates.static.StdMaxLevelPadding(p)
return math.floor(p/2)
end

◆ StdMinLevelPadding()

function util rates static StdMinLevelPadding ( p  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :91-93

function util.rates.static.StdMinLevelPadding(p)
return 0
end

◆ StdPrepareInitialGuess()

function util rates static StdPrepareInitialGuess ( ,
lev  ,
minLev  ,
maxLev  ,
domainDisc  ,
solver   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :41-50

function util.rates.static.StdPrepareInitialGuess(u, lev, minLev, maxLev,
if lev > minLev then
Prolongate(u[lev], u[lev-1]);
write(">> Solution interpolated as start value from coarser level.\n")
else
u[lev]:set(0.0)
write(">> Solution set to zero on coarsest level.\n")
end
end
void Prolongate(GridFunction< TDomain, TAlgebra > &uFine, const GridFunction< TDomain, TAlgebra > &uCoarse)
Definition: level_transfer.h:343

◆ XLatex()

function util rates static StdLabel XLatex ( )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :118-121

function util.rates.static.StdLabel.XLatex(x)
local gpXLabel ={ DoFs = "Anzahl Unbekannte", h = "h (Gitterweite)"}
return gpXLabel[x]
end
int local(bglp_vertex_descriptor p)
Definition: parallel_matrix.h:57

◆ XPdf()

function util rates static StdLabel XPdf ( )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :145-148

function util.rates.static.StdLabel.XPdf(x)
local gpXLabel ={ DoFs = "Anzahl Unbekannte", h = "h (Gitterweite)"}
return gpXLabel[x]
end

References CreateApproxSpace(), and CreateDomainDisc().

◆ YLatex()

function util rates static StdLabel YLatex ( ,
,
 
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :123-135

function util.rates.static.StdLabel.YLatex(f, t, n)
local gpType = { ["l-exact"] = "{}",
["l-lmax"] = "h_{\\text{min}}",
["l-prev"] = "{h/2}",
}
local gpNorm = { l2 = "L_2", h1 = "H^1"}
if t == "interpol" then
return "$\\norm{\\mathcal{I}_h("..f..") - "..f.."}_{"..gpNorm[n].."}$"
else
return "$\\norm{"..f.."_h - "..f.."_{"..gpType[t].."} }_{ "..gpNorm[n].."}$"
end
end

◆ YPdf()

function util rates static StdLabel YPdf ( ,
,
 
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / conv_rates_static.lua :150-162

function util.rates.static.StdLabel.YPdf(f, t, n)
local gpType = { ["l-exact"] = "{}",
["l-lmax"] = "h_{\\text{min}}",
["l-prev"] = "{h/2}",
}
local gpNorm = { l2 = "L_2", h1 = "H^1"}
if t == "interpol" then
return "$|| I_h("..f..") - "..f.." ||_{"..gpNorm[n].."}$"
else
return "$|| "..f.."_h - "..f.."_{"..gpType[t].."} ||_{"..gpNorm[n].."}$"
end
end