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

Last change on this file since 14951 was 14951, checked in by Eric.Larour, 12 years ago

CHG: de-entangle dependencies between Containers and shared/Elements

File size: 4.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;
20class ElementVector;
21class ElementMatrix;
22#include "../Update.h"
23/*}}}*/
24
25class Node: public Object ,public Update{
26
27 public:
28
29 int id; //unique arbitrary id.
30 int sid; //"serial" id (rank of this node if the dataset was serial on 1 cpu)
31
32 DofIndexing indexing;
33 Hook *hvertex;
34 Inputs *inputs; //properties of this node
35 int analysis_type;
36 IssmDouble coord_system[3][3];
37
38 /*Node constructors, destructors {{{*/
39 Node();
40 Node(int node_id,int node_sid, int vertex_id,int io_index, IoModel* iomodel,int analysis_type);
41 ~Node();
42 /*}}}*/
43 /*Object virtual functions definitions:{{{ */
44 void Echo();
45 void DeepEcho();
46 int Id();
47 int ObjectEnum();
48 Object *copy() {_error_("Not implemented yet (similar to Elements)"); };
49 /*}}}*/
50 /*Update virtual functions definitions: {{{*/
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 int IsOnBed();
89 int IsOnSurface();
90 void FreezeDof(int dof);
91 int IsFloating();
92 int IsGrounded();
93 void UpdateSpcs(IssmDouble* ys);
94 void VecMerge(Vector<IssmDouble>* ug, IssmDouble* vector_serial,int setenum);
95 void VecReduce(Vector<IssmDouble>* vector, IssmDouble* ug_serial,int setnum);
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);
100 void SetClone(int* minranks);
101 /*}}}*/
102};
103
104/*Methods inherent to Node: */
105int* GetLocalDofList(Node** nodes,int numnodes,int setenum,int approximation);
106int* GetGlobalDofList(Node** nodes,int numnodes,int setenum,int approximation);
107int GetNumberOfDofs(Node** nodes,int numnodes,int setenum,int approximation);
108#ifdef _HAVE_DIAGNOSTIC_
109void TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum);
110void TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array);
111void TransformLoadVectorCoord(ElementVector* pe,Node** nodes,int numnodes,int cs_enum);
112void TransformLoadVectorCoord(ElementVector* pe,Node** nodes,int numnodes,int* cs_array);
113void TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int cs_enum);
114void TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int* cs_array);
115void TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum);
116void TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array);
117void CoordinateSystemTransform(IssmDouble** ptransform,Node** nodes,int numnodes,int* cs_array);
118#endif
119
120#endif /* _NODE_H_ */
Note: See TracBrowser for help on using the repository browser.