Changeset 4239


Ignore:
Timestamp:
06/25/10 16:43:28 (15 years ago)
Author:
Eric.Larour
Message:

Separated element results from inputs, not derived anymore.

Location:
issm/trunk/src/c/objects
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/ElementResults/BeamVertexElementResult.cpp

    r4236 r4239  
    2525/*}}}*/
    2626/*FUNCTION BeamVertexElementResult::BeamVertexElementResult(int in_enum_type,double* in_values,int in_step, double in_time){{{1*/
    27 BeamVertexElementResult::BeamVertexElementResult(int in_enum_type,double* in_values,int in_step, double in_time):BeamVertexInput(in_enum_type,in_values){
     27BeamVertexElementResult::BeamVertexElementResult(int in_enum_type,double* in_values,int in_step, double in_time){
    2828
     29        enum_type=in_enum_type;
     30        values[0]=in_values[0];
     31        values[1]=in_values[1];
    2932        step=in_step;
    3033        time=in_time;
     
    4952               
    5053        printf("BeamVertexElementResult:\n");
    51         BeamVertexElementResult::DeepEcho();
     54        printf("   enum: %i (%s)\n",this->enum_type,EnumAsString(this->enum_type));
     55        printf("   values: [%g %g]\n",this->values[0],this->values[1]);
    5256        printf("   step: %i\n",this->step);
    5357        printf("   time: %g\n",this->time);
  • issm/trunk/src/c/objects/ElementResults/BeamVertexElementResult.h

    r4091 r4239  
    1313/*}}}*/
    1414
    15 class BeamVertexElementResult: public BeamVertexInput,public ElementResult{
     15class BeamVertexElementResult: public ElementResult{
    1616
    1717        private:
     18                int    enum_type;
     19                double values[2];
    1820                int    step;
    1921                double time;
     
    4446                void    InputUpdateFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
    4547                void    InputUpdateFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");}
    46                 void    InputUpdateFromSolution(double* solution, int analysis_type, int sub_analysis_type){ISSMERROR("Not implemented yet!");}
     48                void    InputUpdateFromSolution(double* solution){ISSMERROR("Not implemented yet!");}
    4749
    4850                /*}}}*/
  • issm/trunk/src/c/objects/ElementResults/DoubleElementResult.cpp

    r4236 r4239  
    2525/*}}}*/
    2626/*FUNCTION DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time){{{1*/
    27 DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time): DoubleInput(in_enum_type,in_value){
    28                
     27DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time){
     28
     29        enum_type=in_enum_type;
     30        value=in_value;
    2931        step=in_step;
    3032        time=in_time;
     
    4143Object* DoubleElementResult::copy() {
    4244
    43         DoubleElementResult* result=new DoubleElementResult(this->enum_type,this->value,this->step,this->time);
    44         return (Object*)result;
    45         //return new DoubleElementResult(this->enum_type,this->value,this->step,this->time);
     45        return new DoubleElementResult(this->enum_type,this->value,this->step,this->time);
    4646
    4747}
     
    5151
    5252        printf("DoubleElementResult:\n");
    53         DoubleInput::DeepEcho();
     53        printf("   enum: %i (%s)\n",this->enum_type,EnumAsString(this->enum_type));
     54        printf("   value: %g\n",this->value);
    5455        printf("   step: %i\n",this->step);
    5556        printf("   time: %g\n",this->time);
  • issm/trunk/src/c/objects/ElementResults/DoubleElementResult.h

    r4091 r4239  
    1515/*}}}*/
    1616
    17 class DoubleElementResult: public DoubleInput,public ElementResult{
     17class DoubleElementResult: public ElementResult{
    1818
    1919        private:
     20                int    enum_type;
     21                double value;
    2022                int    step;
    2123                double time;
     
    2527                /*constructors, destructors: {{{1*/
    2628                DoubleElementResult();
    27                 DoubleElementResult(int enum_type,IssmDouble value,int step,double time);
     29                DoubleElementResult(int enum_type,double value,int step,double time);
    2830                ~DoubleElementResult();
    2931                /*}}}*/
     
    4648                void    InputUpdateFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
    4749                void    InputUpdateFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");}
    48                 void    InputUpdateFromSolution(double* solution, int analysis_type, int sub_analysis_type){ISSMERROR("Not implemented yet!");}
     50                void    InputUpdateFromSolution(double* solution){ISSMERROR("Not implemented yet!");}
    4951
    5052                                /*}}}*/
  • issm/trunk/src/c/objects/ElementResults/ElementResult.h

    r4191 r4239  
    1212/*}}}*/
    1313
    14 class ElementResult{
     14class ElementResult:public Object{
    1515
    1616        public:
  • issm/trunk/src/c/objects/ElementResults/PentaVertexElementResult.cpp

    r4236 r4239  
    2525/*}}}*/
    2626/*FUNCTION PentaVertexElementResult::PentaVertexElementResult(int in_enum_type,double* in_values,int in_step, double in_time){{{1*/
    27 PentaVertexElementResult::PentaVertexElementResult(int in_enum_type,double* in_values,int in_step, double in_time): PentaVertexInput(in_enum_type,in_values){
    28 
     27PentaVertexElementResult::PentaVertexElementResult(int in_enum_type,double* in_values,int in_step, double in_time){
     28
     29        int i;
     30
     31        enum_type=in_enum_type;
     32        for(i=0;i<6;i++)values[i]=in_values[i];
    2933        step=in_step;
    3034        time=in_time;
     
    4953
    5054        printf("PentaVertexElementResult:\n");
    51         PentaVertexElementResult::DeepEcho();
     55        printf("   enum: %i (%s)\n",this->enum_type,EnumAsString(this->enum_type));
     56        printf("   values: [%g %g %g %g %g %g]\n",this->values[0],this->values[1],this->values[2],this->values[3],this->values[4],this->values[5]);
    5257        printf("   step: %i\n",this->step);
    5358        printf("   time: %g\n",this->time);
  • issm/trunk/src/c/objects/ElementResults/PentaVertexElementResult.h

    r4091 r4239  
    1414/*}}}*/
    1515
    16 class PentaVertexElementResult: public PentaVertexInput,public ElementResult{
     16class PentaVertexElementResult: public ElementResult{
    1717
    1818        private:
     19                int    enum_type;
     20                double values[6];
    1921                int    step;
    2022                double time;
     
    4547                void    InputUpdateFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
    4648                void    InputUpdateFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");}
    47                 void    InputUpdateFromSolution(double* solution, int analysis_type, int sub_analysis_type){ISSMERROR("Not implemented yet!");}
     49                void    InputUpdateFromSolution(double* solution){ISSMERROR("Not implemented yet!");}
    4850
    4951                /*}}}*/
  • issm/trunk/src/c/objects/ElementResults/SingVertexElementResult.cpp

    r4236 r4239  
    2525/*}}}*/
    2626/*FUNCTION SingVertexElementResult::SingVertexElementResult(int in_enum_type,double* in_values,int in_step, double in_time){{{1*/
    27 SingVertexElementResult::SingVertexElementResult(int in_enum_type,double in_value,int in_step, double in_time):SingVertexInput(in_enum_type,in_value){
     27SingVertexElementResult::SingVertexElementResult(int in_enum_type,double in_value,int in_step, double in_time){
    2828
     29        enum_type=in_enum_type;
     30        value=in_value;
    2931        step=in_step;
    3032        time=in_time;
     
    4951               
    5052        printf("SingVertexElementResult:\n");
    51         SingVertexElementResult::DeepEcho();
     53        printf("   enum: %i (%s)\n",this->enum_type,EnumAsString(this->enum_type));
     54        printf("   value: %g\n",this->value);
    5255        printf("   step: %i\n",this->step);
    5356        printf("   time: %g\n",this->time);
  • issm/trunk/src/c/objects/ElementResults/SingVertexElementResult.h

    r4091 r4239  
    1313/*}}}*/
    1414
    15 class SingVertexElementResult: public SingVertexInput,public ElementResult{
     15class SingVertexElementResult: public ElementResult{
    1616
    1717        private:
     18                int    enum_type;
     19                double value;
    1820                int    step;
    1921                double time;
     
    4446                void    InputUpdateFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
    4547                void    InputUpdateFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");}
    46                 void    InputUpdateFromSolution(double* solution, int analysis_type, int sub_analysis_type){ISSMERROR("Not implemented yet!");}
     48                void    InputUpdateFromSolution(double* solution){ISSMERROR("Not implemented yet!");}
    4749
    4850                /*}}}*/
  • issm/trunk/src/c/objects/ElementResults/TriaVertexElementResult.cpp

    r4236 r4239  
    2525/*}}}*/
    2626/*FUNCTION TriaVertexElementResult::TriaVertexElementResult(int in_enum_type,double* in_values,int in_step, double in_time){{{1*/
    27 TriaVertexElementResult::TriaVertexElementResult(int in_enum_type,double* in_values,int in_step, double in_time):TriaVertexInput(in_enum_type,in_values){
    28 
     27TriaVertexElementResult::TriaVertexElementResult(int in_enum_type,double* in_values,int in_step, double in_time){
     28
     29        enum_type=in_enum_type;
     30        values[0]=in_values[0];
     31        values[1]=in_values[1];
     32        values[2]=in_values[2];
    2933        step=in_step;
    3034        time=in_time;
     
    4953               
    5054        printf("TriaVertexElementResult:\n");
     55        printf("   enum: %i (%s)\n",this->enum_type,EnumAsString(this->enum_type));
     56        printf("   values: [%g %g %g]\n",this->values[0],this->values[1],this->values[2]);
    5157        printf("   step: %i\n",this->step);
    5258        printf("   time: %g\n",this->time);
    53         this->TriaVertexInput::DeepEcho();
    54 
    5559}
    5660/*}}}*/
     
    104108        int   enum_value=0;
    105109
     110
    106111        /*recover marshalled_dataset: */
    107112        marshalled_dataset=*pmarshalled_dataset;
     
    125130int   TriaVertexElementResult::MarshallSize(){
    126131       
    127         return sizeof(values)+
     132        return sizeof(values)
    128133                +sizeof(enum_type)
    129134                +sizeof(time)
  • issm/trunk/src/c/objects/ElementResults/TriaVertexElementResult.h

    r4091 r4239  
    1313/*}}}*/
    1414
    15 class TriaVertexElementResult: public TriaVertexInput,public ElementResult{
     15class TriaVertexElementResult: public ElementResult{
    1616
    1717        private:
     18                int    enum_type;
     19                double values[3];
    1820                int    step;
    1921                double time;
     
    4446                void    InputUpdateFromConstant(int constant, int name){ISSMERROR("Not implemented yet!");}
    4547                void    InputUpdateFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");}
    46                 void    InputUpdateFromSolution(double* solution, int analysis_type, int sub_analysis_type){ISSMERROR("Not implemented yet!");}
     48                void    InputUpdateFromSolution(double* solution){ISSMERROR("Not implemented yet!");}
    4749
    4850                /*}}}*/
  • issm/trunk/src/c/objects/Inputs/DoubleInput.h

    r4091 r4239  
    1616
    1717        public:
    18 
    19                 /*just hold 3 values for 3 vertices: */
    2018                int    enum_type;
    21                 IssmDouble value;
     19                double value;
    2220
    2321                /*constructors, destructors: {{{1*/
  • issm/trunk/src/c/objects/Inputs/PentaVertexInput.h

    r4091 r4239  
    1515
    1616        public:
    17                 /*just hold 3 values for 3 vertices: */
     17                /*just hold 6 values for 6 vertices: */
    1818                int    enum_type;
    1919                double values[6];
Note: See TracChangeset for help on using the changeset viewer.