ug4
ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation > Class Template Reference

domain discretization for the Level-Set Ghost-Fluid method More...

#include <dom_disc_embb.h>

+ Inheritance diagram for ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >:

Public Types

typedef TAlgebra algebra_type
 Type of algebra. More...
 
typedef ApproximationSpace< TDomain > approx_space_type
 Type of approximation space. More...
 
typedef TDomain domain_type
 Type of Domain. More...
 
typedef TDomain::grid_type grid_type
 Type of the grid. More...
 
typedef gass_type::ls_grid_func_type ls_grid_func_type
 Type of the LSF grid functions. More...
 
typedef algebra_type::matrix_type matrix_type
 Type of algebra matrix. More...
 
typedef algebra_type::vector_type vector_type
 Type of algebra vector. More...
 
- Public Types inherited from ug::DomainDiscretizationBase< TDomain, TAlgebra, LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation > >
typedef TAlgebra algebra_type
 Type of algebra. More...
 
typedef ApproximationSpace< TDomain > approx_space_type
 Type of approximation space. More...
 
typedef TDomain domain_type
 Type of Domain. More...
 
typedef CPUAlgebra::vector_type error_vector_type
 Type of error vector. More...
 
typedef algebra_type::matrix_type matrix_type
 Type of algebra matrix. More...
 
typedef algebra_type::vector_type vector_type
 Type of algebra vector. More...
 
- Public Types inherited from ug::IDomainDiscretization< TAlgebra >
typedef TAlgebra algebra_type
 Algebra type. More...
 
typedef algebra_type::matrix_type matrix_type
 Type of algebra matrix. More...
 
typedef algebra_type::vector_type vector_type
 Type of algebra vector. More...
 
- Public Types inherited from ug::IAssemble< TAlgebra >
typedef TAlgebra algebra_type
 Algebra type. More...
 
typedef TAlgebra::matrix_type matrix_type
 Type of algebra matrix. More...
 
typedef TAlgebra::vector_type vector_type
 Type of algebra vector. More...
 
- Public Types inherited from ug::IDomainErrorIndicator< TAlgebra >
typedef CPUAlgebra::vector_type error_vector_type
 Type of error vector. More...
 
typedef TAlgebra::vector_type vector_type
 Type of algebra vector. More...
 
- Public Types inherited from ug::IDomainMarker< TDomain >
typedef IElementMarkingStrategy< TDomain > element_marking_strategy_type
 Type of algebra vector. More...
 
- Public Types inherited from ug::IInterfaceExtrapolation< TDomain, TAlgebra >
typedef TAlgebra algebra_type
 algebra type for the functions to extrapolate More...
 
typedef TDomain domain_type
 domain type More...
 
typedef algebra_type::matrix_type matrix_type
 matrix type More...
 
typedef algebra_type::vector_type vector_type
 vector type (for the functions to extrapolate) More...
 

Public Member Functions

virtual int check_elem_lsf (size_t n_co, GridObject *pElem, int si, bool use_hanging, const MathVector< dim > vCornerCoords[], number time)
 (slow version) checks whether the element is intersected by the interface, or what, and prepares the data More...
 
virtual 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 More...
 
virtual bool corner_inside (size_t co) const
 returns true if the corner is "inside" (use after check_elem_lsf) More...
 
void exclude_subsets (const char *subset_names)
 excludes a (boundary) subsets from the extrapolation More...
 
virtual 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) More...
 
virtual 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) More...
 
virtual number lsf_at (size_t co) const
 returns the effective value of the LSF at a corner (use after check_elem_lsf) More...
 
 LSGFDomainDiscretization (SmartPtr< approx_space_type > pApproxSpace)
 default Constructor More...
 
void project_LSF ()
 project the level-set function to the coarse levels More...
 
void set_assemble_only_cut (bool b)
 set the "assemble only in cut elements" flag More...
 
void set_Dirichlet_on_if_for (const char *fct_name, number value)
 sets the Dirichlet boundary condition at the interface for a component of the solution More...
 
void set_Dirichlet_on_if_for (const char *fct_name, SmartPtr< CplUserData< number, dim > > func)
 sets the Dirichlet boundary condition at the interface for a component of the solution More...
 
