Пример #1
0
import sys
sys.path.insert(0, '../..')

# Problem to solve
from nonvarFEM.problems.testsNVP import FNS_5_4_L_inf_Coeffs

# Solve routine
from nonvarFEM import solveProblem

# Auxiliary stuff
import nonvarFEM.helpers as hlp

if __name__ == "__main__":

    # Load standard options
    global_opt = hlp.standardOptions()

    P = FNS_5_4_L_inf_Coeffs()
    global_opt["id"] = "FNS_5_4"

    global_opt["NdofsThreshold"] = 30000
    # Fix polynomial degree
    global_opt["p"] = 2
    global_opt["q"] = 2
    global_opt["plotMesh"] = 1
    global_opt["saveMesh"] = 1
    global_opt["plotSolution"] = 1
    global_opt["saveSolution"] = 1
    global_opt["meshRefinement"] = 2
    global_opt["refinementThreshold"] = .90
    global_opt["writeToCsv"] = 0
sys.path.insert(0, '../..')

# Problem to solve
from nonvarFEM.problems.testsNVP import Sol_in_H_alpha

# Solve routine
from nonvarFEM import solveProblem

# Auxiliary stuff
from nonvarFEM.helpers import standardOptions, opt_Own_CG_0_stab


if __name__ == "__main__":

    # Load standard options
    global_opt = standardOptions()

    # Discontinuous A
    P = Sol_in_H_alpha(1.5)
    global_opt["id"] = 'Sol_in_H_2.5'

    global_opt["NdofsThreshold"] = 30000
    # Fix polynomial degree
    global_opt["p"] = 2
    global_opt["q"] = 2
    global_opt["plotMesh"] = 1
    global_opt["saveMesh"] = 1
    global_opt["plotSolution"] = 1
    global_opt["saveSolution"] = 1
    global_opt["meshRefinement"] = 2
    global_opt["refinementThreshold"] = .90
Пример #3
0
# Elliptic non-variational pdes
import nonvarFEM.problems.testsNVP as NVP

# Parabolic non-variational pdes
import nonvarFEM.problems.testsParabolicNVP as PNVP

# Elliptic HJB equations
import nonvarFEM.problems.testsHJB as HJB

import nonvarFEM.problems.testsParabolicHJB as PHJB

from nonvarFEM import solveProblem

if __name__ == "__main__":

    opt = hlp.standardOptions()

    opt["initialMeshResolution"] = 16
    opt["timeSteps"] = 10
    opt["timeStepFactor"] = 2
    opt["printCordesInfo"] = 0

    opt["plotSolution"] = 1
    opt["plotErrorEstimates"] = 0
    opt["plotConvergenceRates"] = 0
    opt["plotMesh"] = 0
    opt["saveMesh"] = 0
    opt["holdOn"] = 0
    opt["normalizeSystem"] = 0
    opt["meshRefinement"] = 0
Пример #4
0
# Solve routine
from nonvarFEM import solveProblem

# Auxiliary stuff
from nonvarFEM.helpers import standardOptions, writeOutputToCsv

# Nice organization of results
import pandas as pd

WRITE_CSV = True

if __name__ == "__main__":
    kappa_list = [0.9, 0.99, 0.999]
    eta_list = [5, 1, 0]
    opt = standardOptions()

    # Fix polynomial degree
    opt["HessianSpace"] = 'CG'
    opt["p"] = 2
    opt["q"] = 2

    # We want to compare gmres iteration numbers
    opt["solutionMethod"] = 'BHWreduced'
    # Regular refinement
    opt["meshRefinement"] = 1
    # Initial mesh resolution h = 2^-3
    opt["initialMeshResolution"] = 8
    # Maximum number of dofs
    opt["NdofsThreshold"] = 70000
    # Don't write all the information