Changeset 9206


Ignore:
Timestamp:
08/08/11 15:21:04 (14 years ago)
Author:
Eric.Larour
Message:

New NodalValue module

Location:
issm/trunk/src/c
Files:
3 added
8 edited

Legend:

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

    r9127 r9206  
    494494                                        ./modules/NodesDofx/NodesDofx.h\
    495495                                        ./modules/NodesDofx/NodesDofx.cpp\
     496                                        ./modules/NodalValuex/NodalValuex.h\
     497                                        ./modules/NodalValuex/NodalValuex.cpp\
    496498                                        ./modules/TriaSearchx/TriaSearchx.h\
    497499                                        ./modules/TriaSearchx/TriaSearchx.cpp\
     
    11831185                                        ./modules/NodesDofx/NodesDofx.h\
    11841186                                        ./modules/NodesDofx/NodesDofx.cpp\
     1187                                        ./modules/NodalValuex/NodalValuex.h\
     1188                                        ./modules/NodalValuex/NodalValuex.cpp\
    11851189                                        ./modules/TriaSearchx/TriaSearchx.h\
    11861190                                        ./modules/TriaSearchx/TriaSearchx.cpp\
  • issm/trunk/src/c/modules/Responsex/Responsex.cpp

    r9010 r9206  
    4242                case DragCoefficientAbsGradientEnum:DragCoefficientAbsGradientx(responses, elements,nodes, vertices, loads, materials, parameters,process_units,weight_index); break;
    4343                case RheologyBbarEnum:RheologyBbarx(responses, elements,nodes, vertices, loads, materials, parameters,process_units); break;
     44                case DragCoefficientEnum:NodalValuex(responses, DragCoefficientEnum,elements,nodes, vertices, loads, materials, parameters,process_units); break;
    4445                default: _error_(" response descriptor \"%s\" not supported yet!",response_descriptor); break;
    4546        }
  • issm/trunk/src/c/modules/modules.h

    r9127 r9206  
    7979#include "./ModelProcessorx/ModelProcessorx.h"
    8080#include "./ParsePetscOptionsx/ParsePetscOptionsx.h"
     81#include "./NodalValuex/NodalValuex.h"
    8182#include "./NodeConnectivityx/NodeConnectivityx.h"
    8283#include "./NodesDofx/NodesDofx.h"
  • issm/trunk/src/c/objects/Elements/Element.h

    r9110 r9206  
    9696                virtual int    UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vec vec_nodes_on_iceshelf,double* nodes_on_iceshelf)=0;
    9797                virtual double RheologyBbarx(void)=0;
     98                virtual int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units)=0;
    9899
    99100                /*Implementation: */
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r9204 r9206  
    69406940        extern int my_rank;
    69416941        return my_rank;
     6942}
     6943/*}}}*/
     6944/*FUNCTION Penta::NodalValue {{{1*/
     6945int    Penta::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){
     6946
     6947        int i;
     6948        int found=0;
     6949        double value;
     6950        Input* data=NULL;
     6951        GaussPenta* gauss=NULL;
     6952
     6953        /*First, serarch the input: */
     6954        data=inputs->GetInput(natureofdataenum);
     6955
     6956        /*figure out if we have the vertex id: */
     6957        found=0;
     6958        for(i=0;i<NUMVERTICES;i++){
     6959                if(index==nodes[i]->GetVertexId()){
     6960                        /*Do we have natureofdataenum in our inputs? :*/
     6961                        if(data){
     6962                                /*ok, we are good. retrieve value of input at vertex :*/
     6963                                gauss=new GaussPenta(); gauss->GaussVertex(i);
     6964                                data->GetParameterValue(&value,gauss);
     6965                                found=1;
     6966                                break;
     6967                        }
     6968                }
     6969        }
     6970
     6971        if(found)*pvalue=value;
     6972        return found;
    69426973}
    69436974/*}}}*/
  • issm/trunk/src/c/objects/Elements/Penta.h

    r9110 r9206  
    146146                double RheologyBbarx(void);
    147147                void   ViscousHeatingCreateInput(void);
     148                int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
    148149                /*}}}*/
    149150                /*Penta specific routines:{{{1*/
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r9110 r9206  
    45254525}
    45264526/*}}}*/
     4527/*FUNCTION Tria::NodalValue {{{1*/
     4528int    Tria::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){
     4529
     4530        int i;
     4531        int found=0;
     4532        double value;
     4533        Input* data=NULL;
     4534        GaussTria *gauss                            = NULL;
     4535
     4536        /*First, serarch the input: */
     4537        data=inputs->GetInput(natureofdataenum);
     4538
     4539        /*figure out if we have the vertex id: */
     4540        found=0;
     4541        for(i=0;i<NUMVERTICES;i++){
     4542                if(index==nodes[i]->GetVertexId()){
     4543                        /*Do we have natureofdataenum in our inputs? :*/
     4544                        if(data){
     4545                                /*ok, we are good. retrieve value of input at vertex :*/
     4546                                gauss=new GaussTria(); gauss->GaussVertex(i);
     4547                                data->GetParameterValue(&value,gauss);
     4548                                found=1;
     4549                                break;
     4550                        }
     4551                }
     4552        }
     4553
     4554        if(found)*pvalue=value;
     4555        return found;
     4556}
     4557/*}}}*/
    45274558/*FUNCTION Tria::PatchFill{{{1*/
    45284559void  Tria::PatchFill(int* prow, Patch* patch){
  • issm/trunk/src/c/objects/Elements/Tria.h

    r9110 r9206  
    148148                int*   GetHorizontalNeighboorSids(void);
    149149                double RheologyBbarx(void);
     150                int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
    150151                /*}}}*/
    151152                /*Tria specific routines:{{{1*/
Note: See TracChangeset for help on using the changeset viewer.