Changeset 3685


Ignore:
Timestamp:
05/10/10 14:38:52 (15 years ago)
Author:
Eric.Larour
Message:

majors changes

Location:
issm/trunk/src/c
Files:
6 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/Bamgx/Bamgx.h

    r3283 r3685  
    77
    88#include "../objects/objects.h"
    9 #include "objects/BamgObjects.h"
    109
    1110/* local prototypes: */
  • issm/trunk/src/c/DataSet/DataSet.cpp

    r3673 r3685  
    11/*
    22 * \file DataSet.c
    3  * \brief: implementation of the DataSet class
     3 * \brief: implementation of the DataSet class, and derived classes Inputs and Parameters
    44 */
    55
     6/*Headers: {{{1*/
    67#ifdef HAVE_CONFIG_H
    78        #include "config.h"
     
    2122
    2223using namespace std;
    23 
     24/*}}}*/
     25/*DataSet: {{{1*/
    2426/*Constructors/Destructors*/
    25 /*FUNCTION DataSet::DataSet(){{{1*/
     27/*FUNCTION DataSet::DataSet(){{{2*/
    2628DataSet::DataSet(){
    2729       
     
    3234}
    3335/*}}}*/
    34 /*FUNCTION DataSet::DataSet(int dataset_enum){{{1*/
     36/*FUNCTION DataSet::DataSet(int dataset_enum){{{2*/
    3537DataSet::DataSet(int dataset_enum){
    3638        enum_type=dataset_enum;
     
    4244}
    4345/*}}}*/
    44 /*FUNCTION DataSet::Copy{{{1*/
     46/*FUNCTION DataSet::Copy{{{2*/
    4547DataSet*   DataSet::Copy(void){
    4648
     
    7375}
    7476/*}}}*/
    75 /*FUNCTION DataSet::~DataSet{{{1*/
     77/*FUNCTION DataSet::~DataSet{{{2*/
    7678DataSet::~DataSet(){
    7779        clear();
     
    8284
    8385/*I/O*/
    84 /*FUNCTION DataSet::Marshall{{{1*/
     86/*FUNCTION DataSet::Marshall{{{2*/
    8587char* DataSet::Marshall(){
    8688
     
    129131}
    130132/*}}}*/
    131 /*FUNCTION DataSet::MarshallSize{{{1*/
     133/*FUNCTION DataSet::MarshallSize{{{2*/
    132134int DataSet::MarshallSize(){
    133135
     
    150152}
    151153/*}}}*/
    152 /*FUNCTION DataSet::Demarshall{{{1*/
     154/*FUNCTION DataSet::Demarshall{{{2*/
    153155DataSet* DataSetDemarshall(char* marshalled_dataset){
    154156
     
    157159}
    158160/*}}}*/
    159 /*FUNCTION DataSet::DemarshallRaw{{{1*/
     161/*FUNCTION DataSet::DemarshallRaw{{{2*/
    160162DataSet* DataSetDemarshallRaw(char** pmarshalled_dataset){
    161163
     
    309311}
    310312/*}}}*/
    311 /*FUNCTION DataSet::Spawn{{{1*/
     313/*FUNCTION DataSet::Spawn{{{2*/
    312314DataSet* DataSet::Spawn(int* indices, int num){
    313315        ISSMERROR(" not supported yet!");
     
    316318
    317319/*Specific methods*/
    318 /*FUNCTION DataSet::AddObject{{{1*/
     320/*FUNCTION DataSet::AddObject{{{2*/
    319321int  DataSet::AddObject(Object* object){
    320322
     
    324326}
    325327/*}}}*/
    326 /*FUNCTION DataSet::clear{{{1*/
     328/*FUNCTION DataSet::clear{{{2*/
    327329void  DataSet::clear(){
    328330
     
    335337}
    336338/*}}}*/
    337 /*FUNCTION DataSet::DeleteObject{{{1*/
     339/*FUNCTION DataSet::DeleteObject{{{2*/
    338340int  DataSet::DeleteObject(Object* object){
    339341
     
    348350}
    349351/*}}}*/
    350 /*FUNCTION DataSet::DeepEcho{{{1*/
     352/*FUNCTION DataSet::DeepEcho{{{2*/
    351353void DataSet::DeepEcho(){
    352354
     
    367369}
    368370/*}}}*/
    369 /*FUNCTION DataSet::Echo{{{1*/
     371/*FUNCTION DataSet::Echo{{{2*/
    370372void DataSet::Echo(){
    371373
     
    386388}
    387389/*}}}*/
    388 /*FUNCTION DataSet::FindResult(Vec* presult,char* name){{{1*/
     390/*FUNCTION DataSet::FindResult(Vec* presult,char* name){{{2*/
    389391int   DataSet::FindResult(Vec* presult,char* name){
    390392
     
    416418}
    417419/*}}}*/
    418 /*FUNCTION DataSet::FindResult(void* pvalue, char* name){{{1*/
     420/*FUNCTION DataSet::FindResult(void* pvalue, char* name){{{2*/
    419421int   DataSet::FindResult(void* pvalue, char* name){
    420422
     
    448450}
    449451/*}}}*/
    450 /*FUNCTION DataSet::GetEnum{{{1*/
     452/*FUNCTION DataSet::GetEnum{{{2*/
    451453int  DataSet::GetEnum(){
    452454        return enum_type;
    453455}
    454456/*}}}*/
    455 /*FUNCTION DataSet::GetEnum(int offset){{{1*/
     457/*FUNCTION DataSet::GetEnum(int offset){{{2*/
    456458int   DataSet::GetEnum(int offset){
    457459
     
    460462}
    461463/*}}}*/
    462 /*FUNCTION DataSet::GetObjectByOffset{{{1*/
     464/*FUNCTION DataSet::GetObjectByOffset{{{2*/
    463465Object* DataSet::GetObjectByOffset(int offset){
    464466
     
    467469}
    468470/*}}}*/
    469 /*FUNCTION DataSet::GetObjectById{{{1*/
     471/*FUNCTION DataSet::GetObjectById{{{2*/
    470472Object* DataSet::GetObjectById(int* poffset,int eid){
    471473
     
    491493}
    492494/*}}}*/
    493 /*FUNCTION DataSet::Ranks{{{1*/
     495/*FUNCTION DataSet::Ranks{{{2*/
    494496void   DataSet::Ranks(int* ranks){
    495497
     
    514516}
    515517/*}}}*/
    516 /*FUNCTION DataSet::Presort{{{1*/
     518/*FUNCTION DataSet::Presort{{{2*/
    517519void DataSet::Presort(){
    518520
     
    534536}
    535537/*}}}*/
    536 /*FUNCTION DataSet::SetSorting{{{1*/
     538/*FUNCTION DataSet::SetSorting{{{2*/
    537539void DataSet::SetSorting(int* in_sorted_ids,int* in_id_offsets){
    538540
     
    542544}
    543545/*}}}*/
    544 /*FUNCTION DataSet::Size{{{1*/
     546/*FUNCTION DataSet::Size{{{2*/
    545547int  DataSet::Size(void){
    546548
     
    548550}
    549551/*}}}*/
    550 /*FUNCTION DataSet::Sort{{{1*/
     552/*FUNCTION DataSet::Sort{{{2*/
    551553void DataSet::Sort(){
    552554
     
    559561
    560562/*Objects methods*/
    561 /*FUNCTION DataSet::ComputeBasalStress{{{1*/
     563/*FUNCTION DataSet::ComputeBasalStress{{{2*/
    562564void DataSet::ComputeBasalStress(Vec sigma_b,int analysis_type,int sub_analysis_type){
    563565
     
    576578}
    577579/*}}}*/
    578 /*FUNCTION DataSet::ComputePressure{{{1*/
     580/*FUNCTION DataSet::ComputePressure{{{2*/
    579581void DataSet::ComputePressure(Vec p_g,int analysis_type,int sub_analysis_type){
    580582
     
    593595}
    594596/*}}}*/
    595 /*FUNCTION DataSet::ComputeStrainRate{{{1*/
     597/*FUNCTION DataSet::ComputeStrainRate{{{2*/
    596598void DataSet::ComputeStrainRate(Vec eps,int analysis_type,int sub_analysis_type){
    597599
     
    610612}
    611613/*}}}*/
    612 /*FUNCTION DataSet::Configure{{{1*/
     614/*FUNCTION DataSet::Configure{{{2*/
    613615void DataSet::Configure(DataSet* elements,DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials,Parameters* parameters){
    614616
     
    638640}
    639641/*}}}*/
    640 /*FUNCTION DataSet::CostFunction{{{1*/
     642/*FUNCTION DataSet::CostFunction{{{2*/
    641643void  DataSet::CostFunction(double* pJ,int analysis_type,int sub_analysis_type){
    642644
     
    661663}
    662664/*}}}*/
    663 /*FUNCTION DataSet::CreateKMatrix{{{1*/
     665/*FUNCTION DataSet::CreateKMatrix{{{2*/
    664666void  DataSet::CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type){
    665667
     
    684686}
    685687/*}}}*/
    686 /*FUNCTION DataSet::CreatePartitioningVector{{{1*/
     688/*FUNCTION DataSet::CreatePartitioningVector{{{2*/
    687689void  DataSet::CreatePartitioningVector(Vec* ppartition,int numberofobjects){
    688690
     
    712714}
    713715/*}}}*/
    714 /*FUNCTION DataSet::CreatePVector{{{1*/
     716/*FUNCTION DataSet::CreatePVector{{{2*/
    715717void  DataSet::CreatePVector(Vec pg,int analysis_type,int sub_analysis_type){
    716718
     
    735737}
    736738/*}}}*/
    737 /*FUNCTION DataSet::DistributeDofs{{{1*/
     739/*FUNCTION DataSet::DistributeDofs{{{2*/
    738740void  DataSet::DistributeDofs(int numberofobjects,int numberofdofsperobject){
    739741
     
    817819}
    818820/*}}}*/
    819 /*FUNCTION DataSet::Du{{{1*/
     821/*FUNCTION DataSet::Du{{{2*/
    820822void  DataSet::Du(Vec du_g,int analysis_type,int sub_analysis_type){
    821823
     
    836838}
    837839/*}}}*/
    838 /*FUNCTION DataSet::FieldAverageOntoVertices{{{1*/
     840/*FUNCTION DataSet::FieldAverageOntoVertices{{{2*/
    839841void DataSet::FieldAverageOntoVertices(Vec fieldsum,Vec connectivity,double* field){
    840842
     
    853855}
    854856/*}}}*/
    855 /*FUNCTION DataSet::FieldDepthAverageAtBase{{{1*/
     857/*FUNCTION DataSet::FieldDepthAverageAtBase{{{2*/
    856858void  DataSet::FieldDepthAverageAtBase(Vec field,double* field_serial,char* fieldname){
    857859
     
    870872}
    871873/*}}}*/
    872 /*FUNCTION DataSet::FieldExtrude{{{1*/
     874/*FUNCTION DataSet::FieldExtrude{{{2*/
    873875void  DataSet::FieldExtrude(Vec field,double* field_serial,char* field_name, int collapse){
    874876
     
    895897}
    896898/*}}}*/
    897 /*FUNCTION DataSet::FlagClones{{{1*/
     899/*FUNCTION DataSet::FlagClones{{{2*/
    898900void  DataSet::FlagClones(int numberofobjects){
    899901
     
    936938}
    937939/*}}}*/
    938 /*FUNCTION DataSet::FlagNodeSets{{{1*/
     940/*FUNCTION DataSet::FlagNodeSets{{{2*/
    939941void DataSet::FlagNodeSets(Vec pv_g, Vec pv_m, Vec pv_n, Vec pv_f, Vec pv_s){
    940942
     
    973975}
    974976/*}}}*/
    975 /*FUNCTION DataSet::Gradj{{{1*/
     977/*FUNCTION DataSet::Gradj{{{2*/
    976978void  DataSet::Gradj(Vec grad_g,int analysis_type,int sub_analysis_type,char* control_type){
    977979
     
    992994}               
    993995/*}}}*/
    994 /*FUNCTION DataSet::MeltingIsPresent{{{1*/
     996/*FUNCTION DataSet::MeltingIsPresent{{{2*/
    995997int   DataSet::MeltingIsPresent(){
    996998
     
    10171019}
    10181020/*}}}*/
    1019 /*FUNCTION DataSet::MeltingConstraints{{{1*/
     1021/*FUNCTION DataSet::MeltingConstraints{{{2*/
    10201022void  DataSet::MeltingConstraints(int* pconverged, int* pnum_unstable_constraints,int analysis_type,int sub_analysis_type){
    10211023
     
    10591061}
    10601062/*}}}*/
    1061 /*FUNCTION DataSet::Misfit{{{1*/
     1063/*FUNCTION DataSet::Misfit{{{2*/
    10621064void  DataSet::Misfit(double* pJ,int analysis_type,int sub_analysis_type){
    10631065
     
    10821084}
    10831085/*}}}*/
    1084 /*FUNCTION DataSet::NumberOfDofs{{{1*/
     1086/*FUNCTION DataSet::NumberOfDofs{{{2*/
    10851087int   DataSet::NumberOfDofs(){
    10861088
     
    11141116}
    11151117/*}}}*/
    1116 /*FUNCTION DataSet::NumberOfRgbs{{{1*/
     1118/*FUNCTION DataSet::NumberOfRgbs{{{2*/
    11171119int   DataSet::NumberOfRgbs(){
    11181120
     
    11341136}
    11351137/*}}}*/
    1136 /*FUNCTION DataSet::OutputRifts{{{1*/
     1138/*FUNCTION DataSet::OutputRifts{{{2*/
    11371139void  DataSet::OutputRifts(Vec riftproperties){
    11381140
     
    11531155}
    11541156/*}}}*/
    1155 /*FUNCTION DataSet::PenaltyCreateKMatrix{{{1*/
     1157/*FUNCTION DataSet::PenaltyCreateKMatrix{{{2*/
    11561158void  DataSet::PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type){
    11571159
     
    11701172}
    11711173/*}}}*/
    1172 /*FUNCTION DataSet::PenaltyCreatePVector{{{1*/
     1174/*FUNCTION DataSet::PenaltyCreatePVector{{{2*/
    11731175void  DataSet::PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type){
    11741176
     
    11871189}
    11881190/*}}}*/
    1189 /*FUNCTION DataSet::RiftIsPresent{{{1*/
     1191/*FUNCTION DataSet::RiftIsPresent{{{2*/
    11901192int   DataSet::RiftIsPresent(){
    11911193
     
    12151217}
    12161218/*}}}*/
    1217 /*FUNCTION DataSet::SetupMpcs{{{1*/
     1219/*FUNCTION DataSet::SetupMpcs{{{2*/
    12181220void DataSet::SetupMpcs(Mat Rmg,DataSet* nodes){
    12191221
     
    12831285}
    12841286/*}}}*/
    1285 /*FUNCTION DataSet::SetupSpcs{{{1*/
     1287/*FUNCTION DataSet::SetupSpcs{{{2*/
    12861288void   DataSet::SetupSpcs(DataSet* nodes,Vec yg){
    12871289
     
    13221324}
    13231325/*}}}*/
    1324 /*FUNCTION DataSet::SurfaceArea{{{1*/
     1326/*FUNCTION DataSet::SurfaceArea{{{2*/
    13251327void  DataSet::SurfaceArea(double* pS,int analysis_type,int sub_analysis_type){
    13261328
     
    13451347}
    13461348/*}}}*/
    1347 /*FUNCTION DataSet::UpdateInputs{{{1*/
     1349/*FUNCTION DataSet::UpdateInputs{{{2*/
    13481350void  DataSet::UpdateInputs(double* solution, int analysis_type, int sub_analysis_type){
    13491351
     
    13621364}
    13631365/*}}}*/
    1364 /*FUNCTION DataSet::AddInput{{{1*/
     1366/*FUNCTION DataSet::AddInput{{{2*/
    13651367void  DataSet::AddInput(double value, int enum_type){
    13661368
     
    13791381}
    13801382/*}}}*/
    1381 /*FUNCTION DataSet::UpdateVertexPositions{{{1*/
     1383/*FUNCTION DataSet::UpdateVertexPositions{{{2*/
    13821384void  DataSet::UpdateVertexPositions(double* thickness,double* bed){
    13831385
     
    13951397}
    13961398/*}}}*/
     1399
     1400/*}}}*/
     1401/*Inputs: {{{1*/
     1402
     1403/*Object constructors and destructor*/
     1404/*FUNCTION Inputs::Inputs(){{{2*/
     1405Inputs::Inputs(){
     1406        return;
     1407}
     1408/*}}}*/
     1409/*FUNCTION Inputs::Inputs(int in_enum){{{2*/
     1410Inputs::Inputs(int in_enum): DataSet(in_enum) {
     1411        //do nothing;
     1412        return;
     1413}
     1414/*}}}*/
     1415/*FUNCTION Inputs::~Inputs(){{{2*/
     1416Inputs::~Inputs(){
     1417        return;
     1418}
     1419/*}}}*/
     1420
     1421/*Object management*/
     1422/*FUNCTION Inputs::GetParameterValue(double* pvalue,double* gauss,int enum_type){{{2*/
     1423void Inputs::GetParameterValue(double* pvalue,double* gauss, int enum_type){
     1424
     1425        vector<Object*>::iterator object;
     1426        Input* input=NULL;
     1427
     1428        /*Go through inputs and check whether any input with the same name is already in: */
     1429        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1430
     1431                input=(Input*)(*object);
     1432                if (input->EnumType()==enum_type)break;
     1433        }
     1434
     1435        if (!input){
     1436                /*we could not find an input with the correct enum type. No defaults values were provided,
     1437                 * error out: */
     1438                ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
     1439        }
     1440
     1441        /*Ok, we have an input if we made it here, request the input to return the values: */
     1442        input->GetParameterValue(pvalue,gauss);
     1443
     1444}
     1445/*}}}*/
     1446/*FUNCTION Inputs::GetParameterValue(double* pvalue,double* gauss,int enum_type,double defaultvalue){{{2*/
     1447void Inputs::GetParameterValue(double* pvalue,double* gauss, int enum_type,double defaultvalue){
     1448
     1449        vector<Object*>::iterator object;
     1450        Input* input=NULL;
     1451
     1452        /*Go through inputs and check whether any input with the same name is already in: */
     1453        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1454
     1455                input=(Input*)(*object);
     1456                if (input->EnumType()==enum_type)break;
     1457        }
     1458
     1459        if (!input){
     1460                /*we could not find an input with the correct enum type. Return the default value: */
     1461                *pvalue=defaultvalue;
     1462        }
     1463        else{
     1464                input->GetParameterValue(pvalue,gauss);
     1465        }
     1466}
     1467/*}}}*/
     1468/*FUNCTION Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type){{{2*/
     1469void Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type){
     1470
     1471        vector<Object*>::iterator object;
     1472        Input* input=NULL;
     1473
     1474        /*Go through inputs and check whether any input with the same name is already in: */
     1475        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1476
     1477                input=(Input*)(*object);
     1478                if (input->EnumType()==enum_type)break;
     1479        }
     1480
     1481        if (!input){
     1482                /*we could not find an input with the correct enum type. No defaults values were provided,
     1483                 * error out: */
     1484                ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
     1485        }
     1486
     1487        /*Ok, we have an input if we made it here, request the input to return the values: */
     1488        input->GetParameterValues(values,gauss_pointers,numgauss);
     1489
     1490}
     1491/*}}}*/
     1492/*FUNCTION Inputs::GetParameterValue(double* pvalue, Node* node, int enum_type){{{2*/
     1493void Inputs::GetParameterValue(double* pvalue,Node* node,int enum_type){
     1494
     1495        /*given a node, instead of a gauss point, we want to recover a value: probably in an element!: */
     1496
     1497        vector<Object*>::iterator object;
     1498        Input* input=NULL;
     1499
     1500        /*Go through inputs and check whether any input with the same name is already in: */
     1501        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1502
     1503                input=(Input*)(*object);
     1504                if (input->EnumType()==enum_type)break;
     1505        }
     1506
     1507        if (!input){
     1508                /*we could not find an input with the correct enum type. No defaults values were provided,
     1509                 * error out: */
     1510                ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
     1511        }
     1512
     1513        /*Ok, we have an input if we made it here, request the input to return the values: */
     1514        input->GetParameterValue(pvalue,node);
     1515}
     1516/*}}}*/
     1517/*FUNCTION Inputs::GetParameterValue(double* pvalue, Node* node1, Node* node2,int enum_type){{{2*/
     1518void Inputs::GetParameterValue(double* pvalue,Node* node1, Node* node2,double gauss_coord,int enum_type){
     1519
     1520        /*given a node, instead of a gauss point, we want to recover a value: probably in an element!: */
     1521
     1522        vector<Object*>::iterator object;
     1523        Input* input=NULL;
     1524
     1525        /*Go through inputs and check whether any input with the same name is already in: */
     1526        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1527
     1528                input=(Input*)(*object);
     1529                if (input->EnumType()==enum_type)break;
     1530        }
     1531
     1532        if (!input){
     1533                /*we could not find an input with the correct enum type. No defaults values were provided,
     1534                 * error out: */
     1535                ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
     1536        }
     1537
     1538        /*Ok, we have an input if we made it here, request the input to return the values: */
     1539        input->GetParameterValue(pvalue,node1,node2,gauss_coord);
     1540}
     1541/*}}}*/
     1542/*FUNCTION Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type,double* defaultvalues){{{2*/
     1543void Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type,double* defaultvalues){
     1544
     1545        int i;
     1546        vector<Object*>::iterator object;
     1547        Input* input=NULL;
     1548
     1549        /*Go through inputs and check whether any input with the same name is already in: */
     1550        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1551
     1552                input=(Input*)(*object);
     1553                if (input->EnumType()==enum_type)break;
     1554        }
     1555
     1556        if (!input){
     1557                /*we could not find an input with the correct enum type. Return the default values: */
     1558                for(i=0;i<numgauss;i++)values[i]=defaultvalues[i];
     1559        }
     1560        else{
     1561                input->GetParameterValues(values,gauss_pointers,numgauss);
     1562        }
     1563
     1564}
     1565/*}}}*/
     1566/*FUNCTION Inputs::GetParameterValue(bool* pvalue,int enum-type){{{2*/
     1567void Inputs::GetParameterValue(bool* pvalue,int enum_type){
     1568
     1569        vector<Object*>::iterator object;
     1570        Input* input=NULL;
     1571
     1572        /*Go through inputs and check whether any input with the same name is already in: */
     1573        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1574
     1575                input=(Input*)(*object);
     1576                if (input->EnumType()==enum_type)break;
     1577        }
     1578
     1579        if (!input){
     1580                /*we could not find an input with the correct enum type. No defaults values were provided,
     1581                 * error out: */
     1582                ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
     1583        }
     1584
     1585        /*Ok, we have an input if we made it here, request the input to return the value: */
     1586        input->GetParameterValue(pvalue);
     1587
     1588}
     1589/*}}}*/
     1590/*FUNCTION Inputs::GetParameterValue(int* pvalue,int enum-type){{{2*/
     1591void Inputs::GetParameterValue(int* pvalue,int enum_type){
     1592
     1593        vector<Object*>::iterator object;
     1594        Input* input=NULL;
     1595
     1596        /*Go through inputs and check whether any input with the same name is already in: */
     1597        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1598
     1599                input=(Input*)(*object);
     1600                if (input->EnumType()==enum_type)break;
     1601        }
     1602
     1603        if (!input){
     1604                /*we could not find an input with the correct enum type. No defaults values were provided,
     1605                 * error out: */
     1606                ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
     1607        }
     1608
     1609        /*Ok, we have an input if we made it here, request the input to return the value: */
     1610        input->GetParameterValue(pvalue);
     1611
     1612}
     1613/*}}}*/
     1614/*FUNCTION Inputs::GetParameterValue(double* pvalue,int enum-type){{{2*/
     1615void Inputs::GetParameterValue(double* pvalue,int enum_type){
     1616
     1617        vector<Object*>::iterator object;
     1618        Input* input=NULL;
     1619
     1620        /*Go through inputs and check whether any input with the same name is already in: */
     1621        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1622
     1623                input=(Input*)(*object);
     1624                if (input->EnumType()==enum_type)break;
     1625        }
     1626
     1627        if (!input){
     1628                /*we could not find an input with the correct enum type. No defaults values were provided,
     1629                 * error out: */
     1630                ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
     1631        }
     1632
     1633        /*Ok, we have an input if we made it here, request the input to return the value: */
     1634        input->GetParameterValue(pvalue);
     1635
     1636}
     1637/*}}}*/
     1638/*FUNCTION Inputs::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss,int enum_type){{{2*/
     1639void Inputs::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss,int enum_type){
     1640
     1641        vector<Object*>::iterator object;
     1642        Input* input=NULL;
     1643
     1644        /*Go through inputs and check whether any input with the same name is already in: */
     1645        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1646
     1647                input=(Input*)(*object);
     1648                if (input->EnumType()==enum_type)break;
     1649        }
     1650
     1651        if (!input){
     1652                /*we could not find an input with the correct enum type. No defaults values were provided,
     1653                 * error out: */
     1654                ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
     1655        }
     1656
     1657        /*Ok, we have an input if we made it here, request the input to return the value: */
     1658        input->GetParameterDerivativeValue(derivativevalues,xyz_list,gauss);
     1659}
     1660/*}}}*/
     1661/*FUNCTION Inputs::GetStrainRate(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum){{{2*/
     1662void Inputs::GetStrainRate(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum){
     1663
     1664        vector<Object*>::iterator object;
     1665        Input* xinput=NULL;
     1666        Input* yinput=NULL;
     1667
     1668        /*Go through inputs and find data for xenum: */
     1669        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1670                xinput=(Input*)(*object);
     1671                if (xinput->EnumType()==xenum)break;
     1672        }
     1673        /*Go through inputs and find data for yenum: */
     1674        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1675                yinput=(Input*)(*object);
     1676                if (yinput->EnumType()==yenum)break;
     1677        }
     1678
     1679        if (!xinput | !yinput){
     1680                /*we could not find one input with the correct enum type. No defaults values were provided,
     1681                 * error out: */
     1682                ISSMERROR("%s%i%s%i\n"," could not find input with enum type ",xenum," or enum type ",yenum);
     1683        }
     1684
     1685        /*Ok, we have the inputs, call bilinear operator: */
     1686        xinput->GetStrainRate(epsilon,yinput,xyz_list,gauss);
     1687
     1688}
     1689/*}}}*/
     1690/*FUNCTION Inputs::GetStrainRateStokes(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum,int zenum){{{2*/
     1691void Inputs::GetStrainRateStokes(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum,int zenum){
     1692
     1693        vector<Object*>::iterator object;
     1694        Input* xinput=NULL;
     1695        Input* yinput=NULL;
     1696        Input* zinput=NULL;
     1697
     1698        /*Go through inputs and find data for xenum: */
     1699        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1700                xinput=(Input*)(*object);
     1701                if (xinput->EnumType()==xenum)break;
     1702        }
     1703        /*Go through inputs and find data for yenum: */
     1704        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1705                yinput=(Input*)(*object);
     1706                if (yinput->EnumType()==yenum)break;
     1707        }
     1708        /*Go through inputs and find data for zenum: */
     1709        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1710                zinput=(Input*)(*object);
     1711                if (zinput->EnumType()==zenum)break;
     1712        }
     1713
     1714        if (!xinput | !yinput | !zinput){
     1715                /*we could not find one input with the correct enum type. No defaults values were provided,
     1716                 * error out: */
     1717                ISSMERROR("%s%i%s%i%s%i\n"," could not find input with enum type ",xenum," or enum type ",yenum, " or enum type ",zenum);
     1718        }
     1719
     1720        /*Ok, we have the inputs, call bilinear operator: */
     1721        xinput->GetStrainRateStokes(epsilon,yinput,zinput,xyz_list,gauss);
     1722
     1723}
     1724/*}}}*/
     1725/*FUNCTION Inputs::AddInput{{{2*/
     1726int  Inputs::AddInput(Input* in_input){
     1727
     1728        /*First, go through dataset of inputs and check whether any input
     1729         * with the same name is already in. If so, erase the corresponding
     1730         * object before adding this new one: */
     1731        vector<Object*>::iterator object;
     1732        Input* input=NULL;
     1733
     1734        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1735
     1736                input=(Input*)(*object);
     1737
     1738                if (input->EnumType()==in_input->EnumType()){
     1739                        this->DeleteObject(input);
     1740                        break;
     1741                }
     1742        }
     1743        this->AddObject(in_input);
     1744}
     1745/*}}}*/
     1746
     1747/*Object functions*/
     1748
     1749
     1750/*}}}*/
     1751/*Parameters: {{{1*/
     1752
     1753
     1754/*Object constructors and destructor*/
     1755/*FUNCTION Parameters::Parameters(){{{2*/
     1756Parameters::Parameters(){
     1757        return;
     1758}
     1759/*}}}*/
     1760/*FUNCTION Parameters::Parameters(int in_enum){{{2*/
     1761Parameters::Parameters(int in_enum): DataSet(in_enum){
     1762        //do nothing;
     1763        return;
     1764}
     1765/*}}}*/
     1766/*FUNCTION Parameters::~Parameters(){{{2*/
     1767Parameters::~Parameters(){
     1768        return;
     1769}
     1770/*}}}*/
     1771
     1772/*Object management*/
     1773/*FUNCTION Parameters::FindParam(double* pscalar, int enum_type){{{2*/
     1774int   Parameters::FindParam(double* pscalar, int enum_type){
     1775       
     1776        /*Go through a dataset, and find a Param* object
     1777         *which parameter name is "name" : */
     1778       
     1779        vector<Object*>::iterator object;
     1780        Param* param=NULL;
     1781
     1782        int found=0;
     1783
     1784        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1785
     1786                /*Find param type objects: */
     1787                if((*object)->Enum()==ParamEnum){
     1788
     1789                        /*Ok, this object is a parameter, recover it and ask which name it has: */
     1790                        param=(Param*)(*object);
     1791
     1792                        if(param->EnumType()==enum_type){
     1793                                /*Ok, this is the one! Recover the value of this parameter: */
     1794                                param->GetParameterValue(pscalar);
     1795                                found=1;
     1796                                break;
     1797                        }
     1798                }
     1799        }
     1800        return found;
     1801}
     1802/*}}}*/
     1803/*FUNCTION Parameters::FindParam(int* pinteger,int enum_type){{{2*/
     1804int   Parameters::FindParam(int* pinteger,int enum_type){
     1805       
     1806       
     1807        /*Go through a dataset, and find a Param* object
     1808         *which parameter name is "name" : */
     1809       
     1810        vector<Object*>::iterator object;
     1811        Param* param=NULL;
     1812
     1813        int found=0;
     1814
     1815        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1816
     1817                /*Find param type objects: */
     1818                if((*object)->Enum()==ParamEnum){
     1819
     1820                        /*Ok, this object is a parameter, recover it and ask which name it has: */
     1821                        param=(Param*)(*object);
     1822
     1823                        if(param->EnumType()==enum_type){
     1824                                /*Ok, this is the one! Recover the value of this parameter: */
     1825                                param->GetParameterValue(pinteger);
     1826                                found=1;
     1827                                break;
     1828                        }
     1829                }
     1830        }
     1831        return found;
     1832}
     1833/*}}}*/
     1834/*FUNCTION Parameters::FindParam(char** pstring,int enum_type){{{2*/
     1835int   Parameters::FindParam(char** pstring,int enum_type){
     1836       
     1837        /*Go through a dataset, and find a Param* object
     1838         *which parameter name is "name" : */
     1839       
     1840        vector<Object*>::iterator object;
     1841        Param* param=NULL;
     1842
     1843        int found=0;
     1844
     1845        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1846
     1847                /*Find param type objects: */
     1848                if((*object)->Enum()==ParamEnum){
     1849
     1850                        /*Ok, this object is a parameter, recover it and ask which name it has: */
     1851                        param=(Param*)(*object);
     1852
     1853                        if(param->EnumType()==enum_type){
     1854                                /*Ok, this is the one! Recover the value of this parameter: */
     1855                                param->GetParameterValue(pstring);
     1856                                found=1;
     1857                                break;
     1858                        }
     1859                }
     1860        }
     1861        return found;
     1862
     1863}
     1864/*}}}*/
     1865/*FUNCTION Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){{{2*/
     1866int   Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){
     1867       
     1868        /*Go through a dataset, and find a Param* object
     1869         *which parameter name is "name" : */
     1870       
     1871        vector<Object*>::iterator object;
     1872        Param* param=NULL;
     1873
     1874        int found=0;
     1875
     1876        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1877
     1878                /*Find param type objects: */
     1879                if((*object)->Enum()==ParamEnum){
     1880
     1881                        /*Ok, this object is a parameter, recover it and ask which name it has: */
     1882                        param=(Param*)(*object);
     1883
     1884                        if(param->EnumType()==enum_type){
     1885                                /*Ok, this is the one! Recover the value of this parameter: */
     1886                                param->GetParameterValue(pstringarray,pM);
     1887                                found=1;
     1888                                break;
     1889                        }
     1890                }
     1891        }
     1892        return found;
     1893
     1894}
     1895/*}}}*/
     1896/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM,int enum_type){{{2*/
     1897int   Parameters::FindParam(double** pdoublearray,int* pM, int enum_type){
     1898       
     1899        /*Go through a dataset, and find a Param* object
     1900         *which parameter name is "name" : */
     1901       
     1902        vector<Object*>::iterator object;
     1903        Param* param=NULL;
     1904
     1905        int found=0;
     1906
     1907        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1908
     1909                /*Find param type objects: */
     1910                if((*object)->Enum()==ParamEnum){
     1911
     1912                        /*Ok, this object is a parameter, recover it and ask which name it has: */
     1913                        param=(Param*)(*object);
     1914
     1915                        if(param->EnumType()==enum_type){
     1916                                /*Ok, this is the one! Recover the value of this parameter: */
     1917                                param->GetParameterValue(pdoublearray,pM);
     1918                                found=1;
     1919                                break;
     1920                        }
     1921                }
     1922        }
     1923        return found;
     1924
     1925}
     1926/*}}}*/
     1927/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){{{2*/
     1928int   Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){
     1929       
     1930        /*Go through a dataset, and find a Param* object
     1931         *which parameter name is "name" : */
     1932       
     1933        vector<Object*>::iterator object;
     1934        Param* param=NULL;
     1935
     1936        int found=0;
     1937
     1938        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1939
     1940                /*Find param type objects: */
     1941                if((*object)->Enum()==ParamEnum){
     1942
     1943                        /*Ok, this object is a parameter, recover it and ask which name it has: */
     1944                        param=(Param*)(*object);
     1945
     1946                        if(param->EnumType()==enum_type){
     1947                                /*Ok, this is the one! Recover the value of this parameter: */
     1948                                param->GetParameterValue(pdoublearray,pM,pN);
     1949                                found=1;
     1950                                break;
     1951                        }
     1952                }
     1953        }
     1954        return found;
     1955
     1956}
     1957/*}}}*/
     1958/*FUNCTION Parameters::FindParam(Vec* pvec,int enum_type){{{2*/
     1959int   Parameters::FindParam(Vec* pvec,int enum_type){
     1960       
     1961        /*Go through a dataset, and find a Param* object
     1962         *which parameter name is "name" : */
     1963       
     1964        vector<Object*>::iterator object;
     1965        Param* param=NULL;
     1966
     1967        int found=0;
     1968
     1969        for ( object=objects.begin() ; object < objects.end(); object++ ){
     1970
     1971                /*Find param type objects: */
     1972                if((*object)->Enum()==ParamEnum){
     1973
     1974                        /*Ok, this object is a parameter, recover it and ask which name it has: */
     1975                        param=(Param*)(*object);
     1976
     1977                        if(param->EnumType()==enum_type){
     1978                                /*Ok, this is the one! Recover the value of this parameter: */
     1979                                param->GetParameterValue(pvec);
     1980                                found=1;
     1981                                break;
     1982                        }
     1983                }
     1984        }
     1985        return found;
     1986
     1987}
     1988/*}}}*/
     1989/*FUNCTION Parameters::FindParamMat* pmat,int enum_type){{{2*/
     1990int   Parameters::FindParam(Mat* pmat,int enum_type){
     1991       
     1992        /*Go through a dataset, and find a Param* object
     1993         *which parameter name is "name" : */
     1994       
     1995        vector<Object*>::iterator object;
     1996        Param* param=NULL;
     1997
     1998        int found=0;
     1999
     2000        for ( object=objects.begin() ; object < objects.end(); object++ ){
     2001
     2002                /*Find param type objects: */
     2003                if((*object)->Enum()==ParamEnum){
     2004
     2005                        /*Ok, this object is a parameter, recover it and ask which name it has: */
     2006                        param=(Param*)(*object);
     2007
     2008                        if(param->EnumType()==enum_type){
     2009                                /*Ok, this is the one! Recover the value of this parameter: */
     2010                                param->GetParameterValue(pmat);
     2011                                found=1;
     2012                                break;
     2013                        }
     2014                }
     2015        }
     2016        return found;
     2017
     2018}
     2019/*}}}*/
     2020/*FUNCTION Parameters::FindParamObject{{{2*/
     2021Object* Parameters::FindParamObject(int enum_type){
     2022
     2023        /*Go through a dataset, and find a Param* object
     2024         *which parameter name is "name" : */
     2025
     2026        vector<Object*>::iterator object;
     2027        Param* param=NULL;
     2028
     2029        for ( object=objects.begin() ; object < objects.end(); object++ ){
     2030
     2031                /*Find param type objects: */
     2032                if((*object)->Enum()==ParamEnum){
     2033
     2034                        /*Ok, this object is a parameter, recover it and ask which name it has: */
     2035                        param=(Param*)(*object);
     2036
     2037                        if(param->EnumType()==enum_type){
     2038                                /*Ok, this is the one! Return the object: */
     2039                                return (*object);
     2040                        }
     2041                }
     2042        }
     2043        return NULL;
     2044}
     2045/*}}}*/
     2046
     2047/*Object functions*/
     2048
     2049
     2050/*}}}*/
  • issm/trunk/src/c/DataSet/DataSet.h

    r3673 r3685  
    11/*
    2  * DataSet.h:
    3  * \brief Class that holds objects.
    4  * \file DataSet.h This prototype defines a DataSet, capable of holding any type of
    5  * objects (using the abstract class Object).
     2 * DataSet.h: declaration of DataSet,Parameters and Inputs classes
    63 */
    7 
    84
    95#ifndef _DATASET_H_
     
    117
    128#include <vector>
     9#include "../objects/Object.h"
    1310#include "../toolkits/toolkits.h"
    14 #include "../objects/Object.h"
     11
     12/*forward declarations */
     13class Parameters;
     14class DataSet;
    1515class Inputs;
    16 class Parameters;
    1716
     17
     18/********************************************************DATASET************************************************/
    1819class DataSet{
    1920       
     
    102103DataSet* DataSetDemarshallRaw(char** pmarshalled_dataset);
    103104
     105
     106
     107/********************************************************INPUTS************************************************/
     108class Input;
     109class Node;
     110#include "./DataSet.h"
     111#include "../objects/objects.h"
     112
     113class Inputs: public DataSet{
     114
     115        public:
     116
     117                /*constructors, destructors: {{{1*/
     118                Inputs();
     119                Inputs(int enum_type);
     120                ~Inputs();
     121                /*}}}*/
     122                /*numerics: {{{1*/
     123                int  AddInput(Input* in_input);
     124               
     125                void GetParameterValue(bool* pvalue,int enum_type);
     126                void GetParameterValue(int* pvalue,int enum_type);
     127                void GetParameterValue(double* pvalue,int enum_type);
     128                void GetParameterValue(double* pvalue,Node* node,int enum_type);
     129                void GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_coord,int enum_type);
     130                void GetParameterValue(double* pvalue,double* gauss,int enum_type);
     131                void GetParameterValue(double* pvalue,double* gauss,int enum_type,double defaultvalue);
     132               
     133                void GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type);
     134                void GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type,double* defaultvalues);
     135       
     136                void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss,int enum_type);
     137                void GetStrainRate(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum);
     138                void GetStrainRateStokes(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum,int yenum);
     139                /*}}}*/
     140
     141};
     142
     143
     144/********************************************************PARAMETERS************************************************/
     145
     146class Parameters: public DataSet{
     147
     148        public:
     149
     150                /*constructors, destructors: {{{1*/
     151                Parameters();
     152                Parameters(int enum_type);
     153                ~Parameters();
     154                /*}}}*/
     155                /*numerics: {{{1*/
     156                int   FindParam(double* pscalar, int enum_type);
     157                int   FindParam(int* pinteger,int enum_type);
     158                int   FindParam(char** pstring,int enum_type);
     159                int   FindParam(char*** pstringarray,int* pM,int enum_type);
     160                int   FindParam(double** pdoublearray,int* pM,int enum_type);
     161                int   FindParam(double** pdoublearray,int* pM,int* pN,int enum_type);
     162                int   FindParam(Vec* pvec,int enum_type);
     163                int   FindParam(Mat* pmat,int enum_type);
     164                Object* FindParamObject(int enum_type);
     165                /*}}}*/
     166
     167};
     168
     169
    104170#endif
  • issm/trunk/src/c/Makefile.am

    r3673 r3685  
    2323libISSM_a_SOURCES = ./objects/objects.h\
    2424                                        ./objects/Object.h\
    25                                         ./objects/BamgGeom.h\
    26                                         ./objects/BamgGeom.cpp\
    27                                         ./objects/BamgMesh.h\
    28                                         ./objects/BamgMesh.cpp\
    29                                         ./objects/BamgOpts.h\
    30                                         ./objects/BamgOpts.cpp\
     25                                        ./objects/Bamg/BamgGeom.h\
     26                                        ./objects/Bamg/BamgGeom.cpp\
     27                                        ./objects/Bamg/BamgMesh.h\
     28                                        ./objects/Bamg/BamgMesh.cpp\
     29                                        ./objects/Bamg/BamgOpts.h\
     30                                        ./objects/Bamg/BamgOpts.cpp\
    3131                                        ./objects/Element.h\
    3232                                        ./objects/Model.h\
     
    3535                                        ./objects/FemModel.cpp\
    3636                                        ./objects/Material.h\
    37                                         ./objects/Material.cpp\
    3837                                        ./objects/DofVec.h\
    3938                                        ./objects/DofVec.cpp\
    4039                                        ./objects/Load.h\
    41                                         ./objects/Load.cpp\
    4240                                        ./objects/OptArgs.h\
    4341                                        ./objects/OptPars.h\
     
    4543                                        ./objects/Contour.h\
    4644                                        ./objects/Contour.cpp\
    47                                         ./objects/Friction.h\
    48                                         ./objects/Friction.cpp\
     45                                        ./objects/Loads/Friction.h\
     46                                        ./objects/Loads/Friction.cpp\
    4947                                        ./objects/DakotaPlugin.h\
    5048                                        ./objects/DakotaPlugin.cpp\
     
    5553                                        ./objects/DofIndexing.h\
    5654                                        ./objects/DofIndexing.cpp\
     55                                        ./objects/IoModel.h\
     56                                        ./objects/IoModel.cpp\
    5757                                        ./objects/Node.h\
    5858                                        ./objects/Node.cpp\
    5959                                        ./objects/Result.h\
    6060                                        ./objects/Result.cpp\
    61                                         ./objects/Tria.h\
    62                                         ./objects/Tria.cpp\
    63                                         ./objects/InputObjects/Input.h\
    64                                         ./objects/InputObjects/TriaVertexInput.h\
    65                                         ./objects/InputObjects/TriaVertexInput.cpp\
    66                                         ./objects/InputObjects/SingVertexInput.h\
    67                                         ./objects/InputObjects/SingVertexInput.cpp\
    68                                         ./objects/InputObjects/BeamVertexInput.h\
    69                                         ./objects/InputObjects/BeamVertexInput.cpp\
    70                                         ./objects/InputObjects/PentaVertexInput.h\
    71                                         ./objects/InputObjects/PentaVertexInput.cpp\
    72                                         ./objects/InputObjects/BoolInput.h\
    73                                         ./objects/InputObjects/BoolInput.cpp\
    74                                         ./objects/InputObjects/IntInput.h\
    75                                         ./objects/InputObjects/IntInput.cpp\
    76                                         ./objects/InputObjects/DoubleInput.h\
    77                                         ./objects/InputObjects/DoubleInput.cpp\
    78                                         ./objects/Sing.h\
    79                                         ./objects/Sing.cpp\
    80                                         ./objects/Beam.h\
    81                                         ./objects/Beam.cpp\
    82                                         ./objects/Penta.h\
    83                                         ./objects/Penta.cpp\
    84                                         ./objects/Matice.h\
    85                                         ./objects/Matice.cpp\
    86                                         ./objects/Matpar.h\
    87                                         ./objects/Matpar.cpp\
    88                                         ./objects/Spc.cpp\
    89                                         ./objects/Spc.h\
    90                                         ./objects/Rgb.cpp\
    91                                         ./objects/Rgb.h\
    92                                         ./objects/Penpair.cpp\
    93                                         ./objects/Penpair.h\
    94                                         ./objects/Pengrid.cpp\
    95                                         ./objects/Pengrid.h\
    96                                         ./objects/Icefront.cpp\
    97                                         ./objects/Icefront.h\
    98                                         ./objects/Riftfront.cpp\
    99                                         ./objects/Riftfront.h\
    100                                         ./objects/Numericalflux.cpp\
    101                                         ./objects/Numericalflux.h\
    102                                         ./objects/ParamObjects/Param.h\
    103                                         ./objects/ParamObjects/BoolParam.cpp\
    104                                         ./objects/ParamObjects/BoolParam.h\
    105                                         ./objects/ParamObjects/IntParam.cpp\
    106                                         ./objects/ParamObjects/IntParam.h\
    107                                         ./objects/ParamObjects/DoubleParam.cpp\
    108                                         ./objects/ParamObjects/DoubleParam.h\
    109                                         ./objects/ParamObjects/PetscMatParam.cpp\
    110                                         ./objects/ParamObjects/PetscMatParam.h\
    111                                         ./objects/ParamObjects/StringArrayParam.cpp\
    112                                         ./objects/ParamObjects/StringArrayParam.h\
    113                                         ./objects/ParamObjects/DoubleMatParam.cpp\
    114                                         ./objects/ParamObjects/DoubleMatParam.h\
    115                                         ./objects/ParamObjects/DoubleVecParam.cpp\
    116                                         ./objects/ParamObjects/DoubleVecParam.h\
    117                                         ./objects/ParamObjects/PetscVecParam.cpp\
    118                                         ./objects/ParamObjects/PetscVecParam.h\
    119                                         ./objects/ParamObjects/StringParam.cpp\
    120                                         ./objects/ParamObjects/StringParam.h\
     61                                        ./objects/Elements/Tria.h\
     62                                        ./objects/Elements/Tria.cpp\
     63                                        ./objects/Inputs/Input.h\
     64                                        ./objects/Inputs/TriaVertexInput.h\
     65                                        ./objects/Inputs/TriaVertexInput.cpp\
     66                                        ./objects/Inputs/SingVertexInput.h\
     67                                        ./objects/Inputs/SingVertexInput.cpp\
     68                                        ./objects/Inputs/BeamVertexInput.h\
     69                                        ./objects/Inputs/BeamVertexInput.cpp\
     70                                        ./objects/Inputs/PentaVertexInput.h\
     71                                        ./objects/Inputs/PentaVertexInput.cpp\
     72                                        ./objects/Inputs/BoolInput.h\
     73                                        ./objects/Inputs/BoolInput.cpp\
     74                                        ./objects/Inputs/IntInput.h\
     75                                        ./objects/Inputs/IntInput.cpp\
     76                                        ./objects/Inputs/DoubleInput.h\
     77                                        ./objects/Inputs/DoubleInput.cpp\
     78                                        ./objects/Elements/Sing.h\
     79                                        ./objects/Elements/Sing.cpp\
     80                                        ./objects/Elements/Beam.h\
     81                                        ./objects/Elements/Beam.cpp\
     82                                        ./objects/Elements/Penta.h\
     83                                        ./objects/Elements/Penta.cpp\
     84                                        ./objects/Materials/Matice.h\
     85                                        ./objects/Materials/Matice.cpp\
     86                                        ./objects/Materials/Matpar.h\
     87                                        ./objects/Materials/Matpar.cpp\
     88                                        ./objects/Constraints/Spc.cpp\
     89                                        ./objects/Constraints/Spc.h\
     90                                        ./objects/Constraints/Rgb.cpp\
     91                                        ./objects/Constraints/Rgb.h\
     92                                        ./objects/Loads/Penpair.cpp\
     93                                        ./objects/Loads/Penpair.h\
     94                                        ./objects/Loads/Pengrid.cpp\
     95                                        ./objects/Loads/Pengrid.h\
     96                                        ./objects/Loads/Icefront.cpp\
     97                                        ./objects/Loads/Icefront.h\
     98                                        ./objects/Loads/Riftfront.cpp\
     99                                        ./objects/Loads/Riftfront.h\
     100                                        ./objects/Loads/Numericalflux.cpp\
     101                                        ./objects/Loads/Numericalflux.h\
     102                                        ./objects/Params/Param.h\
     103                                        ./objects/Params/BoolParam.cpp\
     104                                        ./objects/Params/BoolParam.h\
     105                                        ./objects/Params/IntParam.cpp\
     106                                        ./objects/Params/IntParam.h\
     107                                        ./objects/Params/DoubleParam.cpp\
     108                                        ./objects/Params/DoubleParam.h\
     109                                        ./objects/Params/PetscMatParam.cpp\
     110                                        ./objects/Params/PetscMatParam.h\
     111                                        ./objects/Params/StringArrayParam.cpp\
     112                                        ./objects/Params/StringArrayParam.h\
     113                                        ./objects/Params/DoubleMatParam.cpp\
     114                                        ./objects/Params/DoubleMatParam.h\
     115                                        ./objects/Params/DoubleVecParam.cpp\
     116                                        ./objects/Params/DoubleVecParam.h\
     117                                        ./objects/Params/PetscVecParam.cpp\
     118                                        ./objects/Params/PetscVecParam.h\
     119                                        ./objects/Params/StringParam.cpp\
     120                                        ./objects/Params/StringParam.h\
    121121                                        ./objects/NodeSets.cpp\
    122122                                        ./objects/NodeSets.h\
    123123                                        ./DataSet/DataSet.cpp\
    124124                                        ./DataSet/DataSet.h\
    125                                         ./DataSet/Inputs.cpp\
    126                                         ./DataSet/Inputs.h\
    127                                         ./DataSet/Parameters.cpp\
    128                                         ./DataSet/Parameters.h\
    129125                                        ./shared/shared.h\
    130126                                        ./shared/Alloc/alloc.h\
     
    228224                                        ./EnumDefinitions/EnumDefinitions.cpp\
    229225                                        ./ModelProcessorx/ModelProcessorx.h\
    230                                         ./ModelProcessorx/IoModel.h\
    231                                         ./ModelProcessorx/IoModel.cpp\
    232226                                        ./ModelProcessorx/Partitioning.cpp\
    233227                                        ./ModelProcessorx/CreateDataSets.cpp\
     
    456450                                        ./objects/Object.h\
    457451                                        ./objects/BamgGeom.h\
    458                                         ./objects/BamgGeom.cpp\
    459                                         ./objects/BamgMesh.h\
    460                                         ./objects/BamgMesh.cpp\
    461                                         ./objects/BamgOpts.h\
    462                                         ./objects/BamgOpts.cpp\
     452                                        ./objects/Bamg/BamgGeom.cpp\
     453                                        ./objects/Bamg/BamgMesh.h\
     454                                        ./objects/Bamg/BamgMesh.cpp\
     455                                        ./objects/Bamg/BamgOpts.h\
     456                                        ./objects/Bamg/BamgOpts.cpp\
    463457                                        ./objects/Element.h\
    464458                                        ./objects/Model.h\
     
    467461                                        ./objects/FemModel.cpp\
    468462                                        ./objects/Material.h\
    469                                         ./objects/Material.cpp\
    470463                                        ./objects/DofVec.h\
    471464                                        ./objects/DofVec.cpp\
    472465                                        ./objects/Load.h\
    473                                         ./objects/Load.cpp\
    474466                                        ./objects/SolverEnum.h\
    475467                                        ./objects/Contour.h\
     
    477469                                        ./objects/OptArgs.h\
    478470                                        ./objects/OptPars.h\
    479                                         ./objects/Friction.h\
    480                                         ./objects/Friction.cpp\
     471                                        ./objects/Loads/Friction.h\
     472                                        ./objects/Loads/Friction.cpp\
    481473                                        ./objects/DakotaPlugin.h\
    482474                                        ./objects/DakotaPlugin.cpp\
    483475                                        ./objects/DofIndexing.h\
    484476                                        ./objects/DofIndexing.cpp\
     477                                        ./objects/IoModel.h\
     478                                        ./objects/IoModel.cpp\
    485479                                        ./objects/Node.h\
    486480                                        ./objects/Node.cpp\
     
    491485                                        ./objects/Result.h\
    492486                                        ./objects/Result.cpp\
    493                                         ./objects/Tria.h\
    494                                         ./objects/Tria.cpp\
    495                                         ./objects/InputObjects/Input.h\
    496                                         ./objects/InputObjects/TriaVertexInput.h\
    497                                         ./objects/InputObjects/TriaVertexInput.cpp\
    498                                         ./objects/InputObjects/SingVertexInput.h\
    499                                         ./objects/InputObjects/SingVertexInput.cpp\
    500                                         ./objects/InputObjects/BeamVertexInput.h\
    501                                         ./objects/InputObjects/BeamVertexInput.cpp\
    502                                         ./objects/InputObjects/PentaVertexInput.h\
    503                                         ./objects/InputObjects/PentaVertexInput.cpp\
    504                                         ./objects/InputObjects/BoolInput.h\
    505                                         ./objects/InputObjects/BoolInput.cpp\
    506                                         ./objects/InputObjects/IntInput.h\
    507                                         ./objects/InputObjects/IntInput.cpp\
    508                                         ./objects/InputObjects/DoubleInput.h\
    509                                         ./objects/InputObjects/DoubleInput.cpp\
    510                                         ./objects/Sing.h\
    511                                         ./objects/Sing.cpp\
    512                                         ./objects/Beam.h\
    513                                         ./objects/Beam.cpp\
    514                                         ./objects/Penta.h\
    515                                         ./objects/Penta.cpp\
    516                                         ./objects/Matice.h\
    517                                         ./objects/Matice.cpp\
    518                                         ./objects/Matpar.h\
    519                                         ./objects/Matpar.cpp\
    520                                         ./objects/Spc.cpp\
    521                                         ./objects/Spc.h\
    522                                         ./objects/Rgb.cpp\
    523                                         ./objects/Rgb.h\
    524                                         ./objects/Penpair.cpp\
    525                                         ./objects/Penpair.h\
    526                                         ./objects/Pengrid.cpp\
    527                                         ./objects/Pengrid.h\
    528                                         ./objects/Icefront.cpp\
    529                                         ./objects/Icefront.h\
    530                                         ./objects/Riftfront.cpp\
    531                                         ./objects/Riftfront.h\
    532                                         ./objects/Numericalflux.cpp\
    533                                         ./objects/Numericalflux.h\
    534                                         ./objects/ParamObjects/Param.h\
    535                                         ./objects/ParamObjects/BoolParam.cpp\
    536                                         ./objects/ParamObjects/BoolParam.h\
    537                                         ./objects/ParamObjects/IntParam.cpp\
    538                                         ./objects/ParamObjects/IntParam.h\
    539                                         ./objects/ParamObjects/DoubleParam.cpp\
    540                                         ./objects/ParamObjects/DoubleParam.h\
    541                                         ./objects/ParamObjects/PetscMatParam.cpp\
    542                                         ./objects/ParamObjects/PetscMatParam.h\
    543                                         ./objects/ParamObjects/StringArrayParam.cpp\
    544                                         ./objects/ParamObjects/StringArrayParam.h\
    545                                         ./objects/ParamObjects/DoubleMatParam.cpp\
    546                                         ./objects/ParamObjects/DoubleMatParam.h\
    547                                         ./objects/ParamObjects/DoubleVecParam.cpp\
    548                                         ./objects/ParamObjects/DoubleVecParam.h\
    549                                         ./objects/ParamObjects/PetscVecParam.cpp\
    550                                         ./objects/ParamObjects/PetscVecParam.h\
    551                                         ./objects/ParamObjects/StringParam.cpp\
    552                                         ./objects/ParamObjects/StringParam.h\
     487                                        ./objects/Elements/Tria.h\
     488                                        ./objects/Elements/Tria.cpp\
     489                                        ./objects/Inputs/Input.h\
     490                                        ./objects/Inputs/TriaVertexInput.h\
     491                                        ./objects/Inputs/TriaVertexInput.cpp\
     492                                        ./objects/Inputs/SingVertexInput.h\
     493                                        ./objects/Inputs/SingVertexInput.cpp\
     494                                        ./objects/Inputs/BeamVertexInput.h\
     495                                        ./objects/Inputs/BeamVertexInput.cpp\
     496                                        ./objects/Inputs/PentaVertexInput.h\
     497                                        ./objects/Inputs/PentaVertexInput.cpp\
     498                                        ./objects/Inputs/BoolInput.h\
     499                                        ./objects/Inputs/BoolInput.cpp\
     500                                        ./objects/Inputs/IntInput.h\
     501                                        ./objects/Inputs/IntInput.cpp\
     502                                        ./objects/Inputs/DoubleInput.h\
     503                                        ./objects/Inputs/DoubleInput.cpp\
     504                                        ./objects/Elements/Sing.h\
     505                                        ./objects/Elements/Sing.cpp\
     506                                        ./objects/Elements/Beam.h\
     507                                        ./objects/Elements/Beam.cpp\
     508                                        ./objects/Elements/Penta.h\
     509                                        ./objects/Elements/Penta.cpp\
     510                                        ./objects/Materials/Matice.h\
     511                                        ./objects/Materials/Matice.cpp\
     512                                        ./objects/Materials/Matpar.h\
     513                                        ./objects/Materials/Matpar.cpp\
     514                                        ./objects/Constraints/Spc.cpp\
     515                                        ./objects/Constraints/Spc.h\
     516                                        ./objects/Constraints/Rgb.cpp\
     517                                        ./objects/Constraints/Rgb.h\
     518                                        ./objects/Loads/Penpair.cpp\
     519                                        ./objects/Loads/Penpair.h\
     520                                        ./objects/Loads/Pengrid.cpp\
     521                                        ./objects/Loads/Pengrid.h\
     522                                        ./objects/Loads/Icefront.cpp\
     523                                        ./objects/Loads/Icefront.h\
     524                                        ./objects/Loads/Riftfront.cpp\
     525                                        ./objects/Loads/Riftfront.h\
     526                                        ./objects/Loads/Numericalflux.cpp\
     527                                        ./objects/Loads/Numericalflux.h\
     528                                        ./objects/Params/Param.h\
     529                                        ./objects/Params/BoolParam.cpp\
     530                                        ./objects/Params/BoolParam.h\
     531                                        ./objects/Params/IntParam.cpp\
     532                                        ./objects/Params/IntParam.h\
     533                                        ./objects/Params/DoubleParam.cpp\
     534                                        ./objects/Params/DoubleParam.h\
     535                                        ./objects/Params/PetscMatParam.cpp\
     536                                        ./objects/Params/PetscMatParam.h\
     537                                        ./objects/Params/StringArrayParam.cpp\
     538                                        ./objects/Params/StringArrayParam.h\
     539                                        ./objects/Params/DoubleMatParam.cpp\
     540                                        ./objects/Params/DoubleMatParam.h\
     541                                        ./objects/Params/DoubleVecParam.cpp\
     542                                        ./objects/Params/DoubleVecParam.h\
     543                                        ./objects/Params/PetscVecParam.cpp\
     544                                        ./objects/Params/PetscVecParam.h\
     545                                        ./objects/Params/StringParam.cpp\
     546                                        ./objects/Params/StringParam.h\
    553547                                        ./objects/NodeSets.cpp\
    554548                                        ./objects/NodeSets.h\
    555549                                        ./DataSet/DataSet.cpp\
    556550                                        ./DataSet/DataSet.h\
    557                                         ./DataSet/Inputs.cpp\
    558                                         ./DataSet/Inputs.h\
    559                                         ./DataSet/Parameters.cpp\
    560                                         ./DataSet/Parameters.h\
    561551                                        ./shared/shared.h\
    562552                                        ./shared/Threads/issm_threads.h\
     
    657647                                        ./EnumDefinitions/EnumDefinitions.cpp\
    658648                                        ./ModelProcessorx/ModelProcessorx.h\
    659                                         ./ModelProcessorx/IoModel.h\
    660                                         ./ModelProcessorx/IoModel.cpp\
    661649                                        ./ModelProcessorx/Partitioning.cpp\
    662650                                        ./ModelProcessorx/CreateDataSets.cpp\
  • issm/trunk/src/c/ModelProcessorx/CreateDataSets.cpp

    r3673 r3685  
    99#endif
    1010
    11 #include "./IoModel.h"
     11#include "../objects/objects.h"
    1212#include "../shared/shared.h"
    1313#include "../include/macros.h"
  • issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp

    r3673 r3685  
    99#include "../shared/shared.h"
    1010#include "../MeshPartitionx/MeshPartitionx.h"
    11 #include "./IoModel.h"
    1211
    1312void CreateParameters(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle){
  • issm/trunk/src/c/ModelProcessorx/Partitioning.cpp

    r3673 r3685  
    1010
    1111#include <string.h>
    12 #include "./IoModel.h"
     12#include "../objects/objects.h"
    1313#include "../shared/shared.h"
    1414#include "../EnumDefinitions/EnumDefinitions.h"
    1515#include "../include/macros.h"
     16#include "../io/io.h"
    1617#include "../include/typedefs.h"
    1718#include "../MeshPartitionx/MeshPartitionx.h"
  • issm/trunk/src/c/io/FetchParams.cpp

    r3673 r3685  
    1212
    1313#include <mex.h>
    14 
    15 #include "../objects/Param.h"
    1614#include "./io.h"
     15#include "../objects/objects.h"
    1716#include "../shared/shared.h"
    1817#include "../include/macros.h"
     18#include "../EnumDefinitions/EnumDefinitions.h"
    1919
    2020void FetchParams(DataSet** pparameters, DataHandle dataref){
    2121
    2222        int i,j;
     23        int count;
    2324
    2425        /*output: */
  • issm/trunk/src/c/io/IoModelFetchData.cpp

    r3570 r3685  
    1010
    1111#include "./io.h"
    12 #include "../ModelProcessorx/IoModel.h"
    13 #include "../shared/shared.h"
    14 #include "../include/macros.h"
    1512
    1613#ifdef _SERIAL_
  • issm/trunk/src/c/io/WriteParams.cpp

    r3673 r3685  
    1313#include <mex.h>
    1414
    15 #include "../objects/Param.h"
    1615#include "./io.h"
     16#include "../objects/objects.h"
    1717#include "../shared/shared.h"
    1818#include "../include/macros.h"
  • issm/trunk/src/c/io/io.h

    r3673 r3685  
    33 */
    44
    5 #ifndef IO_H_
    6 #define IO_H_
     5#ifndef _IO_H_
     6#define _IO_H_
    77
    8 #include "../objects/NodeSets.h"
    9 #include "../objects/DofVec.h"
    10 #include "../objects/BamgMesh.h"
    11 #include "../objects/BamgGeom.h"
     8#include "../objects/objects.h"
    129#include "../DataSet/DataSet.h"
    1310#include "../include/types.h"
     
    5956#endif
    6057
    61 
    62 
    63 
    64 
    6558#ifdef _PARALLEL_
    6659void FetchData(double** pmatrix, int* pM,int* pN,FILE* fid);
     
    8376
    8477
    85 
    86 
    87 
    8878#endif  /* _IO_H_ */
  • issm/trunk/src/c/shared/Elements/GetVerticesCoordinates.cpp

    r3162 r3685  
    33 */
    44
    5 #include "../../objects/Node.h"
     5#include "../../objects/objects.h"
    66
    77int GetVerticesCoordinates( double* xyz,  Node** nodes, int numgrids){
  • issm/trunk/src/c/shared/Numerics/numerics.h

    r3673 r3685  
    88#include "./GaussPoints.h"
    99#include "./isnan.h"
    10 #include "../../objects/OptArgs.h"
    11 #include "../../objects/OptPars.h"
     10
     11struct OptArgs;
     12struct OptPars;
    1213
    1314double min(double a,double b);
Note: See TracChangeset for help on using the changeset viewer.