Changeset 3637


Ignore:
Timestamp:
04/29/10 21:56:47 (15 years ago)
Author:
Eric.Larour
Message:

Icefront and Riftfront + rest of upgrade

Location:
issm/trunk/src/c/objects
Files:
40 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Beam.h

    r3632 r3637  
    66#define _BEAM_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810
    911#include "./Element.h"
     
    2123class Element;
    2224class Hook;
     25/*}}}*/
    2326
    2427class Beam: public Element{
  • issm/trunk/src/c/objects/BeamVertexInput.h

    r3620 r3637  
    33 */
    44
    5 #include "./Input.h"
    65
    76#ifndef _BEAMVERTEXINPUT_H_
    87#define _BEAMVERTEXINPUT_H_
     8
     9/*Headers:*/
     10/*{{{1*/
     11#include "./Input.h"
     12/*}}}*/
     13
    914
    1015class BeamVertexInput: public Input{
  • issm/trunk/src/c/objects/BoolInput.h

    r3612 r3637  
    33 */
    44
    5 #include "./Input.h"
    6 #include "../include/types.h"
    75
    86#ifndef _BOOLINPUT_H_
    97#define _BOOLINPUT_H_
     8
     9/*Headers:*/
     10/*{{{1*/
     11#include "./Input.h"
     12#include "../include/types.h"
     13/*}}}*/
    1014
    1115class BoolInput: public Input{
  • issm/trunk/src/c/objects/DakotaPlugin.h

    r3420 r3637  
    88#ifdef _HAVE_DAKOTA_ //only works if dakota library has been compiled in.
    99
     10/*Headers:*/
     11/*{{{1*/
     12
     13
    1014#include "DirectApplicInterface.H"
    1115#include "../toolkits/toolkits.h"
    1216#include "../objects/objects.h"
     17
     18/*}}}*/
    1319
    1420namespace SIM {
  • issm/trunk/src/c/objects/DofObject.h

    r3464 r3637  
    77#define _DOFOBJECT_H_
    88
     9/*Headers:*/
     10/*{{{1*/
    911#include "./Object.h"
    1012#include "../toolkits/toolkits.h"
     13/*}}}*/
    1114
    1215class DofObject{
  • issm/trunk/src/c/objects/DofVec.h

    r3463 r3637  
    66#define _DOFVEC_H_
    77
    8 
     8/*Headers:*/
     9/*{{{1*/
    910#include "./Object.h"
    1011#include "../toolkits/toolkits.h"
    1112
    1213#define DOFVECNAMESIZE 20
     14/*}}}*/
     15
    1316
    1417class DofVec: public Object{
  • issm/trunk/src/c/objects/DoubleInput.h

    r3612 r3637  
    33 */
    44
    5 #include "./Input.h"
    6 #include "../include/types.h"
    75
    86#ifndef _DOUBLEINPUT_H_
    97#define _DOUBLEINPUT_H_
     8
     9/*Headers:*/
     10/*{{{1*/
     11#include "./Input.h"
     12#include "../include/types.h"
     13/*}}}*/
    1014
    1115class DoubleInput: public Input{
  • issm/trunk/src/c/objects/Element.h

    r3620 r3637  
    99#define _ELEMENT_H_
    1010
     11/*Headers:*/
     12/*{{{1*/
    1113#include "./Object.h"
    1214#include "../DataSet/DataSet.h"
    1315#include "../DataSet/Parameters.h"
    1416#include "../toolkits/toolkits.h"
     17/*}}}*/
    1518
    1619class Element: public Object{
  • issm/trunk/src/c/objects/FemModel.h

    r3620 r3637  
    66#define _FEMMODEL_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810class DataSet;
    911class DofVec;
    10 
    1112#include "./Object.h"
    1213#include "../DataSet/DataSet.h"
     
    1516#include "../toolkits/toolkits.h"
    1617#include "../parallel/parallel.h"
     18/*}}}*/
    1719
    1820class FemModel: public Object{
  • issm/trunk/src/c/objects/Hook.h

    r3420 r3637  
    99#define _HOOK_H_
    1010
     11/*Headers:*/
     12/*{{{1*/
    1113class DataSet;
    1214class Object;
    13 
    1415#include "./Object.h"
    1516#include "../DataSet/DataSet.h"
    1617#include "../toolkits/toolkits.h"
     18/*}}}*/
    1719
    1820class Hook{
  • issm/trunk/src/c/objects/Icefront.cpp

    r3632 r3637  
    33 */
    44
    5 
     5/*Headers:*/
     6/*{{{1*/
    67#ifdef HAVE_CONFIG_H
    78        #include "config.h"
     
    1718#include "../include/macros.h"
    1819#include "./Icefront.h"
    19                
     20/*}}}*/
     21
    2022/*Object constructors and destructor*/
    2123/*FUNCTION Icefront::Icefront() {{{1*/
     
    2527}
    2628/*}}}*/
    27 /*FUNCTION Icefront::Icefront(int icefront_id,int* icefront_node_ids, int num_nodes, int icefront_element_id, int icefront_matpar_id){{{1*/
    28 Icefront::Icefront(int icefront_id,int* icefront_node_ids, int num_nodes, int icefront_element_id, int icefront_matpar_id):
    29         hnodes(icefront_node_ids,num_nodes),
    30         helement(&icefront_matice_id,1),
     29/*FUNCTION Icefront::Icefront(int id, int* node_ids, int numnodes, int element_id, int matpar_id){{{1*/
     30Icefront::Icefront(int icefront_id,int* icefront_node_ids, int icefront_numnodes, int icefront_element_id, int icefront_matpar_id):
     31        hnodes(icefront_node_ids,icefront_numnodes),
     32        helement(&icefront_element_id,1),
    3133        hmatpar(&icefront_matpar_id,1)
    3234{
    3335
    34         /*all the initialization has been done by the initializer, just fill in the id: */
     36        /*all the initialization has been done by the initializer, just fill in the id : */
    3537        this->id=icefront_id;
    3638        this->parameters=NULL;
    3739        this->inputs=new Inputs();
    38 }
    39 /*}}}*/
    40 /*FUNCTION Icefront::Icefront(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, DataSet* parameters, Inputs* icefront_inputs) {{{1*/
     40
     41}
     42/*}}}*/
     43/*FUNCTION Icefront::Icefront(int id, Hook* hnodes, Hook* helement, Hook* hmatpar, DataSet* parameters, Inputs* icefront_inputs) {{{1*/
    4144Icefront::Icefront(int icefront_id,Hook* icefront_hnodes, Hook* icefront_helement, Hook* icefront_hmatpar, Parameters* icefront_parameters, Inputs* icefront_inputs):
    4245        hnodes(icefront_hnodes),
     
    6164
    6265        int segment_width;
    63         int i1,i2,i3,i4;
    6466        int element;
    65 
    66         /*icefront intermediary data: */
     67        int num_nodes;
     68
     69        /*icefront constructor data: */
     70        int  icefront_eid;
     71        int  icefront_mparid;
    6772        int  icefront_node_ids[MAX_ICEFRONT_GRIDS];
    68         int  num_nodes;
    69         int  icefront_mparid;
    70         int  icefront_eid;
    7173        int  icefront_fill;
     74        int  icefront_type;
    7275
    7376        /*First, retrieve element index and element type: */
     
    8083        element=(int)(*(iomodel->pressureload+segment_width*i+segment_width-2)-1); //element is in the penultimate column (grid1 grid2 ... elem fill)
    8184
    82         /*Setup all ids, so we can get our hooks setup: */
     85        /*Build ids for hook constructors: */
     86        icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
    8387        icefront_mparid=iomodel->numberofelements+1; //matlab indexing
    84         icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
    8588
    8689        icefront_node_ids[0]=(int)*(iomodel->pressureload+segment_width*i+0);
     
    8992        if (iomodel->sub_analysis_type==HorizAnalysisEnum){
    9093                if ((int)*(iomodel->elements_type+2*element+0)==MacAyealFormulationEnum){ //this is a collapsed 3d element, icefront will be 2d
    91                         num_nodes=2;
     94                        icefront_type=SegmentIcefrontEnum;
    9295                }
    9396                else if ((int)*(iomodel->elements_type+2*element+0)==PattynFormulationEnum){ //this is a real 3d element, icefront will be 3d.
    94                         num_nodes=4;
     97                        icefront_type=QuadIceFrontEnum;
    9598                        icefront_node_ids[2]=(int)*(iomodel->pressureload+segment_width*i+2);
    9699                        icefront_node_ids[3]=(int)*(iomodel->pressureload+segment_width*i+3);
    97100                }
    98                 else{
    99                         ISSMERROR(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0));
    100                 }
     101                else ISSMERROR(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0));
    101102        }
    102103        else if (iomodel->sub_analysis_type==StokesAnalysisEnum){
    103104                //We have a Stokes element, so we need a 3d Icefront
    104                 num_nodes=4;
     105                icefront_type=QuadIceFrontEnum;
    105106                icefront_node_ids[2]=(int)*(iomodel->pressureload+segment_width*i+2);
    106107                icefront_node_ids[3]=(int)*(iomodel->pressureload+segment_width*i+3);
     
    108109        else ISSMERROR("Not supported yet!");
    109110
    110         /*Ok, get the hooks setup: */
     111        if (icefront_type==QuadIceFrontEnum) num_nodes=4;
     112        else num_nodes=2;
     113        icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1);
     114       
     115        /*Ok, we have everything to build the object: */
     116        this->id=icefront_id;
     117
     118        /*Hooks: */
    111119        this->hnodes.Init(icefront_node_ids,num_nodes);
    112         this->helement.Init(&icefront_element_id,1);
    113         this->hmatpar.Init(&icefront_matpar_id,1);
    114 
    115         //intialize inputs, and add as many inputs per element as requested:
     120        this->helement.Init(&icefront_eid,1);
     121        this->hmatpar.Init(&icefront_mparid,1);
     122
     123        //intialize and add as many inputs per element as requested:
    116124        this->inputs=new Inputs();
    117                
    118         icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1);
    119125        this->inputs->AddInput(new IntInput(FillEnum,icefront_fill));
    120 
     126        this->inputs->AddInput(new IntInput(TypeEnum,icefront_type));
     127       
    121128        //this->parameters: we still can't point to it, it may not even exist. Configure will handle this.
    122129        this->parameters=NULL;
    123 
    124130}
    125131
     
    128134/*FUNCTION Icefront::~Icefront() {{{1*/
    129135Icefront::~Icefront(){
    130         return;
     136        delete inputs;
     137        this->parameters=NULL;
    131138}
    132139/*}}}*/
     
    134141/*Object marshall*/
    135142/*FUNCTION Icefront Configure {{{1*/
    136 void  Icefront::Configure(DataSet* elementsin,DataSet* loadsin,DataSet* nodesin,DataSet* verticesin,DataSet* materialsin,Parameters* parametersin);
    137        
    138 /*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective
     143void  Icefront::Configure(DataSet* elementsin,DataSet* loadsin,DataSet* nodesin,DataSet* verticesin,DataSet* materialsin,Parameters* parametersin){
     144
     145        /*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective
    139146         * datasets, using internal ids and offsets hidden in hooks: */
    140147        hnodes.configure(nodesin);
     
    151158}
    152159/*}}}*/
    153 /*FUNCTION Icefront DeepEcho {{{1*/
     160/*FUNCTION Icefront::DeepEcho{{{1*/
    154161void Icefront::DeepEcho(void){
    155162
    156163        printf("Icefront:\n");
    157164        printf("   id: %i\n",id);
    158         hnodes.Echo();
    159         helement.Echo();
    160         hmatpar.Echo();
     165        hnodes.DeepEcho();
     166        helement.DeepEcho();
     167        hmatpar.DeepEcho();
    161168        printf("   parameters\n");
    162         parameters->Echo();
     169        parameters->DeepEcho();
    163170        printf("   inputs\n");
    164         inputs->Echo();
    165 }               
    166 /*}}}*/
    167 /*FUNCTION Icefront Demarshall {{{1*/
     171        inputs->DeepEcho();
     172}
     173/*}}}*/
     174/*FUNCTION Icefront::Demarshall {{{1*/
    168175void  Icefront::Demarshall(char** pmarshalled_dataset){
    169176
     
    197204/*FUNCTION Icefront Echo {{{1*/
    198205void Icefront::Echo(void){
    199 
    200206        this->DeepEcho();
    201207}
     
    209215/*}}}*/
    210216/*FUNCTION Icefront GetId {{{1*/
    211 int    Icefront::GetId(void){ return sid; }
     217int    Icefront::GetId(void){ return id; }
    212218/*}}}*/
    213219/*FUNCTION Icefront GetName {{{1*/
     
    216222}
    217223/*}}}*/
    218 /*FUNCTION Icefront Marshall {{{1*/
     224/*FUNCTION Icefront::Marshall {{{1*/
    219225void  Icefront::Marshall(char** pmarshalled_dataset){
    220 
    221226
    222227        char* marshalled_dataset=NULL;
     
    228233        marshalled_dataset=*pmarshalled_dataset;
    229234
    230         /*get enum type of Tria: */
    231         enum_type=TriaEnum;
     235        /*get enum type of Icefront: */
     236        enum_type=IcefrontEnum;
    232237
    233238        /*marshall enum: */
    234239        memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
    235240
    236         /*marshall Tria data: */
     241        /*marshall Icefront data: */
    237242        memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
    238243
     
    253258
    254259        *pmarshalled_dataset=marshalled_dataset;
    255         return;
    256 }
    257 /*}}}*/
    258 /*FUNCTION Icefront MarshallSize{{{1*/
     260}
     261/*}}}*/
     262/*FUNCTION Icefront::MarshallSize {{{1*/
    259263int   Icefront::MarshallSize(){
    260 
     264       
    261265        return sizeof(id)
    262266                +hnodes.MarshallSize()
     
    277281/*FUNCTION Icefront CreateKMatrix {{{1*/
    278282
    279 void  Icefront::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     283void  Icefront::CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type){
    280284
    281285        /*No stiffness loads applied, do nothing: */
     
    286290/*}}}*/
    287291/*FUNCTION Icefront CreatePVector {{{1*/
    288 void  Icefront::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
     292void  Icefront::CreatePVector(Vec pg, int analysis_type,int sub_analysis_type){
    289293
    290294        /*Just branch to the correct element icefront vector generator, according to the type of analysis we are carrying out: */
    291295        if (analysis_type==ControlAnalysisEnum){
    292296               
    293                 CreatePVectorDiagnosticHoriz( pg,inputs,analysis_type,sub_analysis_type);
     297                CreatePVectorDiagnosticHoriz( pg,analysis_type,sub_analysis_type);
    294298
    295299        }
     
    298302                if (sub_analysis_type==HorizAnalysisEnum){
    299303               
    300                         CreatePVectorDiagnosticHoriz( pg,inputs,analysis_type,sub_analysis_type);
     304                        CreatePVectorDiagnosticHoriz( pg,analysis_type,sub_analysis_type);
    301305
    302306                }
    303307                else if (sub_analysis_type==StokesAnalysisEnum){
    304308                       
    305                         CreatePVectorDiagnosticStokes( pg,inputs,analysis_type,sub_analysis_type);
     309                        CreatePVectorDiagnosticStokes( pg,analysis_type,sub_analysis_type);
    306310
    307311                }
     
    315319/*}}}*/
    316320/*FUNCTION Icefront CreatePVectorDiagnosticHoriz {{{1*/
    317 void Icefront::CreatePVectorDiagnosticHoriz( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
     321void Icefront::CreatePVectorDiagnosticHoriz( Vec pg,  int analysis_type,int sub_analysis_type){
     322       
     323        int type;
     324        inputs->GetParameterValue(&type,TypeEnum);
    318325
    319326        /*Branck on the type of icefront: */
    320         if (strcmp(type,"segment")==0){
    321                 CreatePVectorDiagnosticHorizSegment(pg,inputs,analysis_type,sub_analysis_type);
     327        if (type==SegmentIcefrontEnum){
     328                CreatePVectorDiagnosticHorizSegment(pg,analysis_type,sub_analysis_type);
    322329        }
    323330        else{
    324                 CreatePVectorDiagnosticHorizQuad(pg,inputs,analysis_type,sub_analysis_type);
     331                CreatePVectorDiagnosticHorizQuad(pg,analysis_type,sub_analysis_type);
    325332        }
    326333}       
    327334/*}}}*/
    328335/*FUNCTION Icefront CreatePVectorDiagnosticHorizSegment{{{1*/
    329 
    330 void Icefront::CreatePVectorDiagnosticHorizSegment( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){
     336void Icefront::CreatePVectorDiagnosticHorizSegment( Vec pg,int analysis_type,int sub_analysis_type){
    331337
    332338        int i,j;
     
    350356        double normal[2];
    351357        double length;
     358        int    element_type;
    352359
    353360        /*Objects: */
    354         double  pe_g[numdofs];
    355         Matpar* matpar=NULL;
    356         Node**  element_nodes=NULL;
    357         ParameterInputs* inputs=NULL;
    358 
    359         inputs=(ParameterInputs*)vinputs;
    360 
    361         /*Recover material */
    362         matpar=(Matpar*)element->GetMatPar();
     361        double  pe_g[numdofs]={0.0};
     362        Matpar*  matpar=NULL;
     363        Node**   element_nodes=NULL;
     364        Node**   nodes=NULL;
     365        Element* element=NULL;
     366
     367        /*Recover hook objects: */
     368        matpar=(Matpar*)hmatpar.delivers();
     369        element=(Element*)helement.delivers();
     370        nodes=(Node**)hnodes.deliverp();
     371
     372        element_type=element->Enum();
    363373
    364374        //check that the element is onbed (collapsed formulation) otherwise:pe=0
     
    368378                }
    369379        }
    370         /* Set pe_g to 0: */
    371         for(i=0;i<numdofs;i++) pe_g[i]=0.0;
    372380               
    373381        /*Identify which grids are comprised in the segment. */
     
    419427/*}}}*/
    420428/*FUNCTION Icefront CreatePVectorDiagnosticHorizQuad {{{1*/
    421 void Icefront::CreatePVectorDiagnosticHorizQuad( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){
     429void Icefront::CreatePVectorDiagnosticHorizQuad( Vec pg,int analysis_type,int sub_analysis_type){
    422430
    423431        int i,j;
     
    439447
    440448        /*Objects: */
    441         double  pe_g[numdofs];
     449        double  pe_g[numdofs]={0.0};
    442450        Matpar* matpar=NULL;
    443451        Node**  element_nodes=NULL;
    444         ParameterInputs* inputs=NULL;   
    445 
     452        Node**   nodes=NULL;
     453        Element* element=NULL;
     454        int    element_type;
     455               
    446456        /*quad grids: */
    447457        int grid1,grid2,grid3,grid4;
     
    458468        double v45[3];
    459469
    460         inputs=(ParameterInputs*)vinputs;
     470        /*Recover hook objects: */
     471        matpar=(Matpar*)hmatpar.delivers();
     472        element=(Element*)helement.delivers();
     473        nodes=(Node**)hnodes.deliverp();
     474
     475        element_type=element->Enum();
    461476
    462477        /*check icefront is associated to a pentaelem: */
     
    464479                ISSMERROR(" quad icefront is associated to a TriaElem!");
    465480        }
    466         /*Recover material*/
    467         matpar=(Matpar*)element->GetMatPar();
    468 
    469         /* Set pe_g to 0: */
    470         for(i=0;i<numdofs;i++) pe_g[i]=0.0;
    471481
    472482        /* Get dof list and node coordinates: */
     
    555565/*}}}*/
    556566/*FUNCTION Icefront CreatePVectorDiagnosticStokes {{{1*/
    557 void Icefront::CreatePVectorDiagnosticStokes( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){
     567void Icefront::CreatePVectorDiagnosticStokes( Vec pg,int analysis_type,int sub_analysis_type){
    558568
    559569        int i,j;
     
    575585
    576586        /*Objects: */
    577         double  pe_g[numdofs];
     587        double  pe_g[numdofs]={0.0};
    578588        Matpar* matpar=NULL;
    579589        Node**  element_nodes=NULL;
    580         ParameterInputs* inputs=NULL;   
     590        Node**   nodes=NULL;
     591        Element* element=NULL;
     592        int     element_type;
     593               
    581594
    582595        /*quad grids: */
     
    594607        double v45[3];
    595608
    596         inputs=(ParameterInputs*)vinputs;
    597 
     609        /*Recover hook objects: */
     610        matpar=(Matpar*)hmatpar.delivers();
     611        element=(Element*)helement.delivers();
     612        nodes=(Node**)hnodes.deliverp();
     613       
    598614        /*check icefront is associated to a pentaelem: */
    599615        if(element_type!=PentaEnum){
    600616                ISSMERROR(" quad icefront is associated to a TriaElem!");
    601617        }
    602         /*Recover material*/
    603         matpar=(Matpar*)element->GetMatPar();
    604 
    605         /* Set pe_g to 0: */
    606         for(i=0;i<numdofs;i++) pe_g[i]=0.0;
    607618
    608619        /* Get dof list and node coordinates: */
     
    701712        int doflist_per_node[MAXDOFSPERNODE];
    702713        int numberofdofspernode;
    703        
    704         if (strcmp(type,"segment")==0){
     714        int type;
     715
     716        Node**   nodes=NULL;
     717        nodes=(Node**)hnodes.deliverp();
     718        inputs->GetParameterValue(&type,TypeEnum);
     719       
     720        if(type==SegmentIcefrontEnum){
    705721                for(i=0;i<2;i++){
    706722                        nodes[i]->GetDofList(&doflist_per_node[0],&numberofdofspernode);
     
    726742/*}}}*/
    727743/*FUNCTION Icefront PenaltyCreateKMatrix {{{1*/
    728 void  Icefront::PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
     744void  Icefront::PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type){
    729745        /*do nothing: */
    730746}
    731747/*}}}*/
    732748/*FUNCTION Icefront PenaltyCreatePVector{{{1*/
    733 void  Icefront::PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
     749void  Icefront::PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type){
    734750        /*do nothing: */
    735751}
     
    798814        double water_pressure_tria;
    799815        double pressure_tria[4];
     816        int    fill;
     817
    800818
    801819        /*To use tria functionalities: */
    802820        Tria* tria=NULL;
     821       
     822        /*Recover inputs: */
     823        inputs->GetParameterValue(&fill,FillEnum);
    803824
    804825        /*Initialize fake tria: */
     
    10541075        double water_pressure_tria;
    10551076        double pressure_tria;
     1077        int    fill;
    10561078
    10571079        /*To use tria functionalities: */
    10581080        Tria* tria=NULL;
     1081
     1082        /*Recover inputs: */
     1083        inputs->GetParameterValue(&fill,FillEnum);
    10591084
    10601085        /*Initialize fake tria: */
     
    12621287        double   surface_under_water,base_under_water;
    12631288        double   pressure;
     1289        int    fill;
     1290
     1291        /*Recover inputs: */
     1292        inputs->GetParameterValue(&fill,FillEnum);
    12641293
    12651294        nx=normal[0];
    12661295        ny=normal[1];
     1296
    12671297
    12681298        //Get gaussian points and weights. order 2 since we have a product of 2 nodal functions
  • issm/trunk/src/c/objects/Icefront.h

    r3632 r3637  
    66#define _ICEFRONT_H_
    77
     8/*Headers:*/
     9/*{{{1*/
     10class Element;
     11class Load;
     12class Matpar;
     13class Element;
     14class Node;
     15
    816#include "./Load.h"
     17#include "./Matpar.h"
     18#include "./Element.h"
     19#include "./Node.h"
     20#include "../ModelProcessorx/IoModel.h"
    921
    1022#define MAX_ICEFRONT_GRIDS 4 //max number of grids for a certain load
    1123#define ICEFRONTSTRING 20 //max string length
     24/*}}}*/
    1225
    1326class Icefront: public Load {
    1427
    1528        public:
    16                 int     id;
    17        
    18                 Hook* hnodes; //2 or 4 nodes
    19                 Hook* helement; //tria or penta
    20                 Hook* hmatpar;
     29                int id;
    2130
     31                /*hooks: */
     32                Hook hnodes;
     33                Hook helement;
     34                Hook hmatpar;
     35
     36                /*inputs and parameters: */
     37                Inputs* inputs;
    2238                Parameters* parameters;
    23                 Inputs*     inputs;
    2439
    2540                /*constructors: {{{1*/
    2641                Icefront();
    27                 Icefront(int icefront_id,int* icefront_node_ids, int num_nodes, int icefront_element_id, int icefront_matpar_id);
    28                 Icefront(int icefront_id,Hook* icefront_hnodes, Hook* icefront_helement,Hook* icefront_hmatpar, Parameters* icefront_parameters, Inputs* icefront_inputs);
    29                 Icefront(int id,int i, IoModel* iomodel);
     42                Icefront(int icefront_id,int* icefront_node_ids, int icefront_numnodes, int icefront_element_id,int icefront_matpar_id);
     43                Icefront(int icefront_id, Hook* icefront_hnodes, Hook* icefront_helement, Hook* icefront_hmatpar, Parameters* parameters, Inputs* icefront_inputs);
     44                Icefront(int icefront_id,int i, IoModel* iomodel);
    3045                ~Icefront();
    3146                /*}}}*/
    3247                /*object management: {{{1*/
    33                 void  Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* vertices,DataSet* materials,Parameters* parameters);
     48                void  Configure(DataSet* elementsin,DataSet* loadsin,DataSet* nodesin,DataSet* verticesin,DataSet* materialsin,Parameters* parametersin);
    3449                Object* copy();
    3550                void  DeepEcho();
     
    4863                void  CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type);
    4964                void  CreatePVector(Vec pg, int analysis_type,int sub_analysis_type);
    50                 void  CreatePVectorDiagnosticHoriz( Vec pg, int analysis_type,int sub_analysis_type);
    51                 void  CreatePVectorDiagnosticHorizSegment( Vec pg,int analysis_type,int sub_analysis_type);
     65                void  CreatePVectorDiagnosticHoriz( Vec pg,  int analysis_type,int sub_analysis_type);
     66                void  CreatePVectorDiagnosticHorizSegment( Vec pg, int analysis_type,int sub_analysis_type);
    5267                void  CreatePVectorDiagnosticHorizQuad( Vec pg, int analysis_type,int sub_analysis_type);
    5368                void  CreatePVectorDiagnosticStokes( Vec pg, int analysis_type,int sub_analysis_type);
  • issm/trunk/src/c/objects/Input.h

    r3612 r3637  
    77#define _EINPUT_H_
    88
     9/*Headers:*/
     10/*{{{1*/
    911#include "./Object.h"
     12/*}}}*/
    1013
    1114class Input: public Object{
  • issm/trunk/src/c/objects/IntInput.h

    r3612 r3637  
    33 */
    44
    5 #include "./Input.h"
    6 #include "../include/types.h"
    75
    86#ifndef _INTINPUT_H_
    97#define _INTINPUT_H_
     8
     9/*Headers:*/
     10/*{{{1*/
     11#include "./Input.h"
     12#include "../include/types.h"
     13/*}}}*/
    1014
    1115class IntInput: public Input{
  • issm/trunk/src/c/objects/Load.h

    r3632 r3637  
    99#define _LOAD_H_
    1010
     11/*Headers:*/
     12/*{{{1*/
    1113class Object;
    1214
     
    1517#include "../DataSet/DataSet.h"
    1618#include "../DataSet/Parameters.h"
     19/*}}}*/
    1720
    1821class Load: public Object{
  • issm/trunk/src/c/objects/Material.h

    r3463 r3637  
    77#define _MATERIAL_H_
    88
     9/*Headers:*/
     10/*{{{1*/
    911class Object;
    10 
    1112#include "./Object.h"
    1213#include "../toolkits/toolkits.h"
     14/*}}}*/
    1315
    1416class Material: public Object{
  • issm/trunk/src/c/objects/Matice.h

    r3622 r3637  
    66#define MATICE_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810struct IoModel;
    9 
    1011#include "./Material.h"
    1112#include "../ModelProcessorx/IoModel.h"
     13/*}}}*/
     14
    1215class Matice: public Material{
    1316
  • issm/trunk/src/c/objects/Matpar.h

    r3622 r3637  
    66#define _MATPAR_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810struct IoModel;
    9 
    1011#include "./Material.h"
    1112#include "../ModelProcessorx/IoModel.h"
     13/*}}}*/
    1214
    1315class Matpar: public Material{
  • issm/trunk/src/c/objects/Model.h

    r2333 r3637  
    66#define _MODEL_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "../include/types.h"
    9 
    1011struct FemModel;
    1112class DataSet;
     13/*}}}*/
    1214
    1315class Model{
  • issm/trunk/src/c/objects/Node.h

    r3632 r3637  
    66#define _NODE_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810/*indefinitions: */
    911#include "./Object.h"
     
    1315#include "./DofIndexing.h"
    1416#include "../ModelProcessorx/IoModel.h"
     17/*}}}*/
    1518
    1619class Node: public Object,public DofObject{
  • issm/trunk/src/c/objects/NodeSets.h

    r1 r3637  
    66#define _NODESETS_H
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "../toolkits/toolkits.h"
     11/*}}}*/
    912
    1013class NodeSets {
  • issm/trunk/src/c/objects/Numericalflux.h

    r3570 r3637  
    66#define _NUMERICALFLUX_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "./Load.h"
    911#include "./Matpar.h"
    1012#include "./Element.h"
    1113#include "./Node.h"
     14class Element;
    1215
    1316#define NUMERICALFLUXSTRING 20    //max string length
    1417#define MAX_NUMERICALFLUX_NODES 4 //max number of grids for a certain load
    1518#define MAX_NUMERICALFLUX_ELEMS 2 //max number of elements for a certain load
     19/*}}}*/
    1620
    17 class Element;
    1821class Numericalflux: public Load {
    1922
  • issm/trunk/src/c/objects/Numpar.h

    r3612 r3637  
    66#define _NUMPAR_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "./Object.h"
     11/*}}}*/
    912
    1013class Numpar: public Object{
  • issm/trunk/src/c/objects/Param.h

    r3463 r3637  
    66#define _PARAM_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "./Object.h"
    911#include "../toolkits/toolkits.h"
     
    1113
    1214#define PARAMSTRING 200 //max string length
    13 
     15/*}}}*/
    1416
    1517class Param: public Object{
  • issm/trunk/src/c/objects/Pengrid.h

    r3632 r3637  
    55#define _PENGRID_H_
    66
     7/*Headers:*/
     8/*{{{1*/
    79#include "./Load.h"
    810#include "./Node.h"
     
    1113
    1214class Element;
     15/*}}}*/
     16
    1317class Pengrid: public Load{
    1418
  • issm/trunk/src/c/objects/Penpair.h

    r3632 r3637  
    55#define _PENPAIR_H_
    66
     7/*Headers:*/
     8/*{{{1*/
    79#include "./Load.h"
    810#include "./Node.h"
     
    1012
    1113class Element;
     14/*}}}*/
     15
    1216class Penpair: public Load{
    1317
  • issm/trunk/src/c/objects/Penta.h

    r3632 r3637  
    66#define _PENTA_H
    77
     8/*Headers:*/
     9/*{{{1*/
    810class Object;
    911class Node;
     
    2426#include "../DataSet/Parameters.h"
    2527#include "../DataSet/Inputs.h"
     28/*}}}*/
    2629
    2730class Penta: public Element{
  • issm/trunk/src/c/objects/PentaVertexInput.h

    r3620 r3637  
    33 */
    44
    5 #include "./Input.h"
    65
    76#ifndef _PENTAVERTEXINPUT_H_
    87#define _PENTAVERTEXINPUT_H_
     8
     9/*Headers:*/
     10/*{{{1*/
     11#include "./Input.h"
     12/*}}}*/
    913
    1014class PentaVertexInput: public Input{
  • issm/trunk/src/c/objects/Result.h

    r3463 r3637  
    66#define _RESULT_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "stdio.h"
    911#include "./Object.h"
    1012#include "../toolkits/toolkits.h"
     13/*}}}*/
    1114
    1215class Result: public Object{
  • issm/trunk/src/c/objects/Rgb.h

    r3463 r3637  
    66#define _RGB_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "./Object.h"
    911#include "../DataSet/DataSet.h"
     12/*}}}*/
    1013
    1114class Rgb: public Object{
  • issm/trunk/src/c/objects/Riftfront.cpp

    r3622 r3637  
    33 */
    44
    5 
     5/*Headers:*/
     6/*{{{1*/
    67#ifdef HAVE_CONFIG_H
    78        #include "config.h"
     
    1617#include "../include/typedefs.h"
    1718#include "../include/macros.h"
     19#include "../ModelProcessorx/ModelProcessorx.h"
    1820#include "./objects.h"
    19 
    20                
     21/*}}}*/
     22
    2123/*Object constructors and destructor*/
    2224/*FUNCTION Riftfront::Riftfront(){{{1*/
    2325Riftfront::Riftfront(){
    24         /*in case :*/
    25         material_converged=0;
    26         return;
    27 }
    28 /*}}}1*/
    29 /*FUNCTION Riftfront::Riftfront(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], ...){{{1*/
    30 Riftfront::Riftfront(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], int riftfront_mparid, double riftfront_h[MAX_RIFTFRONT_GRIDS],double riftfront_b[MAX_RIFTFRONT_GRIDS],double riftfront_s[MAX_RIFTFRONT_GRIDS],double riftfront_normal[2],double riftfront_length,int riftfront_fill,double riftfront_friction, double riftfront_fraction,double riftfront_fractionincrement, double riftfront_penalty_offset, int riftfront_penalty_lock, bool riftfront_active,bool riftfront_frozen, int riftfront_counter,bool riftfront_prestable,bool riftfront_shelf){
    31 
    32         this->Init(riftfront_type,riftfront_id, riftfront_node_ids, riftfront_mparid, riftfront_h,riftfront_b,riftfront_s,riftfront_normal,riftfront_length,riftfront_fill,riftfront_friction, riftfront_fraction,riftfront_fractionincrement, riftfront_penalty_offset, riftfront_penalty_lock, riftfront_active,riftfront_frozen, riftfront_counter,riftfront_prestable,riftfront_shelf);
    33 
    34 }
    35 /*}}}1*/
     26        this->inputs=NULL;
     27        this->parameters=NULL;
     28}
     29/*}}}*/
     30/*FUNCTION Riftfront::Riftfront(int id, int* node_ids, int matice_id, int matpar_id){{{1*/
     31Riftfront::Riftfront(int riftfront_id,int* riftfront_node_ids, int riftfront_matpar_id):
     32        hnodes(riftfront_node_ids,2),
     33        hmatpar(&riftfront_matpar_id,1)
     34{
     35
     36        /*all the initialization has been done by the initializer, just fill in the id: */
     37        this->id=riftfront_id;
     38        this->parameters=NULL;
     39        this->inputs=new Inputs();
     40
     41}
     42/*}}}*/
     43/*FUNCTION Riftfront::Riftfront(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, DataSet* parameters, Inputs* riftfront_inputs) {{{1*/
     44Riftfront::Riftfront(int riftfront_id,Hook* riftfront_hnodes, Hook* riftfront_hmatpar, Parameters* riftfront_parameters, Inputs* riftfront_inputs):
     45        hnodes(riftfront_hnodes),
     46        hmatpar(riftfront_hmatpar)
     47{
     48
     49        /*all the initialization has been done by the initializer, just fill in the id: */
     50        this->id=riftfront_id;
     51        if(riftfront_inputs){
     52                this->inputs=(Inputs*)riftfront_inputs->Copy();
     53        }
     54        else{
     55                this->inputs=new Inputs();
     56        }
     57        /*point parameters: */
     58        this->parameters=riftfront_parameters;
     59}
     60/*}}}*/
    3661/*FUNCTION Riftfront::Riftfront(int id, int i, IoModel* iomodel){{{1*/
    3762Riftfront::Riftfront(int riftfront_id,int i, IoModel* iomodel){
    3863
    39         /*rifts: */
    40         char riftfront_type[RIFTFRONTSTRING];
    41         int  riftfront_node_ids[2];
    42         int  riftfront_mparid;
    43         double riftfront_h[2];
    44         double riftfront_b[2];
    45         double riftfront_s[2];
    46         double riftfront_normal[2];
    47         double riftfront_length;
    48         int    riftfront_fill;
     64        /*data: */
     65        int    riftfront_node_ids[2];
     66        int    riftfront_matpar_id;
     67        int    riftfront_type;
     68        double riftfront_fill;
    4969        double riftfront_friction;
    50         double riftfront_fraction;
    5170        double riftfront_fractionincrement;
    5271        bool   riftfront_shelf;
    53         double riftfront_penalty_offset;
    54         int riftfront_penalty_lock;
    55         bool riftfront_active;
    56         bool riftfront_frozen;
    57         int  riftfront_counter;
    58         bool riftfront_prestable;
    59         int el1,el2;
    60         int grid1,grid2;
    61         double normal[2];
    62         double length;
    63         int    fill;
    64         double friction;
    65         double fraction;
    66         double fractionincrement;
     72
     73        /*intermediary: */
     74        int el1    ,el2;
     75        int grid1  ,grid2;
    6776
    6877        /*Ok, retrieve all the data needed to add a penalty between the two grids: */
     
    7382        grid2=(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+1);
    7483
    75         normal[0]=*(iomodel->riftinfo+RIFTINFOSIZE*i+4);
    76         normal[1]=*(iomodel->riftinfo+RIFTINFOSIZE*i+5);
    77         length=*(iomodel->riftinfo+RIFTINFOSIZE*i+6);
    78 
    79         fill = (int)*(iomodel->riftinfo+RIFTINFOSIZE*i+7);
    80         friction=*(iomodel->riftinfo+RIFTINFOSIZE*i+8);
    81         fraction=*(iomodel->riftinfo+RIFTINFOSIZE*i+9);
    82         fractionincrement=*(iomodel->riftinfo+RIFTINFOSIZE*i+10);
    83 
    84         strcpy(riftfront_type,"2d");
     84        /*id: */
     85        this->id=riftfront_id;
     86
     87        /*hooks: */
    8588        riftfront_node_ids[0]=grid1;
    8689        riftfront_node_ids[1]=grid2;
    87         riftfront_mparid=iomodel->numberofelements+1; //matlab indexing
    88 
    89         riftfront_h[0]=iomodel->thickness[grid1-1];
    90         riftfront_h[1]=iomodel->thickness[grid2-1];
    91 
    92         riftfront_b[0]=iomodel->bed[grid1-1];
    93         riftfront_b[1]=iomodel->bed[grid2-1];
    94 
    95         riftfront_s[0]=iomodel->surface[grid1-1];
    96         riftfront_s[1]=iomodel->surface[grid2-1];
    97 
    98         riftfront_normal[0]=normal[0];
    99         riftfront_normal[1]=normal[1];
    100         riftfront_length=length;
    101 
    102         riftfront_fill=fill;
    103         riftfront_friction=friction;
    104         riftfront_fraction=fraction;
    105         riftfront_fractionincrement=fractionincrement;
     90        riftfront_matpar_id=iomodel->numberofelements+1; //matlab indexing
     91
     92        this->hnodes.Init(riftfront_node_ids,2);
     93        this->hmatpar.Init(&riftfront_matpar_id,1);
     94
     95        /*computational parameters: */
     96        this->active=0;
     97        this->frozen=0;
     98        this->counter=0;
     99        this->prestable=0;
     100        this->penalty_lock=0;
     101        this->material_converged=0;
     102        this->normal[0]=*(iomodel->riftinfo+RIFTINFOSIZE*i+4);
     103        this->normal[1]=*(iomodel->riftinfo+RIFTINFOSIZE*i+5);
     104        this->length=*(iomodel->riftinfo+RIFTINFOSIZE*i+6);
     105        this->fraction=*(iomodel->riftinfo+RIFTINFOSIZE*i+9);
     106
     107        //intialize inputs, and add as many inputs per element as requested:
     108        this->inputs=new Inputs();
     109               
     110        riftfront_type=SegmentRiftfrontEnum;
     111        riftfront_fill = (int)*(iomodel->riftinfo+RIFTINFOSIZE*i+7);
     112        riftfront_friction=*(iomodel->riftinfo+RIFTINFOSIZE*i+8);
     113        riftfront_fractionincrement=*(iomodel->riftinfo+RIFTINFOSIZE*i+10);
    106114        riftfront_shelf=(bool)iomodel->gridoniceshelf[grid1-1];
    107115
    108         riftfront_penalty_offset=iomodel->penalty_offset;
    109         riftfront_penalty_lock=iomodel->penalty_lock;
    110 
    111         riftfront_active=0;
    112         riftfront_frozen=0;
    113         riftfront_counter=0;
    114         riftfront_prestable=0;
    115                        
    116         this->Init(riftfront_type,riftfront_id, riftfront_node_ids, riftfront_mparid, riftfront_h,riftfront_b,riftfront_s,riftfront_normal,riftfront_length,riftfront_fill,riftfront_friction, riftfront_fraction,riftfront_fractionincrement, riftfront_penalty_offset, riftfront_penalty_lock, riftfront_active,riftfront_frozen, riftfront_counter,riftfront_prestable,riftfront_shelf);
    117 
    118 }
    119 /*}}}1*/
    120 /*FUNCTION Riftfront::Init {{{1*/
    121 void Riftfront::Init(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], int riftfront_mparid, double riftfront_h[MAX_RIFTFRONT_GRIDS],double riftfront_b[MAX_RIFTFRONT_GRIDS],double riftfront_s[MAX_RIFTFRONT_GRIDS],double riftfront_normal[2],double riftfront_length,int riftfront_fill,double riftfront_friction, double riftfront_fraction,double riftfront_fractionincrement, double riftfront_penalty_offset, int riftfront_penalty_lock, bool riftfront_active,bool riftfront_frozen, int riftfront_counter,bool riftfront_prestable,bool riftfront_shelf){
    122 
    123         int i;
    124        
    125         strcpy(type,riftfront_type);
    126         id=riftfront_id;
    127        
    128         for(i=0;i<MAX_RIFTFRONT_GRIDS;i++){
    129                 node_ids[i]=riftfront_node_ids[i];
    130                 node_offsets[i]=UNDEF;
    131                 nodes[i]=NULL;
    132         }
    133        
    134         mparid=riftfront_mparid;
    135         matpar=NULL;
    136         matpar_offset=UNDEF;
    137 
    138         for(i=0;i<MAX_RIFTFRONT_GRIDS;i++){
    139                 h[i]=riftfront_h[i];
    140                 b[i]=riftfront_b[i];
    141                 s[i]=riftfront_s[i];
    142         }
    143 
    144         normal[0]=riftfront_normal[0];
    145         normal[1]=riftfront_normal[1];
    146         length=riftfront_length;
    147         fill=riftfront_fill;
    148         friction=riftfront_friction;
    149         fraction=riftfront_fraction;
    150         fractionincrement=riftfront_fractionincrement;
    151         penalty_offset=riftfront_penalty_offset;
    152         penalty_lock=riftfront_penalty_lock;
    153         active=riftfront_active;
    154         frozen=riftfront_frozen;
    155         counter=riftfront_counter;
    156         prestable=riftfront_prestable;
    157         shelf=riftfront_shelf;
    158 
    159         /*not in the constructor, but still needed: */
    160         material_converged=0;
    161 
    162         return;
     116        this->inputs->AddInput(new IntInput(TypeEnum,riftfront_type));
     117        this->inputs->AddInput(new DoubleInput(FillEnum,riftfront_fill));
     118        this->inputs->AddInput(new DoubleInput(FrictionEnum,riftfront_friction));
     119        this->inputs->AddInput(new DoubleInput(FractionIncrementEnum,riftfront_fractionincrement));
     120        this->inputs->AddInput(new BoolInput(SegmentOnIceShelfEnum,riftfront_shelf));
     121       
     122        //this->parameters: we still can't point to it, it may not even exist. Configure will handle this.
     123        this->parameters=NULL;
     124               
    163125}
    164126/*}}}1*/
    165127/*FUNCTION Riftfront::~Riftfront(){{{1*/
    166128Riftfront::~Riftfront(){
    167         return;
    168 }
    169 /*}}}1*/
    170                
     129        delete inputs;
     130        this->parameters=NULL;
     131}
     132/*}}}*/
     133
    171134/*Object marshall*/
     135/*FUNCTION Riftfront::copy {{{1*/
     136Object* Riftfront::copy() {
     137        return new Riftfront(*this);
     138}
     139/*}}}1*/
     140/*FUNCTION Riftfront::Configure {{{1*/
     141void  Riftfront::Configure(DataSet* elementsin,DataSet* loadsin,DataSet* nodesin,DataSet* verticesin,DataSet* materialsin,Parameters* parametersin){
     142
     143        /*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective
     144         * datasets, using internal ids and offsets hidden in hooks: */
     145        hnodes.configure(nodesin);
     146        hmatpar.configure(materialsin);
     147
     148        /*point parameters to real dataset: */
     149        this->parameters=parametersin;
     150
     151}
     152/*}}}*/
     153/*FUNCTION Riftfront::DeepEcho{{{1*/
     154void Riftfront::DeepEcho(void){
     155
     156        printf("Riftfront:\n");
     157        printf("   id: %i\n",id);
     158        hnodes.DeepEcho();
     159        hmatpar.DeepEcho();
     160        printf("   parameters\n");
     161        parameters->DeepEcho();
     162        printf("   inputs\n");
     163        inputs->DeepEcho();
     164}
     165/*}}}*/
     166/*FUNCTION Riftfront::Demarshall {{{1*/
     167void  Riftfront::Demarshall(char** pmarshalled_dataset){
     168
     169        char* marshalled_dataset=NULL;
     170        int   i;
     171
     172        /*recover marshalled_dataset: */
     173        marshalled_dataset=*pmarshalled_dataset;
     174
     175        /*this time, no need to get enum type, the pointer directly points to the beginning of the
     176         *object data (thanks to DataSet::Demarshall):*/
     177
     178        memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
     179        memcpy(&active,marshalled_dataset,sizeof(active));marshalled_dataset+=sizeof(active);
     180        memcpy(&normal,marshalled_dataset,sizeof(normal));marshalled_dataset+=sizeof(normal);
     181        memcpy(&length,marshalled_dataset,sizeof(length));marshalled_dataset+=sizeof(length);
     182        memcpy(&fraction,marshalled_dataset,sizeof(fraction));marshalled_dataset+=sizeof(fraction);
     183        memcpy(&frozen,marshalled_dataset,sizeof(frozen));marshalled_dataset+=sizeof(frozen);
     184        memcpy(&counter,marshalled_dataset,sizeof(counter));marshalled_dataset+=sizeof(counter);
     185        memcpy(&prestable,marshalled_dataset,sizeof(prestable));marshalled_dataset+=sizeof(prestable);
     186        memcpy(&penalty_lock,marshalled_dataset,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);
     187        memcpy(&material_converged,marshalled_dataset,sizeof(material_converged));marshalled_dataset+=sizeof(material_converged);
     188
     189        /*demarshall hooks: */
     190        hnodes.Demarshall(&marshalled_dataset);
     191        hmatpar.Demarshall(&marshalled_dataset);
     192       
     193        /*demarshall inputs: */
     194        inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);
     195
     196        /*parameters: may not exist even yet, so let Configure handle it: */
     197        this->parameters=NULL;
     198
     199        /*return: */
     200        *pmarshalled_dataset=marshalled_dataset;
     201}
     202/*}}}*/
     203/*FUNCTION Riftfront::Echo {{{1*/
     204void Riftfront::Echo(void){
     205        this->DeepEcho();
     206}
     207/*}}}1*/
     208/*FUNCTION Riftfront::Enum {{{1*/
     209int Riftfront::Enum(void){
     210
     211        return RiftfrontEnum;
     212
     213}
     214/*}}}1*/
     215/*FUNCTION Riftfront::GetId {{{1*/
     216int    Riftfront::GetId(void){ return id; }
     217/*}}}1*/
     218/*FUNCTION Riftfront::GetName {{{1*/
     219char* Riftfront::GetName(void){
     220        return "riftfront";
     221}
     222/*}}}1*/
    172223/*FUNCTION Riftfront::Marshall {{{1*/
    173224void  Riftfront::Marshall(char** pmarshalled_dataset){
     
    175226        char* marshalled_dataset=NULL;
    176227        int   enum_type=0;
     228        char* marshalled_inputs=NULL;
     229        int   marshalled_inputs_size;
    177230
    178231        /*recover marshalled_dataset: */
     
    181234        /*get enum type of Riftfront: */
    182235        enum_type=RiftfrontEnum;
    183        
     236
    184237        /*marshall enum: */
    185238        memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
    186        
     239
    187240        /*marshall Riftfront data: */
    188         memcpy(marshalled_dataset,&type,sizeof(type));marshalled_dataset+=sizeof(type);
    189241        memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
    190         memcpy(marshalled_dataset,&node_ids,sizeof(node_ids));marshalled_dataset+=sizeof(node_ids);
    191         memcpy(marshalled_dataset,&node_offsets,sizeof(node_offsets));marshalled_dataset+=sizeof(node_offsets);
    192         memcpy(marshalled_dataset,&mparid,sizeof(mparid));marshalled_dataset+=sizeof(mparid);
    193         memcpy(marshalled_dataset,&matpar_offset,sizeof(matpar_offset));marshalled_dataset+=sizeof(matpar_offset);
    194 
    195         memcpy(marshalled_dataset,&h,sizeof(h));marshalled_dataset+=sizeof(h);
    196         memcpy(marshalled_dataset,&b,sizeof(b));marshalled_dataset+=sizeof(b);
    197         memcpy(marshalled_dataset,&s,sizeof(s));marshalled_dataset+=sizeof(s);
    198        
     242        memcpy(marshalled_dataset,&active,sizeof(active));marshalled_dataset+=sizeof(active);
    199243        memcpy(marshalled_dataset,&normal,sizeof(normal));marshalled_dataset+=sizeof(normal);
    200244        memcpy(marshalled_dataset,&length,sizeof(length));marshalled_dataset+=sizeof(length);
    201         memcpy(marshalled_dataset,&fill,sizeof(fill));marshalled_dataset+=sizeof(fill);
    202         memcpy(marshalled_dataset,&friction,sizeof(friction));marshalled_dataset+=sizeof(friction);
    203245        memcpy(marshalled_dataset,&fraction,sizeof(fraction));marshalled_dataset+=sizeof(fraction);
    204         memcpy(marshalled_dataset,&fractionincrement,sizeof(fractionincrement));marshalled_dataset+=sizeof(fractionincrement);
    205         memcpy(marshalled_dataset,&penalty_offset,sizeof(penalty_offset));marshalled_dataset+=sizeof(penalty_offset);
    206         memcpy(marshalled_dataset,&penalty_lock,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);
    207         memcpy(marshalled_dataset,&active,sizeof(active));marshalled_dataset+=sizeof(active);
    208246        memcpy(marshalled_dataset,&frozen,sizeof(frozen));marshalled_dataset+=sizeof(frozen);
    209247        memcpy(marshalled_dataset,&counter,sizeof(counter));marshalled_dataset+=sizeof(counter);
    210248        memcpy(marshalled_dataset,&prestable,sizeof(prestable));marshalled_dataset+=sizeof(prestable);
    211         memcpy(marshalled_dataset,&material_converged,sizeof(material_converged));marshalled_dataset+=sizeof(material_converged);
    212         memcpy(marshalled_dataset,&shelf,sizeof(shelf));marshalled_dataset+=sizeof(shelf);
     249        memcpy(marshalled_dataset,&penalty_lock,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);
     250
     251        /*Marshall hooks: */
     252        hnodes.Marshall(&marshalled_dataset);
     253        hmatpar.Marshall(&marshalled_dataset);
     254
     255        /*Marshall inputs: */
     256        marshalled_inputs_size=inputs->MarshallSize();
     257        marshalled_inputs=inputs->Marshall();
     258        memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
     259        marshalled_dataset+=marshalled_inputs_size;
     260
     261        /*parameters: don't do anything about it. parameters are marshalled somewhere else!*/
     262
     263        xfree((void**)&marshalled_inputs);
    213264
    214265        *pmarshalled_dataset=marshalled_dataset;
    215266        return;
    216267}
    217 /*}}}1*/
     268/*}}}*/
    218269/*FUNCTION Riftfront::MarshallSize {{{1*/
    219270int   Riftfront::MarshallSize(){
    220 
    221         return sizeof(type)+
    222                 sizeof(id)+
    223                 sizeof(node_ids)+
    224                 sizeof(node_offsets)+
    225                 sizeof(mparid)+
    226                 sizeof(matpar_offset)+
    227                 sizeof(h)+
    228                 sizeof(b)+
    229                 sizeof(s)+
    230                 sizeof(normal)+
    231                 sizeof(length)+
    232                 sizeof(fill)+
    233                 sizeof(friction)+
    234                 sizeof(fraction)+
    235                 sizeof(fractionincrement)+
    236                 sizeof(penalty_offset)+
    237                 sizeof(penalty_lock)+
    238                 sizeof(active)+
    239                 sizeof(frozen)+
    240                 sizeof(counter)+
    241                 sizeof(prestable)+
    242                 sizeof(material_converged)+
    243                 sizeof(shelf)+
    244                 sizeof(int); //sizeof(int) for enum type
    245 }
    246 /*}}}1*/
    247 /*FUNCTION Riftfront::Demarshall {{{1*/
    248 void  Riftfront::Demarshall(char** pmarshalled_dataset){
    249 
    250         int i;
    251         char* marshalled_dataset=NULL;
    252 
    253         /*recover marshalled_dataset: */
    254         marshalled_dataset=*pmarshalled_dataset;
    255 
    256         /*this time, no need to get enum type, the pointer directly points to the beginning of the
    257          *object data (thanks to DataSet::Demarshall):*/
    258 
    259         memcpy(&type,marshalled_dataset,sizeof(type));marshalled_dataset+=sizeof(type);
    260         memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
    261         memcpy(&node_ids,marshalled_dataset,sizeof(node_ids));marshalled_dataset+=sizeof(node_ids);
    262         memcpy(&node_offsets,marshalled_dataset,sizeof(node_offsets));marshalled_dataset+=sizeof(node_offsets);
    263         memcpy(&mparid,marshalled_dataset,sizeof(mparid));marshalled_dataset+=sizeof(mparid);
    264         memcpy(&matpar_offset,marshalled_dataset,sizeof(matpar_offset));marshalled_dataset+=sizeof(matpar_offset);
    265 
    266         memcpy(&h,marshalled_dataset,sizeof(h));marshalled_dataset+=sizeof(h);
    267         memcpy(&b,marshalled_dataset,sizeof(b));marshalled_dataset+=sizeof(b);
    268         memcpy(&s,marshalled_dataset,sizeof(s));marshalled_dataset+=sizeof(s);
    269         memcpy(&normal,marshalled_dataset,sizeof(normal));marshalled_dataset+=sizeof(normal);
    270         memcpy(&length,marshalled_dataset,sizeof(length));marshalled_dataset+=sizeof(length);
    271         memcpy(&fill,marshalled_dataset,sizeof(fill));marshalled_dataset+=sizeof(fill);
    272         memcpy(&friction,marshalled_dataset,sizeof(friction));marshalled_dataset+=sizeof(friction);
    273         memcpy(&fraction,marshalled_dataset,sizeof(fraction));marshalled_dataset+=sizeof(fraction);
    274         memcpy(&fractionincrement,marshalled_dataset,sizeof(fractionincrement));marshalled_dataset+=sizeof(fractionincrement);
    275         memcpy(&penalty_offset,marshalled_dataset,sizeof(penalty_offset));marshalled_dataset+=sizeof(penalty_offset);
    276         memcpy(&penalty_lock,marshalled_dataset,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);
    277         memcpy(&active,marshalled_dataset,sizeof(active));marshalled_dataset+=sizeof(active);
    278         memcpy(&frozen,marshalled_dataset,sizeof(frozen));marshalled_dataset+=sizeof(frozen);
    279         memcpy(&counter,marshalled_dataset,sizeof(counter));marshalled_dataset+=sizeof(counter);
    280         memcpy(&prestable,marshalled_dataset,sizeof(prestable));marshalled_dataset+=sizeof(prestable);
    281         memcpy(&material_converged,marshalled_dataset,sizeof(material_converged));marshalled_dataset+=sizeof(material_converged);
    282         memcpy(&shelf,marshalled_dataset,sizeof(shelf));marshalled_dataset+=sizeof(shelf);
    283 
    284         for(i=0;i<MAX_RIFTFRONT_GRIDS;i++)nodes[i]=NULL;
    285         matpar=NULL;
    286 
    287         /*return: */
    288         *pmarshalled_dataset=marshalled_dataset;
    289         return;
     271       
     272        return sizeof(id)
     273                +sizeof(active)
     274                +sizeof(normal)
     275                +sizeof(length)
     276                +sizeof(fraction)
     277                +sizeof(frozen)
     278                +sizeof(counter)
     279                +sizeof(prestable)
     280                +sizeof(penalty_lock)
     281                +hnodes.MarshallSize()
     282                +hmatpar.MarshallSize()
     283                +inputs->MarshallSize()
     284                +sizeof(int); //sizeof(int) for enum type
     285}
     286/*}}}*/
     287/*FUNCTION Riftfront::MyRank {{{1*/
     288int    Riftfront::MyRank(void){
     289        extern int my_rank;
     290        return my_rank;
    290291}
    291292/*}}}1*/
    292293
    293294/*Object functions*/
    294 /*FUNCTION Riftfront::Configure {{{1*/
    295 void  Riftfront::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){
    296 
    297         DataSet* nodesin=NULL;
    298         DataSet* materialsin=NULL;
    299 
    300         /*Recover pointers :*/
    301         nodesin=(DataSet*)pnodesin;
    302         materialsin=(DataSet*)pmaterialsin;
    303 
    304         /*Link this load with its nodes: */
    305         ResolvePointers((Object**)nodes,node_ids,node_offsets,MAX_RIFTFRONT_GRIDS,nodesin);
    306        
    307         /*Same for materials: */
    308         ResolvePointers((Object**)&matpar,&mparid,&matpar_offset,1,materialsin);
    309 
    310 }
    311 /*}}}1*/
    312295/*FUNCTION Riftfront::Constrain {{{1*/
    313296#define _ZIGZAGCOUNTER_
    314297
    315 int   Riftfront::Constrain(int* punstable, void* vinputs, int analysis_type){
    316 
    317         const int     numgrids=2;
    318         int           dofs[2]={0,1};
    319         double        vxvy_list[2][2]; //velocities for all grids
    320         double        max_penetration;
    321         double        penetration;
    322         int           activate;
    323         int           found;
    324         int           unstable;
    325 
    326         ParameterInputs* inputs=NULL;
    327 
    328         inputs=(ParameterInputs*)vinputs;
     298int   Riftfront::Constrain(int* punstable,  int analysis_type){
     299
     300        const int   numgrids        = 2;
     301        double      max_penetration;
     302        double      penetration;
     303        int         activate;
     304        int         found;
     305        int         unstable;
     306        double      vx1;
     307        double      vy1;
     308        double      vx2;
     309        double      vy2;
     310        double      fractionincrement;
     311
     312
     313        /*Objects: */
     314        Element   **elements        = NULL;
     315        Node      **nodes           = NULL;
     316        Tria       *tria1           = NULL;
     317        Tria       *tria2           = NULL;
     318
     319        /*Recover hook objects: */
     320        elements=(Element**)helements.deliverp();
     321        nodes=(Node**)hnodes.deliverp();
     322
     323        /*enum of element? */
     324        if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
     325
     326        /*recover elements on both side of rift: */
     327        tria1=(Tria*)elements[0];
     328        tria2=(Tria*)elements[1];
    329329
    330330        /*Is this constraint frozen? In which case we don't touch: */
     
    334334        }
    335335
    336         /*First recover parameter inputs: */
    337         found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
    338         if(!found)ISSMERROR(" could not find velocity in inputs!");
    339 
    340 
    341         /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
    342         penetration=(vxvy_list[1][0]-vxvy_list[0][0])*normal[0]+(vxvy_list[1][1]-vxvy_list[0][1])*normal[1];
     336        /*recover parameters: */
     337        this->inputs->GetParameterValue(&fractionincrement,FractionIncrementEnum);
     338
     339        /*First recover velocity: */
     340        tria1->inputs->GetParameterValueAtNode(&vx1,nodes[0],VxEnum);
     341        tria2->inputs->GetParameterValueAtNode(&vx2,nodes[1],VxEnum);
     342        tria1->inputs->GetParameterValueAtNode(&vy1,nodes[0],VyEnum);
     343        tria2->inputs->GetParameterValueAtNode(&vy2,nodes[1],VyEnum);
     344
     345        /*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     346        penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
    343347
    344348        /*activation: */
     
    352356                this->counter=0;
    353357                /*increase melange fraction: */
    354                 this->fraction+=this->fractionincrement;
     358                this->fraction+=fractionincrement;
    355359                if (this->fraction>1)this->fraction=(double)1.0;
    356360                //printf("riftfront %i fraction: %g\n",this->GetId(),this->fraction);
     
    375379}
    376380/*}}}1*/
    377 /*FUNCTION Riftfront::copy {{{1*/
    378 Object* Riftfront::copy() {
    379         return new Riftfront(*this);
    380 }
    381 /*}}}1*/
    382381/*FUNCTION Riftfront::CreateKMatrix {{{1*/
    383 void  Riftfront::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     382void  Riftfront::CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type){
    384383        /*do nothing: */
    385384}
    386385/*}}}1*/
    387386/*FUNCTION Riftfront::CreatePVector {{{1*/
    388 void  Riftfront::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
     387void  Riftfront::CreatePVector(Vec pg, int analysis_type,int sub_analysis_type){
    389388        /*do nothing: */
    390389}
    391390/*}}}1*/
    392 /*FUNCTION Riftfront::DeepEcho {{{1*/
    393 void Riftfront::DeepEcho(void){
    394 
    395         int i;
    396 
    397         printf("Riftfront:\n");
    398         printf("   type: %s\n",type);
    399         printf("   id: %i\n",id);
    400 
    401         printf("   node_ids: ");
    402         for(i=0;i<MAX_RIFTFRONT_GRIDS;i++)printf("%i ",node_ids[i]);
    403         for(i=0;i<MAX_RIFTFRONT_GRIDS;i++){
    404                 if (nodes[i])nodes[i]->Echo();
    405         }
    406         printf("\n");
    407        
    408         printf("   mparid: %i\n",mparid);
    409         if(matpar)matpar->Echo();
    410 
    411         printf("normal [%g,%g], length %g\n",normal[0],normal[1],normal[2]);
    412         printf("fill: %i friction %g fraction %g fractionincrement %g \n",fill,friction,fraction,fractionincrement);
    413         printf("penalty_offset %g\n",penalty_offset);
    414         printf("penalty_lock %i\n",penalty_lock);
    415         printf("active %i\n",active);
    416         printf("frozen %i\n",frozen);
    417         printf("counter %i\n",counter);
    418         printf("prestable %i\n",prestable);
    419         printf("material_converged %i\n",material_converged);
    420         printf("shelf %i\n",shelf);
    421        
    422 }               
    423 /*}}}1*/
    424 /*FUNCTION Riftfront::Echo {{{1*/
    425 void Riftfront::Echo(void){
    426 
    427         int i;
    428        
    429         printf("Riftfront:\n");
    430         printf("   type: %s\n",type);
    431         printf("   id: %i\n",id);
    432         printf("   mparid: %i\n",mparid);
    433 
    434         printf("   node_ids: ");
    435         for(i=0;i<MAX_RIFTFRONT_GRIDS;i++)printf("%i ",node_ids[i]);
    436         printf("\n");
    437 
    438         printf("normal [%g,%g], length %g\n",normal[0],normal[1],normal[2]);
    439         printf("fill: %i friction %g fraction %g fractionincrement %g \n",fill,friction,fraction,fractionincrement);
    440         printf("penalty_offset %g\n",penalty_offset);
    441         printf("penalty_lock %i\n",penalty_lock);
    442         printf("active %i\n",active);
    443         printf("frozen %i\n",frozen);
    444         printf("counter %i\n",counter);
    445         printf("prestable %i\n",prestable);
    446         printf("material_converged %i\n",material_converged);
    447         printf("shelf %i\n",shelf);
    448 }
    449 /*}}}1*/
    450 /*FUNCTION Riftfront::Enum {{{1*/
    451 int Riftfront::Enum(void){
    452 
    453         return RiftfrontEnum;
    454 
    455 }
    456 /*}}}1*/
    457391/*FUNCTION Riftfront::FreezeConstraints{{{1*/
    458 void   Riftfront::FreezeConstraints(void* vinputs, int analysis_type){
     392void   Riftfront::FreezeConstraints( int analysis_type){
    459393
    460394        /*Just set frozen flag to 1: */
     
    470404        int doflist_per_node[MAXDOFSPERNODE];
    471405        int numberofdofspernode;
    472        
     406        Node      **nodes           = NULL;
     407       
     408        nodes=(Node**)hnodes.deliverp();
     409
    473410        for(i=0;i<MAX_RIFTFRONT_GRIDS;i++){
    474411                nodes[i]->GetDofList(&doflist_per_node[0],&numberofdofspernode);
     
    482419}
    483420/*}}}1*/
    484 /*FUNCTION Riftfront::GetId {{{1*/
    485 int    Riftfront::GetId(void){ return id; }
    486 /*}}}1*/
    487 /*FUNCTION Riftfront::GetName {{{1*/
    488 char* Riftfront::GetName(void){
    489         return "riftfront";
    490 }
    491 /*}}}1*/
    492421/*FUNCTION Riftfront::IsFrozen{{{1*/
    493422bool   Riftfront::IsFrozen(void){
     
    499428/*}}}1*/
    500429/*FUNCTION Riftfront::IsMaterialStable {{{1*/
    501 int   Riftfront::IsMaterialStable(void* vinputs, int analysis_type){
     430int   Riftfront::IsMaterialStable( int analysis_type){
    502431
    503432        int found=0;
    504         ParameterInputs* inputs=NULL;
    505433        double converged=0;
    506434
    507         inputs=(ParameterInputs*)vinputs;
    508 
    509         found=inputs->Recover("converged",&converged);
    510         if(!found)ISSMERROR(" could not find converged flag  in inputs!");
     435        this->inputs->GetParameterValue(&converged,ConvergedEnum);
    511436
    512437        if(converged){
     
    521446/*}}}1*/
    522447/*FUNCTION Riftfront::MaxPenetration {{{1*/
    523 int   Riftfront::MaxPenetration(double* ppenetration, void* vinputs, int analysis_type){
     448int   Riftfront::MaxPenetration(double* ppenetration, int analysis_type){
    524449
    525450        const int     numgrids=2;
    526         int           dofs[2]={0,1};
    527         double        vxvy_list[2][2]; //velocities for all grids
    528451        double        max_penetration;
    529452        double        penetration=0;
    530453        int           found;
    531 
    532         ParameterInputs* inputs=NULL;
    533 
    534         inputs=(ParameterInputs*)vinputs;
     454        double      vx1;
     455        double      vy1;
     456        double      vx2;
     457        double      vy2;
     458
     459        /*Objects: */
     460        Element   **elements        = NULL;
     461        Node      **nodes           = NULL;
     462        Tria       *tria1           = NULL;
     463        Tria       *tria2           = NULL;
     464
     465        /*Recover hook objects: */
     466        elements=(Element**)helements.deliverp();
     467        nodes=(Node**)hnodes.deliverp();
     468
     469        /*enum of element? */
     470        if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
     471
     472        /*recover elements on both side of rift: */
     473        tria1=(Tria*)elements[0];
     474        tria2=(Tria*)elements[1];
    535475
    536476        //initialize:
    537477        penetration=-1;
    538478
    539         found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
    540         if(!found)ISSMERROR(" could not find velocity in inputs!");
     479        /*recover velocity: */
     480        tria1->inputs->GetParameterValueAtNode(&vx1,nodes[0],VxEnum);
     481        tria2->inputs->GetParameterValueAtNode(&vx2,nodes[1],VxEnum);
     482        tria1->inputs->GetParameterValueAtNode(&vy1,nodes[0],VyEnum);
     483        tria2->inputs->GetParameterValueAtNode(&vy2,nodes[1],VyEnum);
    541484
    542485        /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
    543         penetration=(vxvy_list[1][0]-vxvy_list[0][0])*normal[0]+(vxvy_list[1][1]-vxvy_list[0][1])*normal[1];
     486        penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
    544487
    545488        /*Now, we return penetration only if we are active!: */
     
    552495        *ppenetration=penetration;
    553496
    554 }
    555 /*}}}1*/
    556 /*FUNCTION Riftfront::MyRank {{{1*/
    557 int    Riftfront::MyRank(void){
    558         extern int my_rank;
    559         return my_rank;
    560497}
    561498/*}}}1*/
     
    575512/*}}}1*/
    576513/*FUNCTION Riftfront::PenaltyCreateKMatrix {{{1*/
    577 void  Riftfront::PenaltyCreateKMatrix(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
    578 
    579         int i,j;
    580         const int    numgrids=MAX_RIFTFRONT_GRIDS;
    581         int              dofs[1]={0};
    582         double           Ke_gg[4][4];
    583         const int    numdof=2*numgrids;
    584         int          doflist[numdof];
    585         int          numberofdofspernode;
    586         double       thickness;
    587         ParameterInputs* inputs=NULL;
    588        
    589         /*Some pointer intialization: */
    590         inputs=(ParameterInputs*)vinputs;
    591 
     514void  Riftfront::PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type){
     515
     516        int         i;
     517        int         j;
     518        const int   numgrids            = MAX_RIFTFRONT_GRIDS;
     519        int         dofs[1]             = {0};
     520        double      Ke_gg[4][4];
     521        const int   numdof              = 2 *numgrids;
     522        int         doflist[numdof];
     523        int         numberofdofspernode;
     524        double      thickness;
     525        double      h[2];
     526        double      penalty_offset;
     527        double      friction;
     528
     529        /*Objects: */
     530        Element   **elements            = NULL;
     531        Node      **nodes               = NULL;
     532        Tria       *tria1               = NULL;
     533        Tria       *tria2               = NULL;
     534
     535        /*Recover hook objects: */
     536        elements=(Element**)helements.deliverp();
     537        nodes=(Node**)hnodes.deliverp();
     538
     539        /*enum of element? */
     540        if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
     541
     542        /*recover elements on both side of rift: */
     543        tria1=(Tria*)elements[0];
     544        tria2=(Tria*)elements[1];
     545
     546       
    592547        /* Get node coordinates and dof list: */
    593548        GetDofList(&doflist[0],&numberofdofspernode);
     
    596551        for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke_gg[i][j]=0.0;
    597552
     553        /*Get some parameters: */
     554        this->parameters->FindParam(&penalty_offset,"penalty_offset");
     555        this->inputs->GetParameterValue(&friction,FrictionEnum);
    598556
    599557        if(this->active){
     
    602560                 *contact slip friction. */
    603561                 
    604                 /*Recover input parameters: */
    605                 inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
     562                /*Recover thickness: */
     563                tria1->inputs->GetParameterValueAtNode(&h[0],nodes[0],ThicknessEnum);
     564                tria2->inputs->GetParameterValueAtNode(&h[1],nodes[1],ThicknessEnum);
     565
    606566                if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts");
    607567                thickness=h[0];
     
    664624/*}}}1*/
    665625/*FUNCTION Riftfront::PenaltyCreatePVector {{{1*/
    666 void  Riftfront::PenaltyCreatePVector(Vec pg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
    667 
    668         int          i,j;
    669         const int    numgrids=MAX_RIFTFRONT_GRIDS;
    670         int          dofs[1]={0};
    671         double       pe_g[4];
    672         const int    numdof=2*numgrids;
    673         int          doflist[numdof];
    674         int          numberofdofspernode;
    675         ParameterInputs* inputs=NULL;
    676         double       rho_ice;
    677         double       rho_water;
    678         double       gravity;
    679         double       thickness;
    680         double       bed;
    681         double       pressure;
    682         double       pressure_litho;
    683         double       pressure_air;
    684         double       pressure_melange;
    685         double       pressure_water;
    686        
    687         /*Some pointer intialization: */
    688         inputs=(ParameterInputs*)vinputs;
     626void  Riftfront::PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type){
     627
     628        int         i                     ,j;
     629        const int   numgrids            = MAX_RIFTFRONT_GRIDS;
     630        double      pe_g[4]={0.0};
     631        const int   numdof              = 2 *numgrids;
     632        int         doflist[numdof];
     633        int         numberofdofspernode;
     634
     635        double      rho_ice;
     636        double      rho_water;
     637        double      gravity;
     638        double      thickness;
     639        double      h[2];
     640        double      bed;
     641        double      b[2];
     642        double      pressure;
     643        double      pressure_litho;
     644        double      pressure_air;
     645        double      pressure_melange;
     646        double      pressure_water;
     647        double      fill;
     648        bool        shelf;
     649
     650
     651        /*Objects: */
     652        Element   **elements            = NULL;
     653        Node      **nodes               = NULL;
     654        Tria       *tria1               = NULL;
     655        Tria       *tria2               = NULL;
     656        Matpar     *matpar              = NULL;
     657
     658       
     659        /*Recover hook objects: */
     660        elements=(Element**)helements.deliverp();
     661        nodes=(Node**)hnodes.deliverp();
     662        matpar=(Matpar*)hmatpar.delivers();
     663
     664        /*enum of element? */
     665        if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
     666
     667        /*recover elements on both side of rift: */
     668        tria1=(Tria*)elements[0];
     669        tria2=(Tria*)elements[1];
    689670
    690671        /* Get node coordinates and dof list: */
    691672        GetDofList(&doflist[0],&numberofdofspernode);
    692673
    693         /* Set pe_g to 0: */
    694         for(i=0;i<numdof;i++) pe_g[i]=0;
     674        /*Get some inputs: */
     675        this->inputs->GetParameterValue(&fill,FillEnum);
     676        this->inputs->GetParameterValue(&shelf,SegmentOnIceShelfEnum);
    695677
    696678        if(!this->active){
     
    706688
    707689                /*get thickness: */
    708                 inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
     690                tria1->inputs->GetParameterValueAtNode(&h[0],nodes[0],ThicknessEnum);
     691                tria2->inputs->GetParameterValueAtNode(&h[1],nodes[1],ThicknessEnum);
     692
    709693                if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts");
    710694                thickness=h[0];
    711695
    712                 inputs->Recover("bed",&b[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
     696                tria1->inputs->GetParameterValueAtNode(&b[0],nodes[0],BedEnum);
     697                tria2->inputs->GetParameterValueAtNode(&b[1],nodes[1],BedEnum);
     698
    713699                if (b[0]!=b[1])ISSMERROR(" different beds not supported for rift fronts");
    714700                bed=b[0];
     
    765751/*}}}1*/
    766752/*FUNCTION Riftfront::Penetration {{{1*/
    767 int   Riftfront::Penetration(double* ppenetration, void* vinputs, int analysis_type){
    768 
    769         const int     numgrids=2;
    770         int           dofs[2]={0,1};
    771         double        vxvy_list[2][2]; //velocities for all grids
    772         double        max_penetration;
    773         double        penetration;
    774         int           found;
    775 
    776         ParameterInputs* inputs=NULL;
    777 
    778         inputs=(ParameterInputs*)vinputs;
    779 
    780 
    781         found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
    782         if(!found)ISSMERROR(" could not find velocity in inputs!");
    783 
    784         /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
    785         penetration=(vxvy_list[1][0]-vxvy_list[0][0])*normal[0]+(vxvy_list[1][1]-vxvy_list[0][1])*normal[1];
     753int   Riftfront::Penetration(double* ppenetration,  int analysis_type){
     754
     755        double    vx1;
     756        double    vy1;
     757        double    vx2;
     758        double    vy2;
     759
     760        double    penetration;
     761        int       found;
     762
     763        /*Objects: */
     764        Element **elements    = NULL;
     765        Node    **nodes       = NULL;
     766        Tria     *tria1       = NULL;
     767        Tria     *tria2       = NULL;
     768
     769        /*Recover hook objects: */
     770        elements=(Element**)helements.deliverp();
     771        nodes=(Node**)hnodes.deliverp();
     772
     773        /*enum of element? */
     774        if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
     775
     776        /*recover elements on both side of rift: */
     777        tria1=(Tria*)elements[0];
     778        tria2=(Tria*)elements[1];
     779
     780        /*First recover velocity: */
     781        tria1->inputs->GetParameterValueAtNode(&vx1,nodes[0],VxEnum);
     782        tria2->inputs->GetParameterValueAtNode(&vx2,nodes[1],VxEnum);
     783        tria1->inputs->GetParameterValueAtNode(&vy1,nodes[0],VyEnum);
     784        tria2->inputs->GetParameterValueAtNode(&vy2,nodes[1],VyEnum);
     785
     786        /*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     787        penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
    786788
    787789        /*Now, we return penetration only if we are active!: */
     
    794796/*}}}1*/
    795797/*FUNCTION Riftfront::PotentialUnstableConstraint {{{1*/
    796 int   Riftfront::PotentialUnstableConstraint(int* punstable, void* vinputs, int analysis_type){
    797 
    798 
    799         const int     numgrids=2;
    800         int           dofs[2]={0,1};
    801         double        vxvy_list[2][2]; //velocities for all grids
    802         double        max_penetration;
    803         double        penetration;
    804         int           activate;
    805         int           unstable;
    806         int           found;
    807 
    808         ParameterInputs* inputs=NULL;
    809 
    810         inputs=(ParameterInputs*)vinputs;
    811 
    812         found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
    813         if(!found)ISSMERROR(" could not find velocity in inputs!");
    814 
    815         /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
    816         penetration=(vxvy_list[1][0]-vxvy_list[0][0])*normal[0]+(vxvy_list[1][1]-vxvy_list[0][1])*normal[1];
     798int   Riftfront::PotentialUnstableConstraint(int* punstable,  int analysis_type){
     799
     800
     801        const int   numgrids        = 2;
     802        double      max_penetration;
     803        double      penetration;
     804        int         activate;
     805        int         unstable;
     806        int         found;
     807        double      vx1;
     808        double      vy1;
     809        double      vx2;
     810        double      vy2;
     811
     812
     813        /*Objects: */
     814        Element   **elements        = NULL;
     815        Node      **nodes           = NULL;
     816        Tria       *tria1           = NULL;
     817        Tria       *tria2           = NULL;
     818
     819        /*Recover hook objects: */
     820        elements=(Element**)helements.deliverp();
     821        nodes=(Node**)hnodes.deliverp();
     822
     823        /*enum of element? */
     824        if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
     825
     826        /*recover elements on both side of rift: */
     827        tria1=(Tria*)elements[0];
     828        tria2=(Tria*)elements[1];
     829
     830        /*First recover velocity: */
     831        tria1->inputs->GetParameterValueAtNode(&vx1,nodes[0],VxEnum);
     832        tria2->inputs->GetParameterValueAtNode(&vx2,nodes[1],VxEnum);
     833        tria1->inputs->GetParameterValueAtNode(&vy1,nodes[0],VyEnum);
     834        tria2->inputs->GetParameterValueAtNode(&vy2,nodes[1],VyEnum);
     835
     836        /*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     837        penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
    817838
    818839        /*Ok, we are looking for positive penetration in an active constraint: */
     
    834855/*}}}1*/
    835856/*FUNCTION Riftfront::PreConstrain {{{1*/
    836 int   Riftfront::PreConstrain(int* punstable, void* vinputs, int analysis_type){
    837 
    838         const int     numgrids=2;
    839         int           dofs[2]={0,1};
    840         double        vxvy_list[2][2]; //velocities for all grids
    841         double        penetration;
    842         int           unstable;
    843         ParameterInputs* inputs=NULL;
    844         int           found;
    845 
    846         inputs=(ParameterInputs*)vinputs;
     857int   Riftfront::PreConstrain(int* punstable,  int analysis_type){
     858
     859        const int   numgrids    = 2;
     860        double      penetration;
     861        int         unstable;
     862        int         found;
     863        double      vx1;
     864        double      vy1;
     865        double      vx2;
     866        double      vy2;
     867
     868
     869        /*Objects: */
     870        Element   **elements    = NULL;
     871        Node      **nodes       = NULL;
     872        Tria       *tria1       = NULL;
     873        Tria       *tria2       = NULL;
     874
     875        /*Recover hook objects: */
     876        elements=(Element**)helements.deliverp();
     877        nodes=(Node**)hnodes.deliverp();
     878
     879        /*enum of element? */
     880        if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
     881
     882        /*recover elements on both side of rift: */
     883        tria1=(Tria*)elements[0];
     884        tria2=(Tria*)elements[1];
    847885
    848886        /*First recover velocity: */
    849         found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
    850         if(!found)ISSMERROR(" could not find velocity in inputs!");
    851        
    852         /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
    853         penetration=(vxvy_list[1][0]-vxvy_list[0][0])*normal[0]+(vxvy_list[1][1]-vxvy_list[0][1])*normal[1];
     887        tria1->inputs->GetParameterValueAtNode(&vx1,nodes[0],VxEnum);
     888        tria2->inputs->GetParameterValueAtNode(&vx2,nodes[1],VxEnum);
     889        tria1->inputs->GetParameterValueAtNode(&vy1,nodes[0],VyEnum);
     890        tria2->inputs->GetParameterValueAtNode(&vy2,nodes[1],VyEnum);
     891
     892        /*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     893        penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
    854894
    855895        /*Ok, we are preconstraining here. Ie, anything that penetrates is constrained until stability of the entire set
     
    895935}
    896936/*}}}1*/
    897 /*FUNCTION Riftfront::UpdateFromInputs {{{1*/
    898 void  Riftfront::UpdateFromInputs(void* vinputs){
    899 
    900         int  dofs[1]={0};
    901         ParameterInputs* inputs=NULL;   
    902        
    903         inputs=(ParameterInputs*)vinputs;
    904 
    905         inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
    906         inputs->Recover("bed",&b[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
    907         inputs->Recover("surface",&s[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
    908 
    909 }
    910 /*}}}1*/
  • issm/trunk/src/c/objects/Riftfront.h

    r3622 r3637  
    66#define _RIFTFRONT_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "./Load.h"
    911#include "./Matpar.h"
     
    1517
    1618class Element;
     19/*}}}*/
     20
    1721class Riftfront: public Load {
    1822
    19         private:
    20                 char    type[RIFTFRONTSTRING];
     23        public:
    2124                int             id;
    2225
    23                 /*nodes: */
    24                 int   node_ids[MAX_RIFTFRONT_GRIDS]; //node ids
    25                 Node* nodes[MAX_RIFTFRONT_GRIDS]; //node pointers
    26                 int   node_offsets[MAX_RIFTFRONT_GRIDS]; //node offsets in nodes dataset
     26                Hook hnodes; //2 nodes
     27                Hook helements; //2 elements
     28                Hook hmatpar;
     29               
     30                /*computational: */
     31                int      penalty_lock;
     32                bool     active;
     33                bool     frozen;
     34                int      counter;
     35                bool     prestable;
     36                bool     material_converged;
     37                double   normal[2];
     38                double   length;
     39                double   fraction;
     40               
     41                Parameters* parameters; //pointer to solution parameters
     42                Inputs*  inputs;
    2743
    28                 /*material: */
    29                 int mparid;
    30                 Matpar* matpar;
    31                 int   matpar_offset;
    32 
    33                 /*properties: */
    34                 double          h[MAX_RIFTFRONT_GRIDS]; //thickness
    35                 double          b[MAX_RIFTFRONT_GRIDS]; //bed
    36                 double          s[MAX_RIFTFRONT_GRIDS]; //surface
    37 
    38                 double      normal[2];
    39                 double      length;
    40                 int         fill;
    41                 double      friction;
    42                 double      fraction;
    43                 double      fractionincrement;
    44                 bool        shelf;
    45 
    46                 double      penalty_offset;
    47                 int         penalty_lock;
    48 
    49                 /*computational: */
    50                 bool        active;
    51                 bool        frozen;
    52                 int         counter;
    53                 bool        prestable;
    54                 bool        material_converged;
    55 
    56         public:
    5744
    5845                /*constructors,destructors: {{{1*/
    5946                Riftfront();
    60                 void Init(char type[RIFTFRONTSTRING],int id, int node_ids[MAX_RIFTFRONT_GRIDS], int mparid, double h[MAX_RIFTFRONT_GRIDS],double b[MAX_RIFTFRONT_GRIDS],double s[MAX_RIFTFRONT_GRIDS],double normal[2],double length,int fill,double friction, double fraction, double fractionincrement, double penalty_offset, int penalty_lock,bool active,bool frozen, int counter,bool prestable,bool shelf);
    61                 Riftfront(char type[RIFTFRONTSTRING],int id, int node_ids[MAX_RIFTFRONT_GRIDS], int mparid, double h[MAX_RIFTFRONT_GRIDS],double b[MAX_RIFTFRONT_GRIDS],double s[MAX_RIFTFRONT_GRIDS],double normal[2],double length,int fill,double friction, double fraction, double fractionincrement, double penalty_offset, int penalty_lock,bool active,bool frozen, int counter,bool prestable,bool shelf);
    62                 Riftfront(int id, int i, IoModel* iomodel);
     47                Riftfront(int riftfront_id,int* riftfront_node_ids, int riftfront_matpar_id);
     48                Riftfront(int riftfront_id,Hook* riftfront_hnodes, Hook* riftfront_hmatpar, Parameters* parameters, Inputs* riftfront_inputs);
     49                Riftfront(int riftfront_id,int i, IoModel* iomodel);
    6350                ~Riftfront();
    6451                /*}}}*/
    6552                /*object management: {{{1*/
    66                 void  Configure(void* elements,void* nodes,void* materials);
     53                void  Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* vertices,DataSet* materials,Parameters* parameters);
    6754                Object* copy();
    6855                void  DeepEcho();
     
    7865                /*}}}*/
    7966                /*numerics: {{{1*/
    80                 void  UpdateFromInputs(void* inputs);
    8167                void  GetDofList(int* doflist,int* pnumberofdofs);
    82                 void  CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type);
    83                 void  CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type);
    84                 void  PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type);
    85                 void  PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type);
     68                void  CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type);
     69                void  CreatePVector(Vec pg, int analysis_type,int sub_analysis_type);
     70                void  PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type);
     71                void  PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type);
    8672                bool  PreStable();
    8773                void  SetPreStable();
    88                 int   PreConstrain(int* punstable, void* inputs, int analysis_type);
    89                 int   Constrain(int* punstable, void* inputs, int analysis_type);
    90                 void  FreezeConstraints(void* inputs, int analysis_type);
     74                int   PreConstrain(int* punstable, int analysis_type);
     75                int   Constrain(int* punstable, int analysis_type);
     76                void  FreezeConstraints( int analysis_type);
    9177                bool  IsFrozen(void);
    92                 int   Penetration(double* ppenetration, void* inputs, int analysis_type);
    93                 int   MaxPenetration(double* ppenetration, void* inputs, int analysis_type);
    94                 int   PotentialUnstableConstraint(int* punstable, void* inputs, int analysis_type);
    95                 int   IsMaterialStable(void* inputs, int analysis_type);
     78                int   Penetration(double* ppenetration, int analysis_type);
     79                int   MaxPenetration(double* ppenetration, int analysis_type);
     80                int   PotentialUnstableConstraint(int* punstable, int analysis_type);
     81                int   IsMaterialStable( int analysis_type);
    9682                void  OutputProperties(Vec riftproperties);
    9783                /*}}}*/
  • issm/trunk/src/c/objects/Sing.h

    r3632 r3637  
    66#define  _SING_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "./Element.h"
    911#include "./Node.h"
     
    1517#include "../DataSet/DataSet.h"
    1618#include "../DataSet/Parameters.h"
     19/*}}}*/
    1720
    1821class Sing: public Element{
  • issm/trunk/src/c/objects/SingVertexInput.h

    r3620 r3637  
    33 */
    44
    5 #include "./Input.h"
    65
    76#ifndef _SINGVERTEXINPUT_H_
    87#define _SINGVERTEXINPUT_H_
     8
     9/*Headers:*/
     10/*{{{1*/
     11#include "./Input.h"
     12/*}}}*/
    913
    1014class SingVertexInput: public Input{
  • issm/trunk/src/c/objects/SolPar.h

    r3463 r3637  
    66#define _SOLPAR_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "./Object.h"
     11/*}}}*/
    912
    1013class SolPar: public Object{
  • issm/trunk/src/c/objects/Spc.h

    r3463 r3637  
    66#define _SPC_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "./Object.h"
    911#include "../DataSet/DataSet.h"
     12/*}}}*/
    1013
    1114class Spc: public Object{
  • issm/trunk/src/c/objects/Tria.cpp

    r3636 r3637  
    33 */
    44
     5/*Headers:*/
     6/*{{{1*/
    57#ifdef HAVE_CONFIG_H
    68        #include "config.h"
     
    2224#include "../include/typedefs.h"
    2325#include "../include/macros.h"
     26/*}}}*/
    2427
    2528/*Object constructors and destructor*/
     
    6669Tria::Tria(int tria_id, int index, IoModel* iomodel){ //i is the element index
    6770
    68         int i,j;
    69         int tria_node_ids[3];
    70         int tria_matice_id;
    71         int tria_matpar_id;
     71        int    i;
     72        int    j;
     73        int    tria_node_ids[3];
     74        int    tria_matice_id;
     75        int    tria_matpar_id;
    7276        double nodeinputs[3];
    7377
     
    443447/*}}}*/
    444448
    445                
    446449/*Object functions*/
    447450/*FUNCTION Tria::ComputeBasalStress {{{1*/
     
    518521
    519522        /*dynamic objects pointed to by hooks: */
    520         Node**  nodes=NULL;
    521         Matpar* matpar=NULL;
    522         Matice* matice=NULL;
     523        Node**  nodes=   NULL;
     524        Matpar* matpar    =NULL;
     525        Matice* matice= NULL;
    523526
    524527        /*recover objects from hooks: */
  • issm/trunk/src/c/objects/Tria.h

    r3632 r3637  
    66#define _TRIA_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810#include "./Object.h"
    911#include "./Element.h"
     
    1416#include "../DataSet/Parameters.h"
    1517#include "../DataSet/Inputs.h"
     18/*}}}*/
    1619
    1720class Tria: public Element{
  • issm/trunk/src/c/objects/TriaVertexInput.h

    r3612 r3637  
    33 */
    44
    5 #include "./Input.h"
    65
    76#ifndef _TRIAVERTEXINPUT_H_
    87#define _TRIAVERTEXINPUT_H_
     8
     9/*Headers:*/
     10/*{{{1*/
     11#include "./Input.h"
     12/*}}}*/
    913
    1014class TriaVertexInput: public Input{
  • issm/trunk/src/c/objects/Vertex.h

    r3622 r3637  
    66#define _VERTEX_H_
    77
     8/*Headers:*/
     9/*{{{1*/
    810class Object;
    911class DofObject;
     
    1214#include "./Object.h"
    1315#include "./DofObject.h"
     16/*}}}*/
    1417
    1518class Vertex: public Object,public DofObject{
Note: See TracChangeset for help on using the changeset viewer.