source: issm/trunk-jpl/src/c/classes/objects/Node.h@ 13410

Last change on this file since 13410 was 13410, checked in by Mathieu Morlighem, 12 years ago

CHG: renaming vertex->dof vertex->pid for consistency (id, sid and pid) and cleaned up some code

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