#include <ctime>
#include <iostream>
Function_LinearTri(const MOERTEL::Function_LinearTri &old)
Copy-Constructor.
Definition: mrtr_functions.H:295
Function_BiLinearQuad(const MOERTEL::Function_BiLinearQuad &old)
Copy-Constructor.
Definition: mrtr_functions.H:469
Function_Constant1D(int out)
Constructor.
Definition: mrtr_functions.H:106
int OutLevel()
Returns the Level of output (0 - 10) the user specified in the constructor.
Definition: mrtr_manager.H:230
bool AddNode(MOERTEL::Node &node, int side)
Add a node to the interface on either side 1 or 0.
Definition: mrtr_interface_tools.cpp:373
int ReportError(const std::stringstream &Message)
Error reporting method.
Definition: mrtr_utils.cpp:1282
virtual ~Node()
Destructor.
Definition: mrtr_node.cpp:263
double length(const double *g, const int dim)
Length of a vector.
Definition: mrtr_utils.cpp:196
const double * Xi()
Return view of segment local coordinates of this point (2D)
Definition: mrtr_point.H:155
Lmselector()
Constructor.
Definition: mrtr_lm_selector.H:105
Teuchos::RCP< MOERTEL::Node > GetNodeView(int nid)
Get a view of a MOERTEL::Node (of either side) specifying node id.
Definition: mrtr_interface_tools.cpp:688
bool SplitMatrix2x2(Teuchos::RCP< Epetra_CrsMatrix > A, Teuchos::RCP< Epetra_Map > &A11rowmap, Teuchos::RCP< Epetra_Map > &A22rowmap, Teuchos::RCP< Epetra_CrsMatrix > &A11, Teuchos::RCP< Epetra_CrsMatrix > &A12, Teuchos::RCP< Epetra_CrsMatrix > &A21, Teuchos::RCP< Epetra_CrsMatrix > &A22)
split a matrix into a 2x2 block system where the rowmap of one of the blocks is given
Definition: mrtr_utils.cpp:888
bool SetXi(const double *xi)
Set segment local coordinates of this point (2D) in a segment.
Definition: mrtr_point.H:180
SegmentType
Type of segment.
Definition: mrtr_segment.H:128
void sort(double *dlist, int N, int *list2)
Sort dlist of length N in ascending, sort list2 according to dlist.
Definition: mrtr_utils.cpp:293
void AddDValue(double val, int col)
Add a value to the 'D' map of this node.
Definition: mrtr_node.cpp:542
const int * Dof() const
Return view of degrees of freedom on this node.
Definition: mrtr_node.H:248
A class to define a 3-noded triangle 2D Segment.
Definition: mrtr_segment_bilineartri.H:125
bool SetFunctionTypes(MOERTEL::Function::FunctionType primal, MOERTEL::Function::FunctionType dual)
Set types of shape functions to be used.
Definition: mrtr_interface_tools.cpp:1737
Segment_BiLinearQuad(int id, int nnode, int *nodeId, int out)
Standard Constructor.
Definition: mrtr_segment_bilinearquad.cpp:67
bool cross(double *out, const double *g1, const double *g2)
Cross product.
Definition: mrtr_utils.cpp:175
int OutLevel()
Return level of output to be generated by this class (0-10)
Definition: mrtr_segment.H:184
MOERTEL::Segment * Clone()
Deep copy this instance of Segment_Linear1D and return pointer to the copy.
Definition: mrtr_segment_linear1D.cpp:185
int GetSide(MOERTEL::Segment *seg)
Returns the side the MOERTEL::Segment seg is on ( 0 or 1 )
Definition: mrtr_interface_tools.cpp:820
const int * NodeIds() const
Return view of node ids of nodes attached to this Segment.
Definition: mrtr_segment.H:208
bool UnPack(int *pack)
not implemented
Definition: mrtr_segment_bilinearquad.cpp:139
FunctionType
Type of function.
Definition: mrtr_function.H:110
void AddSupportedByNode(MOERTEL::Node *suppnode)
Add an internal node to the map of nodes supporting this node.
Definition: mrtr_node.H:470
bool DetectEndSegmentsandReduceOrder()
Makes necessary boundary modification for 1D and 2D interfaces.
Definition: mrtr_interface_tools.cpp:1439
Point(const int id, const double *xi, int out)
Constructor.
Definition: mrtr_point.cpp:54
bool UseTranspose() const
not implemented
Definition: mrtr_ml_preconditioner.H:243
int OutLevel()
Return the level of output written to stdout ( 0 - 10 )
Definition: mrtr_node.H:172
A class to handle the projection of a node onto some segment
Definition: mrtr_pnode.H:103
void SetSystem(Teuchos::RCP< Epetra_CrsMatrix > matrix, Teuchos::RCP< Epetra_Vector > x, Teuchos::RCP< Epetra_Vector > b)
Set linear system.
Definition: mrtr_solver.cpp:85
virtual ~Function()
Destructor.
Definition: mrtr_function.H:153
bool EvaluateFunction(const MOERTEL::Segment &seg, const double *xi, double *val, const int valdim, double *deriv)
Evaluate the function and derivatives at a given local coordinate.
Definition: mrtr_functions.cpp:145
const Epetra_Map & OperatorDomainMap() const
Get fine level OperatorDomainMap.
Definition: mrtr_ml_preconditioner.H:186
Teuchos::RCP< std::map< int, double > > GetD()
Get view of the 'D' map of this node.
Definition: mrtr_node.H:422
int MyNsegment(int side)
Returns the number of segments on the specified side ( 0 or 1) that are owned by the calling processo...
Definition: mrtr_interface.H:417
Node(int Id, const double *x, int ndof, const int *dof, bool isonboundary, int out)
Constructor.
Definition: mrtr_node.cpp:63
virtual ~Function_LinearTri()
Destructor.
Definition: mrtr_functions.H:310
bool EvaluateFunction(const MOERTEL::Segment &seg, const double *xi, double *val, const int valdim, double *deriv)
Evaluate the function and derivatives at a given local coordinate.
Definition: mrtr_functions.cpp:356
bool AddSegment(int sid)
Adds a segment id to the list of segments adjacent to this node.
Definition: mrtr_node.cpp:365
std::vector< int > * MyLMIds()
Return vector of all Lagrange multiplier degrees of freedom on this interface.
Definition: mrtr_interface_tools.cpp:1388
A virtual class to serve as base class for different types of interface segmentsconstruct a single in...
Definition: mrtr_segment.H:116
int NodePID(int nid) const
Returns the local PID of the owner of the node with Id nid.
Definition: mrtr_interface_tools.cpp:591
virtual double * BuildNormal(double *xi)=0
Build an outward normal at segment coordinates xi.
double Metric(double *xi, double g[], double G[][3])
Build the covariant basis vectors and metric tensor at a given local coord in this segment.
Definition: mrtr_segment_linear1D.cpp:221
int Ndof() const
Return the number of degrees of freedom on this node.
Definition: mrtr_node.H:230
bool UnPack(double *pack)
Unpacks information stored in a double vector to an instance of Node.
Definition: mrtr_node.cpp:228
const Epetra_Comm & Comm() const
get Comm of this class
Definition: mrtr_ml_preconditioner.H:178
bool EvaluateFunction(const MOERTEL::Segment &seg, const double *xi, double *val, const int valdim, double *deriv)
Evaluate the function and derivatives at a given local coordinate.
Definition: mrtr_functions.cpp:576
virtual bool EvaluateFunction(const MOERTEL::Segment &seg, const double *xi, double *val, const int valdim, double *deriv)=0
Evaluate the function and derivatives at a given local coordinate.
void SetCorner()
Set the flag indicating that node is corner node of 1D interface.
Definition: mrtr_node.H:439
Function_BiLinearQuad(int out)
Constructor.
Definition: mrtr_functions.H:462
virtual ~Function_BiLinearQuad()
Destructor.
Definition: mrtr_functions.H:484
MOERTEL::Node ** Nodes()
Return pointer to vector of length Nnode() of pointers to Nodes attached to this Segment.
Definition: mrtr_segment.H:215
Epetra_CrsMatrix * GetRHSMatrix()
returns the righ hand side matrix of the spd system of equations
Definition: mrtr_manager_solve.cpp:971
bool SetFunctionsFromFunctionTypes()
Set functions from function types.
Definition: mrtr_interface_tools.cpp:1749
int OutLevel()
Return the level of output written to stdout ( 0 - 10 )
Definition: mrtr_integrator.H:141
Function_ConstantTri(int out)
Constructor.
Definition: mrtr_functions.H:415
virtual MOERTEL::Segment * Clone()=0
Deep copy the derived class and return pointer to it.
virtual double Metric(double *xi, double g[], double G[][3])=0
Build the basis vectors and metric tensor at a given local coord in this segment.
bool Complete()
Finalizes the construction of the interface instance.
Definition: mrtr_interface_complete.cpp:53
bool Mortar_Integrate()
Perform integration of the mortar integral on all interfaces.
Definition: mrtr_manager.cpp:323
double * Xi()
Return view of the local coordinates of the projection in the segment.
Definition: mrtr_pnode.H:160
MOERTEL::Node ** GetNodeView()
Get a view of all nodes on this interface.
Definition: mrtr_interface_tools.cpp:715
Function_LinearTri(int out)
Constructor.
Definition: mrtr_functions.H:288
A class to define a 4-noded quadrilateral 2D Segment.
Definition: mrtr_segment_bilinearquad.H:127
int SetUseTranspose(bool UseTranspose)
not implemented
Definition: mrtr_ml_preconditioner.H:231
virtual ~Function_Constant1D()
Destructor.
Definition: mrtr_functions.H:128
virtual bool EvaluateLM(Teuchos::RCP< MOERTEL::Node > node, const int LMDof)=0
Function that determines if the LMs should be active for this node and dof.
void SetSolverParameters(Teuchos::ParameterList ¶ms)
Set a parameter list holding solver parameters.
Definition: mrtr_manager_solve.cpp:1008
virtual MOERTEL::Function * Clone() const =0
Clone method.
const char * Label() const
Returns the label of this class.
Definition: mrtr_ml_preconditioner.H:170
ProjectionType
Type of projections to be used to construct the Mortar projection from the mortar to the slave side.
Definition: mrtr_interface.H:243
double * BuildNormalAtNode(int nid)
Build normal at a node adjacent to this Segment.
Definition: mrtr_segment.cpp:304
const Epetra_CrsMatrix * D() const
Get pointer to constraints matrix D.
Definition: mrtr_manager.H:605
virtual ~Function_DualBiLinearQuad()
Destructor.
Definition: mrtr_functions.H:531
bool HasNormInf() const
not implemented
Definition: mrtr_ml_preconditioner.H:248
virtual MOERTEL::Function * Clone() const
Clone method.
Definition: mrtr_functions.cpp:342
bool Print_Graph(std::string name, Epetra_CrsGraph &A, int ibase)
Print graph to file.
Definition: mrtr_utils.cpp:827
int NSupportSet() const
Get number of nodes that support this boundary node.
Definition: mrtr_node.H:460
virtual ~Segment_BiLinearQuad()
Destructor.
Definition: mrtr_segment_bilinearquad.cpp:174
double Area()
not implemented
Definition: mrtr_segment_bilinearquad.cpp:287
bool ProjectNodetoSegment_Orthogonal_to_Slave(MOERTEL::Node &snode, MOERTEL::Segment &seg, double xi[], double &gap, MOERTEL::Segment &sseg)
Project a Node onto a Segment orthogonal another Segment (2D problems only)
Definition: mrtr_projector.cpp:757
bool UnPack(int *pack)
Unpack some data an int vector and store data in this class.
Definition: mrtr_segment_linear1D.cpp:140
void Reset()
Reset the internal state of this node and clear integrated values.
Definition: mrtr_node.cpp:280
virtual ~Manager()
Destroys an instance of this class.
Definition: mrtr_manager.cpp:113
bool Print() const
Print this node to stdout.
Definition: mrtr_node.cpp:306
void AddMmodValue(int row, double val, int col)
Add a value to the 'M' map of this node.
Definition: mrtr_node.cpp:572
virtual ~Projector()
Destructor.
Definition: mrtr_projector.cpp:65
Function_DualLinearTri(int out)
Constructor.
Definition: mrtr_functions.H:351
bool Compute()
Compute the preconditioner.
Definition: mrtr_ml_preconditioner.cpp:198
int Id()
Return id of this point.
Definition: mrtr_point.H:149
virtual double Area()=0
Compute and return the area of this Segment.
int GlobalNnode()
Returns global number of nodes on interface on both sides.
Definition: mrtr_interface_tools.cpp:569
MOERTEL::Segment * Segment()
Return pointer to segment this projection is in.
Definition: mrtr_pnode.H:166
Lmselector(const MOERTEL::Lmselector &old)
Copy-Constructor.
Definition: mrtr_lm_selector.H:114
bool Mortar_Assemble(Epetra_CrsMatrix &D, Epetra_CrsMatrix &M)
Assemble coupling matrices D and M after integration.
Definition: mrtr_interface_integrate.cpp:64
MOERTEL::Segment ** GetSegmentView()
Get a view of all segments on this interface.
Definition: mrtr_interface_tools.cpp:793
bool AddSegment(MOERTEL::Segment &seg, int side)
Add a segment to the interface on either side 1 or 0.
Definition: mrtr_interface_tools.cpp:294
A class to solve mortar constraint problems.
Definition: mrtr_solver.H:127
bool SetFunction(int id, MOERTEL::Function *func)
Attach a function to this Segment.
Definition: mrtr_segment.cpp:176
int Ngp()
Return number of Gaussian integration points to be used.
Definition: mrtr_integrator.H:147
Segment_BiLinearTri(int id, int nnode, int *nodeId, int out)
Standard Constructor.
Definition: mrtr_segment_bilineartri.cpp:68
bool solve33(const double A[][3], double *x, const double *b)
Solve dense 3x3 system of equations.
Definition: mrtr_utils.cpp:226
virtual bool Print() const
Print this Segment.
Definition: mrtr_segment.cpp:149
virtual MOERTEL::Function * Clone() const
Clone method.
Definition: mrtr_functions.cpp:200
int MortarSide() const
Returns the Mortar side of the interface.
Definition: mrtr_interface.H:352
Epetra_Map * ProblemMap() const
Return view of row map of the uncoupled problem.
Definition: mrtr_manager.H:413
bool Integrate_Interfaces()
Perform the integration of the mortar integral on all interfaces.
Definition: mrtr_manager.cpp:359
int GlobalNsegment()
Returns the global number of segments on both sides of the interface.
Definition: mrtr_interface_tools.cpp:514
void SetParameters(Teuchos::ParameterList *params)
Set solver parameters.
Definition: mrtr_solver.H:168
Teuchos::ParameterList & Default_Parameters()
Obtain a parameter list with default values.
Definition: mrtr_manager.cpp:121
bool Mortar_Integrate_2D(Teuchos::RCP< Teuchos::ParameterList > intparams)
Integrate the mortar integrals on this interface (1D interface)
Definition: mrtr_interface_integrate.cpp:208
A 2D linear shape function for a 3-noded triangle
Definition: mrtr_functions.H:279
int OrthoSegment()
Return id of segment this projection is orthogonal to (might be different from Segment() )
Definition: mrtr_pnode.H:172
double Coordinate(int gp)
Return coordinate of a specific Gaussian point in 1D segment.
Definition: mrtr_integrator.H:154
Segment(int id, int nnode, int *nodeId, int outlevel)
Standard Constructor.
Definition: mrtr_segment.cpp:75
MOERTEL::Segment ** Segments()
Returns a view to the vector of pointers to segments adjacent to this node.
Definition: mrtr_node.H:289
bool EvaluateFunction(const MOERTEL::Segment &seg, const double *xi, double *val, const int valdim, double *deriv)
Evaluate the function and derivatives at a given local coordinate.
Definition: mrtr_functions.cpp:430
void SetProjectionType(MOERTEL::Interface::ProjectionType typ)
Set type of projection to be used for the mortar projection.
Definition: mrtr_interface.H:780
virtual ~Segment_BiLinearTri()
Destructor.
Definition: mrtr_segment_bilineartri.cpp:178
A virtual class that supports user activation of LMs.
Definition: mrtr_lm_selector.H:93
Epetra_Map * SplitMap(const Epetra_Map &Amap, const Epetra_Map &Agiven)
split a rowmap of matrix A
Definition: mrtr_utils.cpp:1182
bool SetX(double *x)
Update the coordinates of this Node.
Definition: mrtr_node.H:209
bool BuildAveragedNormal()
Build averaged normal from adjacent segments at this node.
Definition: mrtr_node.cpp:451
void SetGap(double gap)
Sets the distance between projection and source node.
Definition: mrtr_node.H:500
Integrator(int ngp, bool oneD, int outlevel)
Constructor.
Definition: mrtr_integrator.cpp:60
virtual ~Segment()
Destructor.
Definition: mrtr_segment.cpp:139
bool GetPtrstoSegments(MOERTEL::Interface &interface)
Construct vector of pointers to segments from adjacent segments id list.
Definition: mrtr_node.cpp:393
bool IsCorner() const
Query the flag indicating that node is corner node of 1D interface.
Definition: mrtr_node.H:444
Interface(int Id, bool oneD, Epetra_Comm &comm, int outlevel)
Creates an (empty) instance of this class.
Definition: mrtr_interface_tools.cpp:57
double * Coordinate(int *gp)
Return coordinates of a specific Gaussian point in 2D segment.
Definition: mrtr_integrator.H:161
int * Pack(int *size)
Pack some data from this class to an int vector of length size so it can be communicated using MPI.
Definition: mrtr_segment_bilineartri.cpp:102
int MyNsegment()
Returns the number of segments on both sides of the interface that are owned by the calling processor...
Definition: mrtr_interface.H:445
Teuchos::RCP< MOERTEL::ProjectedNode > GetProjectedNode()
Returns a view of the projection of this node.
Definition: mrtr_node.cpp:530
virtual ~Mortar_ML_Preconditioner()
Destroys an instance of this class.
Definition: mrtr_ml_preconditioner.H:162
Function(const MOERTEL::Function &old)
Copy-Constructor.
Definition: mrtr_function.H:145
bool LocalCoordinatesOfNode(int lid, double *xi)
not implemented
Definition: mrtr_segment_bilinearquad.cpp:200
std::vector< double > * FunctionValues()
Return view of function values stored in this Point.
Definition: mrtr_point.H:209
bool BuildNormals()
Build averaged nodal normals.
Definition: mrtr_interface_project.cpp:56
bool AssembleInterfacesIntoResidual(Lmselector *sel)
Assembles contributions from the D and M matrices into the JFNK residual vector.
Definition: mrtr_manager.cpp:975
int Nseg() const
Return the number of segments adjacent to this node.
Definition: mrtr_node.H:267
int digit_ten(int i)
Return the '10' digit from an integer number.
Definition: mrtr_utils.cpp:263
int Id() const
Returns the unique interface id associated with this instance and chosen by the user.
Definition: mrtr_interface.H:324
int SetLMDofs(int minLMGID)
Choose degrees of freedom for Lagrange multipliers.
Definition: mrtr_interface_tools.cpp:1162
Function_Constant1D(const MOERTEL::Function_Constant1D &old)
Copy-Constructor.
Definition: mrtr_functions.H:113
bool Assemble(MOERTEL::Interface &inter, MOERTEL::Segment &sseg, MOERTEL::Segment &mseg, Epetra_CrsMatrix &M, Epetra_SerialDenseMatrix &Mdense)
Assemble integration result '-M' into global matrix 'M'.
Definition: mrtr_integrator.cpp:618
bool EvaluateFunction(const MOERTEL::Segment &seg, const double *xi, double *val, const int valdim, double *deriv)
Evaluate the function and derivatives at a given local coordinate.
Definition: mrtr_functions.cpp:214
MOERTEL::Segment::SegmentType Type() const
Return type of Segment.
Definition: mrtr_segment.H:202
double Area()
Compute and return the area of this Segment_BiLinearTri.
Definition: mrtr_segment_bilineartri.cpp:273
Epetra_Comm & Comm() const
Returns the Epetra_Comm object associated with this class.
Definition: mrtr_solver.H:154
bool Solve(Teuchos::ParameterList ¶ms, Epetra_Vector &sol, const Epetra_Vector &rhs)
Solve the problem.
Definition: mrtr_manager_solve.cpp:1019
virtual ~Lmselector()
Destructor.
Definition: mrtr_lm_selector.H:119
virtual ~Function_ConstantTri()
Destructor.
Definition: mrtr_functions.H:437
bool SplitVector(const Epetra_Vector &x, const Epetra_Map &x1map, Epetra_Vector *&x1, const Epetra_Map &x2map, Epetra_Vector *&x2)
split a vector into 2 non-overlapping pieces
Definition: mrtr_utils.cpp:1208
A virtual class to form a shape function of some type.
Definition: mrtr_function.H:95
A class to perform integration of mass matrices on the overlap of 2 segments in 1D and 2D.
Definition: mrtr_integrator.H:110
A 2D constant shape function for a 3-noded triangle
Definition: mrtr_functions.H:406
bool Mortar_Integrate(Teuchos::RCP< Teuchos::ParameterList > intparams)
Integrate the mortar integrals on this interface (2D interface)
Definition: mrtr_interface_integrate3D.cpp:70
bool Solve(Teuchos::RCP< Teuchos::ParameterList > params, Teuchos::RCP< Epetra_CrsMatrix > matrix, Teuchos::RCP< Epetra_Vector > x, Teuchos::RCP< Epetra_Vector > b, MOERTEL::Manager &manager)
Solve system.
Definition: mrtr_solver.cpp:98
MOERTEL::Segment * Clone()
Deep copy this instance of Segment_BiLinearQuad and return pointer to the copy.
Definition: mrtr_segment_bilinearquad.cpp:182
MOERTEL::Segment * AllocateSegment(int type, int out)
Allocate a Segment of the correct type.
Definition: mrtr_utils.cpp:66
const double * Normal() const
Return pointer to vector of length 3 of normal of this node.
Definition: mrtr_node.H:215
int MatrixMatrixAdd(const Epetra_CrsMatrix &A, bool transposeA, double scalarA, Epetra_CrsMatrix &B, double scalarB)
Add matrices A+B.
Definition: mrtr_utils.cpp:398
bool SetN(double *n)
Store a normal in this node.
Definition: mrtr_node.H:224
double Metric(double *xi, double g[], double G[][3])
not implemented
Definition: mrtr_segment_bilinearquad.cpp:256
bool EvaluateFunction(const MOERTEL::Segment &seg, const double *xi, double *val, const int valdim, double *deriv)
Evaluate the function and derivatives at a given local coordinate.
Definition: mrtr_functions.cpp:282
Teuchos::RCP< std::vector< std::map< int, double > > > GetMmod()
Get view of the 'Mmod' map of this node.
Definition: mrtr_node.H:434
int * Pack(int *size)
not implemented
Definition: mrtr_segment_bilinearquad.cpp:101
const int * LMDof() const
Return view of the Lagrange multipliers on this node.
Definition: mrtr_node.H:256
ProjectedNode(const MOERTEL::Node &basenode, const double *xi, MOERTEL::Segment *pseg)
Constructor.
Definition: mrtr_pnode.cpp:53
int MyNnode(int side)
Returns local number of nodes on interface side 0 or 1.
Definition: mrtr_interface.H:466
bool MergeVector(const Epetra_Vector &x1, const Epetra_Vector &x2, Epetra_Vector &xresult)
merge results from 2 vectors into one (assumes matching submaps)
Definition: mrtr_utils.cpp:1247
bool IsComplete() const
Returns true if Complete() has been called and false otherwise.
Definition: mrtr_interface.H:310
bool SetInputMatrix(Epetra_CrsMatrix *inputmatrix, bool DeepCopy=false)
Set the Matrix of the original uncoupled problem.
Definition: mrtr_manager_solve.cpp:66
Epetra_CrsMatrix * MatMatMult(const Epetra_CrsMatrix &A, bool transA, const Epetra_CrsMatrix &B, bool transB, int outlevel)
Multiply matrices A*B.
Definition: mrtr_utils.cpp:599
double * Pack(int *size)
Packs most information stored in this node to a double vector for communication with MPI.
Definition: mrtr_node.cpp:190
Manager(Epetra_Comm &comm, MOERTEL::Manager::DimensionType dimension, int outlevel)
Creates and empty instance of this class.
Definition: mrtr_manager.cpp:83
bool GetPtrstoNodes(MOERTEL::Interface &interface)
Get pointers to Nodes attached to this Segment from the Interface this Segment resides on.
Definition: mrtr_segment.cpp:321
MOERTEL::Function::FunctionType FunctionType(int id)
Return FunctionType of a function with the Id id.
Definition: mrtr_segment.cpp:415
bool SetProblemMap(const Epetra_Map *map)
Set the RowMap of the original uncoupled problem.
Definition: mrtr_manager_solve.cpp:56
Top level user interface to the mortar package 'Moertel'.
Definition: mrtr_manager.H:161
bool AddInterface(MOERTEL::Interface &interface)
Add an interface class to this class.
Definition: mrtr_manager.cpp:215
int OutLevel()
Returns the Level of output (0 - 10) the user specified in the constructor.
Definition: mrtr_solver.H:159
int Ninterfaces()
Query the number of interfaces passed to this class via AddInterface.
Definition: mrtr_manager.H:246
Teuchos::RCP< MOERTEL::Interface > GetInterface(int idx)
Query a managed interface added using AddInterface.
Definition: mrtr_manager.H:625
double Metric(double *xi, double g[], double G[][3])
not implemented
Definition: mrtr_segment_bilineartri.cpp:235
Teuchos::RCP< MOERTEL::ProjectedNode > * GetProjectedNode(int &length)
Returns a view of all projected nodes this node owns.
Definition: mrtr_node.cpp:518
bool SetProjectedNode(MOERTEL::ProjectedNode *pnode)
Store a pointer to a projected node.
Definition: mrtr_node.cpp:508
virtual ~Segment_Linear1D()
Destructor.
Definition: mrtr_segment_linear1D.cpp:177
MOERTEL::Function * AllocateFunction(MOERTEL::Function::FunctionType type, int out)
Allocate a function of the correct type.
Definition: mrtr_utils.cpp:115
bool Print() const
Print all information stored in this class to stdout.
Definition: mrtr_manager.cpp:148
bool Print() const
Print this ProjectedNode and its Node.
Definition: mrtr_pnode.cpp:118
Teuchos::RCP< MOERTEL::Segment > GetSegmentView(int sid)
Get a view of a MOERTEL::Segment (of either side) specifying segment id.
Definition: mrtr_interface_tools.cpp:767
Teuchos::RCP< std::map< int, double > > GetM()
Get view of the 'M' map of this node.
Definition: mrtr_node.H:428
MOERTEL: namespace of the Moertel package.
Definition: mrtr_function.H:80
double * BuildNormal(double *xi)
Build an outward normal at segment coordinates xi.
Definition: mrtr_segment_linear1D.cpp:266
bool IsOneDimensional() const
Returns true if this interface is a 1D-interface of a 2D-problem.
Definition: mrtr_interface.H:298
bool EvaluateFunction(int id, const double *xi, double *val, int valdim, double *deriv)
Evaluate a function with a certain id.
Definition: mrtr_segment.cpp:251
bool EvaluateFunction(const MOERTEL::Segment &seg, const double *xi, double *val, const int valdim, double *deriv)
Evaluate the function and derivatives at a given local coordinate.
Definition: mrtr_functions.cpp:76
A class to construct a single node.
Definition: mrtr_node.H:117
int OutLevel()
Return the level of output written to stdout ( 0 - 10 )
Definition: mrtr_projector.H:150
bool SetMortarSide(int side)
Choose Mortar side of the interface.
Definition: mrtr_interface_tools.cpp:458
virtual ~Solver()
Destroys an instance of this class.
Definition: mrtr_solver.cpp:78
const Epetra_CrsMatrix * M() const
Get pointer to constraints matrix M.
Definition: mrtr_manager.H:611
int * Pack(int *size)
Pack some data from this class to an int vector of length size so it can be communicated using MPI.
Definition: mrtr_segment_linear1D.cpp:101
MOERTEL::Segment * Clone()
Deep copy this instance of Segment_BiLinearTri and return pointer to the copy.
Definition: mrtr_segment_bilineartri.cpp:186
int Nlmdof() const
Return the number of Lagrange mutlipliers on this node.
Definition: mrtr_node.H:240
int OutLevel() const
Returns the level of output to stdout generated by this class ( 0 - 10 )
Definition: mrtr_interface.H:292
Epetra_CrsMatrix * PaddedMatrix(const Epetra_Map rowmap, double val, const int numentriesperrow)
Allocate and return a matrix padded with val on the diagonal. FillComplete() is NOT called on exit.
Definition: mrtr_utils.cpp:646
MOERTEL::Function * Clone() const
Clone method.
Definition: mrtr_functions.cpp:131
Function_ConstantTri(const MOERTEL::Function_ConstantTri &old)
Copy-Constructor.
Definition: mrtr_functions.H:422
Function_DualBiLinearQuad(int out)
Constructor.
Definition: mrtr_functions.H:509
Teuchos::RCP< MOERTEL::Node > Node()
Return view of Node.
Definition: mrtr_point.H:174
A class to perform projections of nodes onto opposing segments in 2D and 3D.
Definition: mrtr_projector.H:120
bool IsTwoDimensional()
Return whether this instance was constructed for 2D or 3D projections.
Definition: mrtr_projector.H:156
A couple of shape functions for 1D and 2D elements.
int Id() const
Return unique and positive id of this node.
Definition: mrtr_node.H:178
virtual void AccumulateRHS(Teuchos::RCP< MOERTEL::Node > node)=0
Functions that accumulate values into the RHS depending on the state of the contact problem.
const Epetra_Comm & gComm() const
Returns the Epetra_Comm object associated with this interface.
Definition: mrtr_interface.H:332
Function(int outlevel, MOERTEL::Function::FunctionType type)
Constructor.
Definition: mrtr_function.H:133
DimensionType
Specification of the problem dimension.
Definition: mrtr_manager.H:171
int SegPID(int sid) const
Returns the local PID of the owner of the segment with Id sid.
Definition: mrtr_interface_tools.cpp:624
double Area()
Compute and return the area of this Segment_Linear1D.
Definition: mrtr_segment_linear1D.cpp:287
double NormInf() const
not implemented
Definition: mrtr_ml_preconditioner.H:236
virtual MOERTEL::Function * Clone() const
Clone method.
Definition: mrtr_functions.cpp:562
bool Project()
Build averaged nodal normals and projects nodes to other side.
Definition: mrtr_interface_project.cpp:112
double * BuildNormal(double *xi)
Build an outward normal at segment coordinates xi.
Definition: mrtr_segment_bilineartri.cpp:249
int * SegmentIds()
Returns a view to the vector of segment ids of segments adjacent to this node.
Definition: mrtr_node.H:278
MOERTEL::Function * Clone() const
Clone method.
Definition: mrtr_functions.cpp:62
const double * XCoords() const
Returns the view (a vector of length 3) to the current coordinates of this node.
Definition: mrtr_node.H:201
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
not implemented
Definition: mrtr_ml_preconditioner.H:224
std::map< int, MOERTEL::Node * > & GetSupportedByNode()
Get the map of nodes supporting this node.
Definition: mrtr_node.H:480
Definition: mrtr_functions.H:453
double Gap()
Return distance between projection and source node.
Definition: mrtr_node.H:490
virtual int * Pack(int *size)=0
Pack some data from this class to an int vector of length size so it can be communicated using MPI.
Segment_Linear1D(int id, int nnode, int *nodeId, int out)
Standard Constructor.
Definition: mrtr_segment_linear1D.cpp:67
void SetDimension(MOERTEL::Manager::DimensionType type)
Set problem dimension.
Definition: mrtr_manager.H:267
virtual void AssembleNodeVal(int row, int col, double val)=0
Functions that accumulate values into the RHS depending on the state of the contact problem.
Function_DualLinearTri(const MOERTEL::Function_DualLinearTri &old)
Copy-Constructor.
Definition: mrtr_functions.H:358
virtual ~Integrator()
Destructor.
Definition: mrtr_integrator.cpp:536
Function_DualLinear1D(const MOERTEL::Function_DualLinear1D &old)
Copy-Constructor.
Definition: mrtr_functions.H:231
MOERTEL::Function::FunctionType Type() const
Return the function type.
Definition: mrtr_function.H:178
const Epetra_Comm * lComm() const
Returns the interface-local Epetra_Comm object associated with this interface.
Definition: mrtr_interface.H:342
bool ProjectNodetoSegment_SegmentNormal(MOERTEL::Node &node, MOERTEL::Segment &seg, double xi[], double &gap)
Project a Node onto a Segment along the interpolated outward normal field of the Segment.
Definition: mrtr_projector.cpp:313
A 2D dual linear shape function for a 3-noded triangle
Definition: mrtr_functions.H:342
Mortar_ML_Preconditioner(Teuchos::RCP< Epetra_CrsMatrix > Atilde, Teuchos::RCP< Epetra_CrsMatrix > A, Teuchos::RCP< Epetra_CrsMatrix > WT, Teuchos::RCP< Epetra_CrsMatrix > B, Teuchos::RCP< Epetra_Map > Annmap, Teuchos::ParameterList &mlparams, bool constructnow=true)
Construct the mortar modified ml preocnditioner.
Definition: mrtr_ml_preconditioner.cpp:52
virtual MOERTEL::Function * Clone() const
Clone method.
Definition: mrtr_functions.cpp:268
void Print() const
Print this node to stdout.
Definition: mrtr_point.cpp:86
void swap(kind &a, kind &b)
Template to swap 2 <kind> instances.
Definition: mrtr_utils.H:199
bool ProjectNodetoSegment_SegmentOrthogonal(MOERTEL::Node &node, MOERTEL::Segment &seg, double xi[], double &gap)
Project a Node onto a Segment orthogonal to the Segment (2D problems only)
Definition: mrtr_projector.cpp:576
int GetLocalNodeId(int nid)
Get segment-local node id from global node id nid.
Definition: mrtr_segment.cpp:281
Epetra_Comm & Comm() const
Returns the Epetra_Comm object associated with this class.
Definition: mrtr_manager.H:225
bool IsOnBoundary() const
Query the flag indicating that node is on the boundary of 2D interface.
Definition: mrtr_node.H:450
virtual ~Point()
Destructor.
Definition: mrtr_point.cpp:69
void ResetSolver()
Reset the internal solver.
Definition: mrtr_manager_solve.cpp:992
Epetra_SerialDenseMatrix * Integrate(MOERTEL::Segment &sseg, double sxia, double sxib, MOERTEL::Segment &mseg, double mxia, double mxib)
Integrate mass matrix 'M' on a 1D overlap between a slave and a master segment.
Definition: mrtr_integrator.cpp:558
A couple utility methods for the Moertel package.
virtual MOERTEL::Function * Clone() const
Clone method.
Definition: mrtr_functions.cpp:416
virtual bool LocalCoordinatesOfNode(int lid, double *xi)=0
Get local coords of a node attached to this segment with local node Id lid.
A class to define a 2-noded linear 1D Segment.
Definition: mrtr_segment_linear1D.H:125
bool Print() const
Prints complete interface information to stdout.
Definition: mrtr_interface_tools.cpp:235
bool IsIntegrated() const
Returns true if this interface has been successfully integrated and false otherwise.
Definition: mrtr_interface.H:316
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
ApplyInverse the preconditioner.
Definition: mrtr_ml_preconditioner.cpp:87
A light weight node.
Definition: mrtr_point.H:107
virtual ~ProjectedNode()
Destructor.
Definition: mrtr_pnode.cpp:110
virtual ~Function_Linear1D()
Destructor.
Definition: mrtr_functions.H:187
void StoreFunctionValues(int place, double *val, int valdim)
Store finite element function values at the Point 's coordinate Xi()
Definition: mrtr_point.cpp:97
virtual bool UnPack(int *pack)=0
Unpack some data an int vector and store data in this class.
Epetra_CrsMatrix * StripZeros(Epetra_CrsMatrix &A, double eps)
Strip out values from a matrix below a certain tolerance.
Definition: mrtr_utils.cpp:669
bool solve22(const double A[][2], double *x, const double *b)
Solve dense 2x2 system of equations.
Definition: mrtr_utils.cpp:206
A 1D linear shape function
Definition: mrtr_functions.H:156
bool SetFunctionAllSegmentsSide(int side, int id, MOERTEL::Function *func)
Set shape function to all segments on a specified side.
Definition: mrtr_interface_tools.cpp:414
Epetra_CrsMatrix * MakeSPDProblem()
Construct a spd system of equations if possible.
Definition: mrtr_manager_solve.cpp:669
bool SetLagrangeMultiplierId(int LMId)
Add a Lagrange multiplier id to this node's list.
Definition: mrtr_node.cpp:344
bool EvaluateFunction(const MOERTEL::Segment &seg, const double *xi, double *val, const int valdim, double *deriv)
Evaluate the function and derivatives at a given local coordinate.
Definition: mrtr_functions.cpp:504
double dot(const double *g1, const double *g2, const int dim)
Dot product.
Definition: mrtr_utils.cpp:186
bool Print_Vector(std::string name, Epetra_Vector &v, int ibase)
Print vector to file.
Definition: mrtr_utils.cpp:787
A class to construct a single interface.
Definition: mrtr_interface.H:229
bool LocalCoordinatesOfNode(int lid, double *xi)
Get local coords of a node attached to this segment with local node Id lid.
Definition: mrtr_segment_linear1D.cpp:203
int OtherSide(int side) const
Returns 0 if side is 1 and returns 1 if side is 0 .
Definition: mrtr_interface_tools.cpp:657
Function_Linear1D(int out)
Constructor.
Definition: mrtr_functions.H:165
bool LocalCoordinatesOfNode(int lid, double *xi)
Get local coords of a node attached to this segment with local node Id lid.
Definition: mrtr_segment_bilineartri.cpp:204
Definition: mrtr_functions.H:500
void AddMValue(double val, int col)
Add a value to the 'M' map of this node.
Definition: mrtr_node.cpp:557
const double * XCoords()
Return view of global coordinates of this point (3D)
Definition: mrtr_point.H:165
double * BuildNormal(double *xi)
not implemented
Definition: mrtr_segment_bilinearquad.cpp:237
int Nfunctions()
Return number of functions defined on this Segment.
Definition: mrtr_segment.H:221
bool UnPack(int *pack)
Unpack some data an int vector and store data in this class.
Definition: mrtr_segment_bilineartri.cpp:141
int OutLevel()
Return the level of output written to stdout ( 0 - 10 )
Definition: mrtr_point.H:137
std::ostream & operator<<(std::ostream &os, const MOERTEL::Manager &node)
<< operator
Definition: mrtr_manager.cpp:139
bool Assemble_2D_Mod(MOERTEL::Interface &inter, MOERTEL::Segment &sseg, MOERTEL::Segment &mseg, Epetra_SerialDenseMatrix &Mmod)
Assemble modification integration result '-DELTA_M' into global matrix 'M'.
Definition: mrtr_integrator.cpp:961
Epetra_CrsMatrix * MakeSaddleProblem()
Construct a saddle point system of equations.
Definition: mrtr_manager_solve.cpp:148
bool SetNode(MOERTEL::Node *node)
Set a Node to this point.
Definition: mrtr_point.H:188
Function_DualLinear1D(int out)
Constructor.
Definition: mrtr_functions.H:224
MOERTEL::Manager::DimensionType Dimension()
Query the problem dimension.
Definition: mrtr_manager.H:238
virtual ~Function_DualLinearTri()
Destructor.
Definition: mrtr_functions.H:373
Epetra_SerialDenseMatrix * Integrate_2D_Mmod(MOERTEL::Segment &sseg, double sxia, double sxib, MOERTEL::Segment &mseg, double mxia, double mxib)
Integrate modification to mass matrix 'M' on a 1D overlap between a slave and a master segment.
Definition: mrtr_integrator.cpp:831
virtual ~Function_DualLinear1D()
Destructor.
Definition: mrtr_functions.H:246
bool ProjectNodetoSegment_NodalNormal(MOERTEL::Node &node, MOERTEL::Segment &seg, double xi[], double &gap)
Project a Node onto a Segment along the Node 's normal.
Definition: mrtr_projector.cpp:73
virtual MOERTEL::Function * Clone() const
Clone method.
Definition: mrtr_functions.cpp:490
A 1D constant shape function for a 2-noded 1D Segment
Definition: mrtr_functions.H:97
A 1D dual linear shape function
Definition: mrtr_functions.H:215
virtual ~Interface()
Destructor.
Definition: mrtr_interface_tools.cpp:132
const Epetra_Map & OperatorRangeMap() const
Get fine level OperatorRangeMap.
Definition: mrtr_ml_preconditioner.H:194
int Id() const
Return unique id of this Segment.
Definition: mrtr_segment.H:190
Projector(bool twoD, int outlevel)
Constructor.
Definition: mrtr_projector.cpp:56
Function_Linear1D(const MOERTEL::Function_Linear1D &old)
Copy-Constructor.
Definition: mrtr_functions.H:172
int Nnode() const
Return number of nodes attached to this Segment.
Definition: mrtr_segment.H:196
double Weight(int gp)
Return weight for given Gaussian point.
Definition: mrtr_integrator.H:168
int MyNnode()
Returns local total number of nodes on interface on both sides.
Definition: mrtr_interface.H:477
bool Print_Matrix(std::string name, Epetra_CrsMatrix &A, int ibase)
Print matrix to file.
Definition: mrtr_utils.cpp:724
ProjectionType GetProjectionType() const
Return the projection type to be used and as set by the user.
Definition: mrtr_interface.H:368
Definition: mrtr_ml_preconditioner.H:127
Function_DualBiLinearQuad(const MOERTEL::Function_DualBiLinearQuad &old)
Copy-Constructor.
Definition: mrtr_functions.H:516
int OutLevel()
Return the level of output written to stdout ( 0 - 10 )
Definition: mrtr_function.H:172