This file is indexed.

/usr/include/trilinos/mrtr_projector.H is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.

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
/*
#@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.
#
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
# Questions? Contact Glen Hansen (Glen.Hansen@inl.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: 20-March-06
 *
 */
#ifndef MOERTEL_PROJECTOR_H
#define MOERTEL_PROJECTOR_H

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


using namespace std;

// ----------   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 neccessary 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-continous 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 neccessary within the Newton iteration.<br>

When projecting along the C0-continous 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 neccessary 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 (Glen.Hansen@inl.gov)

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

  /*!
  \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 neccesarily 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
  */
  bool ProjectNodetoSegment_NodalNormal(MOERTEL::Node& node, MOERTEL::Segment& seg, double xi[]);

  /*!
  \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 neccesarily 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
  */
  bool ProjectNodetoSegment_SegmentNormal(MOERTEL::Node& node, MOERTEL::Segment& seg, double xi[]);

  //@}
  // @{ \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 neccesarily 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
  */
  bool ProjectNodetoSegment_SegmentOrthogonal(MOERTEL::Node& node, MOERTEL::Segment& seg, double xi[]);

  /*!
  \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 neccesarily 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 sseg (in) : Segment to project orthogonal to
  */
  bool ProjectNodetoSegment_Orthogonal_to_Slave(MOERTEL::Node& snode, MOERTEL::Segment& seg, double xi[], 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 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 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 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* 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);
  // 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);

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