 |
Ice Sheet System Model
4.18
Code documentation
|
Go to the documentation of this file.
5 #include "../../bamg/bamgobjects.h"
6 #include "../../shared/shared.h"
7 #include "../../toolkits/toolkits.h"
23 double hminaniso=1e-100;
29 coef =bamgopts->
coeff;
34 if (bamgopts->
metric==NULL) nbsmooth=0;
41 if (verbosity>0)
_printf_(
"Construction of a mesh from a given geometry\n");
42 if (verbosity>1)
_printf_(
" Processing geometry...\n");
50 if (verbosity>1)
_printf_(
" Generating Metric...\n");
51 for(i=0;i<Gh.
nbv;i++){
60 if (verbosity>1)
_printf_(
" Generating Mesh...\n");
61 Mesh Th(maxnbv,Gh,bamgopts);
73 if (verbosity>1)
_printf_(
" Write Mesh...\n");
75 if (verbosity>1)
_printf_(
" Write Geometry...\n");
87 if (verbosity>0)
_printf_(
"Anisotropic mesh adaptation\n");
88 if (verbosity>1)
_printf_(
" Processing initial mesh and geometry...\n");
89 Mesh BTh(bamggeom_in,bamgmesh_in,bamgopts);
100 if (verbosity>1)
_printf_(
" Processing Metric...\n");
104 if (verbosity>1)
_printf_(
" Generating initial Metric...\n");
106 for (
int iv=0;iv<BTh.
nbv;iv++) BTh[iv].m = Mhmax;
110 if (bamgopts->
field){
111 if (verbosity>1)
_printf_(
" Merge metric with field provided...\n");
117 if (verbosity>1)
_printf_(
" Merging Metric with hVertices...\n");
118 for (i=0;i<BTh.
nbv;i++){
119 if (!xIsNan<IssmPDouble>(bamgopts->
hVertices[i])){
127 if (verbosity>1)
_printf_(
" Merging Metric with hminVertices...\n");
128 for (i=0;i<BTh.
nbv;i++){
140 if (verbosity>1)
_printf_(
" Merging Metric with hmaxVertices...\n");
141 for (i=0;i<BTh.
nbv;i++){
161 if (verbosity>1)
_printf_(
" Generating Mesh...\n");
164 if (Thr != &BTh)
delete Thr;
183 if (verbosity>1)
_printf_(
" Write Mesh...\n");
185 if (verbosity>1)
_printf_(
" Write Geometry...\n");
187 if (verbosity>1)
_printf_(
" Write Metric...\n");
197 if (verbosity>1)
_printf_(
" Exiting Bamg.\n");
#define _printf_(StreamArgs)
void CrackMesh(BamgOpts *bamgopts)
T Max(const T &a, const T &b)
void SmoothMetric(BamgOpts *bamgopts, double raisonmax)
void BoundAnisotropy(BamgOpts *bamgopts, double anisomax, double hminaniso=1e-100)
void WriteMetric(BamgOpts *bamgopts)
void MaxSubDivision(BamgOpts *bamgopts, double maxsubdiv)
void SmoothingVertex(BamgOpts *bamgopts, int=3, double=0.3)
void WriteGeometry(BamgGeom *bamggeom, BamgOpts *bamgopts)
void ReadMetric(const BamgOpts *bamgopts)
long SplitInternalEdgeWithBorderVertices()
void WriteMesh(BamgMesh *bamgmesh, BamgOpts *bamgopts)
void AddMetric(BamgOpts *bamgopts)
header file for Bamg module
T Min(const T &a, const T &b)
int Bamgx(BamgMesh *bamgmesh_out, BamgGeom *bamggeom_out, BamgMesh *bamgmesh_in, BamgGeom *bamggeom_in, BamgOpts *bamgopts)
void TrianglesRenumberBySubDomain(bool justcompress=false)