Ice Sheet System Model
4.18
Code documentation
src
c
modules
CreateNodalConstraintsx
CreateNodalConstraintsx.cpp
Go to the documentation of this file.
1
5
#include "
./CreateNodalConstraintsx.h
"
6
7
#include "../../shared/shared.h"
8
#include "../../toolkits/toolkits.h"
9
10
void
CreateNodalConstraintsx
(
Vector<IssmDouble>
** pys,
Nodes
* nodes){
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
Nodes
Declaration of Nodes class.
Definition:
Nodes.h:19
_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
CreateNodalConstraintsx.h
CreateNodalConstraintsx
void CreateNodalConstraintsx(Vector< IssmDouble > **pys, Nodes *nodes)
Definition:
CreateNodalConstraintsx.cpp:10
Node::CreateNodalConstraints
void CreateNodalConstraints(Vector< IssmDouble > *ys)
Definition:
Node.cpp:654
Nodes::NumberOfDofs
int NumberOfDofs(int setenum)
Definition:
Nodes.cpp:314
Vector< IssmDouble >
Generated on Thu Jul 2 2020 08:09:19 for Ice Sheet System Model by
1.8.19