Plugins
Loading...
Searching...
No Matches
ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra > Class Template Reference

Level-set extrapolation for the ghost-fluid method based on piecewise linear LS functions. More...

#include <levset_lin_extrapol.h>

Classes

struct  GLData
 Class for the level-set function on the coarser levels. More...
 
struct  ICData
 Class for the specification of the boundary conditions at the interface (for one component/function) More...
 
struct  SumUpNearIfOuterValues
 helper class for the loop over all the element types More...
 

Public Types

typedef TAlgebra algebra_type
 algebra type for the functions to extrapolate
 
typedef ApproximationSpace< domain_typeapprox_space_type
 type of approximation space
 
typedef TDomain domain_type
 domain type
 
typedef TDomain::grid_type grid_type
 grid type for the domain
 
typedef GridFunction< domain_type, lsf_algebra_typels_grid_func_type
 grid function type for the LSF
 
typedef CPUAlgebra lsf_algebra_type
 algebra type for the LSF
 
typedef algebra_type::matrix_type matrix_type
 matrix type
 
typedef domain_type::position_accessor_type position_accessor_type
 type of the position attachment accessor
 
typedef StdInjection< domain_type, lsf_algebra_typeprojection_type
 type of the projection of the LSF to the coarser grid levels
 
typedef algebra_type::vector_type vector_type
 vector type (for the functions to extrapolate)
 

Public Member Functions

void check_dd (ConstSmartPtr< DoFDistribution > dd) const
 checks the dof distribution of the solution
 
int check_elem_lsf (size_t n_co, GridObject *pElem, int si, int g_level, bool use_hanging, const MathVector< dim > vCornerCoords[], number time)
 checks whether the element is intersected by the interface, or what, and prepares the data
 
void clear_outer_values (vector_type &d, const DoFDistribution *dd) const
 sets the values at the outer vertices to 0
 
template<typename TElem >
void clear_outer_vectors (LocalVector &locD, size_t base_co)
 sets the values of the vector at the non-base vertices to 0
 
bool corner_inside (size_t co) const
 returns true if the corner is "inside" (use after check_elem_lsf)
 
template<typename TElem >
void eliminate_extrapolated (LocalMatrix &locM, LocalVector &locB)
 eliminates the matrix connections to the vertices behind the interface and the corresponding rhs
 
template<typename TElem >
void eliminate_extrapolated (LocalMatrix &locM, LocalVector &locB, size_t base_co)
 eliminates the matrix connections to the vertices behind the interface and the corresponding rhs
 
template<typename TElem >
void eliminate_extrapolated (LocalMatrix &locM, size_t base_co)
 eliminates the matrix connections to the vertices behind the interface
 
void exclude_subsets (SmartPtr< approx_space_type > spApproxSpace, const char *subset_names)
 excludes a (boundary) subsets from the extrapolation; note that this resets the old excluded subsets
 
void extrapolate_by_lsf (size_t num_co, number *u, size_t fct) const
 extrapolates a component of the solution to the vertices behind the interface (by averaging)
 
void extrapolate_by_lsf (size_t num_co, size_t base_co, number *u, size_t fct) const
 extrapolates a component of the solution to the vertices behind the interface (w.r.t. a base corner)
 
template<typename TElem >
void extrapolate_sol_by_lsf (LocalVector &locU, size_t base_co) const
 extrapolates all the components of the solution to the vertices behind the interface (w.r.t. a base corner)
 
 LevSetGFlinearExtrapolation ()
 class constructor
 
number lsf_at (size_t co) const
 returns the effective value of the LSF at a corner (use after check_elem_lsf)
 
void prepare_interface_bc (SmartPtr< approx_space_type > spApproxSpace)
 prepares the boundary conditions at the interface: sets all them to Dirichlet-0
 
void project_LSF ()
 projects the values of the LSF to the coarser levels
 
void set_Dirichlet_for (SmartPtr< approx_space_type > spApproxSpace, const char *fct_name, number value)
 adds a Dirichlet BC with a given value
 
void set_Dirichlet_for (SmartPtr< approx_space_type > spApproxSpace, const char *fct_name, SmartPtr< CplUserData< number, dim > > func)
 adds a Dirichlet BC with a given value
 
void set_LSF (SmartPtr< ls_grid_func_type > spLSF)
 set the level-set function and check it
 
