This file is indexed.

/usr/include/trilinos/mrtr_projector.H is in libtrilinos-moertel-dev 12.10.1-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
/*
#@HEADER
# ************************************************************************
#
#                          Moertel FE Package
#                 Copyright (2006) Sandia Corporation
#
# Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
# license for use of this work by or on behalf of the U.S. Government.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Corporation nor the names of the
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Questions? Contact Glen Hansen (gahanse@sandia.gov)
#
# ************************************************************************
#@HEADER
*/
/* ******************************************************************** */
/* See the file COPYRIGHT for a complete copyright notice, contact      */
/* person and disclaimer.                                               */
/* ******************************************************************** */
/*!
 * \file mrtr_projector.H
 *
 * \class MOERTEL::Projector
 *
 * \brief A class to perform projections of nodes onto opposing segments in 2D and 3D
 *
 * \date Last update do Doxygen: 10-June-2010
 *
 */
#ifndef MOERTEL_PROJECTOR_H
#define MOERTEL_PROJECTOR_H

#include <ctime>
#include <iostream>
#include <iomanip>

// ----------   User Defined Includes   ----------

/*!
\brief MOERTEL: namespace of the Moertel package

The Moertel package depends on \ref Epetra, \ref EpetraExt, \ref Teuchos,
\ref Amesos, \ref ML and \ref AztecOO:<br>
Use at least the following lines in the configure of Trilinos:<br>
\code
--enable-moertel 
--enable-epetra 
--enable-epetraext
--enable-teuchos 
--enable-ml
--enable-aztecoo --enable-aztecoo-teuchos 
--enable-amesos
\endcode

*/
namespace MOERTEL
{

// forward declarations
class Interface;
class Segment;
class Node;

/*!
\class Projector

\brief <b> A class to perform projections of nodes onto opposing segments in 2D and 3D </b>

This class performs all necessary projections of nodes onto opposing segment surfaces in 2D and 3D
applying 2 different kinds of projection techniques.<br>
In 2D problems, the user has a choice of projecting nodes onto opposing segment surfaces
either orthogonal to that segment surface or along a previously constructed
C0-continuous normal field of the slave side.<br>
In both cases finding the projection of a Node on a Segment in terms of the segment's local
coordinates of the projection point is a nonlinear operation. A local Newton iteration
is involved and a dense solve of a 2x2 system is necessary within the Newton iteration.<br>

When projecting along the C0-continuous normal field, the field of normals is defined over the
slave side discretization and is an interpolation of (weighted averaged) nodal normals of the slave side.
Projections in both directions are performed along that same normal field making it necessary to have
different methods for projecting slave to mortar and vice versa.

In 3D projection is always performed along a previously constructed outward field of nodal normals.
The projection of a point in 3D along a field onto a 2D surface is always a nonlinear iteration
and a Newton method is applied here involving a dense 3x3 solve in each Newton step.

These projections make up for a pretty good share of the overall computational cost
of the mortar method though convergence in the Newton iterations is usually excellent.

\author Glen Hansen (gahanse@sandia.gov)

*/
class  Projector 
{
public:
  
  // @{ \name Constructors and destructor

  /*!
  \brief Constructor
  
  Constructs an instance of this class.<br>
  Note that this is \b not a collective call as projections are performed in parallel by
  individual processes.
  
  \param twoD : True if problem is 2D, false if problem is 3D
  \param outlevel : Level of output information written to stdout ( 0 - 10 )
  */
  explicit Projector(bool twoD, int outlevel);
  
  /*!
  \brief Destructor
  */
  virtual ~Projector();
  
  //@}
  // @{ \name Public members

  /*!
  \brief Return the level of output written to stdout ( 0 - 10 )
  
  */
  int OutLevel() { return outputlevel_; }
  
  /*!
  \brief Return whether this instance was constructed for 2D or 3D projections
  
  */
  bool IsTwoDimensional() { return twoD_; }

  //@}
  // @{ \name 2D and 3D projection methods
  
  /*!
  \brief Project a Node onto a Segment along the Node 's normal
  
  Used to project a Node from the slave side onto a Segment on the mortar side
  
  This method will compute the coordinates of a projection of a Node in the local coordinate system of a Segment.
  The projection point will not necessarily fall inside the Segment. However, if the projection point is far
  outside the segment's boundaries, problems with the internal nonlinear iteration might occur and a warning is issued
  when convergence can not be achieved in a limited number of iterations.
  
  \param node (in): Node to project
  \param seg (in) : Segment to project on
  \param xi (out) : Local coordinates if projection of Node in Segment 's coordinate System
  \param gap (out) : Gap between node and projection along projection vector.
  */
  bool ProjectNodetoSegment_NodalNormal(MOERTEL::Node& node, MOERTEL::Segment& seg, double xi[],
				  double &gap);

