Changeset 4882


Ignore:
Timestamp:
07/29/10 11:52:20 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added PentaRef

Location:
issm/trunk/src/c
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/Makefile.am

    r4873 r4882  
    163163                                        ./objects/Elements/PentaHook.h\
    164164                                        ./objects/Elements/PentaHook.cpp\
     165                                        ./objects/Elements/PentaRef.h\
     166                                        ./objects/Elements/PentaRef.cpp\
    165167                                        ./objects/Materials/Matice.h\
    166168                                        ./objects/Materials/Matice.cpp\
     
    727729                                        ./objects/Elements/PentaHook.h\
    728730                                        ./objects/Elements/PentaHook.cpp\
     731                                        ./objects/Elements/PentaRef.h\
     732                                        ./objects/Elements/PentaRef.cpp\
    729733                                        ./objects/Materials/Matice.h\
    730734                                        ./objects/Materials/Matice.cpp\
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r4880 r4882  
    2727        this->matpar=NULL;
    2828        this->neighbors=NULL;
    29        
    3029        this->inputs=NULL;
     30        this->parameters=NULL;
    3131        this->results=NULL;
    32         this->parameters=NULL;
    3332}
    3433/*}}}*/
     
    4140/*}}}*/
    4241/*FUNCTION Penta::Penta(int id, int index, IoModel* iomodel,int nummodels) {{{1*/
    43 Penta::Penta(int penta_id, int index, IoModel* iomodel,int nummodels):
    44 
    45         PentaHook(nummodels,index+1,iomodel->numberofelements+1) //index+1: matice id, iomodel->numberofelements+1: matpar id
     42Penta::Penta(int penta_id, int index, IoModel* iomodel,int nummodels)
     43        :PentaRef(nummodels)
     44        ,PentaHook(nummodels,index+1,iomodel->numberofelements+1) //index+1: matice id, iomodel->numberofelements+1: matpar id
    4645                                                                      { //i is the element index
    4746
     
    5857        this->id=penta_id;
    5958
    60         /*penta_elements_ids: */
    61         if isnan(iomodel->upperelements[index]){
    62                 penta_elements_ids[1]=this->id; //upper penta is the same penta
    63         }
    64         else{
    65                 penta_elements_ids[1]=(int)(iomodel->upperelements[index]);
    66         }
    67        
    68         if isnan(iomodel->lowerelements[index]){
    69                 penta_elements_ids[0]=this->id; //lower penta is the same penta
    70         }
    71         else{
    72                 penta_elements_ids[0]=(int)(iomodel->lowerelements[index]);
    73         }
     59        /*Build neighbors list*/
     60        if isnan(iomodel->upperelements[index]) penta_elements_ids[1]=this->id; //upper penta is the same penta
     61        else                                    penta_elements_ids[1]=(int)(iomodel->upperelements[index]);
     62        if isnan(iomodel->lowerelements[index]) penta_elements_ids[0]=this->id; //lower penta is the same penta
     63        else                                    penta_elements_ids[0]=(int)(iomodel->lowerelements[index]);
    7464        this->InitHookNeighbors(penta_elements_ids);
    7565
     
    17521742        /*Intermediaries*/
    17531743        IssmInt i;
    1754         int penta_node_ids[6];
    1755         int penta_vertex_ids[6];
    1756         double nodeinputs[6];
     1744        int     penta_type;
     1745        int     penta_node_ids[6];
     1746        int     penta_vertex_ids[6];
     1747        double  nodeinputs[6];
    17571748
    17581749        /*Checks if debuging*/
     
    17601751        ISSMASSERT(iomodel->elements);
    17611752        /*}}}*/
     1753
     1754        /*Recover element type*/
     1755        if ((analysis_type==PrognosticAnalysisEnum || analysis_type==BalancedthicknessAnalysisEnum) && iomodel->prognostic_DG){
     1756                /*P1 Discontinuous Galerkin*/
     1757                penta_type=P1DGEnum;
     1758        }
     1759        else{
     1760                /*P1 Continuous Galerkin*/
     1761                penta_type=P1Enum;
     1762        }
     1763        this->SetElementType(penta_type,analysis_counter);
    17621764
    17631765        /*Recover vertices ids needed to initialize inputs*/
  • issm/trunk/src/c/objects/Elements/Penta.h

    r4880 r4882  
    33 */
    44
    5 #ifndef _PENTA_H
    6 #define _PENTA_H
     5#ifndef _PENTA_H_
     6#define _PENTA_H_
    77
    88/*Headers:*/
     
    1010#include "./Element.h"
    1111#include "./PentaHook.h"
     12#include "./PentaRef.h"
    1213class  Object;
    1314class Parameters;
     
    1920class Tria;
    2021
     22#include "../../include/include.h"
    2123#include "../../shared/Exceptions/exceptions.h"
    22 #include "../../include/include.h"
    23 
    2424/*}}}*/
    2525
    26 class Penta: public Element,public PentaHook{
     26class Penta: public Element,public PentaHook,public PentaRef{
    2727
    2828        public:
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r4880 r4882  
    20802080                tria_type=P1Enum;
    20812081        }
    2082 
    2083         /*Set TriaRef*/
    20842082        this->SetElementType(tria_type,analysis_counter);
    20852083
  • issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp

    r4698 r4882  
    2424/*}}}*/
    2525/*FUNCTION PentaVertexInput::PentaVertexInput(int in_enum_type,double* values){{{1*/
    26 PentaVertexInput::PentaVertexInput(int in_enum_type,double* in_values){
     26PentaVertexInput::PentaVertexInput(int in_enum_type,double* in_values)
     27                :PentaRef(1)
     28{
     29
     30        /*Set PentaRef*/
     31        this->SetElementType(P1Enum,0);
     32        this->element_type=P1Enum;
    2733
    2834        enum_type=in_enum_type;
  • issm/trunk/src/c/objects/Inputs/PentaVertexInput.h

    r4704 r4882  
    1010/*{{{1*/
    1111#include "./Input.h"
     12#include "../Elements/PentaRef.h"
    1213/*}}}*/
    1314
    14 class PentaVertexInput: public Input{
     15class PentaVertexInput: public Input, public PentaRef{
    1516
    1617        public:
  • issm/trunk/src/c/objects/objects.h

    r4873 r4882  
    3737#include "./Elements/Penta.h"
    3838#include "./Elements/PentaHook.h"
     39#include "./Elements/PentaRef.h"
    3940#include "./Elements/Tria.h"
    4041#include "./Elements/TriaHook.h"
Note: See TracChangeset for help on using the changeset viewer.