void set_Neumann0_for (SmartPtr< approx_space_type > spApproxSpace, const char *fct_name)
 adds a Neumann-0
 
void set_outer_matrices (matrix_type &A, const DoFDistribution *dd) const
 sets the matrices at outer vertices to identity
 
void set_outer_values (vector_type &u, const DoFDistribution *dd, number time)
 sets the values at the outer vertices to given values
 

Static Public Member Functions

static bool lsf_inside (number lsf_val)
 returns true if the given value should correspond to the 'inside' subdomain
 

Static Public Attributes

static const int dim = domain_type::dim
 dimensionality (the World dimension)
 
static constexpr number small_lsf_value = 1e-8
 the threshold for the level-set function
 

Private Types

typedef LevSetGFlinearExtrapolation< TDomain, TAlgebra > this_type
 

Private Member Functions

number boundary_value (size_t fct) const
 gets the BC value
 
bool corner_excluded (size_t co) const
 checks if the corner is excluded
 
template<int refDim>
void extrapolate_by_lsf_in_ (size_t num_co, number *u, size_t fct) const
 extrapolates a component of the solution to the vertices behind the interface (by averaging)
 
template<int refDim>
void extrapolate_by_lsf_in_ (size_t num_co, size_t base_co, number *u, size_t fct) const
 extrapolates a component of the solution to the vertices behind the interface (w.r.t. a base corner)
 
void prepare_grid_levels ()
 projects the level-set functions to the coarser grid levels
 
template<typename TElem >
void sum_up_near_if_outer_values_for_ (vector_type &u, size_t fct, const DoFDistribution *dd, number time, Grid::VertexAttachmentAccessor< ANumber > &aaBC, Grid::VertexAttachmentAccessor< AUInt > &aaNumElem)
 sets the values at the outer vertices near the interface (for one type of the elements)
 

Private Attributes

bool m_co_excluded [max_num_corners]
 if corners are excluded by subsets (only for cut elements)
 
MathVector< dimm_elemCenter
 center of the element
 
SubsetGroup m_excl_ssg
 subsets to exclude
 
LocalIndices m_indLSF
 indices of the LSF dof's
 
LocalVector m_locLSF
 corner values of the LFS (if initialized)
 
GridObjectm_pElem
 the current grid element
 
int m_si
 subset index of the element
 
SmartPtr< ls_grid_func_typem_spLSF
 original Level-Set function
 
number m_time
 the physical time from the current initialization
 
const MathVector< dim > * m_vCornerCoords
 array of coordinates of the corners
 
std::vector< GLDatam_vGLData
 data on the grid levels
 
std::vector< ICDatam_vICData
 the boundary conditions at the interface
 

Static Private Attributes

static const size_t max_num_corners = grid_dim_traits<dim>::MaxNumVerticesOfElem
 max. number of corners of an grid element
 

Detailed Description

template<typename TDomain, typename TAlgebra>
class ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >

Level-set extrapolation for the ghost-fluid method based on piecewise linear LS functions.

This class implements the extrapolation of the vertex-centered solution over the interface given by the zero isoline of a piecewise linear vertex-centered grid function.

Template Parameters
TDomaindomain type
TAlgebraalgebra type for the functions to extrapolate

Member Typedef Documentation

◆ algebra_type

template<typename TDomain , typename TAlgebra >
typedef TAlgebra ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::algebra_type

algebra type for the functions to extrapolate

◆ approx_space_type

template<typename TDomain , typename TAlgebra >
typedef ApproximationSpace<domain_type> ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::approx_space_type

type of approximation space

◆ domain_type

template<typename TDomain , typename TAlgebra >
typedef TDomain ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::domain_type

domain type

◆ grid_type

template<typename TDomain , typename TAlgebra >
typedef TDomain::grid_type ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::grid_type

grid type for the domain

◆ ls_grid_func_type

template<typename TDomain , typename TAlgebra >
typedef GridFunction<domain_type, lsf_algebra_type> ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::ls_grid_func_type

grid function type for the LSF

◆ lsf_algebra_type

template<typename TDomain , typename TAlgebra >
typedef CPUAlgebra ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::lsf_algebra_type

algebra type for the LSF

◆ matrix_type

template<typename TDomain , typename TAlgebra >
typedef algebra_type::matrix_type ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::matrix_type

matrix type

◆ position_accessor_type

