/*!\file PentaVertexInput.c * \brief: implementation of the PentaVertexInput object */ #ifdef HAVE_CONFIG_H #include "config.h" #else #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" #endif #include "stdio.h" #include #include "../objects.h" #include "../../EnumDefinitions/EnumDefinitions.h" #include "../../shared/shared.h" #include "../../DataSet/DataSet.h" #include "../../include/typedefs.h" #include "../../include/macros.h" /*Object constructors and destructor*/ /*FUNCTION PentaVertexInput::PentaVertexInput(){{{1*/ PentaVertexInput::PentaVertexInput(){ return; } /*}}}*/ /*FUNCTION PentaVertexInput::PentaVertexInput(double* values){{{1*/ PentaVertexInput::PentaVertexInput(int in_enum_type,double* in_values){ enum_type=in_enum_type; values[0]=in_values[0]; values[1]=in_values[1]; values[2]=in_values[2]; values[3]=in_values[3]; values[4]=in_values[4]; values[5]=in_values[5]; } /*}}}*/ /*FUNCTION PentaVertexInput::~PentaVertexInput(){{{1*/ PentaVertexInput::~PentaVertexInput(){ return; } /*}}}*/ /*Object management*/ /*FUNCTION PentaVertexInput::copy{{{1*/ Object* PentaVertexInput::copy() { return new PentaVertexInput(this->enum_type,this->values); } /*}}}*/ /*FUNCTION PentaVertexInput::DeepEcho{{{1*/ void PentaVertexInput::DeepEcho(void){ printf("PentaVertexInput:\n"); printf(" enum: %i\n",this->enum_type); printf(" %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]); } /*}}}*/ /*FUNCTION PentaVertexInput::Demarshall{{{1*/ void PentaVertexInput::Demarshall(char** pmarshalled_dataset){ char* marshalled_dataset=NULL; int i; /*recover marshalled_dataset: */ marshalled_dataset=*pmarshalled_dataset; /*this time, no need to get enum type, the pointer directly points to the beginning of the *object data (thanks to DataSet::Demarshall):*/ memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type); memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values); /*return: */ *pmarshalled_dataset=marshalled_dataset; return; } /*}}}*/ /*FUNCTION PentaVertexInput::Echo {{{1*/ void PentaVertexInput::Echo(void){ this->DeepEcho(); } /*}}}*/ /*FUNCTION PentaVertexInput::Enum{{{1*/ int PentaVertexInput::Enum(void){ return PentaVertexInputEnum; } /*}}}*/ /*FUNCTION PentaVertexInput::EnumType{{{1*/ int PentaVertexInput::EnumType(void){ return this->enum_type; } /*}}}*/ /*FUNCTION PentaVertexInput::Id{{{1*/ int PentaVertexInput::Id(void){ return -1; } /*}}}*/ /*FUNCTION PentaVertexInput::Marshall{{{1*/ void PentaVertexInput::Marshall(char** pmarshalled_dataset){ char* marshalled_dataset=NULL; int enum_value=0; /*recover marshalled_dataset: */ marshalled_dataset=*pmarshalled_dataset; /*get enum value of PentaVertexInput: */ enum_value=PentaVertexInputEnum; /*marshall enum: */ memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value); /*marshall PentaVertexInput data: */ memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type); memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values); *pmarshalled_dataset=marshalled_dataset; } /*}}}*/ /*FUNCTION PentaVertexInput::MarshallSize{{{1*/ int PentaVertexInput::MarshallSize(){ return sizeof(values)+ +sizeof(enum_type)+ +sizeof(int); //sizeof(int) for enum value } /*}}}*/ /*FUNCTION PentaVertexInput::MyRank{{{1*/ int PentaVertexInput::MyRank(void){ extern int my_rank; return my_rank; } /*}}}*/ /*Object functions*/ /*FUNCTION PentaVertexInput::GetParameterValue(bool* pvalue) {{{1*/ void PentaVertexInput::GetParameterValue(bool* pvalue){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::GetParameterValue(int* pvalue){{{1*/ void PentaVertexInput::GetParameterValue(int* pvalue){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue){{{1*/ void PentaVertexInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,Node* node){{{1*/ void PentaVertexInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/ void PentaVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,double* gauss){{{1*/ void PentaVertexInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){{{1*/ void PentaVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){{{1*/ void PentaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){{{1*/ void PentaVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss){{{1*/ void PentaVertexInput::GetStrainRate(double* epsilon,Input* yinput,double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss){{{1*/ void PentaVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput,Input* zinput, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");} /*}}}*/ /*FUNCTION PentaVertexInput::ChangeEnum(int newenumtype){{{1*/ void PentaVertexInput::ChangeEnum(int newenumtype){ this->enum_type=newenumtype; } /*}}}*/