A 3D adaptive BEM space with piecewise constant basis functions. More...

#include <space.hh>

Inheritance diagram for bem::AdaptConst3d002< F >:
bem::AdaptiveSpace< concepts::Real > concepts::SpaceOnCells< concepts::Real > concepts::AdaptiveSpace< concepts::Real, AdaptiveAdjust > concepts::Space< concepts::Real >

Public Types

typedef Scan< ElementWithCell< concepts::Real > > Scanner
 
typedef ElementWithCell< concepts::Realtype
 

Public Member Functions

 AdaptConst3d002 (concepts::Mesh2 &msh, uint lvl, ushort deltal, ushort deltaL)
 Constructor. More...
 
void adjust (const concepts::Element< F > &elm, const AdaptiveAdjust &a)
 Sets the adjustments for an element. More...
 
void adjust (const Constant3d001< F > &elm, const AdaptiveAdjust &a)
 
virtual void adjust (const Element< concepts::Real > &elm, const AdaptiveAdjust &a)=0
 Adjusts the space in the next rebuild step for this element. More...
 
uint dim ()
 Returns the dimension of the space. More...
 
uint dim () const
 Returns the number of degrees of freedom. More...
 
virtual uint getOutputDimension () const
 Returns the default output dimension, when we consider plotting a real-valued operator on this space. More...
 
std::ostream & info (std::ostream &os, uint mode=0) const
 Gives some information about the space. More...
 
short l (Constant3d001< F > &elm)
 Returns the level of a element. More...
 
uint maxlevel ()
 Returns the maximal level of all elements. More...
 
uint minlevel ()
 Returns the minimal level of all elements. More...
 
uint nelm ()
 Returns the number of elements in the space. More...
 
uint nelm () const
 Returns the number of elements of the space. More...
 
void rebuild ()
 Rebuilds the space. More...
 
concepts::Scan< concepts::ElementWithCell< F > > * scan ()
 Returns a scanner to iterate over the elements of the space. More...
 
concepts::Scan< concepts::ElementWithCell< F > > * scan () const
 Returns a scanner for the active elements of the space. More...
 
 ~AdaptConst3d002 ()
 

Protected Member Functions

std::ostream & info (std::ostream &os) const
 

Private Member Functions

void rebuild0_ (concepts::Connector2 &cntr, int l, int &L)
 Marks the cells correctly for the new space. More...
 
void rebuild1_ (concepts::Connector2 &cntr, uint l)
 
void rebuild2_ ()
 
void rebuild3_ (concepts::Triangle3d &cell, uint l, ushort tag)
 

Private Attributes

concepts::DynArray< AdaptiveAdjustadj_
 Dynamic array of the adjustment information of the mesh. More...
 
concepts::DynArray< concepts::AdaptiveControl<> > ctrl_
 Dynamic array of the control information for the elements. More...
 
ushort deltal_
 level difference between two neighbouring elements less or equal to $\Delta l$. More...
 
ushort deltaL_
 level difference between two elements less or equal to $\Delta L$. More...
 
uint dim_
 Number of degrees of freedom in the space. More...
 
concepts::DynArray< EdgeMapedgmap_
 Dynamic array of the edge $\rightarrow$ panel mapping. More...
 
concepts::Joiner< concepts::ElementWithCell< F > *, 1 > * elm_
 Linked list of the elements. More...
 
uint maxlvl_
 Maximal level of all elements. More...
 
uint minlvl_
 Minimal level of all elements. More...
 
concepts::Mesh2msh_
 The mesh. More...
 
uint nelm_
 Number of elements currently active in the mesh. More...
 
bool rebuild_
 If true: the mesh has to be rebuilt (refined or coarsened) More...
 
std::stack< EdgeMap * > stk_
 stack for the edge $\rightarrow$ panels mappings with a too large level difference More...
 

Detailed Description

template<class F = concepts::Real>
class bem::AdaptConst3d002< F >

A 3D adaptive BEM space with piecewise constant basis functions.

Constraints: level difference between neighbouring elements is less or equal to $\Delta l$, Maximal level difference between two panels is less of equal to $\Delta L$.

Parameters
FField of the space (Real or Cmplx)
Test:
test::BEMSpaceTest

Definition at line 613 of file space.hh.

Member Typedef Documentation

◆ Scanner

typedef Scan<ElementWithCell<concepts::Real > > concepts::SpaceOnCells< concepts::Real >::Scanner
inherited

Definition at line 84 of file space.hh.

◆ type

typedef ElementWithCell<concepts::Real > concepts::SpaceOnCells< concepts::Real >::type
inherited

