diff --git a/NonLinearSolver/Interface/InterfaceKeys.cpp b/NonLinearSolver/Interface/InterfaceKeys.cpp index 911bc14305813fe9f1c874674c48b0517559e209..c79375568961c304fbd8f129c5cb2650d243f2e0 100644 --- a/NonLinearSolver/Interface/InterfaceKeys.cpp +++ b/NonLinearSolver/Interface/InterfaceKeys.cpp @@ -54,6 +54,7 @@ bool interfaceKeys::operator==(const interfaceKeys &key)const{ } else Msg::Error("Missing case in interfaceKeys::operator = \n"); + return false; }; bool interfaceKeys::operator < (const interfaceKeys& key) const{ @@ -83,5 +84,6 @@ bool interfaceKeys::operator < (const interfaceKeys& key) const{ } else printf("Missing case in interfaceKeys::operator < \n"); + return false; }; diff --git a/NonLinearSolver/internalPoints/ipFiniteStrain.cpp b/NonLinearSolver/internalPoints/ipFiniteStrain.cpp index e398749f45d980575150bcfa689d247f23a84d8c..b4339e93fc0814b10e299e96a27fbe7ec6b657e4 100644 --- a/NonLinearSolver/internalPoints/ipFiniteStrain.cpp +++ b/NonLinearSolver/internalPoints/ipFiniteStrain.cpp @@ -142,7 +142,11 @@ std::vector<CurlTraits<double>::CurlType>& ipFiniteStrain::fcurl(const FunctionS if (typeFunction == "HcurlLegendre") return _interfaceGPData->fcurl(space,e,GP,typeFunction); else + { Msg::Error("Wrong function invoked; use Curlfcurl() instead"); + static std::vector<CurlTraits<double>::CurlType> tmp; + return tmp; + } } std::vector<CurlTraits<double>::CurlCurlType>& ipFiniteStrain::Curlfcurl(const FunctionSpaceBase* space, MInterfaceElement* ele, IntPt &GP, const std::string & typeFunction) const @@ -155,7 +159,11 @@ std::vector<CurlTraits<double>::CurlCurlType>& ipFiniteStrain::Curlfcurl(const F if (typeFunction == "CurlHcurlLegendre") return _interfaceGPData->Curlfcurl(space,e,GP,typeFunction); else + { Msg::Error("Wrong function invoked; use fcurl() instead"); + static std::vector<CurlTraits<double>::CurlCurlType> tmp; + return tmp; + } } double& ipFiniteStrain::getJacobianDeterminant(MInterfaceElement* ele, IntPt &GP) const{ diff --git a/NonLinearSolver/materialLaw/PorousYieldSurface.cpp b/NonLinearSolver/materialLaw/PorousYieldSurface.cpp index 28eb578eb57d49859368f70cebad30658b459938..c97212b858b6e586c78ab0c2a533b4e5fdcff8b7 100644 --- a/NonLinearSolver/materialLaw/PorousYieldSurface.cpp +++ b/NonLinearSolver/materialLaw/PorousYieldSurface.cpp @@ -45,7 +45,7 @@ PorousYieldSurface& PorousYieldSurface::operator=(const PorousYieldSurface &sour num_ = source.num_; isInitialized_ = source.isInitialized_; mlawPorous_ = source.mlawPorous_; - + return *this; }; diff --git a/NonLinearSolver/materialLaw/Weight.cpp b/NonLinearSolver/materialLaw/Weight.cpp index ac9c4ab6b9fe46d4b9f88e9e4b60d1ea25c5ac08..82224b0434befb2fb5386f0fbd7069403ae49593 100644 --- a/NonLinearSolver/materialLaw/Weight.cpp +++ b/NonLinearSolver/materialLaw/Weight.cpp @@ -738,14 +738,14 @@ void getARWeight(double theta, double phi, int Total_number_of_AR_per_phase, dou ARtable = fopen("ARtable.i01", "r"); if(ARtable==NULL) printf("Error, no ARtable.i01 file\n"); - fscanf(ARtable,"%s%*[^\n]",line); - fscanf(ARtable, "%s", line); + int okf = fscanf(ARtable,"%s%*[^\n]",line); + okf =fscanf(ARtable, "%s", line); Nfacets = atoi(line); - fscanf(ARtable, "%s", line); + okf = fscanf(ARtable, "%s", line); NAR = atoi(line); if(NAR!=Total_number_of_AR_per_phase) printf("NAR!=Total_number_of_AR_per_phase\n"); - fscanf(ARtable, "%s%*[^\n]", line); + okf =fscanf(ARtable, "%s%*[^\n]", line); DAR = atof(line); if(listTheta==NULL) @@ -757,23 +757,23 @@ void getARWeight(double theta, double phi, int Total_number_of_AR_per_phase, dou mallocmatrix(&pdfAR,Nfacets,NAR); } - fscanf(ARtable,"%s%*[^\n]",line); + okf =fscanf(ARtable,"%s%*[^\n]",line); for(i=0;i<Nfacets;i++) { - fscanf(ARtable, "%s", line); + okf =fscanf(ARtable, "%s", line); listTheta[i]=atof(line); - fscanf(ARtable, "%s", line); + okf =fscanf(ARtable, "%s", line); listPhi[i]=atof(line); - fscanf(ARtable, "%s", line); + okf =fscanf(ARtable, "%s", line); listSurf[i]=atof(line); - fscanf(ARtable, "%s", line); + okf =fscanf(ARtable, "%s", line); listVol[i]=atof(line); for(j=0;j<NAR;j++) { if(j<NAR-1) - fscanf(ARtable, "%s", line); + okf =fscanf(ARtable, "%s", line); else - fscanf(ARtable, "%s%*[^\n]", line); + okf =fscanf(ARtable, "%s%*[^\n]", line); pdfAR[i][j]=atof(line); } } diff --git a/NonLinearSolver/materialLaw/material.cpp b/NonLinearSolver/materialLaw/material.cpp index fd0f8c68c2ab962bb9c3d65ad40116cf66fe1c0f..9081c46c5a8991f5c1ee89d53ff3fe5f28c32660 100755 --- a/NonLinearSolver/materialLaw/material.cpp +++ b/NonLinearSolver/materialLaw/material.cpp @@ -44,16 +44,19 @@ int Material::constboxSecantMixte(double* dstrn, double* strs_n, double* strs, int Material::constboxLargD(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt) { printf("Function constBoxLargD is not defined for this material\n"); + return (1); } int Material::constbox_2order(int mtx, double *DE, double* dstrn, double* strs, double* statev_n, double* statev, double **Calgo, Lcc* LCC, YieldF* YF, double** c_g, int kinc, int kstep, double dt) { printf("Function constBox_2order is not defined for this material\n"); + return (1); } int Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, ELcc* LCC, EPR* epresult, double alpha, double** c_g, int kinc, int kstep, double dt) { printf("Function constbox_2ndNtr is not defined for this material\n"); + return (1); } int Material::get_pos_eqstrs() const @@ -86,7 +89,7 @@ bool Material::eqstrs_exist() const int Material::constboxSecantMixteGeneric(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt, bool forceZero, bool forceRes, double E, double nu, int htype, double sy0, double hexp, double hmod1, double hmod2, double hp0, int viscmodel, double vmod, double vstressy, double vexp, bool evp) { - + return (1); } #ifdef NONLOCALGMSH @@ -146,7 +149,7 @@ void Material::get_elOp_icl(double** Cel) double Material::get_vfI() { printf("Function get_vfI is not defined for this material\n"); - + return 0.; } #endif @@ -278,18 +281,18 @@ void EL_Material::print(){ //constbox int EL_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ - + return (1); } //costboxSecant int EL_Material::constboxSecantMixte(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt, bool forceZero, bool forceRes){ - + return (1); } int EL_Material::constboxLargD(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt){ - + return (1); } //constitutive box called by 2rd order method******************* @@ -298,7 +301,7 @@ int EL_Material::constboxLargD(double* dstrn, double* strs_n, double* strs, dou int EL_Material::constbox_2order( int mtx, double *DE, double* dstrn, double* strs, double* statev_n, double* statev, double **Calgo, Lcc* LCC, YieldF* YF, double** c_g, int kinc, int kstep, double dt){ - + return (1); } @@ -524,12 +527,13 @@ void EP_Material::print(){ //constbox //*****************New tenor added by wu ling: double* dpdE, double* strs_dDdp_bar **************** int EP_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ - + return (1); } //****************************************************** //costboxSecant //**************************************************** int EP_Material::constboxSecantMixte(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt, bool forceZero, bool forceRes){ + return (1); } //end of costboxSecant @@ -540,7 +544,7 @@ int EP_Material::constboxSecantMixte(double* dstrn, double* strs_n, double* str int EP_Material::constboxLargD(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt){ - + return (1); } //end of constbox large deformation @@ -551,7 +555,7 @@ double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, int EP_Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, ELcc* LCC, EPR* epresult, double alpha, double** c_g, int kinc, int kstep, double dt){ - + return (1); } // end of constbox_2ndNtr() @@ -563,7 +567,7 @@ int EP_Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_n, dou int EP_Material::constbox_2order(int mtx, double *DE, double* dstrn, double* strs, double* statev_n, double* statev, double **Calgo, Lcc* LCC, YieldF* YF, double** c_g, int kinc, int kstep, double dt){ - + return (1); } //end of consbox_2order @@ -914,7 +918,7 @@ void EP_Stoch_Material::print(){ //constbox //*****************New tenor added by wu ling: double* dpdE, double* strs_dDdp_bar **************** int EP_Stoch_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ - + return (1); } //****************************************************** //costboxSecant @@ -922,7 +926,7 @@ int EP_Stoch_Material::constbox(double* dstrn, double* strs_n, double* strs, do int EP_Stoch_Material::constboxSecantMixte(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt, bool forceZero, bool forceRes) { - + return (1); } //end of costboxSecant @@ -935,7 +939,7 @@ statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double int EP_Stoch_Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, ELcc* LCC, EPR* epresult, double alpha, double** c_g, int kinc, int kstep, double dt){ - + return (1); } // end of constbox_2ndNtr() @@ -1255,7 +1259,7 @@ void EVP_Material::print(){ //constbox //*****************New tenor added by wu ling: double* dpdE, double* strs_dDdp_bar **************** int EVP_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ - + return (1); } //****************************************************** //costboxSecant @@ -1263,6 +1267,7 @@ int EVP_Material::constbox(double* dstrn, double* strs_n, double* strs, double* int EVP_Material::constboxSecantMixte(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt, bool forceZero, bool forceRes) { + return (1); } //end of costboxSecant @@ -1273,7 +1278,7 @@ statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double int EVP_Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, ELcc* LCC, EPR* epresult, double alpha, double** c_g, int kinc, int kstep, double dt){ - + return (1); } // end of constbox_2ndNtr() @@ -1286,7 +1291,7 @@ int EVP_Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_n, do int EVP_Material::constboxLargD(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt){ - + return (1); } // end of constbox_LargD() @@ -1296,7 +1301,7 @@ double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, int EVP_Material::constbox_2order(int mtx, double *DE, double* dstrn, double* strs, double* statev_n, double* statev, double **Calgo, Lcc* LCC, YieldF* YF, double** c_g, int kinc, int kstep, double dt){ - + return (1); } //end of consbox_2order @@ -1535,7 +1540,7 @@ void VT_Material::print(){ //constbox int VT_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ - + return (1); } //reference operator from statev @@ -1862,7 +1867,7 @@ void MT_Material::print(){ int MT_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) - + return (1); } void MT_Material::get_refOp(double* statev, double** C, int kinc, int kstep){ @@ -2084,7 +2089,7 @@ MTSecF_Material::~MTSecF_Material(){ int MTSecF_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) - + return (1); } @@ -2268,7 +2273,7 @@ int MTSecNtr_Material::constbox(double* dstrn, double* strs_n, double* strs, do //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) - + return (1); } @@ -2502,7 +2507,7 @@ MTSecSd_Material::~MTSecSd_Material(){ int MTSecSd_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) - + return (1); } @@ -2879,7 +2884,7 @@ int MTSecF_Stoch_Material::get_pos_locFd()const int MTSecF_Stoch_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) - + return (1); } // unloading step for MTSecF_Material material to reset statev_n in residual condition, by Ling Wu June 2012 @@ -3374,7 +3379,7 @@ MTSecF_LargD::~MTSecF_LargD(){ //constbox int MTSecF_LargD::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) - + return (1); } // unloading step for MTSecF_Material material to reset statev_n in residual condition, by Ling Wu June 2012 @@ -4041,7 +4046,7 @@ void SC_Material::print(){ int SC_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ - + return (1); } void SC_Material::get_refOp(double* statev_n, double** C, int kinc, int kstep){ @@ -4457,7 +4462,7 @@ int MT_VT_Material::constbox(double* dstrn, double* strs_n, double* strs, doubl - + return (1); } void MT_VT_Material::get_refOp(double* statev_n, double** C, int kinc, int kstep){ @@ -4661,12 +4666,12 @@ double ANEL_Material::getPlasticEnergy (double* statev) int ANEL_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ - + return (1); } int ANEL_Material::constboxSecantMixte(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt, bool forceZero, bool forceRes) { - + return (1); } @@ -4676,7 +4681,7 @@ int ANEL_Material::constboxSecantMixte(double* dstrn, double* strs_n, double* s int ANEL_Material::constbox_2order(int mtx, double *DE, double* dstrn, double* strs, double* statev_n, double* statev, double **Calgo, Lcc* LCC, YieldF* YF, double** c_g, int kinc, int kstep, double dt){ - + return (1); } //end of consbox_2order diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.cpp b/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.cpp index e0e568cfcf876f17cbda3d985e35e71081b8f04a..94e2bcdd9b1dfdaf7b2165e71c156aff3fc86ca8 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.cpp @@ -122,7 +122,7 @@ mlawNonLocalDamage_Stoch::mlawNonLocalDamage_Stoch(const int num, const double r FILE *Props = fopen(RandProp, "r"); if ( Props != NULL ){ - fscanf(Props, "%d %d %d\n", &nxyz[0], &nxyz[1], &nxyz[2]); + int okf = fscanf(Props, "%d %d %d\n", &nxyz[0], &nxyz[1], &nxyz[2]); if (nxyz[2] == 1){ bool resizeFlag; if(pos_vfi !=0) resizeFlag = _VfMat.resize(nxyz[0], nxyz[1], true); @@ -138,12 +138,12 @@ mlawNonLocalDamage_Stoch::mlawNonLocalDamage_Stoch(const int num, const double r if(pos_DamParm2 !=0) resizeFlag = _dam_Parm2_Mat.resize(nxyz[0], nxyz[1], true); if(pos_DamParm3 !=0) resizeFlag = _dam_Parm3_Mat.resize(nxyz[0], nxyz[1], true); - fscanf(Props, "%lf %lf %lf\n", &_dx, &_dy, &_dz); + okf = fscanf(Props, "%lf %lf %lf\n", &_dx, &_dy, &_dz); if (resizeFlag){ for(int i=0; i<nxyz[0]; i++){ for(int j=0; j<nxyz[1]; j++){ - fscanf(Props, "%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf\n", &Rprop[0], &Rprop[1],&Rprop[2], + okf = fscanf(Props, "%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf\n", &Rprop[0], &Rprop[1],&Rprop[2], &Rprop[3],&Rprop[4],&Rprop[5],&Rprop[6],&Rprop[7],&Rprop[8],&Rprop[9],&Rprop[10],&Rprop[11]); k = 0; if(pos_vfi !=0){ diff --git a/NonLinearSolver/materialLaw/mlawTransverseIsoYarnB.cpp b/NonLinearSolver/materialLaw/mlawTransverseIsoYarnB.cpp index 0e40a9a7064a35524dad15a48d1331c2a205417d..c48145032ee5cc8eef9f4f88192bedb769e919c3 100644 --- a/NonLinearSolver/materialLaw/mlawTransverseIsoYarnB.cpp +++ b/NonLinearSolver/materialLaw/mlawTransverseIsoYarnB.cpp @@ -22,12 +22,13 @@ mlawTransverseIsoYarnB::mlawTransverseIsoYarnB(const mlawTransverseIsoYarnB &sou mlawTransverseIsoYarnB& mlawTransverseIsoYarnB::operator=(const materialLaw &source) { materialLaw::operator=(source); - const mlawTransverseIsoYarnB* src =static_cast<const mlawTransverseIsoYarnB*>(&source); + const mlawTransverseIsoYarnB* src =dynamic_cast<const mlawTransverseIsoYarnB*>(&source); if(src != NULL) { // FILL HERE _physicnum = src->_physicnum; } + return *this; }