IFEM  90A354
ASMunstruct.h
Go to the documentation of this file.
1 // $Id$
2 //==============================================================================
12 //==============================================================================
13 
14 #ifndef _ASM_UNSTRUCT_H
15 #define _ASM_UNSTRUCT_H
16 
17 #include "MatVec.h"
18 #include <set>
19 #include <string>
20 
21 typedef std::vector<int> IntVec;
22 typedef std::set<int> IntSet;
23 
24 class RealFunc;
25 class Vec3;
26 
27 
28 namespace LR
29 {
43  struct RefineData
44  {
45  bool refShare;
49  std::vector<IntVec> MLGN;
50 
52  explicit RefineData(bool rs = false) : refShare(rs) {}
54  void clear() { options.clear(); elements.clear(); errors.clear(); }
55  };
56 }
57 
58 
64 {
65 protected:
68 
69 public:
71  virtual ~ASMunstruct() {}
72 
76  virtual bool refine(const LR::RefineData& prm, Vectors& sol) = 0;
77 
81  virtual void remapErrors(RealArray& errors, const RealArray& orig,
82  bool = false) const { errors = orig; }
83 
85  virtual IntVec getBoundaryCovered(const IntSet&) const { return IntVec(); }
87  virtual void extendRefinementDomain(IntSet&, const IntSet&) const {}
88 
90  virtual Vec3 getElementCenter(int iel) const = 0;
91 
95  virtual void storeMesh(const std::string& fName, int fType = 15) const {}
96 };
97 
98 #endif
std::vector< int > IntVec
General integer vector.
Definition: ASMbase.h:25
std::set< int > IntSet
General integer set.
Definition: ASMunstruct.h:22
std::vector< int > IntVec
General integer vector.
Definition: ASMunstruct.h:21
std::vector< Real > RealArray
A real-valued array without algebraic operations.
Definition: ImmersedBoundaries.h:29
Global algebraic operations on index 1-based matrices and vectors.
std::vector< Vector > Vectors
An array of real-valued vectors with algebraic operations.
Definition: MatVec.h:37
Abstract interface for unstructured spline patches.
Definition: ASMunstruct.h:64
ASMunstruct()
The constructor is protected to allow objects of sub-classes only.
Definition: ASMunstruct.h:67
virtual void extendRefinementDomain(IntSet &, const IntSet &) const
Extends the refinement domain with information for neighbors.
Definition: ASMunstruct.h:87
virtual void storeMesh(const std::string &fName, int fType=15) const
Stores the mesh basis to encapsulated postscript files.
Definition: ASMunstruct.h:95
virtual Vec3 getElementCenter(int iel) const =0
Returns the coordinates of the element center.
virtual IntVec getBoundaryCovered(const IntSet &) const
Returns all boundary functions that are covered by the given nodes.
Definition: ASMunstruct.h:85
virtual void remapErrors(RealArray &errors, const RealArray &orig, bool=false) const
Remaps element-wise errors from geometry mesh to refinement mesh.
Definition: ASMunstruct.h:81
virtual bool refine(const LR::RefineData &prm, Vectors &sol)=0
Refines the mesh adaptively.
virtual ~ASMunstruct()
Empty destructor.
Definition: ASMunstruct.h:71
Scalar-valued unary function of a spatial point.
Definition: Function.h:193
Simple class for representing a point in 3D space.
Definition: Vec3.h:27
Utilities for LR-splines.
Definition: AdaptiveSetup.h:22
A struct of data to control the mesh refinement.
Definition: ASMunstruct.h:44
IntVec options
Parameters used to control the refinement.
Definition: ASMunstruct.h:46
bool refShare
If true, force refinement of shared FE grids.
Definition: ASMunstruct.h:45
void clear()
Clears the refinement parameters.
Definition: ASMunstruct.h:54
IntVec elements
0-based indices of the elements to refine
Definition: ASMunstruct.h:47
RefineData(bool rs=false)
Default constructor.
Definition: ASMunstruct.h:52
RealArray errors
List of error indicators for the elements.
Definition: ASMunstruct.h:48
std::vector< IntVec > MLGN
MLGN mapping to use for multipatch.
Definition: ASMunstruct.h:49