Definition at line 83 of file space.hh.

Constructor & Destructor Documentation

◆ AdaptConst3d002()

template<class F = concepts::Real>
bem::AdaptConst3d002< F >::AdaptConst3d002 ( concepts::Mesh2 msh,
uint  lvl,
ushort  deltal,
ushort  deltaL 
)

Constructor.

Scans the mesh and sets the cells in the mesh active and the level of refinement in all cells to the given values. rebuild_ is set to true, ie. if the mesh is used it will firstly be rebuilt.

Parameters
mshThe surface of interest partitioned into a mesh.
lvlLevel of refinement
deltalMaximal local level difference
deltaLMaximal global level difference

◆ ~AdaptConst3d002()

template<class F = concepts::Real>
bem::AdaptConst3d002< F >::~AdaptConst3d002 ( )

Member Function Documentation

◆ adjust() [1/3]

template<class F = concepts::Real>
void bem::AdaptConst3d002< F >::adjust ( const concepts::Element< F > &  elm,
const AdaptiveAdjust a 
)

Sets the adjustments for an element.

The adjustment information in adj_ is updated and the flag rebuild_ is set to true.

Parameters
elmElement to be adjusted
lDifference in the level
Exceptions
MissingFeature

◆ adjust() [2/3]

template<class F = concepts::Real>
void bem::AdaptConst3d002< F >::adjust ( const Constant3d001< F > &  elm,
const AdaptiveAdjust a 
)

◆ adjust() [3/3]

virtual void concepts::AdaptiveSpace< concepts::Real , AdaptiveAdjust >::adjust ( const Element< F > &  elm,
const Tadj &  a 
)
pure virtualinherited

Adjusts the space in the next rebuild step for this element.

◆ dim() [1/2]

template<class F >
uint bem::AdaptConst3d002< F >::dim
inlinevirtual

Returns the dimension of the space.

Implements concepts::SpaceOnCells< concepts::Real >.

Definition at line 738 of file space.hh.

◆ dim() [2/2]

template<class F >
uint bem::AdaptConst3d002< F >::dim
inline

Returns the number of degrees of freedom.

Exceptions
SpaceNotBuilt

Definition at line 732 of file space.hh.

◆ getOutputDimension()

virtual uint concepts::Space< concepts::Real >::getOutputDimension ( ) const
inlinevirtualinherited

Returns the default output dimension, when we consider plotting a real-valued operator on this space.

Definition at line 50 of file space.hh.

◆ info() [1/2]

template<class F = concepts::Real>
std::ostream& bem::AdaptConst3d002< F >::info ( std::ostream &  os) const
inlineprotectedvirtual

Reimplemented from concepts::SpaceOnCells< concepts::Real >.

Definition at line 663 of file space.hh.

◆ info() [2/2]

template<class F = concepts::Real>
std::ostream& bem::AdaptConst3d002< F >::info ( std::ostream &  os,
uint  mode = 0 
) const

Gives some information about the space.

Exceptions
SpaceNotBuilt
Parameters
osOutput stream
modeThere are different levels of information available. mode = 0 Output of dimension and number of elements mode = 1 Prints all elements

◆ l()

template<class F = concepts::Real>
short bem::AdaptConst3d002< F >::l ( Constant3d001< F > &  elm)
inline

Returns the level of a element.

Definition at line 699 of file space.hh.

◆ maxlevel()

template<class F >
uint bem::AdaptConst3d002< F >::maxlevel
inline

Returns the maximal level of all elements.

Definition at line 756 of file space.hh.

◆ minlevel()

template<class F >
uint bem::AdaptConst3d002< F >::minlevel
inline

Returns the minimal level of all elements.

Definition at line 762 of file space.hh.

◆ nelm() [1/2]

template<class F >
uint bem::AdaptConst3d002< F >::nelm
inlinevirtual

Returns the number of elements in the space.

Implements concepts::SpaceOnCells< concepts::Real >.

Definition at line 750 of file space.hh.

◆ nelm() [2/2]

template<class F >
uint bem::AdaptConst3d002< F >::nelm
inline

Returns the number of elements of the space.

Exceptions
SpaceNotBuilt

Definition at line 744 of file space.hh.

◆ rebuild()

template<class F = concepts::Real>
void bem::AdaptConst3d002< F >::rebuild ( )

Rebuilds the space.

First the old list of elements in the space is removed (not the elements in the topology!). For every cell in the original mesh, rebuild0_ and rebuild1_ are called. From the mesh, they build the space and store the elements in elm_. rebuild0_ marks the elements with the right values and rebuild1_ really does the work.

Exceptions
MissingFeature

◆ rebuild0_()

template<class F = concepts::Real>
void bem::AdaptConst3d002< F >::rebuild0_ ( concepts::Connector2 cntr,
int  l,
int &  L 
)
private

Marks the cells correctly for the new space.

First, the desired level in the current connector is determined. Second, the maximum desired level of the children is recursively determined, if we need to refine the current connector. Third, the edge $\rightarrow$ panel mapping is constructed Fourth, the level difference between the panels adjusted Fifth, the tag of the current connector is updated.

Parameters
cntrThe current connector (part of the topology)
lThe current level
LThe desired level

◆ rebuild1_()

template<class F = concepts::Real>
void bem::AdaptConst3d002< F >::rebuild1_ ( concepts::Connector2 cntr,
uint  l 
)
private

◆ rebuild2_()

template<class F = concepts::Real>
void bem::AdaptConst3d002< F >::rebuild2_ ( )
private

◆ rebuild3_()

template<class F = concepts::Real>
void bem::AdaptConst3d002< F >::rebuild3_ ( concepts::Triangle3d cell,
uint  l,
ushort  tag 
)
private

◆ scan() [1/2]

template<class F >
concepts::Scan< concepts::ElementWithCell< F > > * bem::AdaptConst3d002< F >::scan
inlinevirtual

Returns a scanner to iterate over the elements of the space.

Implements concepts::SpaceOnCells< concepts::Real >.

Definition at line 776 of file space.hh.

◆ scan() [2/2]

template<class F >
concepts::Scan< concepts::ElementWithCell< F > > * bem::AdaptConst3d002< F >::scan
inline

Returns a scanner for the active elements of the space.

Exceptions
SpaceNotBuilt

Definition at line 769 of file space.hh.

Member Data Documentation

◆ adj_

template<class F = concepts::Real>
concepts::DynArray<AdaptiveAdjust> bem::AdaptConst3d002< F >::adj_
private

Dynamic array of the adjustment information of the mesh.

Definition at line 630 of file space.hh.

◆ ctrl_

template<class F = concepts::Real>
concepts::DynArray<concepts::AdaptiveControl<> > bem::AdaptConst3d002< F >::ctrl_
private

Dynamic array of the control information for the elements.

Definition at line 628 of file space.hh.

◆ deltal_

template<class F = concepts::Real>
ushort bem::AdaptConst3d002< F >::deltal_
private

level difference between two neighbouring elements less or equal to $\Delta l$.

Definition at line 636 of file space.hh.

◆ deltaL_

template<class F = concepts::Real>
ushort bem::AdaptConst3d002< F >::deltaL_
private

level difference between two elements less or equal to $\Delta L$.

Definition at line 638 of file space.hh.

◆ dim_

template<class F = concepts::Real>
uint bem::AdaptConst3d002< F >::dim_
private

Number of degrees of freedom in the space.

Definition at line 615 of file space.hh.

◆ edgmap_

template<class F = concepts::Real>
concepts::DynArray<EdgeMap> bem::AdaptConst3d002< F >::edgmap_
private

Dynamic array of the edge $\rightarrow$ panel mapping.

Definition at line 640 of file space.hh.

◆ elm_

template<class F = concepts::Real>
concepts::Joiner<concepts::ElementWithCell<F>*, 1>* bem::AdaptConst3d002< F >::elm_
private

Linked list of the elements.

Definition at line 619 of file space.hh.

◆ maxlvl_

template<class F = concepts::Real>
uint bem::AdaptConst3d002< F >::maxlvl_
private

Maximal level of all elements.

Definition at line 624 of file space.hh.

◆ minlvl_

template<class F = concepts::Real>
uint bem::AdaptConst3d002< F >::minlvl_
private

Minimal level of all elements.

Definition at line 626 of file space.hh.

◆ msh_

template<class F = concepts::Real>
concepts::Mesh2& bem::AdaptConst3d002< F >::msh_
private

The mesh.

Definition at line 622 of file space.hh.

◆ nelm_

template<class F = concepts::Real>
uint bem::AdaptConst3d002< F >::nelm_
private

Number of elements currently active in the mesh.

Definition at line 617 of file space.hh.

◆ rebuild_

template<class F = concepts::Real>
bool bem::AdaptConst3d002< F >::rebuild_
private

If true: the mesh has to be rebuilt (refined or coarsened)

Definition at line 632 of file space.hh.

◆ stk_

template<class F = concepts::Real>
std::stack<EdgeMap*> bem::AdaptConst3d002< F >::stk_
private

stack for the edge $\rightarrow$ panels mappings with a too large level difference

Definition at line 644 of file space.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich