Changeset 25468


Ignore:
Timestamp:
08/25/20 13:57:17 (5 years ago)
Author:
Mathieu Morlighem
Message:

CHG: working on adding spcthickness as control in MC

Location:
issm/trunk-jpl/src/c/classes/Constraints
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp

    r24712 r25468  
    152152/*}}}*/
    153153
     154void SpcStatic::UpdateSpcThicknessAD(IssmDouble* vector,Nodes* nodes){/*{{{*/
     155
     156        /*Chase through nodes and find the node to which this SpcStatic applies: */
     157        Node* node=(Node*)nodes->GetObjectById(NULL,nodeid);
     158
     159        /*Apply constraint: */
     160        if(node){ //in case the spc is dealing with a node on another cpu
     161                int sid = node->Sid();
     162                this->value = vector[sid];
     163                _assert_(!xIsNan<IssmDouble>(this->value));
     164        }
     165}
     166/*}}}*/
     167
    154168/*SpcStatic functions*/
    155169int        SpcStatic::GetDof(){/*{{{*/
  • issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.h

    r24712 r25468  
    1414
    1515        private:
    16                 int        id;             /*! id, to track it */
    17                 int        nodeid;          /*!node id          */
    18                 int        dof;             /*!component        */
    19                 IssmDouble value;           /*value             */
     16                int        id;
     17                int        nodeid;
     18                int        dof;
     19                IssmDouble value;
    2020                int        analysis_type;
    21                 bool       penalty;         /*Is this a penalty constraint */
     21                bool       penalty;
    2222
    2323        public:
     
    4747                IssmDouble GetValue();
    4848                /*}}}*/
     49                void UpdateSpcThicknessAD(IssmDouble* vector,Nodes* nodes);
    4950
    5051};
Note: See TracChangeset for help on using the changeset viewer.