1 | /*!\file PentaVertexInput.c
|
---|
2 | * \brief: implementation of the PentaVertexInput object
|
---|
3 | */
|
---|
4 |
|
---|
5 | #ifdef HAVE_CONFIG_H
|
---|
6 | #include "config.h"
|
---|
7 | #else
|
---|
8 | #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | #include "stdio.h"
|
---|
12 | #include <string.h>
|
---|
13 | #include "../objects.h"
|
---|
14 | #include "../../EnumDefinitions/EnumDefinitions.h"
|
---|
15 | #include "../../shared/shared.h"
|
---|
16 | #include "../../DataSet/DataSet.h"
|
---|
17 | #include "../../include/typedefs.h"
|
---|
18 | #include "../../include/macros.h"
|
---|
19 |
|
---|
20 | /*Object constructors and destructor*/
|
---|
21 | /*FUNCTION PentaVertexInput::PentaVertexInput(){{{1*/
|
---|
22 | PentaVertexInput::PentaVertexInput(){
|
---|
23 | return;
|
---|
24 | }
|
---|
25 | /*}}}*/
|
---|
26 | /*FUNCTION PentaVertexInput::PentaVertexInput(double* values){{{1*/
|
---|
27 | PentaVertexInput::PentaVertexInput(int in_enum_type,double* in_values){
|
---|
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];
|
---|
33 | values[3]=in_values[3];
|
---|
34 | values[4]=in_values[4];
|
---|
35 | values[5]=in_values[5];
|
---|
36 | }
|
---|
37 | /*}}}*/
|
---|
38 | /*FUNCTION PentaVertexInput::~PentaVertexInput(){{{1*/
|
---|
39 | PentaVertexInput::~PentaVertexInput(){
|
---|
40 | return;
|
---|
41 | }
|
---|
42 | /*}}}*/
|
---|
43 |
|
---|
44 | /*Object management*/
|
---|
45 | /*FUNCTION PentaVertexInput::copy{{{1*/
|
---|
46 | Object* PentaVertexInput::copy() {
|
---|
47 |
|
---|
48 | return new PentaVertexInput(this->enum_type,this->values);
|
---|
49 |
|
---|
50 | }
|
---|
51 | /*}}}*/
|
---|
52 | /*FUNCTION PentaVertexInput::DeepEcho{{{1*/
|
---|
53 | void PentaVertexInput::DeepEcho(void){
|
---|
54 |
|
---|
55 | printf("PentaVertexInput:\n");
|
---|
56 | printf(" enum: %i\n",this->enum_type);
|
---|
57 | 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]);
|
---|
58 | }
|
---|
59 | /*}}}*/
|
---|
60 | /*FUNCTION PentaVertexInput::Demarshall{{{1*/
|
---|
61 | void PentaVertexInput::Demarshall(char** pmarshalled_dataset){
|
---|
62 |
|
---|
63 | char* marshalled_dataset=NULL;
|
---|
64 | int i;
|
---|
65 |
|
---|
66 | /*recover marshalled_dataset: */
|
---|
67 | marshalled_dataset=*pmarshalled_dataset;
|
---|
68 |
|
---|
69 | /*this time, no need to get enum type, the pointer directly points to the beginning of the
|
---|
70 | *object data (thanks to DataSet::Demarshall):*/
|
---|
71 | memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
|
---|
72 | memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
|
---|
73 |
|
---|
74 | /*return: */
|
---|
75 | *pmarshalled_dataset=marshalled_dataset;
|
---|
76 | return;
|
---|
77 | }
|
---|
78 | /*}}}*/
|
---|
79 | /*FUNCTION PentaVertexInput::Echo {{{1*/
|
---|
80 | void PentaVertexInput::Echo(void){
|
---|
81 | this->DeepEcho();
|
---|
82 | }
|
---|
83 | /*}}}*/
|
---|
84 | /*FUNCTION PentaVertexInput::Enum{{{1*/
|
---|
85 | int PentaVertexInput::Enum(void){
|
---|
86 |
|
---|
87 | return PentaVertexInputEnum;
|
---|
88 |
|
---|
89 | }
|
---|
90 | /*}}}*/
|
---|
91 | /*FUNCTION PentaVertexInput::EnumType{{{1*/
|
---|
92 | int PentaVertexInput::EnumType(void){
|
---|
93 |
|
---|
94 | return this->enum_type;
|
---|
95 |
|
---|
96 | }
|
---|
97 | /*}}}*/
|
---|
98 | /*FUNCTION PentaVertexInput::Id{{{1*/
|
---|
99 | int PentaVertexInput::Id(void){ return -1; }
|
---|
100 | /*}}}*/
|
---|
101 | /*FUNCTION PentaVertexInput::Marshall{{{1*/
|
---|
102 | void PentaVertexInput::Marshall(char** pmarshalled_dataset){
|
---|
103 |
|
---|
104 | char* marshalled_dataset=NULL;
|
---|
105 | int enum_value=0;
|
---|
106 |
|
---|
107 | /*recover marshalled_dataset: */
|
---|
108 | marshalled_dataset=*pmarshalled_dataset;
|
---|
109 |
|
---|
110 | /*get enum value of PentaVertexInput: */
|
---|
111 | enum_value=PentaVertexInputEnum;
|
---|
112 |
|
---|
113 | /*marshall enum: */
|
---|
114 | memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
|
---|
115 |
|
---|
116 | /*marshall PentaVertexInput data: */
|
---|
117 | memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
|
---|
118 | memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
|
---|
119 |
|
---|
120 | *pmarshalled_dataset=marshalled_dataset;
|
---|
121 | }
|
---|
122 | /*}}}*/
|
---|
123 | /*FUNCTION PentaVertexInput::MarshallSize{{{1*/
|
---|
124 | int PentaVertexInput::MarshallSize(){
|
---|
125 |
|
---|
126 | return sizeof(values)+
|
---|
127 | +sizeof(enum_type)+
|
---|
128 | +sizeof(int); //sizeof(int) for enum value
|
---|
129 | }
|
---|
130 | /*}}}*/
|
---|
131 | /*FUNCTION PentaVertexInput::MyRank{{{1*/
|
---|
132 | int PentaVertexInput::MyRank(void){
|
---|
133 | extern int my_rank;
|
---|
134 | return my_rank;
|
---|
135 | }
|
---|
136 | /*}}}*/
|
---|
137 |
|
---|
138 | /*Object functions*/
|
---|
139 | /*FUNCTION PentaVertexInput::GetParameterValue(bool* pvalue) {{{1*/
|
---|
140 | void PentaVertexInput::GetParameterValue(bool* pvalue){ISSMERROR(" not supported yet!");}
|
---|
141 | /*}}}*/
|
---|
142 | /*FUNCTION PentaVertexInput::GetParameterValue(int* pvalue){{{1*/
|
---|
143 | void PentaVertexInput::GetParameterValue(int* pvalue){ISSMERROR(" not supported yet!");}
|
---|
144 | /*}}}*/
|
---|
145 | /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue){{{1*/
|
---|
146 | void PentaVertexInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");}
|
---|
147 | /*}}}*/
|
---|
148 | /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,Node* node){{{1*/
|
---|
149 | void PentaVertexInput::GetParameterValue(double* pvalue,Node* node){ISSMERROR(" not supported yet!");}
|
---|
150 | /*}}}*/
|
---|
151 | /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){{{1*/
|
---|
152 | void PentaVertexInput::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord){ISSMERROR(" not supported yet!");}
|
---|
153 | /*}}}*/
|
---|
154 | /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,double* gauss){{{1*/
|
---|
155 | void PentaVertexInput::GetParameterValue(double* pvalue,double* gauss){ISSMERROR(" not supported yet!");}
|
---|
156 | /*}}}*/
|
---|
157 | /*FUNCTION PentaVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){{{1*/
|
---|
158 | void PentaVertexInput::GetParameterValue(double* pvalue,double* gauss,double defaultvalue){ISSMERROR(" not supported yet!");}
|
---|
159 | /*}}}*/
|
---|
160 | /*FUNCTION PentaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){{{1*/
|
---|
161 | void PentaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){ISSMERROR(" not supported yet!");}
|
---|
162 | /*}}}*/
|
---|
163 | /*FUNCTION PentaVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){{{1*/
|
---|
164 | void PentaVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
|
---|
165 | /*}}}*/
|
---|
166 | /*FUNCTION PentaVertexInput::GetStrainRate(double* epsilon,Input* yinput, double* xyz_list, double* gauss){{{1*/
|
---|
167 | void PentaVertexInput::GetStrainRate(double* epsilon,Input* yinput,double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
|
---|
168 | /*}}}*/
|
---|
169 | /*FUNCTION PentaVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput, Input* zinput, double* xyz_list, double* gauss){{{1*/
|
---|
170 | void PentaVertexInput::GetStrainRateStokes(double* epsilon,Input* yinput,Input* zinput, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
|
---|
171 | /*}}}*/
|
---|
172 | /*FUNCTION PentaVertexInput::ChangeEnum(int newenumtype){{{1*/
|
---|
173 | void PentaVertexInput::ChangeEnum(int newenumtype){
|
---|
174 | this->enum_type=newenumtype;
|
---|
175 | }
|
---|
176 | /*}}}*/
|
---|