OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
fastmarchingmethod.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef fastmarchingmethod_h
36 #define fastmarchingmethod_h
37 
38 #include "floatarray.h"
39 #include "mathfem.h"
40 
41 #include <vector>
42 #include <list>
43 #include <queue>
44 
45 namespace oofem {
46 class Domain;
47 
54 {
55 protected:
56 
63  };
66  {
67 public:
69  };
70 
72  std :: vector< FMM_DofmanRecord >dmanRecords;
75  // Delegate of FMM_DofmanRecord; stored in priority queue.
76  //class FMM_DofmanRecordDelegate {
77  //public:FMM_DofmanRecordDelegaFMM_DofmanRecordDelegatete
78  // int id;
79  //};
80 
83  FMM_DofmanRecordDelegate_greater(const FloatArray **dv) : dmanValuesPtrRef(dv)
84  { }
85  bool operator() (const int & p, const int & q) const
86  { return ( fabs( ( * dmanValuesPtrRef )->at(p) ) > fabs( ( * dmanValuesPtrRef )->at(q) ) ); }
87  };
88 
91 
93  std :: priority_queue< int, std :: vector< int > , FMM_DofmanRecordDelegate_greater >dmanTrialQueue;
94 
95 public:
101  FastMarchingMethod(Domain * d) : dmanTrialQueue( FMM_DofmanRecordDelegate_greater(& this->dmanValuesPtr) ) {
102  domain = d;
103  }
105 
117  void solve(FloatArray &dmanValues, const std :: list< int > &bcDofMans, double F);
118 
119  // identification
120  const char *giveClassName() const { return "FastMarchingMethod"; }
121 
122 protected:
124  void initialize(FloatArray &dmanValues, const std :: list< int > &bcDofMans, double F);
125 
127  void updateTrialValue(FloatArray &dmanValues, int id, double F);
128 
131 };
132 } // end namespace oofem
133 #endif // fastmarchingmethod_h
void updateTrialValue(FloatArray &dmanValues, int id, double F)
Updates the distance of trial node with given id).
Class and object Domain.
Definition: domain.h:115
const char * giveClassName() const
Fast Marching Method for unstructured grids.
Boundary nodes, from which the front will not propagate.
std::vector< FMM_DofmanRecord > dmanRecords
Array of DofManager records.
const FloatArray * dmanValuesPtr
Pointer to working set of dmanValues.
void solve(FloatArray &dmanValues, const std::list< int > &bcDofMans, double F)
Solution of problem.
Trial nodes, candidates for known (accepted).
std::priority_queue< int, std::vector< int >, FMM_DofmanRecordDelegate_greater > dmanTrialQueue
Priority queue for trial T values.
void initialize(FloatArray &dmanValues, const std::list< int > &bcDofMans, double F)
Initialize receiver.
Class representing vector of real numbers.
Definition: floatarray.h:82
DofManager Fast Marching data record.
int getSmallestTrialDofMan()
Get the trial point with smallest T; zero if empty.
FastMarchingMethod(Domain *d)
Constructor.
the oofem namespace is to define a context or scope in which all oofem names are defined.
FNM_Status_Type
Type describing node status for fast marching method.

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011