template<typename TDomain , typename TAlgebra >
typedef domain_type::position_accessor_type ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::position_accessor_type

type of the position attachment accessor

◆ projection_type

template<typename TDomain , typename TAlgebra >
typedef StdInjection<domain_type, lsf_algebra_type> ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::projection_type

type of the projection of the LSF to the coarser grid levels

◆ this_type

template<typename TDomain , typename TAlgebra >
typedef LevSetGFlinearExtrapolation<TDomain, TAlgebra> ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::this_type
private

◆ vector_type

template<typename TDomain , typename TAlgebra >
typedef algebra_type::vector_type ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::vector_type

vector type (for the functions to extrapolate)

Constructor & Destructor Documentation

◆ LevSetGFlinearExtrapolation()

template<typename TDomain , typename TAlgebra >
ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::LevSetGFlinearExtrapolation ( )
inline

class constructor

References SPNULL.

Member Function Documentation

◆ boundary_value()

template<typename TDomain , typename TAlgebra >
number ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::boundary_value ( size_t  fct) const
private

◆ check_dd()

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::check_dd ( ConstSmartPtr< DoFDistribution dd) const
inline

◆ check_elem_lsf()

template<typename TDomain , typename TAlgebra >
int ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::check_elem_lsf ( size_t  n_co,
GridObject pElem,
int  si,
int  g_level,
bool  use_hanging,
const MathVector< dim vCornerCoords[],
number  time 
)

checks whether the element is intersected by the interface, or what, and prepares the data

Gets the level-set function at corners of an element and corrects it to avoid small "inside" values. The function returns a positive value if the level-set function is not specified or the element is completely 'inside'. If the element is intersected by the interface, the function returns 0. If the element is completely outside, the function returns a negative value.

Parameters
n_conumber of the corners of the element
pElemthe element to process
sisubset of the element
g_levelgrid level of the element
use_hangingif there can be hanging nodes
vCornerCoordscoordinates of the corners of the element
timethe phisical time

References ug::GetLocalVector(), UG_ASSERT, and UG_THROW.

◆ clear_outer_values()

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::clear_outer_values ( vector_type d,
const DoFDistribution dd 
) const

sets the values at the outer vertices to 0

Sets all vertex dofs at outer vertices to 0.

Parameters
dthe vector where to set
dddof distribution of the grid function to reset

References ug::BlockRef(), ug::DoFDistribution::grid_level(), ug::DoFDistribution::inner_algebra_indices(), ug::GridLevel::level(), ug::DoFDistribution::multi_grid(), ug::GridLevel::TOP, and UG_THROW.

◆ clear_outer_vectors()

template<typename TDomain , typename TAlgebra >
template<typename TElem >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::clear_outer_vectors ( LocalVector locD,
size_t  base_co 
)

sets the values of the vector at the non-base vertices to 0

Sets the values of the vector at the non-base vertices to 0.

Parameters
locDthe local defect/rhs to postprocess
base_cothe base corner of the element

References ug::LocalVector::num_all_fct(), and ug::LocalVector::value().

◆ corner_excluded()

template<typename TDomain , typename TAlgebra >
bool ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::corner_excluded ( size_t  co) const
inlineprivate

checks if the corner is excluded

Parameters
cothe corner

References ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_co_excluded.

◆ corner_inside()

template<typename TDomain , typename TAlgebra >
bool ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::corner_inside ( size_t  co) const
inline

◆ eliminate_extrapolated() [1/3]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::eliminate_extrapolated ( LocalMatrix locM,
LocalVector locB 
)

eliminates the matrix connections to the vertices behind the interface and the corresponding rhs

Eliminates the matrix connections to the vertices behind the interface and corrects the right-hand side. After that, this function sets to 0 all the rows of the local matrix and all the entries of the local defect at the outer corners.

REMARK: This function should be used for linear problems only!

Parameters
locMthe local matrix to postprocess
locBthe local right-hand side to postprocess

References ug::LevelSet::ScaledLSFGrad< WDim, TElem >::compute(), ug::LocalMatrix::num_all_col_fct(), ug::LocalMatrix::num_all_row_fct(), ug::LocalVector::value(), ug::LocalMatrix::value(), ug::VecDot(), and ug::VecSubtract().

◆ eliminate_extrapolated() [2/3]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::eliminate_extrapolated ( LocalMatrix locM,
LocalVector locB,
size_t  base_co 
)

