1 //======================================================================
2 // variable 1 - var[0] , i.e variables are zero based
3 //======================================================================
4 int USERD_get_gold_variable_info
6 char **var_description,
18 Info << "Entering: USERD_get_gold_variable_info" << endl
22 label offset = Num_variables - nSprayVariables
23 - nSecondMeshVariables - nFaMeshVariables;
26 for (label n=0; n<offset; n++)
28 if (isScalar[var2field[n]])
30 var_type[n] = Z_SCALAR;
31 var_classify[n] = Z_PER_ELEM;
32 var_complex[n] = FALSE;
37 fieldNames[var2field[n]].c_str(),
43 // ... and then vectors
44 for (label n=0; n<offset; n++)
46 if (isVector[var2field[n]])
48 var_type[n] = Z_VECTOR;
49 var_classify[n] = Z_PER_ELEM;
50 var_complex[n] = FALSE;
55 fieldNames[var2field[n]].c_str(),
61 // ... and tensors (NB! all tensors are treated as asymmetric)
62 for (label n=0; n<offset; n++)
64 if (isTensor[var2field[n]])
66 var_type[n] = Z_TENSOR9;
67 var_classify[n] = Z_PER_ELEM;
68 var_complex[n] = FALSE;
73 fieldNames[var2field[n]].c_str(),
79 // if (Numparts_available > nPatches+1)
82 label Ns = lagrangianScalarNames.size();
84 for (label n=0; n<Ns; n++)
86 var_type[offset + n] = Z_SCALAR;
87 var_classify[offset + n] = Z_PER_ELEM;
88 var_complex[offset + n] = FALSE;
89 var_timeset[offset + n] = 1;
90 word name = parcelPrepend + lagrangianScalarNames[n];
93 var_description[offset + n],
99 for (label n=0; n<lagrangianVectorNames.size(); n++)
101 var_type[offset + Ns + n] = Z_VECTOR;
102 var_classify[offset + Ns + n] = Z_PER_ELEM;
103 var_complex[offset + Ns + n] = FALSE;
104 var_timeset[offset + Ns + n] = 1;
105 word name = parcelPrepend + lagrangianVectorNames[n];
108 var_description[offset + Ns + n],
117 // Second mesh variables
120 label start = Num_variables - nSecondMeshVariables - nFaMeshVariables;
122 label offset = Num_variables - nFaMeshVariables;
125 for (label n=start; n<offset; n++)
127 if (secondMeshIsScalar[secondMeshVar2field[n-start]])
129 var_type[n] = Z_SCALAR;
130 var_classify[n] = Z_PER_ELEM;
131 var_complex[n] = FALSE;
136 secondMeshFieldNames[secondMeshVar2field[n-start]].c_str(),
142 // ... and then vectors
143 for (label n=start; n<offset; n++)
145 if (secondMeshIsVector[secondMeshVar2field[n-start]])
147 var_type[n] = Z_VECTOR;
148 var_classify[n] = Z_PER_ELEM;
149 var_complex[n] = FALSE;
154 secondMeshFieldNames[secondMeshVar2field[n-start]].c_str(),
160 // ... and tensors (NB! all tensors are treated as asymmetric)
161 for (label n=start; n<offset; n++)
163 if (secondMeshIsTensor[secondMeshVar2field[n-start]])
165 var_type[n] = Z_TENSOR9;
166 var_classify[n] = Z_PER_ELEM;
167 var_complex[n] = FALSE;
172 secondMeshFieldNames[secondMeshVar2field[n-start]].c_str(),
181 // Finite area mesh variables
184 label start = Num_variables - nFaMeshVariables;
186 label offset = Num_variables;
189 for (label n=start; n<offset; n++)
191 if (faMeshIsScalar[faMeshVar2field[n-start]])
193 var_type[n] = Z_SCALAR;
194 var_classify[n] = Z_PER_ELEM;
195 var_complex[n] = FALSE;
200 faMeshFieldNames[faMeshVar2field[n-start]].c_str(),
204 Info << "Scalar: " << var_description[n] << endl;
208 // ... and then vectors
209 for (label n=start; n<offset; n++)
211 if (faMeshIsVector[faMeshVar2field[n-start]])
213 var_type[n] = Z_VECTOR;
214 var_classify[n] = Z_PER_ELEM;
215 var_complex[n] = FALSE;
220 faMeshFieldNames[faMeshVar2field[n-start]].c_str(),
224 Info << "Vector: " << var_description[n] << endl;
228 // ... and tensors (NB! all tensors are treated as asymmetric)
229 for (label n=start; n<offset; n++)
231 if (faMeshIsTensor[faMeshVar2field[n-start]])
233 var_type[n] = Z_TENSOR9;
234 var_classify[n] = Z_PER_ELEM;
235 var_complex[n] = FALSE;
240 faMeshFieldNames[faMeshVar2field[n-start]].c_str(),
244 Info << "Tensor: " << var_description[n] << endl;
250 Info << "Leaving: USERD_get_gold_variable_info" << endl