Herezh_dev/Elements/Mecanique/Hexaedre/Hexa_cm27pti.h
2023-05-03 17:23:49 +02:00

167 lines
6.9 KiB
C++

// FICHIER : Hexa.h
// CLASSE : Hexa
// 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/>.
/************************************************************************
* DATE: 11/01/2003 *
* $ *
* AUTEUR: G RIO (mailto:gerardrio56@free.fr) *
* $ *
* PROJET: Herezh++ *
* $ *
************************************************************************
* BUT: Idem Hexa mais avec 27 pt d'intégration *
* *
* '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' * *
* VERIFICATION: *
* *
* ! date ! auteur ! but ! *
* ------------------------------------------------------------ *
* ! ! ! ! *
* $ *
* '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' *
* MODIFICATIONS: *
* ! date ! auteur ! but ! *
* ------------------------------------------------------------ *
* $ *
************************************************************************/
// -----------classe pour un calcul de mecanique---------
#ifndef HEXA_CM27PTI_H
#define HEXA_CM27PTI_H
#include "ParaGlob.h"
#include "ElemMeca.h"
#include "Met_abstraite.h"
#include "GeomQuadrangle.h"
#include "Noeud.h"
#include "UtilLecture.h"
#include "Tenseur.h"
#include "NevezTenseur.h"
#include "Deformation.h"
#include "HexaMemb.h"
#include "FrontQuadLine.h"
#include "FrontSegLine.h"
/// @addtogroup groupe_des_elements_finis
/// @{
///
class Hexa_cm27pti : public HexaMemb
{
public :
// CONSTRUCTEURS :
// Constructeur par defaut
Hexa_cm27pti ();
// Constructeur fonction d'un numero
// d'identification
Hexa_cm27pti (int num_mail,int num_id);
// Constructeur fonction d'un numero de maillage et d'identification et
// du tableau de connexite des noeuds
Hexa_cm27pti (int num_mail,int num_id,const Tableau<Noeud *>& tab);
// Constructeur de copie
Hexa_cm27pti (const Hexa_cm27pti& Hexa_cm27pti);
// DESTRUCTEUR :
~Hexa_cm27pti ();
// création d'un élément de copie: utilisation de l'opérateur new et du constructeur de copie
// méthode virtuelle
Element* Nevez_copie() const { Element * el= new Hexa_cm27pti(*this); return el;};
// Surcharge de l'operateur = : realise l'egalite entre deux instances de Hexa_cm27pti
Hexa_cm27pti& operator= (Hexa_cm27pti& Hexa_cm27pti);
// METHODES :
// 1) derivant des virtuelles pures
// affichage dans la sortie transmise, des variables duales "nom"
// aux differents points d'integration
// dans le cas ou nom est vide, affichage de "toute" les variables
void AfficheVarDual(ofstream& sort, Tableau<string>& nom);
// 2) derivant des virtuelles
// 3) methodes propres a l'element
protected :
// adressage des frontières linéiques et surfacique
// définit dans les classes dérivées, et utilisées pour la construction des frontières
ElFrontiere* new_frontiere_lin(int ,Tableau <Noeud *> & tab, DdlElement& ddelem)
{ return ((ElFrontiere*) (new FrontSegLine(tab,ddelem)));};
ElFrontiere* new_frontiere_surf(int ,Tableau <Noeud *> & tab, DdlElement& ddelem)
{ return ((ElFrontiere*) (new FrontQuadLine(tab,ddelem)));};
// VARIABLES PRIVEES :
// place memoire commune a tous les elements TriaMembL1
static HexaMemb::DonnComHexa * doCoHexa_cm27pti;
// idem mais pour les indicateurs qui servent pour l'initialisation
static HexaMemb::UneFois uneFois;
class NombresConstruireHexa_cm27pti : public NombresConstruire
{ public: NombresConstruireHexa_cm27pti();
};
static NombresConstruireHexa_cm27pti nombre_V; // les nombres propres à l'élément
// GESTION AUTOMATIQUE D'AJOUT D'ELEMENT DANS LE PROGRAMME
//ajout de l'element dans la liste : listTypeElemen, geree par la class Element
class ConsHexa_cm27pti : public ConstrucElement
{ public : ConsHexa_cm27pti ()
{ NouvelleTypeElement nouv(HEXAEDRE,LINEAIRE,MECA_SOLIDE_DEFORMABLE,this,"_cm27pti");
if (ParaGlob::NiveauImpression() >= 4)
cout << "\n initialisation Hexa_cm27pti" << endl;
Element::listTypeElement.push_back(nouv);
};
Element * NouvelElement(int num_maill,int num) // un nouvel élément sans rien
{Element * pt;
pt = new Hexa_cm27pti (num_maill,num) ;
return pt;};
// ramene true si la construction de l'element est possible en fonction
// des variables globales actuelles: ex en fonction de la dimension
bool Element_possible() { if (ParaGlob::Dimension() == 3) return true; else return false;};
};
static ConsHexa_cm27pti consHexa_cm27pti;
static int bidon; // a virer lorsque l'on n'aura plus a declarer une instance dans herezh
};
/// @} // end of group
#endif