eliminates the matrix connections to the vertices behind the interface and the corresponding rhs

Eliminates the matrix connections to the vertices behind the interface and corrects the right-hand side. After that, this function sets to 0 all the rows of the local matrix and all the entries of the local defect at the base corner.

Parameters
locMthe local matrix to postprocess
locBthe local right-hand side to postprocess
base_cothe base corner of the element

References ug::LevelSet::ScaledLSFGrad< WDim, TElem >::compute(), ug::LocalMatrix::num_all_col_fct(), ug::LocalMatrix::num_all_row_fct(), ug::LocalVector::value(), ug::LocalMatrix::value(), ug::VecDot(), and ug::VecSubtract().

◆ eliminate_extrapolated() [3/3]

template<typename TDomain , typename TAlgebra >
template<typename TElem >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::eliminate_extrapolated ( LocalMatrix locM,
size_t  base_co 
)

eliminates the matrix connections to the vertices behind the interface

Eliminates the matrix connections to the vertices behind the interface. After that, this function sets to 0 all the rows of the local matrix except that for the base corner.

Parameters
locMthe local matrix to postprocess
base_cothe base corner of the element

References ug::LevelSet::ScaledLSFGrad< WDim, TElem >::compute(), ug::LocalMatrix::num_all_col_fct(), ug::LocalMatrix::num_all_row_fct(), ug::LocalMatrix::value(), ug::VecDot(), and ug::VecSubtract().

◆ exclude_subsets()

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::exclude_subsets ( SmartPtr< approx_space_type spApproxSpace,
const char *  subset_names 
)
inline

excludes a (boundary) subsets from the extrapolation; note that this resets the old excluded subsets

Parameters
spApproxSpacethe approximation space of the domain discretization
subset_namesnames of the subsets to exclude

References ug::SubsetGroup::add(), ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_excl_ssg, ug::SubsetGroup::set_subset_handler(), and ug::TokenizeTrimString().

◆ extrapolate_by_lsf() [1/2]

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::extrapolate_by_lsf ( size_t  num_co,
number u,
size_t  fct 
) const

extrapolates a component of the solution to the vertices behind the interface (by averaging)

Extrapolates a component of the solution to the vertices behind the interface by averaging.

This function extrapolates every 'outer' nodal values by the average of the extrapolations from the 'inner' nodes

Parameters
num_conumber of the corners
unodal values to extrapolate
fctindex of the function (to identify to type of the extrapolation)

References ug::ReferenceElement::dimension(), ug::ReferenceElementProvider::get(), and UG_THROW.

◆ extrapolate_by_lsf() [2/2]

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::extrapolate_by_lsf ( size_t  num_co,
size_t  base_co,
number u,
size_t  fct 
) const

extrapolates a component of the solution to the vertices behind the interface (w.r.t. a base corner)

Extrapolates a component of the solution to the vertices behind the interface w.r.t. a base corner.

This function extrapolates all the 'outer' nodal values of one component using the value at the given base corner.

Parameters
num_conumber of the corners
base_cothe base corner of the element
unodal values to extrapolate
fctindex of the function (to identify to type of the extrapolation)

References ug::ReferenceElement::dimension(), ug::ReferenceElementProvider::get(), and UG_THROW.

◆ extrapolate_by_lsf_in_() [1/2]

template<typename TDomain , typename TAlgebra >
template<int refDim>
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::extrapolate_by_lsf_in_ ( size_t  num_co,
number u,
size_t  fct 
) const
private

extrapolates a component of the solution to the vertices behind the interface (by averaging)

Extrapolates a component of the solution to the vertices behind the interface by averaging.

This function extrapolates every 'outer' nodal values by the average of the extrapolations from the 'inner' nodes

Parameters
num_conumber of the corners
unodal values to extrapolate
fctindex of the function (to identify to type of the extrapolation)

References ug::LevelSet::DimScaledLSFGrad< WDim, RDim >::compute(), UG_ASSERT, UG_THROW, ug::VecDot(), and ug::VecSubtract().

◆ extrapolate_by_lsf_in_() [2/2]

template<typename TDomain , typename TAlgebra >
template<int refDim>
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::extrapolate_by_lsf_in_ ( size_t  num_co,
size_t  base_co,
number u,
size_t  fct 
) const
private

extrapolates a component of the solution to the vertices behind the interface (w.r.t. a base corner)

