// -*- C++ -*-
// $RCSfile: gasmaterial.C,v $
// $Revision: 1.3 $
// $Author: langer $
// $Date: 2000/10/30 19:23:25 $

/* This software was produced by NIST, an agency of the U.S. government,
 * and by statute is not subject to copyright in the United States.
 * Recipients of this software assume all responsibilities associated
 * with its operation, modification and maintenance. However, to
 * facilitate maintenance we ask that before distributing modifed
 * versions of this software, you first contact the authors at
 * oof_manager@ctcms.nist.gov. 
 */

#include "gasmaterial.h"
#include "materialcmd.h"
#include "readbinary.h"

#ifdef THERMAL

CharString GasMaterial::type("gas");

MaterialTypeRegistration
GasMaterial::reg("gas", new MaterialCmd<GasMaterial>, 0.1);

float GasMaterial::kappa_dflt(1.0);

void GasMaterial::output(FILE* fp_goof,  unsigned char &flag,
			 int n1, int n2, int n3) const
{
    Material::output(fp_goof, flag, n1, n2, n3);
    writebinary(fp_goof, kappa);
    writebinary(fp_goof, flag);
}

void GasMaterial::output(FILE* fp_goof,  unsigned char &flag,
			 int n1, int n2, int n3, int same_element_type) const
{
    Material::output(fp_goof, flag, n1, n2, n3, same_element_type);
    writebinary(fp_goof, kappa);
    writebinary(fp_goof, flag);
    writebinary(fp_goof,same_element_type);
}

int GasMaterial::compare(const Material *other) const {
  if(!Material::compare(other)) return 0;
  GasMaterial *m2 = (GasMaterial*) other;
  if(kappa != m2->kappa) return 0;
  return 1;
}

#endif // THERMAL
