diff --git a/exSaddle.c b/exSaddle.c index b86f1f1..5721833 100644 --- a/exSaddle.c +++ b/exSaddle.c @@ -26,7 +26,7 @@ static char help[] = "Solves " #endif "-model 6 : single sinker \n" #if NSD == 3 -"-model 7 : lots of sinkers, controlled by -sinker_n \n" +"-model 7 : lots of sinkers, controlled by -sinker_n and -sinker_use_file\n" #endif #if defined(LAME) "-model 8 : one inclusion, fixed base, free elsewhere \n" diff --git a/models.c b/models.c index 1852ef8..b91a19f 100644 --- a/models.c +++ b/models.c @@ -655,7 +655,7 @@ Lame' (Elasticity) PetscErrorCode LameOneSinker_EvaluateCoefficients(PetscReal coor[],PetscReal *mu,PetscReal *lambda, PetscReal Fu[],PetscReal Fp[]) { PetscErrorCode ierr; - static PetscReal opts_mu0,opts_mu1,opts_lambda0,opts_lambda1,opts_rad; + static PetscReal opts_mu0,opts_mu1,opts_lambda0,opts_lambda1,opts_rad,opts_rho0,opts_rho1; static PetscBool been_here = PETSC_FALSE; PetscReal mu_qp,lambda_qp,rho_qp; PetscBool inside = PETSC_FALSE; @@ -668,6 +668,8 @@ PetscErrorCode LameOneSinker_EvaluateCoefficients(PetscReal coor[],PetscReal *mu opts_lambda0 = 1.0; opts_lambda1 = 2.0; opts_rad = 0.25; + opts_rho0 = 1.0; + opts_rho1 = 2.0; ierr = PetscOptionsGetReal(NULL,NULL,"-mu0",&opts_mu0,0);CHKERRQ(ierr); ierr = PetscOptionsGetReal(NULL,NULL,"-mu1",&opts_mu1,0);CHKERRQ(ierr); ierr = PetscOptionsGetReal(NULL,NULL,"-lambda0",&opts_lambda0,0);CHKERRQ(ierr); @@ -683,7 +685,7 @@ PetscErrorCode LameOneSinker_EvaluateCoefficients(PetscReal coor[],PetscReal *mu mu_qp = opts_mu0; lambda_qp = opts_lambda0; - rho_qp = 1.0; + rho_qp = opts_rho0; { #if NSD == 2 @@ -695,7 +697,7 @@ PetscErrorCode LameOneSinker_EvaluateCoefficients(PetscReal coor[],PetscReal *mu } if (inside) { - rho_qp = 2.0; /* 2x density inside the inclusion */ + rho_qp = opts_rho1; mu_qp = opts_mu1; lambda_qp = opts_lambda1; } @@ -722,7 +724,7 @@ PetscErrorCode LameOneSinker_EvaluateCoefficients(PetscReal coor[],PetscReal *mu /******************************************************************************/ PetscErrorCode LameXSinker_EvaluateCoefficients(PetscReal coor[],PetscReal *mu,PetscReal *lambda,PetscReal Fu[],PetscReal Fp[]) { - static PetscReal opts_mu0,opts_mu1,opts_lambda0,opts_lambda1,opts_rad; + static PetscReal opts_mu0,opts_mu1,opts_lambda0,opts_lambda1,opts_rad,opts_rho0,opts_rho1; static PetscBool been_here = PETSC_FALSE; static PetscInt opts_numinc; const PetscReal posx[8] = { 0.27 , 0.6 , 0.7 , 0.2 , 0.85 , 0.4 , 0.16 , 0.55 }; @@ -744,6 +746,8 @@ PetscErrorCode LameXSinker_EvaluateCoefficients(PetscReal coor[],PetscReal *mu,P opts_lambda1 = 1.0; opts_rad = 0.05; opts_numinc = 3; + opts_rho0 = 1.0; + opts_rho1 = 2.0; ierr = PetscOptionsGetReal(NULL,NULL,"-mu0",&opts_mu0,0);CHKERRQ(ierr); ierr = PetscOptionsGetReal(NULL,NULL,"-mu1",&opts_mu1,0);CHKERRQ(ierr); @@ -769,7 +773,7 @@ PetscErrorCode LameXSinker_EvaluateCoefficients(PetscReal coor[],PetscReal *mu,P mu_qp = opts_mu0; lambda_qp = opts_lambda0; - rho_qp = 1.0; + rho_qp = opts_rho0; for(i=0; i