[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;
|
---|
[14951] | 20 | class ElementVector;
|
---|
| 21 | class ElementMatrix;
|
---|
[12832] | 22 | #include "../Update.h"
|
---|
[3637] | 23 | /*}}}*/
|
---|
[1] | 24 |
|
---|
[4244] | 25 | class Node: public Object ,public Update{
|
---|
[1] | 26 |
|
---|
[7089] | 27 | public:
|
---|
[1] | 28 |
|
---|
[13413] | 29 | int id; //unique arbitrary id.
|
---|
| 30 | int sid; //"serial" id (rank of this node if the dataset was serial on 1 cpu)
|
---|
[13623] | 31 |
|
---|
[13413] | 32 | DofIndexing indexing;
|
---|
| 33 | Hook *hvertex;
|
---|
| 34 | Inputs *inputs; //properties of this node
|
---|
| 35 | int analysis_type;
|
---|
| 36 | IssmDouble coord_system[3][3];
|
---|
[1] | 37 |
|
---|
[12365] | 38 | /*Node constructors, destructors {{{*/
|
---|
[1] | 39 | Node();
|
---|
[4140] | 40 | Node(int node_id,int node_sid, int vertex_id,int io_index, IoModel* iomodel,int analysis_type);
|
---|
[1] | 41 | ~Node();
|
---|
[3417] | 42 | /*}}}*/
|
---|
[12365] | 43 | /*Object virtual functions definitions:{{{ */
|
---|
[13414] | 44 | void Echo();
|
---|
| 45 | void DeepEcho();
|
---|
| 46 | int Id();
|
---|
| 47 | int ObjectEnum();
|
---|
| 48 | Object *copy() {_error_("Not implemented yet (similar to Elements)"); };
|
---|
[4244] | 49 | /*}}}*/
|
---|
[12365] | 50 | /*Update virtual functions definitions: {{{*/
|
---|
[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 | #ifdef _HAVE_DIAGNOSTIC_
|
---|
[12322] | 70 | void GetCoordinateSystem(IssmDouble* coord_system_out);
|
---|
[10367] | 71 | #endif
|
---|
| 72 | bool InAnalysis(int analysis_type);
|
---|
| 73 | int GetApproximation();
|
---|
| 74 | int GetNumberOfDofs(int approximation_enum,int setenum);
|
---|
| 75 | int IsClone();
|
---|
[12322] | 76 | void ApplyConstraint(int dof,IssmDouble value);
|
---|
[10367] | 77 | void RelaxConstraint(int dof);
|
---|
| 78 | void DofInSSet(int dof);
|
---|
| 79 | void DofInFSet(int dof);
|
---|
| 80 | int GetDof(int dofindex,int setenum);
|
---|
[13216] | 81 | void CreateVecSets(Vector<IssmDouble>* pv_g,Vector<IssmDouble>* pv_f,Vector<IssmDouble>* pv_s);
|
---|
[10367] | 82 | int GetConnectivity();
|
---|
| 83 | void GetDofList(int* poutdoflist,int approximation_enum,int setenum);
|
---|
| 84 | void GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum);
|
---|
[13410] | 85 | int GetVertexId(void);
|
---|
| 86 | int GetVertexPid(void);
|
---|
| 87 | int GetVertexSid(void);
|
---|
[10367] | 88 | int IsOnBed();
|
---|
| 89 | int IsOnSurface();
|
---|
| 90 | void FreezeDof(int dof);
|
---|
| 91 | int IsFloating();
|
---|
| 92 | int IsGrounded();
|
---|
[12322] | 93 | void UpdateSpcs(IssmDouble* ys);
|
---|
[13216] | 94 | void VecMerge(Vector<IssmDouble>* ug, IssmDouble* vector_serial,int setenum);
|
---|
| 95 | void VecReduce(Vector<IssmDouble>* vector, IssmDouble* ug_serial,int setnum);
|
---|
[5772] | 96 | void DistributeDofs(int* pdofcount,int setenum);
|
---|
| 97 | void OffsetDofs(int dofcount,int setenum);
|
---|
| 98 | void ShowTrueDofs(int* truerows,int ncols,int setenum);
|
---|
| 99 | void UpdateCloneDofs(int* alltruerows,int ncols,int setenum);
|
---|
[3463] | 100 | void SetClone(int* minranks);
|
---|
| 101 | /*}}}*/
|
---|
[1] | 102 | };
|
---|
| 103 |
|
---|
[14951] | 104 | /*Methods inherent to Node: */
|
---|
| 105 | int* GetLocalDofList(Node** nodes,int numnodes,int setenum,int approximation);
|
---|
| 106 | int* GetGlobalDofList(Node** nodes,int numnodes,int setenum,int approximation);
|
---|
| 107 | int GetNumberOfDofs(Node** nodes,int numnodes,int setenum,int approximation);
|
---|
| 108 | #ifdef _HAVE_DIAGNOSTIC_
|
---|
| 109 | void TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum);
|
---|
| 110 | void TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array);
|
---|
| 111 | void TransformLoadVectorCoord(ElementVector* pe,Node** nodes,int numnodes,int cs_enum);
|
---|
| 112 | void TransformLoadVectorCoord(ElementVector* pe,Node** nodes,int numnodes,int* cs_array);
|
---|
| 113 | void TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int cs_enum);
|
---|
| 114 | void TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int* cs_array);
|
---|
| 115 | void TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum);
|
---|
| 116 | void TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array);
|
---|
| 117 | void CoordinateSystemTransform(IssmDouble** ptransform,Node** nodes,int numnodes,int* cs_array);
|
---|
| 118 | #endif
|
---|
| 119 |
|
---|
[1] | 120 | #endif /* _NODE_H_ */
|
---|