00001 #include "crsection3d.h"
00002 #include "globalt.h"
00003 #include "stochdrivert.h"
00004
00005 crsection3d::crsection3d (void)
00006 {
00007 rho=0.0;
00008 }
00009 crsection3d::~crsection3d (void)
00010 {
00011
00012 }
00013
00014
00015
00016
00017
00018
00019
00020 void crsection3d::read (XFILE *in)
00021 {
00022 switch (Tp->tprob){
00023 case stationary_problem:{
00024 xfscanf (in,"%lf",&rho);
00025 break;
00026 }
00027 case nonlinear_stationary_problem:{
00028 break;
00029 }
00030 case nonstationary_problem:{
00031 xfscanf (in,"%lf",&rho);
00032 break;
00033 }
00034 case nonlinear_nonstationary_problem:
00035 case growing_np_problem:
00036 case growing_np_problem_nonlin:{
00037 xfscanf (in,"%lf",&rho);
00038 break;
00039 }
00040 default:{
00041 print_err("unknown problem type is required",__FILE__,__LINE__,__func__);
00042 }
00043 }
00044 }
00045
00046
00047
00048
00049
00050
00051
00052 void crsection3d::print (FILE *out)
00053 {
00054 switch (Tp->tprob){
00055 case stationary_problem:{
00056 break;
00057 }
00058 case nonstationary_problem:{
00059 fprintf (out," %lf\n",rho);
00060 break;
00061 }
00062 case nonlinear_nonstationary_problem:
00063 case growing_np_problem:
00064 case growing_np_problem_nonlin:{
00065 fprintf (out," %lf\n",rho);
00066 break;
00067 }
00068 default:{
00069 print_err("unknown problem type is required",__FILE__,__LINE__,__func__);
00070 }
00071 }
00072 }
00073
00074 void crsection3d::changeparam (atsel &atcs,vector &val)
00075 {
00076 long i;
00077
00078 for (i=0;i<atcs.num;i++){
00079 switch (atcs.atrib[i]){
00080 case 0:{
00081 rho=val[1];
00082 break;
00083 }
00084 default:{
00085 print_err("wrong number of atribute is required",__FILE__,__LINE__,__func__);
00086 }
00087 }
00088 }
00089 }