[1] | 1 | /*!\file Node.h
|
---|
| 2 | * \brief: header file for node object
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 | #ifndef _NODE_H_
|
---|
| 6 | #define _NODE_H_
|
---|
| 7 |
|
---|
[3637] | 8 | /*Headers:*/
|
---|
[12365] | 9 | /*{{{*/
|
---|
[1] | 10 | #include "./Object.h"
|
---|
[12832] | 11 | #include "../../shared/shared.h"
|
---|
| 12 | #include "../DofIndexing.h"
|
---|
[3681] | 13 | class Inputs;
|
---|
| 14 | class Hook;
|
---|
[3969] | 15 | class IoModel;
|
---|
[3681] | 16 | class DataSet;
|
---|
[4213] | 17 | class Vertices;
|
---|
[13216] | 18 | template <class doubletype> class Vector;
|
---|
| 19 | template <class doubletype> class Matrix;
|
---|
[12832] | 20 | #include "../Update.h"
|
---|
[3637] | 21 | /*}}}*/
|
---|
[1] | 22 |
|
---|
[4244] | 23 | class Node: public Object ,public Update{
|
---|
[1] | 24 |
|
---|
[7089] | 25 | public:
|
---|
[1] | 26 |
|
---|
[4140] | 27 | int id; //unique arbitrary id.
|
---|
| 28 | int sid; //sid for "serial" id, ie the rank of this node in the nodes dataset, if the dataset was serial on 1 cpu.
|
---|
[3417] | 29 |
|
---|
| 30 | DofIndexing indexing;
|
---|
[4396] | 31 | Hook* hvertex;
|
---|
[3984] | 32 | Inputs* inputs; //properties of this node
|
---|
| 33 | int analysis_type;
|
---|
[12322] | 34 | IssmDouble coord_system[3][3];
|
---|
[1] | 35 |
|
---|
[12365] | 36 | /*Node constructors, destructors {{{*/
|
---|
[1] | 37 | Node();
|
---|
[4140] | 38 | Node(int node_id,int node_sid, int vertex_id,int io_index, IoModel* iomodel,int analysis_type);
|
---|
[1] | 39 | ~Node();
|
---|
[3417] | 40 | /*}}}*/
|
---|
[12365] | 41 | /*Object virtual functions definitions:{{{ */
|
---|
[4248] | 42 | void Echo();
|
---|
[803] | 43 | void DeepEcho();
|
---|
[4248] | 44 | int Id();
|
---|
| 45 | int MyRank();
|
---|
[9883] | 46 | int ObjectEnum();
|
---|
[13036] | 47 | Object* copy(){_error_("Not implemented yet (similar to Elements)");};
|
---|
[4244] | 48 | /*}}}*/
|
---|
[12365] | 49 | /*Update virtual functions definitions: {{{*/
|
---|
[8240] | 50 |
|
---|
[12322] | 51 | void InputUpdateFromVector(IssmDouble* vector, int name, int type);
|
---|
[4091] | 52 | void InputUpdateFromVector(int* vector, int name, int type);
|
---|
| 53 | void InputUpdateFromVector(bool* vector, int name, int type);
|
---|
[12322] | 54 | void InputUpdateFromMatrixDakota(IssmDouble* matrix,int nrows, int ncols, int name, int type);
|
---|
| 55 | void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
|
---|
[5311] | 56 | void InputUpdateFromVectorDakota(int* vector, int name, int type);
|
---|
| 57 | void InputUpdateFromVectorDakota(bool* vector, int name, int type);
|
---|
[12322] | 58 | void InputUpdateFromConstant(IssmDouble constant, int name);
|
---|
[4079] | 59 | void InputUpdateFromConstant(int constant, int name);
|
---|
| 60 | void InputUpdateFromConstant(bool constant, int name);
|
---|
[13036] | 61 | void InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
|
---|
| 62 | void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("Not implemented yet!");}
|
---|
[3417] | 63 | /*}}}*/
|
---|
[12365] | 64 | /*Node numerical routines {{{*/
|
---|
[10367] | 65 | void Configure(DataSet* nodes,Vertices* vertices);
|
---|
[13216] | 66 | void CreateNodalConstraints(Vector<IssmDouble>* ys);
|
---|
[10367] | 67 | void SetCurrentConfiguration(DataSet* nodes,Vertices* vertices);
|
---|
| 68 | int Sid(void);
|
---|
| 69 | int GetVertexDof(void);
|
---|
| 70 | int GetVertexId(void);
|
---|
| 71 | #ifdef _HAVE_DIAGNOSTIC_
|
---|
[12322] | 72 | void GetCoordinateSystem(IssmDouble* coord_system_out);
|
---|
[10367] | 73 | #endif
|
---|
| 74 | void SetVertexDof(int in_dof);
|
---|
| 75 | bool InAnalysis(int analysis_type);
|
---|
| 76 | int GetApproximation();
|
---|
| 77 | int GetNumberOfDofs(int approximation_enum,int setenum);
|
---|
| 78 | int IsClone();
|
---|
[12322] | 79 | void ApplyConstraint(int dof,IssmDouble value);
|
---|
[10367] | 80 | void RelaxConstraint(int dof);
|
---|
| 81 | void DofInSSet(int dof);
|
---|
| 82 | void DofInFSet(int dof);
|
---|
| 83 | int GetDof(int dofindex,int setenum);
|
---|
[13216] | 84 | void CreateVecSets(Vector<IssmDouble>* pv_g,Vector<IssmDouble>* pv_f,Vector<IssmDouble>* pv_s);
|
---|
[10367] | 85 | int GetConnectivity();
|
---|
| 86 | void GetDofList(int* poutdoflist,int approximation_enum,int setenum);
|
---|
| 87 | void GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum);
|
---|
| 88 | int GetDofList1(void);
|
---|
| 89 | int GetSidList(void);
|
---|
[12322] | 90 | IssmDouble GetX();
|
---|
| 91 | IssmDouble GetY();
|
---|
| 92 | IssmDouble GetZ();
|
---|
| 93 | IssmDouble GetSigma();
|
---|
[10367] | 94 | int IsOnBed();
|
---|
| 95 | int IsOnSurface();
|
---|
| 96 | void FreezeDof(int dof);
|
---|
| 97 | int IsFloating();
|
---|
| 98 | int IsGrounded();
|
---|
[12322] | 99 | void UpdateSpcs(IssmDouble* ys);
|
---|
[13216] | 100 | void VecMerge(Vector<IssmDouble>* ug, IssmDouble* vector_serial,int setenum);
|
---|
| 101 | void VecReduce(Vector<IssmDouble>* vector, IssmDouble* ug_serial,int setnum);
|
---|
[8800] | 102 |
|
---|
[3417] | 103 | /*}}}*/
|
---|
[12365] | 104 | /*Dof Object routines {{{*/
|
---|
[5772] | 105 | void DistributeDofs(int* pdofcount,int setenum);
|
---|
| 106 | void OffsetDofs(int dofcount,int setenum);
|
---|
| 107 | void ShowTrueDofs(int* truerows,int ncols,int setenum);
|
---|
| 108 | void UpdateCloneDofs(int* alltruerows,int ncols,int setenum);
|
---|
[3463] | 109 | void SetClone(int* minranks);
|
---|
| 110 | /*}}}*/
|
---|
[1] | 111 | };
|
---|
| 112 |
|
---|
| 113 | #endif /* _NODE_H_ */
|
---|