Ignore:
Timestamp:
08/02/10 14:55:29 (15 years ago)
Author:
Mathieu Morlighem
Message:

Now Matice uses B2d in 2d and B in 3d. B2d is added to matice's inputs when penta spawns a tria

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r4927 r4931  
    1414#include <string.h>
    1515#include "../objects.h"
    16 #include "../../EnumDefinitions/EnumDefinitions.h"
    1716#include "../../shared/shared.h"
    1817#include "../../Container/Container.h"
     
    629628                }
    630629                else if (control_type==RheologyBEnum){
    631                         inputs->GetParameterDerivativeValue(&dB[0], &xyz_list[0][0], &gauss_l1l2l3[0],RheologyBEnum);
     630                        inputs->GetParameterDerivativeValue(&dB[0], &xyz_list[0][0], &gauss_l1l2l3[0],RheologyB2dEnum);
    632631                        Jelem+=cm_noisedmp*1/2*(pow(dB[0],2)+pow(dB[1],2))*Jdet*gauss_weight;
    633632                }
     
    870869                GradjDrag(gradient);
    871870        }
    872         else if (control_type==RheologyBEnum){
     871        else if (control_type==RheologyB2dEnum){
    873872                GradjB(gradient);
    874873        }
     
    966965        adjointx_input=inputs->GetInput(AdjointxEnum);
    967966        adjointy_input=inputs->GetInput(AdjointyEnum);
    968         rheologyb_input=inputs->GetInput(RheologyBEnum);
     967        rheologyb_input=inputs->GetInput(RheologyB2dEnum);
    969968
    970969        /* Start  looping on the number of gaussian points: */
     
    12311230
    12321231        /*Move input to Material if required (needed if control method) TO BE IMPROVED*/
    1233         if (YEnum==RheologyBEnum){
     1232        if (YEnum==RheologyBEnum || YEnum==RheologyB2dEnum){
    12341233                this->matice->inputs->AddInput((Input*)yinput->copy());
    12351234        }
     
    12871286/*}}}*/
    12881287/*FUNCTION Tria::InputDepthAverageAtBase {{{1*/
    1289 void  Tria::InputDepthAverageAtBase(int enum_type,int average_enum_type){
     1288void  Tria::InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum){
    12901289
    12911290        /*New input*/
     
    12941293
    12951294        /*copy input of enum_type*/
    1296         oldinput=this->inputs->GetInput(enum_type);
     1295        if (object_enum==ElementsEnum)
     1296         oldinput=(Input*)this->inputs->GetInput(enum_type);
     1297        else if (object_enum==MaterialsEnum)
     1298         oldinput=(Input*)this->matice->inputs->GetInput(enum_type);
     1299        else
     1300         ISSMERROR("object %s not supported yet",EnumAsString(object_enum));
    12971301        if(!oldinput)ISSMERROR("%s%s"," could not find old input with enum: ",EnumAsString(enum_type));
    12981302        newinput=(Input*)oldinput->copy();
     
    13021306
    13031307        /*Add new input to current element*/
    1304         this->inputs->AddInput(newinput);
     1308        if (object_enum==ElementsEnum)
     1309         this->inputs->AddInput((Input*)newinput);
     1310        else if (object_enum==MaterialsEnum)
     1311         this->matice->inputs->AddInput((Input*)newinput);
     1312        else
     1313         ISSMERROR("object %s not supported yet",EnumAsString(object_enum));
    13051314
    13061315}
     
    21262135        if (iomodel->rheology_B) {
    21272136                for(i=0;i<3;i++)nodeinputs[i]=iomodel->rheology_B[tria_vertex_ids[i]-1];
    2128                 this->inputs->AddInput(new TriaVertexInput(RheologyBEnum,nodeinputs));
     2137                this->inputs->AddInput(new TriaVertexInput(RheologyB2dEnum,nodeinputs));
    21292138        }
    21302139        if (iomodel->control_parameter) {
     
    60486057                                name==VyEnum ||
    60496058                                name==RheologyBEnum ||
     6059                                name==RheologyB2dEnum ||
    60506060                                name==RheologyNEnum ||
    60516061                                name==FitEnum ||
Note: See TracChangeset for help on using the changeset viewer.