Herezh_dev/tenseurs_mai99/Tenseur/DefValConsTens.cc

82 lines
2.8 KiB
C++

// 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-2021 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 "DefValConsTens.h"
#include "Tenseur.h"
#include "Tenseur1.h"
#include "Tenseur2.h"
#include "Tenseur3.h"
//#include "TypeConsTens.h" // tirer le commentaire pour la compile
void ConstantesTenseur(int dim)
{ switch (dim)
{ case 1 :
IdHH = new Tenseur1HH(1.);
IdBB = new Tenseur1BB(1.);
IdBH = new Tenseur1BH(1.);
IdHB = new Tenseur1HB(1.);
ZeroHH = new Tenseur1HH();
ZeroBB = new Tenseur1BB();
ZeroBH = new Tenseur1BH();
ZeroHB = new Tenseur1HB();
break;
case 2 :
IdHH = new Tenseur2HH(1.,1.,0.);
IdBB = new Tenseur2BB(1.,1.,0.);
IdBH = new Tenseur2BH(1.,1.,0.,0.);
IdHB = new Tenseur2HB(1.,1.,0.,0.);
ZeroHH = new Tenseur2HH();
ZeroBB = new Tenseur2BB();
ZeroBH = new Tenseur2BH();
ZeroHB = new Tenseur2HB();
break;
case 3 :
IdHH = new Tenseur3HH(1.,1.,1.,0.,0.,0.);
IdBB = new Tenseur3BB(1.,1.,1.,0.,0.,0.);
IdBH = new Tenseur3BH(1.,0.,0.,0.,1.,0.,0.,0.,1.);
IdHB = new Tenseur3HB(1.,0.,0.,0.,1.,0.,0.,0.,1.);
ZeroHH = new Tenseur3HH();
ZeroBB = new Tenseur3BB();
ZeroBH = new Tenseur3BH();
ZeroHB = new Tenseur3HB();
break;
default:
cout << " \n cas actuellement non traite \n";
cout << " sp : ConstantesTenseur(int dim) \n";
Sortie(1);
};
Id_dim_HB(1) = (TenseurHB*) &IdHB1;
Id_dim_HB(2) = (TenseurHB*) &IdHB2;
Id_dim_HB(3) = (TenseurHB*) &IdHB3;
};