[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 |
|
---|
[13413] | 27 | int id; //unique arbitrary id.
|
---|
| 28 | int sid; //"serial" id (rank of this node if the dataset was serial on 1 cpu)
|
---|
[3417] | 29 |
|
---|
[13413] | 30 | DofIndexing indexing;
|
---|
| 31 | Hook *hvertex;
|
---|
| 32 | Inputs *inputs; //properties of this node
|
---|
| 33 | int analysis_type;
|
---|
| 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: {{{*/
|
---|
[12322] | 50 | void InputUpdateFromVector(IssmDouble* vector, int name, int type);
|
---|
[4091] | 51 | void InputUpdateFromVector(int* vector, int name, int type);
|
---|
| 52 | void InputUpdateFromVector(bool* vector, int name, int type);
|
---|
[12322] | 53 | void InputUpdateFromMatrixDakota(IssmDouble* matrix,int nrows, int ncols, int name, int type);
|
---|
| 54 | void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
|
---|
[5311] | 55 | void InputUpdateFromVectorDakota(int* vector, int name, int type);
|
---|
| 56 | void InputUpdateFromVectorDakota(bool* vector, int name, int type);
|
---|
[12322] | 57 | void InputUpdateFromConstant(IssmDouble constant, int name);
|
---|
[4079] | 58 | void InputUpdateFromConstant(int constant, int name);
|
---|
| 59 | void InputUpdateFromConstant(bool constant, int name);
|
---|
[13036] | 60 | void InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
|
---|
| 61 | void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("Not implemented yet!");}
|
---|
[3417] | 62 | /*}}}*/
|
---|
[12365] | 63 | /*Node numerical routines {{{*/
|
---|
[10367] | 64 | void Configure(DataSet* nodes,Vertices* vertices);
|
---|
[13216] | 65 | void CreateNodalConstraints(Vector<IssmDouble>* ys);
|
---|
[10367] | 66 | void SetCurrentConfiguration(DataSet* nodes,Vertices* vertices);
|
---|
| 67 | int Sid(void);
|
---|
| 68 | #ifdef _HAVE_DIAGNOSTIC_
|
---|
[12322] | 69 | void GetCoordinateSystem(IssmDouble* coord_system_out);
|
---|
[10367] | 70 | #endif
|
---|
| 71 | bool InAnalysis(int analysis_type);
|
---|
| 72 | int GetApproximation();
|
---|
| 73 | int GetNumberOfDofs(int approximation_enum,int setenum);
|
---|
| 74 | int IsClone();
|
---|
[12322] | 75 | void ApplyConstraint(int dof,IssmDouble value);
|
---|
[10367] | 76 | void RelaxConstraint(int dof);
|
---|
| 77 | void DofInSSet(int dof);
|
---|
| 78 | void DofInFSet(int dof);
|
---|
| 79 | int GetDof(int dofindex,int setenum);
|
---|
[13216] | 80 | void CreateVecSets(Vector<IssmDouble>* pv_g,Vector<IssmDouble>* pv_f,Vector<IssmDouble>* pv_s);
|
---|
[10367] | 81 | int GetConnectivity();
|
---|
| 82 | void GetDofList(int* poutdoflist,int approximation_enum,int setenum);
|
---|
| 83 | void GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum);
|
---|
[13410] | 84 | int GetVertexId(void);
|
---|
| 85 | int GetVertexPid(void);
|
---|
| 86 | int GetVertexSid(void);
|
---|
[12322] | 87 | IssmDouble GetX();
|
---|
| 88 | IssmDouble GetY();
|
---|
| 89 | IssmDouble GetZ();
|
---|
| 90 | IssmDouble GetSigma();
|
---|
[10367] | 91 | int IsOnBed();
|
---|
| 92 | int IsOnSurface();
|
---|
| 93 | void FreezeDof(int dof);
|
---|
| 94 | int IsFloating();
|
---|
| 95 | int IsGrounded();
|
---|
[12322] | 96 | void UpdateSpcs(IssmDouble* ys);
|
---|
[13216] | 97 | void VecMerge(Vector<IssmDouble>* ug, IssmDouble* vector_serial,int setenum);
|
---|
| 98 | void VecReduce(Vector<IssmDouble>* vector, IssmDouble* ug_serial,int setnum);
|
---|
[5772] | 99 | void DistributeDofs(int* pdofcount,int setenum);
|
---|
| 100 | void OffsetDofs(int dofcount,int setenum);
|
---|
| 101 | void ShowTrueDofs(int* truerows,int ncols,int setenum);
|
---|
| 102 | void UpdateCloneDofs(int* alltruerows,int ncols,int setenum);
|
---|
[3463] | 103 | void SetClone(int* minranks);
|
---|
| 104 | /*}}}*/
|
---|
[1] | 105 | };
|
---|
| 106 |
|
---|
| 107 | #endif /* _NODE_H_ */
|
---|