61#if !defined(VINLINE_MGPARM)
71 VASSERT( thee != VNULL);
92 if ((*thee) != VNULL) {
94 Vmem_free(VNULL, 1,
sizeof(
GEOFLOWparm), (
void **)thee);
107 Vnm_print(0,
"GEOFLOWparm_check: checking GEOFLOWparm object of type %d.\n",
112 Vnm_print(2,
"GEOFLOWparm_check: not filled!\n");
120 Vnm_print(2,
"GEOFLOWparm_check: type not set");
128 VASSERT(thee != VNULL);
129 VASSERT(parm != VNULL);
134 thee->vdw = parm->vdw;
138Vrc_Codes FUBAR(
const char* name){
139 Vnm_print(2,
"parseGEOFLOW: ran out of tokens on %s!\n", name);
143Vrc_Codes parseNonNeg(
double* tf,
double def,
int* set,
char* name, Vio* sock){
144 char tok[VMAX_BUFSIZE];
145 if(Vio_scanf(sock,
"%s", tok) == 0) {
150 if (sscanf(tok,
"%lf", tf) == 0){
151 Vnm_print(2,
"NOsh: Read non-float (%s) while parsing %s keyword!\n", tok, name);
155 Vnm_print(2,
"parseGEOFLOW: %s must be greater than 0!\n", name);
164VPRIVATE Vrc_Codes GEOFLOWparm_parseVDW(
GEOFLOWparm *thee, Vio *sock){
165 const char* name =
"vdw";
166 char tok[VMAX_BUFSIZE];
168 if(Vio_scanf(sock,
"%s", tok) == 0) {
173 if (sscanf(tok,
"%u", &tf) == 0){
174 Vnm_print(2,
"NOsh: Read non-unsigned int (%s) while parsing %s keyword!\n", tok, name);
176 }
else if(tf != 0 && tf != 1){
177 Vnm_print(2,
"parseGEOFLOW: %s must be 0 or 1!\n", name);
186VPRIVATE Vrc_Codes GEOFLOWparm_parseETOL(
GEOFLOWparm *thee, Vio *sock){
188 char tok[VMAX_BUFSIZE];
191 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
192 if(sscanf(tok,
"%lf", &tf) == 0){
193 Vnm_print(2,
"NOsh: Read non-float (%s) while parsing etol keyword!\n", tok);
195 }
else if(tf <= 0.0) {
196 Vnm_print(2,
"parseGEOFLOW: etol must be greater than 0!\n");
207 Vnm_print(2,
"parseGEOFLOW: ran out of tokens!\n");
216 Vnm_print(2,
"parseGEOFLOW: got NULL thee!\n");
220 Vnm_print(2,
"parseGEOFLOW: got NULL socket!\n");
224 Vnm_print(0,
"GEOFLOWparm_parseToken: trying %s...\n", tok);
227 return GEOFLOWparm_parseVDW(thee, sock);
229 return GEOFLOWparm_parseETOL(thee, sock);
231 Vnm_print(2,
"parseGEOFLOW: Unrecognized keyword (%s)!\n", tok);
Contains declarations for class GEOFLOWparm.
VPUBLIC void GEOFLOWparm_dtor2(GEOFLOWparm *thee)
FORTRAN stub for object destructor ?????????!!!!!!!!!!!!
VPUBLIC GEOFLOWparm * GEOFLOWparm_ctor(GEOFLOWparm_CalcType type)
Construct GEOFLOWparm object.
VPUBLIC Vrc_Codes GEOFLOWparm_parseToken(GEOFLOWparm *thee, char tok[VMAX_BUFSIZE], Vio *sock)
Parse an MG keyword from an input file.
VPUBLIC void GEOFLOWparm_dtor(GEOFLOWparm **thee)
Object destructor.
VPUBLIC void GEOFLOWparm_copy(GEOFLOWparm *thee, GEOFLOWparm *parm)
copy GEOFLOWparm object int thee.
enum eGEOFLOWparm_CalcType GEOFLOWparm_CalcType
Declare GEOFLOWparm_CalcType type.
VPUBLIC Vrc_Codes GEOFLOWparm_check(GEOFLOWparm *thee)
Consistency check for parameter values stored in object.
VPUBLIC Vrc_Codes GEOFLOWparm_ctor2(GEOFLOWparm *thee, GEOFLOWparm_CalcType type)
FORTRAN stub to construct GEOFLOWparm object ?????????!!!!!!!
#define VEMBED(rctag)
Allows embedding of RCS ID tags in object files.
VPUBLIC int Vstring_strcasecmp(const char *s1, const char *s2)
Case-insensitive string comparison (BSD standard)
Parameter structure for GEOFLOW-specific variables from input files.
GEOFLOWparm_CalcType type