void set_LSF (SmartPtr< ls_grid_func_type > spLSF)
 set the level-set function and check it More...
 
void set_Neumann0_on_if_for (const char *fct_name)
 sets the Neumann-0 boundary condition at the interface for a component of the solution More...
 
void set_plain_Dirichlet_on_if_for (const char *fct_name, number value)
 sets the 'plain' Dirichlet boundary condition at the interface for a component of the solution More...
 
void set_plain_Dirichlet_on_if_for (const char *fct_name, SmartPtr< CplUserData< number, dim > > func)
 sets the 'plain' Dirichlet boundary condition at the interface for a component of the solution More...
 
virtual ~LSGFDomainDiscretization ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::DomainDiscretizationBase< TDomain, TAlgebra, LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation > >
void add (SmartPtr< IDiscretizationItem< TDomain, TAlgebra > > di)
 adds a disc item to the assembling process More...
 
void add (SmartPtr< IDomainConstraint< TDomain, TAlgebra > > pp)
 adds a constraint to the assembling process More...
 
void add (SmartPtr< IElemDisc< TDomain > > elem)
 adds an element discretization to the assembling process More...
 
void add_elem_error_indicator (SmartPtr< IElemError< TDomain > > elem)
 adds an element error indicator to the assembling process More...
 
virtual void adjust_solution (vector_type &u, const GridLevel &gl)
 sets dirichlet values in solution vector More...
 
virtual void adjust_solution (vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 
virtual void adjust_solution (vector_type &u, number time, const GridLevel &gl)
 sets dirichlet values in solution vector More...
 
virtual void adjust_solution (vector_type &u, number time, ConstSmartPtr< DoFDistribution > dd)
 
SmartPtr< approx_space_typeapproximation_space ()
 
ConstSmartPtr< approx_space_typeapproximation_space () const
 
virtual void assemble_defect (vector_type &d, const vector_type &u, const GridLevel &gl)
 assembles Defect More...
 
virtual void assemble_defect (vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 
virtual void assemble_defect (vector_type &d, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, const GridLevel &gl)
 assembles Defect More...
 
virtual void assemble_defect (vector_type &d, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< DoFDistribution > dd)
 
virtual void assemble_jacobian (matrix_type &J, const vector_type &u, const GridLevel &gl)
 assembles Jacobian (or Approximation of Jacobian) More...
 
virtual void assemble_jacobian (matrix_type &J, const vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 
virtual void assemble_jacobian (matrix_type &J, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const number s_a, const GridLevel &gl)
 assembles Jacobian (or Approximation of Jacobian) More...
 
virtual void assemble_jacobian (matrix_type &J, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const number s_a0, ConstSmartPtr< DoFDistribution > dd)
 
virtual void assemble_linear (matrix_type &A, vector_type &b, ConstSmartPtr< DoFDistribution > dd)
 
virtual void assemble_linear (matrix_type &A, vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, const GridLevel &gl)
 Assembles matrix_type and Right-Hand-Side for a linear problem. More...
 
virtual void assemble_linear (matrix_type &A, vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< DoFDistribution > dd)
 
virtual void assemble_linear (matrix_type &mat, vector_type &rhs, const GridLevel &gl)
 Assembles Matrix and Right-Hand-Side for a linear problem. More...
 
virtual void assemble_mass_matrix (matrix_type &M, const vector_type &u, const GridLevel &gl)
 assembles the mass matrix More...
 
virtual void assemble_mass_matrix (matrix_type &M, const vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 assembles the mass matrix More...
 
virtual void assemble_rhs (vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, const GridLevel &gl)
 Assembles Right-Hand-Side for a linear problem. More...
 
virtual void assemble_rhs (vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< DoFDistribution > dd)
 
virtual void assemble_rhs (vector_type &rhs, const GridLevel &gl)
 assembles the rhs More...
 
virtual void assemble_rhs (vector_type &rhs, const vector_type &u, const GridLevel &gl)
 assembles the rhs More...
 
virtual void assemble_rhs (vector_type &rhs, const vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 
virtual void assemble_rhs (vector_type &rhs, ConstSmartPtr< DoFDistribution > dd)
 
virtual void assemble_stiffness_matrix (matrix_type &A, const vector_type &u, const GridLevel &gl)
 assembles the stiffness matrix More...
 
virtual void assemble_stiffness_matrix (matrix_type &A, const vector_type &u, ConstSmartPtr< DoFDistribution > dd)
 assembles the stiffness matrix More...
 
virtual void calc_error (const GridFunction< TDomain, TAlgebra > &u)
 
virtual void calc_error (const GridFunction< TDomain, TAlgebra > &u, error_vector_type *u_vtk)
 
virtual void calc_error (const vector_type &u, const GridLevel &gl, error_vector_type *u_vtk=NULL)
 
virtual void calc_error (const vector_type &u, ConstSmartPtr< DoFDistribution > dd, error_vector_type *u_vtk=NULL)
 
virtual void calc_error (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, const GridLevel &gl, error_vector_type *u_vtk)
 Transient version. More...
 
virtual void calc_error (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, error_vector_type *u_vtk)
 Transient version. More...
 
virtual SmartPtr< IConstraint< TAlgebra > > constraint (size_t i)
 returns the i'th constraint More...
 
 DomainDiscretizationBase (SmartPtr< approx_space_type > pApproxSpace)
 default Constructor More...
 
virtual void finish_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const GridLevel &gl)
 
virtual void finish_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd)
 
virtual void finish_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const GridLevel &gl)
 finishes timestep More...
 
virtual void finish_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd)
 
virtual void invalidate_error ()
 
virtual bool is_error_valid ()
 returns whether current error values are valid More...
 
virtual void mark_with_strategy (IRefiner &refiner, SmartPtr< IElementMarkingStrategy< TDomain > > strategy)
 
virtual size_t num_constraints () const
 returns number of registered constraints More...
 
virtual void prepare_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number future_time, const GridLevel &gl)
 
virtual void prepare_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number future_time, ConstSmartPtr< DoFDistribution > dd)
 
virtual void prepare_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const GridLevel &gl)
 
virtual void prepare_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< DoFDistribution > dd)
 
void remove (SmartPtr< IDomainConstraint< TDomain, TAlgebra > > pp)
 removes a constraint from the assembling process More...
 
void remove (SmartPtr< IElemDisc< TDomain > > elem)
 removes a element discretization from the assembling process More...
 
void remove_elem_error_indicator (SmartPtr< IElemError< TDomain > > elem)
 removes a element discretization from the assembling process More...
 
virtual ~DomainDiscretizationBase ()
 virtual destructor More...
 
void assemble_jacobian (matrix_type &J, GridFunction< TDomain, TAlgebra > &u)
 
void assemble_defect (vector_type &d, GridFunction< TDomain, TAlgebra > &u)
 
void assemble_linear (matrix_type &A, GridFunction< TDomain, TAlgebra > &rhs)
 
void assemble_rhs (vector_type &rhs, GridFunction< TDomain, TAlgebra > &u)
 
void assemble_rhs (GridFunction< TDomain, TAlgebra > &b)
 
void adjust_solution (GridFunction< TDomain, TAlgebra > &u)
 
virtual SmartPtr< AssemblingTuner< TAlgebra > > ass_tuner ()
 
virtual ConstSmartPtr< AssemblingTuner< TAlgebra > > ass_tuner () const
 
- Public Member Functions inherited from ug::IDomainDiscretization< TAlgebra >
void adjust_solution (vector_type &u, number time)
 adjust solution on surface level More...
 
void assemble_defect (vector_type &d, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
 assembles defect on surface level More...
 
void assemble_jacobian (matrix_type &J, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const number s_a)
 assembles jacobian on surface level More...
 
void assemble_linear (matrix_type &A, vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
 assembles linear on surface level More...
 
void assemble_rhs (vector_type &b, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
 assembles rhs on surface level More...
 
virtual void finish_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol)
 
void finish_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol)
 finishes timestep on surface level More...
 
virtual void prepare_timestep (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number future_time)
 
void prepare_timestep_elem (ConstSmartPtr< VectorTimeSeries< vector_type > > vSol)
 prepares timestep on surface level More...
 
virtual ~IDomainDiscretization ()
 
- Public Member Functions inherited from ug::IAssemble< TAlgebra >
void adjust_solution (vector_type &u)
 
void assemble_defect (vector_type &d, const vector_type &u)
 
void assemble_jacobian (matrix_type &J, const vector_type &u)
 
void assemble_linear (matrix_type &A, vector_type &b)
 
void assemble_mass_matrix (matrix_type &M, const vector_type &u)
 
void assemble_rhs (vector_type &b)
 
virtual void assemble_rhs (vector_type &rhs, const vector_type &u)
 
void assemble_stiffness_matrix (matrix_type &A, const vector_type &u)
 
virtual ~IAssemble ()
 Virtual Destructor. More...
 
- Public Member Functions inherited from ug::IDomainErrorIndicator< TAlgebra >
virtual ~IDomainErrorIndicator ()
 
- Public Member Functions inherited from ug::IDomainMarker< TDomain >
virtual ~IDomainMarker ()
 
- Public Member Functions inherited from ug::IInterfaceExtrapolation< TDomain, TAlgebra >
 IInterfaceExtrapolation ()
 Constructor. More...
 
virtual ~IInterfaceExtrapolation ()
 Destructor. More...
 

Static Public Attributes

static const int dim = TDomain::dim
 world dimension More...
 
- Static Public Attributes inherited from ug::DomainDiscretizationBase< TDomain, TAlgebra, LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation > >
static const int dim
 world dimension More...
 
- Static Public Attributes inherited from ug::IInterfaceExtrapolation< TDomain, TAlgebra >
static const int dim = domain_type::dim
 dimensionality (the World dimension) More...
 

Protected Attributes

SmartPtr< ls_constraint_typem_spLSFGFConstraint
 the Level-Set Function constraint More...
 
- Protected Attributes inherited from ug::DomainDiscretizationBase< TDomain, TAlgebra, LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation > >
bool m_bErrorCalculated
 
IMultigridElementIndicators< TDomain > m_mgElemErrors
 
SmartPtr< approx_space_typem_spApproxSpace
 current approximation space More...
 
SmartPtr< AssemblingTuner< TAlgebra > > m_spAssTuner
 this object provides tools to adapt the assemble routine More...
 
std::vector< SmartPtr< IDomainConstraint< TDomain, TAlgebra > > > m_vConstraint
 vector holding all registered constraints More...
 
std::vector< SmartPtr< IElemDisc< TDomain > > > m_vDomainElemDisc
 vector holding all registered elem discs More...
 
std::vector< SmartPtr< IElemError< TDomain > > > m_vDomainElemError
 vector holding all registered elem discs More...
 
std::vector< IElemDisc< TDomain > * > m_vElemDisc
 vector holding all registered elem discs More...
 
std::vector< IElemError< TDomain > * > m_vElemError
 vector holding all registered elem discs More...
 

Private Types

typedef DomainDiscretizationBase< TDomain, TAlgebra, gass_typebase_type
 Type of the base class. More...
 
typedef LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation > gass_type
 Type of the global assembler. More...
 
typedef LSGFConstraint< TDomain, TAlgebra, TExtrapolation > ls_constraint_type
 Type of the constraint. More...
 

Additional Inherited Members

- Protected Types inherited from ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >
typedef TAlgebra algebra_type
 Algebra type. More...
 
typedef ApproximationSpace< domain_typeapprox_space_type
 type of approximation space More...
 
typedef TDomain domain_type
 Domain type. More...
 
typedef TExtrapolation extrapolation_type
 Extrapolation type. More...
 
typedef extrapolation_type::ls_grid_func_type ls_grid_func_type
 Grid function type for the LSF. More...
 
typedef algebra_type::matrix_type matrix_type
 Matrix type in the algebra. More...
 
typedef algebra_type::vector_type vector_type
 Vector type in the algebra. More...
 
- Protected Member Functions inherited from ug::DomainDiscretizationBase< TDomain, TAlgebra, LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation > >
ConstSmartPtr< DoFDistributiondd (const GridLevel &gl) const
 returns the level dof distribution More...
 
void update_constraints ()
 
void update_disc_items ()
 
void update_elem_discs ()
 set the approximation space in the elem discs and extract IElemDiscs More...
 
void update_elem_errors ()
 
void update_error_items ()
 
- Protected Member Functions inherited from ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >
template<typename TElem , typename TIterator >
void AssembleDefect (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, vector_type &d, const vector_type &u, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
template<typename TElem , typename TIterator >
void AssembleDefect (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, vector_type &d, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
template<typename TElem , typename TIterator >
void AssembleJacobian (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &J, const vector_type &u, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
template<typename TElem , typename TIterator >
void AssembleJacobian (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &J, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number s_a0, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
template<typename TElem , typename TIterator >
void AssembleLinear (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &A, vector_type &rhs, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
template<typename TElem , typename TIterator >
void AssembleLinear (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &A, vector_type &rhs, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
template<typename TElem , typename TIterator >
void AssembleMassMatrix (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &M, const vector_type &u, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
template<typename TElem , typename TIterator >
void AssembleStiffnessMatrix (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, matrix_type &A, const vector_type &u, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
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 More...
 
virtual void clear_outer_values (vector_type &d, const DoFDistribution *dd) const
 sets the values at the outer vertices to 0 More...
 
bool corner_inside (size_t co) const
 returns true if the corner is "inside" (use after check_elem_lsf) More...
 
void exclude_subsets (SmartPtr< approx_space_type > spApproxSpace, const char *subset_names)
 excludes a (boundary) subsets from the extrapolation More...
 
void extrapolate_by_lsf (size_t num_co, number *u, size_t fct) const
 extrapolates a component the solution to the vertices behind the interface (by averaging) More...
 
void extrapolate_by_lsf (size_t num_co, size_t base_co, number *u, size_t fct) const
 extrapolates a component the solution to the vertices behind the interface (w.r.t. a base corner) More...
 
extrapolation_typeextrapolation ()
 returns the extrapolation More...
 
void FinishTimestep (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, bool bNonRegularGrid, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
template<typename TElem , typename TIterator >
void FinishTimestepElem (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
number lsf_at (size_t co) const
 returns the effective value of the LSF at a corner (use after check_elem_lsf) More...
 
 LSGFGlobAssembler ()
 class constructor (may not have any arguments!) More...
 
void prepare_interface_bc (SmartPtr< approx_space_type > spApproxSpace)
 prepares the boundary conditions at the interface: sets all them to Dirichlet-0 More...
 
void PrepareTimestep (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< DoFDistribution > dd, bool bNonRegularGrid, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, number future_time, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
template<typename TElem , typename TIterator >
void PrepareTimestepElem (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
void project_LSF ()
 project the level-set function to the coarse levels More...
 
void set_assemble_only_cut (bool b)
 set the "assemble only in cut elements" flag More...
 
void set_Dirichlet_on_if_for (SmartPtr< approx_space_type > spApproxSpace, const char *fct_name, number value)
 adds a Dirichlet BC with a given value on the interface More...
 
void set_Dirichlet_on_if_for (SmartPtr< approx_space_type > spApproxSpace, const char *fct_name, SmartPtr< CplUserData< number, dim > > func)
 adds a Dirichlet BC with a given value on the interface More...
 
void set_LSF (SmartPtr< ls_grid_func_type > spLSF)
 set the level-set function and check it More...
 
void set_Neumann0_on_if_for (SmartPtr< approx_space_type > spApproxSpace, const char *fct_name)
 adds a Neumann-0 with on the interface More...
 
virtual void set_outer_matrices (matrix_type &A, const DoFDistribution *dd) const
 sets the matrices at outer vertices to identity More...
 
virtual void set_outer_values (vector_type &u, const DoFDistribution *dd, number time)
 sets the values at the outer vertices to given values More...
 
void set_plain_Dirichlet_on_if_for (SmartPtr< approx_space_type > spApproxSpace, const char *fct_name, number value)
 adds a "plain" Dirichlet BC with a given value on the interface More...
 
void set_plain_Dirichlet_on_if_for (SmartPtr< approx_space_type > spApproxSpace, const char *fct_name, SmartPtr< CplUserData< number, dim > > func)
 adds a "plain" Dirichlet BC with a given value on the interface More...
 
virtual ~LSGFGlobAssembler ()
 virtual destructor More...
 
- Static Protected Member Functions inherited from ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >
template<typename TElem , typename TIterator >
static void AssembleErrorEstimator (const std::vector< IElemError< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, const vector_type &u)
 
template<typename TElem , typename TIterator >
static void AssembleErrorEstimator (const std::vector< IElemError< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, std::vector< number > vScaleMass, std::vector< number > vScaleStiff, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol)
 
template<typename TElem , typename TIterator >
static void AssembleRhs (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, vector_type &rhs, const vector_type &u, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
template<typename TElem , typename TIterator >
static void AssembleRhs (const std::vector< IElemDisc< domain_type > * > &vElemDisc, ConstSmartPtr< domain_type > spDomain, ConstSmartPtr< DoFDistribution > dd, TIterator iterBegin, TIterator iterEnd, int si, bool bNonRegularGrid, vector_type &rhs, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff, ConstSmartPtr< AssemblingTuner< TAlgebra > > spAssTuner)
 
- Static Protected Attributes inherited from ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >
static const int dim = TDomain::dim
 world dimension More...
 

Detailed Description

template<typename TDomain, typename TAlgebra, typename TExtrapolation>
class ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >

domain discretization for the Level-Set Ghost-Fluid method

This class template is an implementation of the IDomainDiscretization interface for the Level-Set Ghost-Fluid method.

Template Parameters
TDomaindomain type
TAlgebraalgebra type

Member Typedef Documentation

◆ algebra_type

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
typedef TAlgebra ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::algebra_type

Type of algebra.

◆ approx_space_type

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
typedef ApproximationSpace<TDomain> ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::approx_space_type

Type of approximation space.

◆ base_type

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
typedef DomainDiscretizationBase<TDomain, TAlgebra, gass_type> ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::base_type
private

Type of the base class.

◆ domain_type

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
typedef TDomain ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::domain_type

Type of Domain.

◆ gass_type

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
typedef LSGFGlobAssembler<TDomain, TAlgebra, TExtrapolation> ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::gass_type
private

Type of the global assembler.

◆ grid_type

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
typedef TDomain::grid_type ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::grid_type

Type of the grid.

◆ ls_constraint_type

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
typedef LSGFConstraint<TDomain, TAlgebra, TExtrapolation> ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::ls_constraint_type
private

Type of the constraint.

◆ ls_grid_func_type

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
typedef gass_type::ls_grid_func_type ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::ls_grid_func_type

Type of the LSF grid functions.

◆ matrix_type

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
typedef algebra_type::matrix_type ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::matrix_type

Type of algebra matrix.

◆ vector_type

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
typedef algebra_type::vector_type ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::vector_type

Type of algebra vector.

Constructor & Destructor Documentation

◆ LSGFDomainDiscretization()

◆ ~LSGFDomainDiscretization()

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
virtual ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::~LSGFDomainDiscretization ( )
inlinevirtual

virtual destructor

Member Function Documentation

◆ check_elem_lsf() [1/2]

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

(slow version) checks whether the element is intersected by the interface, or what, and prepares the data

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

Reimplemented from ug::IInterfaceExtrapolation< TDomain, TAlgebra >.

References ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::check_elem_lsf(), ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spApproxSpace, and UG_ASSERT.

◆ check_elem_lsf() [2/2]

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

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

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

Reimplemented from ug::IInterfaceExtrapolation< TDomain, TAlgebra >.

References ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::check_elem_lsf().

◆ corner_inside()

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
virtual bool ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::corner_inside ( size_t  co) const
inlinevirtual

returns true if the corner is "inside" (use after check_elem_lsf)

Parameters
cothe corner

Reimplemented from ug::IInterfaceExtrapolation< TDomain, TAlgebra >.

References ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::corner_inside().

◆ exclude_subsets()

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::exclude_subsets ( const char *  subset_names)
inline

excludes a (boundary) subsets from the extrapolation

Parameters
subset_namesnames of the subsets to exclude

References ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::exclude_subsets(), and ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spApproxSpace.

◆ extrapolate_by_lsf() [1/2]

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
virtual void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::extrapolate_by_lsf ( size_t  num_co,
number u,
size_t  fct 
) const
inlinevirtual

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

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

Reimplemented from ug::IInterfaceExtrapolation< TDomain, TAlgebra >.

References ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::extrapolate_by_lsf().

◆ extrapolate_by_lsf() [2/2]

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
virtual void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::extrapolate_by_lsf ( size_t  num_co,
size_t  base_co,
number u,
size_t  fct 
) const
inlinevirtual

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

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

Reimplemented from ug::IInterfaceExtrapolation< TDomain, TAlgebra >.

References ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::extrapolate_by_lsf().

◆ lsf_at()

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
virtual number ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::lsf_at ( size_t  co) const
inlinevirtual

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

Parameters
cothe corner

Reimplemented from ug::IInterfaceExtrapolation< TDomain, TAlgebra >.

References ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::lsf_at().

◆ project_LSF()

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::project_LSF ( )
inline

project the level-set function to the coarse levels

References ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::project_LSF().

◆ set_assemble_only_cut()

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::set_assemble_only_cut ( bool  b)
inline

set the "assemble only in cut elements" flag

References ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::set_assemble_only_cut().

◆ set_Dirichlet_on_if_for() [1/2]

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::set_Dirichlet_on_if_for ( const char *  fct_name,
number  value 
)
inline

sets the Dirichlet boundary condition at the interface for a component of the solution

Parameters
fct_namefunction to impose the condition for
valuethe Dirichlet value

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spApproxSpace, and ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::set_Dirichlet_on_if_for().

◆ set_Dirichlet_on_if_for() [2/2]

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::set_Dirichlet_on_if_for ( const char *  fct_name,
SmartPtr< CplUserData< number, dim > >  func 
)
inline

sets the Dirichlet boundary condition at the interface for a component of the solution

Parameters
fct_namefunction to impose the condition for
functhe Dirichlet value (as a function)

References func(), ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spApproxSpace, and ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::set_Dirichlet_on_if_for().

◆ set_LSF()

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::set_LSF ( SmartPtr< ls_grid_func_type spLSF)
inline

set the level-set function and check it

Parameters
spLSFthe function to set

References ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::set_LSF().

◆ set_Neumann0_on_if_for()

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::set_Neumann0_on_if_for ( const char *  fct_name)
inline

sets the Neumann-0 boundary condition at the interface for a component of the solution

Parameters
fct_namefunction to impose the condition for

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spApproxSpace, and ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::set_Neumann0_on_if_for().

◆ set_plain_Dirichlet_on_if_for() [1/2]

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::set_plain_Dirichlet_on_if_for ( const char *  fct_name,
number  value 
)
inline

sets the 'plain' Dirichlet boundary condition at the interface for a component of the solution

Parameters
fct_namefunction to impose the condition for
valuethe Dirichlet value

References ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spApproxSpace, and ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::set_plain_Dirichlet_on_if_for().

◆ set_plain_Dirichlet_on_if_for() [2/2]

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
void ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::set_plain_Dirichlet_on_if_for ( const char *  fct_name,
SmartPtr< CplUserData< number, dim > >  func 
)
inline

sets the 'plain' Dirichlet boundary condition at the interface for a component of the solution

Parameters
fct_namefunction to impose the condition for
functhe Dirichlet value (as a function)

References func(), ug::DomainDiscretizationBase< TDomain, TAlgebra, TGlobAssembler >::m_spApproxSpace, and ug::LSGFGlobAssembler< TDomain, TAlgebra, TExtrapolation >::set_plain_Dirichlet_on_if_for().

Member Data Documentation

◆ dim

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
const int ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::dim = TDomain::dim
static

world dimension

◆ m_spLSFGFConstraint

template<typename TDomain , typename TAlgebra , typename TExtrapolation >
SmartPtr<ls_constraint_type> ug::LSGFDomainDiscretization< TDomain, TAlgebra, TExtrapolation >::m_spLSFGFConstraint
protected

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