  /*!
  \brief Project a Node onto a Segment along the interpolated outward normal field of the Segment
  
  Used to project a Node from the mortar side onto a Segment on the slave side
  
  This method will compute the coordinates of a projection of a Node in the local coordinate system of a Segment.
  The projection point will not necessarily fall inside the Segment. However, if the projection point is far
  outside the segment's boundaries, problems with the internal nonlinear iteration might occur and a warning is issued
  when convergence can not be achieved in a limited number of iterations.
  
  \param node (in): Node to project
  \param seg (in) : Segment to project on
  \param xi (out) : Local coordinates if projection of Node in Segment 's coordinate System
  \param gap (out) : Gap between node and projection along projection vector.
  */
  bool ProjectNodetoSegment_SegmentNormal(MOERTEL::Node& node, MOERTEL::Segment& seg, double xi[],
				  double &gap);

  //@}
  // @{ \name Additional 2D projection methods
  
  /*!
  \brief Project a Node onto a Segment orthogonal to the Segment (2D problems only)
  
  Used to project a Node from the mortar side onto a Segment on the slave side
  
  This method will compute the coordinates of a projection of a Node in the local coordinate system of a Segment.
  The projection point will not necessarily fall inside the Segment. However, if the projection point is far
  outside the segment's boundaries, problems with the internal nonlinear iteration might occur and a warning is issued
  when convergence can not be achieved in a limited number of iterations.
  
  \param node (in): Node to project
  \param seg (in) : Segment to project on
  \param xi (out) : Local coordinates if projection of Node in Segment 's coordinate System
  \param gap (out) : Gap between node and projection along projection vector.
  */
  bool ProjectNodetoSegment_SegmentOrthogonal(MOERTEL::Node& node, MOERTEL::Segment& seg, double xi[],
				  double &gap);

  /*!
  \brief Project a Node onto a Segment orthogonal another Segment (2D problems only)
  
  Used to project a Node from the slave side onto a Segment on the mortar side orthogonal to some slave Segment
  
  This method will compute the coordinates of a projection of a Node in the local coordinate system of a Segment.
  The projection point will not necessarily fall inside the Segment. However, if the projection point is far
  outside the segment's boundaries, problems with the internal nonlinear iteration might occur and a warning is issued
  when convergence can not be achieved in a limited number of iterations.
  
  \param node (in): Node to project
  \param seg (in) : Segment to project on
  \param xi (out) : Local coordinates if projection of Node in Segment 's coordinate System
  \param gap (out) : Gap between node and projection along projection vector.
  \param sseg (in) : Segment to project orthogonal to
  */
  bool ProjectNodetoSegment_Orthogonal_to_Slave(MOERTEL::Node& snode, MOERTEL::Segment& seg, double xi[], 
				  double &gap, MOERTEL::Segment& sseg);

  //@}

private:  
  // don't want = operator
  Projector operator = (const Projector& old);
  // don't want copy-ctor
  Projector(MOERTEL::Projector& old);

  //====2D projection methods
  
  // evaluate F and gradF functions for ProjectNodetoSegment_NodalNormal in 2D
  double evaluate_F_2D_NodalNormal(MOERTEL::Node& node, MOERTEL::Segment& seg, double eta, double &gap);
  double evaluate_gradF_2D_NodalNormal(MOERTEL::Node& node, MOERTEL::Segment& seg, double eta);

  // evaluate F and gradF functions for ProjectNodetoSegment_SegmentNormal in 2D
  double evaluate_F_2D_SegmentNormal(MOERTEL::Node& node, MOERTEL::Segment& seg, double eta, double &gap);
  double evaluate_gradF_2D_SegmentNormal(MOERTEL::Node& node, MOERTEL::Segment& seg, double eta);

  // evaluate F and gradF functions for ProjectNodetoSegment_SegmentOrthogonal in 2D
  double evaluate_F_2D_SegmentOrthogonal(MOERTEL::Node& node, MOERTEL::Segment& seg, double eta, double &gap);
  double evaluate_gradF_2D_SegmentOrthogonal(MOERTEL::Node& node, MOERTEL::Segment& seg, double eta);
  
  // evalauate F and gradF functions for ProjectNodetoSegment_Orthogonal_to_Slave in 2D
  double evaluate_F_2D_SegmentOrthogonal_to_g(MOERTEL::Node& node, MOERTEL::Segment& seg, double eta, double &gap,
				  double* g);
  double evaluate_gradF_2D_SegmentOrthogonal_to_g(MOERTEL::Node& node, MOERTEL::Segment& seg, double eta, double* g);
  
  //====3D projection methods

  // evaluate F and gradF functions for ProjectNodetoSegment_NodalNormal in 3D
  bool evaluate_FgradF_3D_NodalNormal(double* F,double dF[][3],const MOERTEL::Node& node, 
                                      MOERTEL::Segment& seg,double* eta,double alpha,double &gap);
  // evaluate F and gradF functions for ProjectNodetoSegment_SegmentNormal in 3D
  bool evaluate_FgradF_3D_SegmentNormal(double* F,double dF[][3],const MOERTEL::Node& node, 
                                        MOERTEL::Segment& seg,double* eta,double alpha,double &gap);

private:

  bool twoD_;   // dimension of the projection, true if 2-dimensional
  int  outputlevel_; // amount of output to be written (0-10)
};

} // namespace MOERTEL

#endif // MOERTEL_PROJECTOR_H