Extrapolates a component of the solution to the vertices behind the interface w.r.t. a base corner.

This function extrapolates all the 'outer' nodal values of one component using the value at the given base corner.

Parameters
num_conumber of the corners
base_cothe base corner of the element
unodal values to extrapolate
fctindex of the function (to identify to type of the extrapolation)

References ug::LevelSet::DimScaledLSFGrad< WDim, RDim >::compute(), UG_THROW, ug::VecDot(), and ug::VecSubtract().

◆ extrapolate_sol_by_lsf()

template<typename TDomain , typename TAlgebra >
template<typename TElem >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::extrapolate_sol_by_lsf ( LocalVector locU,
size_t  base_co 
) const

extrapolates all the components of the solution to the vertices behind the interface (w.r.t. a base corner)

Extrapolates all the components of the solution to the vertices behind the interface.

This function extrapolates all the 'outer' nodal values using the value at the given base corner.

Parameters
locUthe solution to extrapolate
base_cothe base corner of the element

References ug::LevelSet::ScaledLSFGrad< WDim, TElem >::compute(), ug::LocalVector::num_all_dof(), ug::LocalVector::num_all_fct(), UG_THROW, ug::LocalVector::value(), ug::VecDot(), and ug::VecSubtract().

◆ lsf_at()

template<typename TDomain , typename TAlgebra >
number ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::lsf_at ( size_t  co) const
inline

returns the effective value of the LSF at a corner (use after check_elem_lsf)

Parameters
cothe corner

References ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_locLSF, and ug::LocalVector::value().

◆ lsf_inside()

template<typename TDomain , typename TAlgebra >
static bool ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::lsf_inside ( number  lsf_val)
inlinestatic

returns true if the given value should correspond to the 'inside' subdomain

Note that this function is used only to determine whether a vertex is inside the actual domain. It introduces a threshold that should exclude machine zero in denominators in the extrapolation and the elimination in the Ghost-Fluid method. In the extrapolation and the elimination themselves, no threshold is used, and the interface corresponds to the zero isoline of the LSF.

Parameters
lsf_valvalue of the level-set function

References ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::small_lsf_value.

Referenced by ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::corner_inside().

◆ prepare_grid_levels()

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::prepare_grid_levels ( )
private

projects the level-set functions to the coarser grid levels

Prepares the grid functions (as data structures - not values) and the restriction operators (canonical injections) on grid levels.

References SPNULL, ug::GridLevel::TOP, and UG_ASSERT.

Referenced by ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::set_LSF().

◆ prepare_interface_bc()

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::prepare_interface_bc ( SmartPtr< approx_space_type spApproxSpace)
inline

◆ project_LSF()

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::project_LSF ( )

projects the values of the LSF to the coarser levels

Projects the level-set function to the coarser grid levels

◆ set_Dirichlet_for() [1/2]

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::set_Dirichlet_for ( SmartPtr< approx_space_type spApproxSpace,
const char *  fct_name,
number  value 
)
inline

adds a Dirichlet BC with a given value

Parameters
spApproxSpacethe approximation space of the domain discretization
fct_namefunction to impose the condition for
valuethe Dirichlet value

References ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_vICData, ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::prepare_interface_bc(), and SPNULL.

◆ set_Dirichlet_for() [2/2]

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::set_Dirichlet_for ( SmartPtr< approx_space_type spApproxSpace,
const char *  fct_name,
SmartPtr< CplUserData< number, dim > >  func 
)
inline

adds a Dirichlet BC with a given value

Parameters
spApproxSpacethe approximation space of the domain discretization
fct_namefunction to impose the condition for
functhe Dirichlet function

References ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_vICData, and ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::prepare_interface_bc().

◆ set_LSF()

◆ set_Neumann0_for()

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::set_Neumann0_for ( SmartPtr< approx_space_type spApproxSpace,
const char *  fct_name 
)
inline

adds a Neumann-0

Parameters
spApproxSpacethe approximation space of the domain discretization
fct_namefunction to impose the condition for

References ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_vICData, ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::prepare_interface_bc(), and SPNULL.

◆ set_outer_matrices()

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::set_outer_matrices ( matrix_type A,
const DoFDistribution dd 
) const

sets the matrices at outer vertices to identity

Sets all matrices at outer vertices to identity.

Parameters
Athe vector where to set
dddof distribution of the grid function to reset

