// FICHIER : Loi_rien1D.cc
// CLASSE : Loi_rien1D


// This file is part of the Herezh++ application.
//
// The finite element software Herezh++ is dedicated to the field
// of mechanics for large transformations of solid structures.
// It is developed by Gérard Rio (APP: IDDN.FR.010.0106078.000.R.P.2006.035.20600)
// INSTITUT DE RECHERCHE DUPUY DE LÔME (IRDL) <https://www.irdl.fr/>.
//
// Herezh++ is distributed under GPL 3 license ou ultérieure.
//
// Copyright (C) 1997-2022 Université Bretagne Sud (France)
// AUTHOR : Gérard Rio
// E-MAIL  : gerardrio56@free.fr
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//
// For more information, please consult: <https://herezh.irdl.fr/>.


//#include "Debug.h"

# include <iostream>
using namespace std;  //introduces namespace std
#include <math.h>
#include <stdlib.h>
#include "Sortie.h"
#include "TypeConsTens.h"
#include "ConstMath.h"


#include "Loi_rien1D.h"


Loi_rien1D::Loi_rien1D () :  // Constructeur par defaut
  Loi_comp_abstraite(LOI_RIEN1D,CAT_THERMO_MECANIQUE,1)
   { };
	

// Constructeur de copie
Loi_rien1D::Loi_rien1D (const Loi_rien1D& loi) :
	Loi_comp_abstraite(loi)
	 {	  };

Loi_rien1D::~Loi_rien1D ()
// Destructeur 
{  };

// Lecture des donnees de la classe sur fichier
void Loi_rien1D::LectureDonneesParticulieres (UtilLecture * entreePrinc,LesCourbes1D&
                                              ,LesFonctions_nD& lesFonctionsnD)
  { // appel au niveau de la classe mère
    Loi_comp_abstraite::Lecture_type_deformation_et_niveau_commentaire
                 (*entreePrinc,lesFonctionsnD,false);
  };
            
// affichage et definition interactive des commandes particulières à chaques lois
void Loi_rien1D::Info_commande_LoisDeComp(UtilLecture& entreePrinc)
 {  ofstream & sort = *(entreePrinc.Commande_pointInfo()); // pour simplifier
    sort << "\n# .......  loi de comportement Loi_rien1D ........";
    // appel de la classe mère
    Loi_comp_abstraite::Info_commande_don_LoisDeComp(entreePrinc);     
  };  		  	  

// test si la loi est complete
int Loi_rien1D::TestComplet()
    { int ret = LoiAbstraiteGeneral::TestComplet();
       return ret; 
    }; 
    
	   //----- lecture écriture de restart -----
	   // cas donne le niveau de la récupération
       // = 1 : on récupère tout
       // = 2 : on récupère uniquement les données variables (supposées comme telles)
void Loi_rien1D::Lecture_base_info_loi(istream& ent,const int cas,LesReferences& lesRef,LesCourbes1D& lesCourbes1D
                                             ,LesFonctions_nD& lesFonctionsnD)
	{ string toto,nom; 
	  if (cas == 1) 
	   { ent >> toto ;
	    };   
	  // appel de la classe mère
	  Loi_comp_abstraite::Lecture_don_base_info(ent,cas,lesRef,lesCourbes1D,lesFonctionsnD);
 };
       // cas donne le niveau de sauvegarde
       // = 1 : on sauvegarde tout
       // = 2 : on sauvegarde uniquement les données variables (supposées comme telles)
void Loi_rien1D::Ecriture_base_info_loi(ostream& sort,const int cas)
   { if (cas == 1) 
       { sort << " LOI_RIEN1D " ;  
        }; 
      // appel de la classe mère  	        
	  Loi_comp_abstraite::Ecriture_don_base_info(sort,cas);
	};
// affichage de la loi
void Loi_rien1D::Affiche() const 
  { cout << "\n loi de comportement loi_rien1D qui ne fait rien mecaniquement";
    // appel de la classe mère
    Loi_comp_abstraite::Affiche_don_classe_abstraite();
  };