Skip to content

Commit

Permalink
NormalsRegularizationBorders: Added ellipsoid parameters for border.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmayerguerr committed Jun 22, 2024
1 parent 54beeb9 commit dec7155
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/html/NormalsRegularizationBorders.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ <h1>NormalsRegularizationBorders</h1><p>
<tr class=""><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config mustset">outputfileOutside</div></div></td><td>filename</td><td></td></tr>
<tr class="table-light"><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config mustset-unbounded">grid</div></div></td><td><a href="gridType.html">grid</a></td><td>nodal point distribution of parameters, e.g harmonics splines</td></tr>
<tr class=""><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config mustset-unbounded">border</div></div></td><td><a href="borderType.html">border</a></td><td>regularization areas, e.g land and ocean</td></tr>
<tr class="table-light"><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config optional">R</div></div></td><td>double</td><td>reference radius for ellipsoidal coordinates for border</td></tr>
<tr class=""><td class="m-0"><div class="h-100 config-tree depth-0"><div class="h-100 config optional">inverseFlattening</div></div></td><td>double</td><td>reference flattening for ellipsoidal coordinates for border, 0: spherical coordinates</td></tr>
</table>

</div>
Expand Down
2 changes: 2 additions & 0 deletions docs/latex/programs.auto.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5450,6 +5450,8 @@ \subsection{NormalsRegularizationBorders}\label{NormalsRegularizationBorders}
\hfuzz=500pt\includegraphics[width=1em]{element-mustset.pdf}~outputfileOutside & \hfuzz=500pt filename & \hfuzz=500pt \\
\hfuzz=500pt\includegraphics[width=1em]{element-mustset-unbounded.pdf}~grid & \hfuzz=500pt \hyperref[gridType]{grid} & \hfuzz=500pt nodal point distribution of parameters, e.g harmonics splines\\
\hfuzz=500pt\includegraphics[width=1em]{element-mustset-unbounded.pdf}~border & \hfuzz=500pt \hyperref[borderType]{border} & \hfuzz=500pt regularization areas, e.g land and ocean\\
\hfuzz=500pt\includegraphics[width=1em]{element.pdf}~R & \hfuzz=500pt double & \hfuzz=500pt reference radius for ellipsoidal coordinates for border\\
\hfuzz=500pt\includegraphics[width=1em]{element.pdf}~inverseFlattening & \hfuzz=500pt double & \hfuzz=500pt reference flattening for ellipsoidal coordinates for border, 0: spherical coordinates\\
\hline
\end{tabularx}

Expand Down
10 changes: 10 additions & 0 deletions groops.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -16924,6 +16924,16 @@
<xs:documentation>regularization areas, e.g land and ocean</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="R" type="double" minOccurs="0" default="6378137.0">
<xs:annotation>
<xs:documentation>reference radius for ellipsoidal coordinates for border</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="inverseFlattening" type="double" minOccurs="0" default="298.2572221010">
<xs:annotation>
<xs:documentation>reference flattening for ellipsoidal coordinates for border, 0: spherical coordinates</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
Expand Down
6 changes: 5 additions & 1 deletion source/programs/normals/normalsRegularizationBorders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ void NormalsRegularizationBorders::run(Config &config, Parallel::CommunicatorPtr
FileName insideName, outsideName;
GridPtr grid;
BorderPtr border;
Double a, f;

readConfig(config, "outputfileInside", insideName, Config::MUSTSET, "", "");
readConfig(config, "outputfileOutside", outsideName, Config::MUSTSET, "", "");
readConfig(config, "grid", grid, Config::MUSTSET, "", "nodal point distribution of parameters, e.g harmonics splines");
readConfig(config, "border", border, Config::MUSTSET, "", "regularization areas, e.g land and ocean");
readConfig(config, "R", a, Config::DEFAULT, STRING_DEFAULT_GRS80_a, "reference radius for ellipsoidal coordinates for border");
readConfig(config, "inverseFlattening", f, Config::DEFAULT, STRING_DEFAULT_GRS80_f, "reference flattening for ellipsoidal coordinates for border, 0: spherical coordinates");
if(isCreateSchema(config)) return;


Ellipsoid ellipsoid(a, f);
std::vector<Vector3d> points = grid->points();
logInfo<<" nodal points: "<<points.size()<<Log::endl;

Expand All @@ -77,7 +81,7 @@ void NormalsRegularizationBorders::run(Config &config, Parallel::CommunicatorPtr

for(UInt k=0; k<points.size(); k++)
{
if(border->isInnerPoint(points.at(k)))
if(border->isInnerPoint(points.at(k), ellipsoid))
diag1(k)=1;
else
diag2(k)=1;
Expand Down

0 comments on commit dec7155

Please sign in to comment.