References ug::BlockRef(), ug::DoFDistribution::grid_level(), ug::DoFDistribution::inner_algebra_indices(), ug::GridLevel::level(), ug::DoFDistribution::multi_grid(), ug::SetDirichletRow(), ug::GridLevel::TOP, and UG_THROW.

◆ set_outer_values()

template<typename TDomain , typename TAlgebra >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::set_outer_values ( vector_type u,
const DoFDistribution dd,
number  time 
)

sets the values at the outer vertices to given values

Sets all vertex dofs at outer vertices to given values.

Parameters
uthe vector where to set
dddof distribution of the grid function to reset
timethe physical time

References ug::BlockRef(), ug::DoFRef(), grid(), ug::DoFDistribution::grid_level(), ug::DoFDistribution::inner_dof_indices(), ug::DoFDistributionInfoProvider::is_def_in_subset(), ug::GridLevel::level(), ug::DoFDistribution::multi_grid(), ug::DoFDistributionInfoProvider::num_fct(), ug::DoFDistributionInfoProvider::num_subsets(), PCL_RO_SUM, ug::GridLevel::TOP, and UG_THROW.

◆ sum_up_near_if_outer_values_for_()

template<typename TDomain , typename TAlgebra >
template<typename TElem >
void ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::sum_up_near_if_outer_values_for_ ( vector_type u,
size_t  fct,
const DoFDistribution dd,
number  time,
Grid::VertexAttachmentAccessor< ANumber > &  aaBC,
Grid::VertexAttachmentAccessor< AUInt > &  aaNumElem 
)
private

sets the values at the outer vertices near the interface (for one type of the elements)

Sets the values at the outer vertices near the interface (for one type of the elements).

Parameters
uthe vector where to set
fctthe function index to process
dddof distribution of the grid function to reset
timethe physical time
aaBCattachment accessor for the bc values
aaNumElemattachment accessor for number of visits

References ug::DoFRef(), ug::DoFDistribution::grid_level(), ug::DoFDistribution::inner_dof_indices(), ug::GridLevel::level(), ug::DoFDistribution::multi_grid(), ug::DoFDistributionInfoProvider::num_subsets(), ug::GridLevel::TOP, and UG_THROW.

Member Data Documentation

◆ dim

template<typename TDomain , typename TAlgebra >
const int ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::dim = domain_type::dim
static

◆ m_co_excluded

template<typename TDomain , typename TAlgebra >
bool ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_co_excluded[max_num_corners]
private

if corners are excluded by subsets (only for cut elements)

Referenced by ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::corner_excluded().

◆ m_elemCenter

template<typename TDomain , typename TAlgebra >
MathVector<dim> ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_elemCenter
private

center of the element

◆ m_excl_ssg

template<typename TDomain , typename TAlgebra >
SubsetGroup ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_excl_ssg
private

◆ m_indLSF

template<typename TDomain , typename TAlgebra >
LocalIndices ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_indLSF
private

indices of the LSF dof's

◆ m_locLSF

template<typename TDomain , typename TAlgebra >
LocalVector ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_locLSF
private

◆ m_pElem

template<typename TDomain , typename TAlgebra >
GridObject* ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_pElem
private

the current grid element

◆ m_si

template<typename TDomain , typename TAlgebra >
int ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_si
private

subset index of the element

◆ m_spLSF

◆ m_time

template<typename TDomain , typename TAlgebra >
number ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_time
private

the physical time from the current initialization

◆ m_vCornerCoords

template<typename TDomain , typename TAlgebra >
const MathVector<dim>* ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_vCornerCoords
private

array of coordinates of the corners

◆ m_vGLData

template<typename TDomain , typename TAlgebra >
std::vector<GLData> ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::m_vGLData
private

data on the grid levels

◆ m_vICData

◆ max_num_corners

template<typename TDomain , typename TAlgebra >
const size_t ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::max_num_corners = grid_dim_traits<dim>::MaxNumVerticesOfElem
staticprivate

max. number of corners of an grid element

◆ small_lsf_value

template<typename TDomain , typename TAlgebra >
constexpr number ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::small_lsf_value = 1e-8
staticconstexpr

the threshold for the level-set function

Referenced by ug::LevelSet::LevSetGFlinearExtrapolation< TDomain, TAlgebra >::lsf_inside().


The documentation for this class was generated from the following files: