Ice Sheet System Model  4.18
Code documentation
Functions
CreateNodalConstraintsx.h File Reference
#include "../../classes/classes.h"

Go to the source code of this file.

Functions

void CreateNodalConstraintsx (Vector< IssmDouble > **pys, Nodes *nodes)
 

Function Documentation

◆ CreateNodalConstraintsx()

void CreateNodalConstraintsx ( Vector< IssmDouble > **  pys,
Nodes nodes 
)

Definition at line 10 of file CreateNodalConstraintsx.cpp.

10  {
11 
12  bool oldalloc = false;
13 
14  /*output: */
15  Vector<IssmDouble>* ys=NULL;
16  int ssize;
17  int slocalsize;
18 
19  if(VerboseModule()) _printf0_(" Create nodal constraints\n");
20 
21  /*figure out how many dofs we have: */
22  ssize=nodes->NumberOfDofs(SsetEnum);
23  slocalsize = nodes->NumberOfDofsLocal(SsetEnum);
24 
25  /*allocate:*/
26  if(oldalloc)
27  ys=new Vector<IssmDouble>(ssize);
28  else
29  ys=new Vector<IssmDouble>(slocalsize,ssize);
30 
31  /*go through all nodes, and for the ones corresponding to this configuration_type, fill the
32  * constraints vector with the constraint values: */
33  for(int i=0;i<nodes->Size();i++){
34  Node* node=(Node*)nodes->GetObjectByOffset(i);
35  node->CreateNodalConstraints(ys);
36  }
37 
38  /*Assemble: */
39  ys->Assemble();
40 
41  /*Assign output pointers: */
42  *pys=ys;
43 }
DataSet::Size
int Size()
Definition: DataSet.cpp:399
_printf0_
#define _printf0_(StreamArgs)
Definition: Print.h:29
SsetEnum
@ SsetEnum
Definition: EnumDefinitions.h:1282
VerboseModule
bool VerboseModule(void)
Definition: Verbosity.cpp:23
Nodes::NumberOfDofsLocal
int NumberOfDofsLocal(int setenum)
Definition: Nodes.cpp:326
Vector::Assemble
void Assemble(void)
Definition: Vector.h:142
Node
Definition: Node.h:23
DataSet::GetObjectByOffset
Object * GetObjectByOffset(int offset)
Definition: DataSet.cpp:334
Node::CreateNodalConstraints
void CreateNodalConstraints(Vector< IssmDouble > *ys)
Definition: Node.cpp:654
Nodes::NumberOfDofs
int NumberOfDofs(int setenum)
Definition: Nodes.cpp:314
Vector< IssmDouble >