source: issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.m@ 19984

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

CHG: new sea level rise solution. Not valdated yet!

This solution requires one Sealevelrise analysis (so added the corresponding EnumToAnalysis and analysis.h files + SealevelriseAnalysis.* files).
In terms of solution core: we have a new sealevelrise_core.cpp files + corresponding hook up in CorePointerFromSolutionEnum.
This core calls the new FemModel Sealevelrise module, which loops through the elements, hence the mods to Element.* along with all
derivatives classes, in particular Tria.
In terms of ModelProcessorx, we have a modified CreateElementsVerticesAndMaterials to include lat,long and radius, which also translsates
into modifications for the Vertex object. The VertexCoordinatesx module is also modified, to be able to retrieve x,y,z but also lat,long,r
from vertices.
Of course, this is all driven from matlab, where we have a new field in the model, the slr class.

File size: 3.1 KB
RevLine 
[2326]1function ismodelselfconsistent(md),
[1]2%ISMODELSELFCONSISTENT - check that model forms a closed form solvable problem.
3%
4% Usage:
[2326]5% ismodelselfconsistent(md),
[1]6
[9730]7%initialize consistency as true
[12664]8md.private.isconsistent=true;
[9730]9
[9853]10%Get solution and associated analyses
11solution=md.private.solution;
[16529]12[analyses]=AnalysisConfiguration(solution);
[9853]13
[12755]14%Go through a model field, check that it is a class, and call checkconsistency
[11221]15fields=properties('model');
[9739]16for i=1:length(fields),
17 field=fields{i};
[9853]18
19 %Some properties do not need to be checked
[9751]20 if ismember(field,{'results' 'debug' 'radaroverlay'}),
[9739]21 continue;
22 end
[9853]23
24 %Check that current field is an object
[9739]25 if ~isobject(md.(field))
[12664]26 md=checkmessage(md,['field ''' char(field) ''' is not an object']);
[16821]27 continue;
[9739]28 end
[9853]29
30 %Check consistency of the object
[13729]31 md=checkconsistency(md.(field),md,solution,analyses);
[9732]32end
33
[9730]34%error message if mode is not consistent
[12664]35if md.private.isconsistent==false,
36 error('Model not consistent, see messages above');
[9730]37end
[13005]38end
39
[16529]40function [analyses]=AnalysisConfiguration(solutiontype), % {{{
[13005]41%ANALYSISCONFIGURATION - return type of analyses, number of analyses
42%
43% Usage:
[16529]44% [analyses]=AnalysisConfiguration(solutiontype);
[13005]45
46switch solutiontype,
47
[15771]48 case StressbalanceSolutionEnum(),
[16529]49 analyses=[StressbalanceAnalysisEnum();StressbalanceVerticalAnalysisEnum();StressbalanceSIAAnalysisEnum();L2ProjectionBaseAnalysisEnum()];
[13005]50
[13043]51 case SteadystateSolutionEnum(),
[16529]52 analyses=[StressbalanceAnalysisEnum();StressbalanceVerticalAnalysisEnum();StressbalanceSIAAnalysisEnum();L2ProjectionBaseAnalysisEnum();ThermalAnalysisEnum();MeltingAnalysisEnum()];
[13005]53
[13043]54 case ThermalSolutionEnum(),
[16470]55 analyses=[EnthalpyAnalysisEnum;ThermalAnalysisEnum();MeltingAnalysisEnum()];
[13005]56
[15767]57 case MasstransportSolutionEnum(),
58 analyses=[MasstransportAnalysisEnum()];
[13005]59
[13043]60 case BalancethicknessSolutionEnum(),
61 analyses=[BalancethicknessAnalysisEnum()];
[13005]62
[17831]63 case Balancethickness2SolutionEnum(),
64 analyses=[Balancethickness2AnalysisEnum()];
65
[15339]66 case BalancethicknessSoftSolutionEnum(),
[14162]67 analyses=[BalancethicknessAnalysisEnum()];
68
[16008]69 case BalancevelocitySolutionEnum(),
70 analyses=[BalancevelocityAnalysisEnum()];
71
[13043]72 case SurfaceSlopeSolutionEnum(),
[16529]73 analyses=[L2ProjectionBaseAnalysisEnum()];
[13005]74
[13043]75 case BedSlopeSolutionEnum(),
[16529]76 analyses=[L2ProjectionBaseAnalysisEnum()];
[15106]77
[14538]78 case GiaSolutionEnum(),
79 analyses=[GiaAnalysisEnum()];
[13005]80
[13043]81 case TransientSolutionEnum(),
[19744]82 analyses=[StressbalanceAnalysisEnum();StressbalanceVerticalAnalysisEnum();StressbalanceSIAAnalysisEnum();L2ProjectionBaseAnalysisEnum();ThermalAnalysisEnum();MeltingAnalysisEnum();EnthalpyAnalysisEnum();MasstransportAnalysisEnum();HydrologySommersAnalysisEnum];
[13005]83
[13043]84 case FlaimSolutionEnum(),
85 analyses=[FlaimAnalysisEnum()];
[13005]86
[19984]87 case SealevelriseSolutionEnum(),
88 analyses=[SealevelriseAnalysisEnum()];
89
[13043]90 case HydrologySolutionEnum(),
[16529]91 analyses=[L2ProjectionBaseAnalysisEnum();HydrologyShreveAnalysisEnum();HydrologyDCInefficientAnalysisEnum();HydrologyDCEfficientAnalysisEnum()];
[16181]92
93 case DamageEvolutionSolutionEnum(),
94 analyses=[DamageEvolutionAnalysisEnum()];
[13005]95
96 otherwise
97 error('%s%s%s',' solution type: ',EnumToString(solutiontype),' not supported yet!');
98
[13018]99 end
[13005]100end % }}}
Note: See TracBrowser for help on using the repository browser.