 |
Ice Sheet System Model
4.18
Code documentation
|
#include <UzawaPressureAnalysis.h>
|
void | CreateConstraints (Constraints *constraints, IoModel *iomodel) |
|
void | CreateLoads (Loads *loads, IoModel *iomodel) |
|
void | CreateNodes (Nodes *nodes, IoModel *iomodel, bool isamr=false) |
|
int | DofsPerNode (int **doflist, int domaintype, int approximation) |
|
void | UpdateElements (Elements *elements, Inputs2 *inputs2, IoModel *iomodel, int analysis_counter, int analysis_type) |
|
void | UpdateParameters (Parameters *parameters, IoModel *iomodel, int solution_enum, int analysis_enum) |
|
void | Core (FemModel *femmodel) |
|
ElementVector * | CreateDVector (Element *element) |
|
ElementMatrix * | CreateJacobianMatrix (Element *element) |
|
ElementMatrix * | CreateKMatrix (Element *element) |
|
ElementVector * | CreatePVector (Element *element) |
|
void | GetM (IssmDouble *M, Element *element, Gauss *gauss) |
|
void | GetSolutionFromInputs (Vector< IssmDouble > *solution, Element *element) |
|
void | GradientJ (Vector< IssmDouble > *gradient, Element *element, int control_type, int control_index) |
|
void | InputUpdateFromSolution (IssmDouble *solution, Element *element) |
|
void | UpdateConstraints (FemModel *femmodel) |
|
virtual | ~Analysis () |
|
Definition at line 11 of file UzawaPressureAnalysis.h.
◆ CreateConstraints()
void UzawaPressureAnalysis::CreateConstraints |
( |
Constraints * |
constraints, |
|
|
IoModel * |
iomodel |
|
) |
| |
|
virtual |
◆ CreateLoads()
void UzawaPressureAnalysis::CreateLoads |
( |
Loads * |
loads, |
|
|
IoModel * |
iomodel |
|
) |
| |
|
virtual |
◆ CreateNodes()
void UzawaPressureAnalysis::CreateNodes |
( |
Nodes * |
nodes, |
|
|
IoModel * |
iomodel, |
|
|
bool |
isamr = false |
|
) |
| |
|
virtual |
◆ DofsPerNode()
int UzawaPressureAnalysis::DofsPerNode |
( |
int ** |
doflist, |
|
|
int |
domaintype, |
|
|
int |
approximation |
|
) |
| |
|
virtual |
◆ UpdateElements()
void UzawaPressureAnalysis::UpdateElements |
( |
Elements * |
elements, |
|
|
Inputs2 * |
inputs2, |
|
|
IoModel * |
iomodel, |
|
|
int |
analysis_counter, |
|
|
int |
analysis_type |
|
) |
| |
|
virtual |
◆ UpdateParameters()
void UzawaPressureAnalysis::UpdateParameters |
( |
Parameters * |
parameters, |
|
|
IoModel * |
iomodel, |
|
|
int |
solution_enum, |
|
|
int |
analysis_enum |
|
) |
| |
|
virtual |
◆ Core()
void UzawaPressureAnalysis::Core |
( |
FemModel * |
femmodel | ) |
|
|
virtual |
◆ CreateDVector()
◆ CreateJacobianMatrix()
◆ CreateKMatrix()
Implements Analysis.
Definition at line 72 of file UzawaPressureAnalysis.cpp.
101 for(
int iv=0;iv<numvertices;iv++){
103 Ke->
values[iv*numvertices+iv]=1./connectivity;
108 xDelete<IssmDouble>(xyz_list);
109 xDelete<IssmDouble>(M);
◆ CreatePVector()
Implements Analysis.
Definition at line 112 of file UzawaPressureAnalysis.cpp.
127 IssmDouble *basis = xNew<IssmDouble>(numnodes);
138 for(
int ig=gauss->
begin();ig<gauss->end();ig++){
150 if (dim==3) divu=divu+dvz[2];
152 for(
int i=0;i<numnodes;i++){
153 pe->
values[i] += - rhop * divu * Jdet * gauss->
weight * basis[i];
159 xDelete<IssmDouble>(xyz_list);
160 xDelete<IssmDouble>(basis);
◆ GetM()
◆ GetSolutionFromInputs()
◆ GradientJ()
void UzawaPressureAnalysis::GradientJ |
( |
Vector< IssmDouble > * |
gradient, |
|
|
Element * |
element, |
|
|
int |
control_type, |
|
|
int |
control_index |
|
) |
| |
|
virtual |
◆ InputUpdateFromSolution()
void UzawaPressureAnalysis::InputUpdateFromSolution |
( |
IssmDouble * |
solution, |
|
|
Element * |
element |
|
) |
| |
|
virtual |
Implements Analysis.
Definition at line 187 of file UzawaPressureAnalysis.cpp.
199 else _error_(
"finite element not supported yet");
205 IssmDouble* values = xNew<IssmDouble>(numnodes);
206 IssmDouble* valueslambda = xNewZeroInit<IssmDouble>(numnodessigma);
207 IssmDouble* pressure = xNew<IssmDouble>(numnodes);
215 for(
int i=0;i<numnodes;i++){
216 values[i] = pressure[i] + solution[doflist[i]];
223 if(dim==3)
_error_(
"not implemented yet");
232 IssmDouble* vertexonbase = xNew<IssmDouble>(numnodessigma);
236 IssmDouble* basis = xNewZeroInit<IssmDouble>(numnodessigma);
238 element->
NormalBase(&bed_normal[0],xyz_list_base);
241 for(
int i=0;i<numnodessigma;i++){
244 if(vertexonbase[i]==1){
249 if(onbase!=3)
_error_(
"basal nodes of element not found");
253 for(
int ig=gauss->
begin();ig<gauss->end();ig++){
259 for(
int i=0;i<3;i++){
260 for(
int j=0;j<3;j++){
261 Jlambda[i][j] += Jdet*gauss->
weight*basis[baselist[i]]*basis[baselist[j]];
268 un=bed_normal[0]*vx + bed_normal[1]*vy;
269 for(
int i=0;i<3;i++) Cuk[i] += - un*rholambda*Jdet*gauss->
weight*basis[baselist[i]];
276 for(
int i=0;i<3;i++){
279 valueslambda[baselist[i]] = sigmann + deltalambda[i];
283 xDelete<IssmDouble>(vertexonbase);
284 xDelete<IssmDouble>(xyz_list_base);
285 xDelete<IssmDouble>(basis);
291 xDelete<IssmDouble>(values);
292 xDelete<IssmDouble>(valueslambda);
293 xDelete<IssmDouble>(pressure);
294 xDelete<int>(doflist);
◆ UpdateConstraints()
void UzawaPressureAnalysis::UpdateConstraints |
( |
FemModel * |
femmodel | ) |
|
|
virtual |
The documentation for this class was generated from the following files:
virtual int GetElementType(void)=0
void GetInputListOnNodes(IssmDouble *pvalue, int enumtype)
virtual int GetNumberOfNodes(void)=0
void FindParam(bool *pvalue, int paramenum)
virtual Gauss * NewGaussBase(int order)=0
void CreateNodes(Nodes *nodes, IoModel *iomodel, bool isamr=false)
virtual void GaussNode(int finitelement, int iv)=0
virtual void JacobianDeterminantBase(IssmDouble *Jdet, IssmDouble *xyz_list_base, Gauss *gauss)=0
virtual void NormalBase(IssmDouble *normal, IssmDouble *xyz_list)=0
void AddObject(Param *newparam)
virtual Input2 * GetInput2(int inputenum)=0
virtual void NodalFunctions(IssmDouble *basis, Gauss *gauss)=0
@ UzawaPressureAnalysisEnum
ElementVector * NewElementVector(int approximation_enum=NoneApproximationEnum)
Param * CopyConstantObject(const char *constant_name, int param_enum)
virtual void AddInput2(int input_enum, IssmDouble *values, int interpolation_enum)
virtual Gauss * NewGauss(void)=0
void FindConstant(bool *pvalue, const char *constant_name)
void GetVerticesCoordinates(IssmDouble **xyz_list)
void GetDofListLocal(int **pdoflist, int approximation_enum, int setenum)
virtual void GetVerticesCoordinatesBase(IssmDouble **xyz_list)=0
#define _error_(StreamArgs)
virtual int begin(void)=0
Object * GetObjectByOffset(int offset)
virtual void NodalFunctionsP2(IssmDouble *basis, Gauss *gauss)=0
virtual void JacobianDeterminant(IssmDouble *Jdet, IssmDouble *xyz_list, Gauss *gauss)=0
virtual void GaussPoint(int ig)=0
virtual void Update(Inputs2 *inputs2, int index, IoModel *iomodel, int analysis_counter, int analysis_type, int finite_element)=0
void FetchDataToInput(Inputs2 *inputs2, Elements *elements, const char *vector_name, int input_enum)
virtual int VertexConnectivity(int vertexindex)=0
void Matrix3x3Solve(IssmDouble *X, IssmDouble *A, IssmDouble *B)
virtual int GetNumberOfVertices(void)=0
@ AugmentedLagrangianRhopEnum
@ AugmentedLagrangianRholambdaEnum
ElementMatrix * NewElementMatrix(int approximation_enum=NoneApproximationEnum)