From fc1f723d531080fdd732e22c2679c7aca212374b Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel <lisa_julia.nebel@tu-dresden.de> Date: Wed, 1 Jul 2020 09:54:19 +0200 Subject: [PATCH] Move film-on-substrate.parset-file, dirichlet-values-py file and surface-shell-parameters-py-file from src to problems folder --- {src => problems}/film-on-substrate.parset | 14 +++++++------- .../identity-dirichlet-values.py | 9 ++------- {src => problems}/surface-shell-parameters-1-3.py | 0 src/film-on-substrate.cc | 4 ++-- 4 files changed, 11 insertions(+), 16 deletions(-) rename {src => problems}/film-on-substrate.parset (94%) rename src/cantilever-dirichlet-values.py => problems/identity-dirichlet-values.py (56%) rename {src => problems}/surface-shell-parameters-1-3.py (100%) diff --git a/src/film-on-substrate.parset b/problems/film-on-substrate.parset similarity index 94% rename from src/film-on-substrate.parset rename to problems/film-on-substrate.parset index d594ef83..d5f55718 100644 --- a/src/film-on-substrate.parset +++ b/problems/film-on-substrate.parset @@ -9,10 +9,10 @@ structuredGrid = true lower = 0 0 0 upper = 200 100 200 -elements = 10 5 5 +elements = 4 2 2 # Number of grid levels, all elements containing surfaceshell grid vertices will get adaptively refined -numLevels = 2 +numLevels = 1 # When starting from a file, the stress-free configuration of the surfaceShell is read from a file, this file needs to match the *finest* grid level! startFromFile = false @@ -26,7 +26,7 @@ gridDeformation="[1.3*x[0], x[1], x[2]]" # Boundary values ############################################# -problem = cantilever +dirichletValues = identity-dirichlet-values ### Python predicate specifying all Dirichlet grid vertices # x is the vertex coordinate @@ -34,7 +34,7 @@ dirichletVerticesPredicate = "x[0] < 0.01" ### Python predicate specifying all surfaceshell grid vertices, elements conataining these vertices will get adaptively refined # x is the vertex coordinate -surfaceShellVerticesPredicate = "x[2] > 199.99" +surfaceShellVerticesPredicate = "x[2] > 199.99 and x[0] > 49.99 and x[0] < 150.01" ### Python predicate specifying all Neumann grid vertices # x is the vertex coordinate @@ -60,7 +60,7 @@ numHomotopySteps = 1 tolerance = 1e-3 # Max number of solver steps -maxSolverSteps = 300 +maxSolverSteps = 1 # Measure convergence instrumented = 0 @@ -70,7 +70,7 @@ instrumented = 0 ############################################# # initial regularization parameter -initialRegularization = 10000000000 +initialRegularization = 1000000 ############################################# # Solver parameters specific for trust-region solver using multigrid solver @@ -106,7 +106,7 @@ baseTolerance = 1e-8 # Material parameters ############################ -energy = stvenantkirchhoff +energy = mooneyrivlin ## For the Wriggers L-shape example [materialParameters] diff --git a/src/cantilever-dirichlet-values.py b/problems/identity-dirichlet-values.py similarity index 56% rename from src/cantilever-dirichlet-values.py rename to problems/identity-dirichlet-values.py index 4de4795d..0de07b12 100644 --- a/src/cantilever-dirichlet-values.py +++ b/problems/identity-dirichlet-values.py @@ -5,13 +5,8 @@ class DirichletValues: self.homotopyParameter = homotopyParameter def deformation(self, x): - # Dirichlet b.c. simply clamp the shell in the reference configuration - out = x - - return out - + return x def orientation(self, x): - rotation = [[1,0,0], [0, 1, 0], [0, 0, 1]] + rotation = [[1,0,0], [0,1,0], [0,0,1]] return rotation - diff --git a/src/surface-shell-parameters-1-3.py b/problems/surface-shell-parameters-1-3.py similarity index 100% rename from src/surface-shell-parameters-1-3.py rename to problems/surface-shell-parameters-1-3.py diff --git a/src/film-on-substrate.cc b/src/film-on-substrate.cc index 6348e753..0f263551 100644 --- a/src/film-on-substrate.cc +++ b/src/film-on-substrate.cc @@ -133,7 +133,7 @@ int main (int argc, char *argv[]) try Python::runStream() << std::endl << "import sys" << std::endl << "import os" - << std::endl << "sys.path.append(os.getcwd() + '/../../src/')" + << std::endl << "sys.path.append(os.getcwd() + '/../../problems/')" << std::endl; typedef BlockVector<FieldVector<double,dim> > SolutionType; @@ -584,7 +584,7 @@ int main (int argc, char *argv[]) try // Set Dirichlet values //////////////////////////////////////////////////////// - Python::Reference dirichletValuesClass = Python::import(parameterSet.get<std::string>("problem") + "-dirichlet-values"); + Python::Reference dirichletValuesClass = Python::import(parameterSet.get<std::string>("dirichletValues")); Python::Callable C = dirichletValuesClass.get("DirichletValues"); -- GitLab