|
Plugins
|
#include <level_set.h>
Public Member Functions | |
| bool | advect_lsf (TGridFunction &uNew, TGridFunction &u) |
| computes the time steps of the discretization of the level-set equation | |
| bool | compute_ddnormal (TGridFunction &ddnormal, TGridFunction &dnormal, TGridFunction &vx, TGridFunction &vy, TGridFunction &phi, TGridFunction &u) |
| bool | compute_dnormal (TGridFunction &dnormal, TGridFunction &vx, TGridFunction &vy, TGridFunction &phi, TGridFunction &u) |
| bool | compute_error (TGridFunction &numsol) |
| computes error w.r.t. the analytical solution (taken from the dirichlet bc) | |
| bool | compute_normal (TGridFunction &vx, TGridFunction &vy, TGridFunction &u) |
| void | create_ls_subsets (TGridFunction &phi) |
| FV1LevelSetDisc () | |
| Constructor. | |
| number | get_time () |
| bool | init_ls_subsets (TGridFunction &phi) |
| subset handling methods: | |
| bool | overwrite (TGridFunction &, number, TGridFunction &, int) |
| bool | overwrite (TGridFunction &, TGridFunction &, TGridFunction &, int) |
| bool | runtimetest (TGridFunction &u) |
| void | set_delta (number delta) |
| bool | set_dirichlet_boundary (TGridFunction &uNew, const char *subsets) |
| boundary condition subset handling | |
| void | set_dirichlet_data (number val) |
| void | set_dirichlet_data (SmartPtr< CplUserData< number, dim > > d) |
| void | set_divfree (bool b) |
| void | set_dt (number deltaT) |
| set time step | |
| void | set_elements_active (int sign) |
| void | set_elements_active (int signi, int signj) |
| void | set_elements_active (int signi, int signj, int signk) |
| void | set_elements_inactive (int sign) |
| void | set_elements_inactive (int signi, int signj) |
| void | set_elements_inactive (int signi, int signj, int signk) |
| void | set_gamma (number gamma) |
| void | set_info (bool b) |
| void | set_limiter (bool b) |
| void | set_nodes_active (int sign) |
| void | set_nodes_active (int signi, int signj) |
| void | set_nodes_active (int signi, int signj, int signk) |
| void | set_nodes_inactive (int sign) |
| void | set_nodes_inactive (int signi, int signj) |
| void | set_nodes_inactive (int signi, int signj, int signk) |
| void | set_nr_of_steps (size_t n) |
| set nr of time steps to perform in advect_lsf (default is 1) | |
| bool | set_outflow_boundary (TGridFunction &uNew, const char *subsets) |
| void | set_reinit (size_t n) |
| void | set_source (number val) |
| void | set_source (SmartPtr< CplUserData< number, dim > > user) |
| void | set_time (number t) |
| void | set_timestep_nr (size_t n) |
| void | set_velocity (number vel_x) |
| void | set_velocity (number vel_x, number vel_y) |
| void | set_velocity (number vel_x, number vel_y, number vel_z) |
| void | set_velocity (SmartPtr< CplUserData< MathVector< dim >, dim > > user) |
| bool | update_ls_subsets (TGridFunction &phi) |
| ~FV1LevelSetDisc () | |
| Destructor. | |
Protected Member Functions | |
| template<typename TElem > | |
| bool | assemble_element (TElem &elem, DimFV1Geometry< dim > &geo, grid_type &grid, TGridFunction &uNew, const TGridFunction &uOld, aaGrad &aaGradient, aaVol &aaVolume) |
| bool | assign_dirichlet (TGridFunction &) |
| bool | calculate_vertex_grad_vol (TGridFunction &u, aaGrad &aaGradient, aaVol &aaVolume) |
| bool | calculate_vertex_grad_vol_sign (TGridFunction &, aaGrad &, aaVol &, TGridFunction &, int) |
| bool | calculate_vertex_vol (TGridFunction &u, aaVol &aaVolVolume) |
| fills the scvVolume attachment for all element types | |
| bool | limit_grad (TGridFunction &uOld, aaGrad &aaGradient) |
Private Types | |
| typedef Grid::VertexAttachmentAccessor< Attachment< MathVector< dim > > > | aaGrad |
| type of gradient attachment | |
| typedef Grid::VertexAttachmentAccessor< Attachment< number > > | aaVol |
| type of volume-size attachment | |
| typedef TGridFunction::algebra_type | algebra_type |
| algebra type | |
| typedef TGridFunction::domain_type | domain_type |
| domain type | |
| typedef TGridFunction::template traits< Edge >::const_iterator | EdgeConstIterator |
| edge iterator | |
| typedef TGridFunction::template dim_traits< dim >::const_iterator | ElemIterator |
| grid element iterator | |
| typedef TGridFunction::template dim_traits< dim >::grid_base_object | ElemType |
| type of base grid object | |
| typedef domain_type::grid_type | grid_type |
| grid type | |
| typedef domain_type::position_accessor_type | position_accessor_type |
| type of the position accessor | |
| typedef TGridFunction::template traits< Vertex >::const_iterator | VertexConstIterator |
| vertex base iterator | |
Private Attributes | |
| number | m_delta |
| SubsetGroup | m_dirichlet_sg |
| bool | m_divFree |
| number | m_dt |
| number | m_gamma |
| SmartPtr< CplUserData< number, dim > > | m_imDirichlet |
| Data import for the Dirichlet values. | |
| SmartPtr< CplUserData< number, dim > > | m_imSource |
| Data import for the right-hand side. | |
| SmartPtr< CplUserData< MathVector< dim >, dim > > | m_imVelocity |
| Data import for the Velocity field. | |
| SubsetGroup | m_inactive_sg |
| int | m_inside_elements_si |
| int | m_inside_nodes_si |
| size_t | m_limiter |
| number | m_maxCFL |
| SubsetGroup | m_neumann_sg |
| size_t | m_nrOfSteps |
| int | m_onls_elements_si |
| int | m_onls_nodes_si |
| int | m_outside_elements_si |
| int | m_outside_nodes_si |
| bool | m_print |
| number | m_time |
| size_t | m_timestep_nr |
Static Private Attributes | |
| static const int | dim = domain_type::dim |
| world dimension | |
|
private |
type of gradient attachment
|
private |
type of volume-size attachment
|
private |
algebra type
|
private |
domain type
|
private |
edge iterator
|
private |
grid element iterator
|
private |
type of base grid object
|
private |
grid type
|
private |
type of the position accessor
|
private |
vertex base iterator
|
inline |
Constructor.
References ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_source().
|
inline |
Destructor.
| bool ug::LevelSet::FV1LevelSetDisc< TGridFunction >::advect_lsf | ( | TGridFunction & | uNew, |
| TGridFunction & | uOld | ||
| ) |
computes the time steps of the discretization of the level-set equation
Computes the time steps of the discretization of the level-set equation.
Main function for assembling and solving ls equation as described in Frolkovic/Mikula, HIGH-RESOLUTION FLUX-BASED LEVEL SET METHOD, SIAM
References ug::DimFV1Geometry< int TDim, int TWorldDim >::add_boundary_subset(), ug::DoFRef(), grid(), ug::SetAttachmentValues(), UG_LOG, and ug::VecAssign().
|
protected |
assemble element using upwind
This function computes the contribution of the explicit local discretization in one grid element.
| elem | the element to compute the contribution for |
References ug::DimFV1Geometry< int TDim, int TWorldDim >::bf(), ug::DoFRef(), ug::DimFV1Geometry::SCVF::from(), SmartPtr< typename T, template< class TT > class FreePolicy >::get(), ug::GetLocalVector(), ug::DimFV1Geometry::BF::global_grad_vector(), ug::DimFV1Geometry::SCVF::global_ip(), ug::DimFV1Geometry::BF::node_id(), ug::DimFV1Geometry::BF::normal(), ug::DimFV1Geometry::SCVF::normal(), ug::DimFV1Geometry< int TDim, int TWorldDim >::num_bf(), ug::DimFV1Geometry< int TDim, int TWorldDim >::num_scv(), ug::DimFV1Geometry< int TDim, int TWorldDim >::num_scvf(), ug::DimFV1Geometry< int TDim, int TWorldDim >::num_sh(), ug::LocalVector::resize(), ug::DimFV1Geometry< int TDim, int TWorldDim >::scv_global_ips(), ug::DimFV1Geometry< int TDim, int TWorldDim >::scv_local_ips(), ug::DimFV1Geometry< int TDim, int TWorldDim >::scvf(), ug::DimFV1Geometry::BF::shape(), ug::DimFV1Geometry::SCVF::shape(), to(), ug::DimFV1Geometry::SCVF::to(), ug::DimFV1Geometry< int TDim, int TWorldDim >::update(), ug::VecLength(), and ug::VecSubtract().
|
protected |
sets Dirichlet values in solution vector for vertices in a given subset
References ug::DoFRef(), and UG_LOG.
|
protected |
computes gradient in grid vertices as well as volume of control volumes and saves the result in the grid attachments
References ug::DoFRef(), ug::DimFV1Geometry::SCV::global_grad(), grid(), ug::DimFV1Geometry< int TDim, int TWorldDim >::num_scv(), num_subsets(), ug::DimFV1Geometry< int TDim, int TWorldDim >::scv(), ug::SetAttachmentValues(), ug::DimFV1Geometry< int TDim, int TWorldDim >::update(), ug::VecScaleAppend(), and ug::DimFV1Geometry::SCV::volume().
|
protected |
References ug::DoFRef(), ug::DimFV1Geometry::SCV::global_grad(), grid(), ug::DimFV1Geometry< int TDim, int TWorldDim >::num_scv(), num_subsets(), ug::DimFV1Geometry< int TDim, int TWorldDim >::scv(), ug::SetAttachmentValues(), ug::DimFV1Geometry< int TDim, int TWorldDim >::update(), ug::VecScaleAppend(), and ug::DimFV1Geometry::SCV::volume().
|
protected |
fills the scvVolume attachment for all element types
compute volume of control volumes and saves it in the attachment
References SmartPtr< typename T, template< class TT > class FreePolicy >::get(), ug::DimFV1Geometry< int TDim, int TWorldDim >::num_scv(), ug::DimFV1Geometry< int TDim, int TWorldDim >::scv(), ug::DimFV1Geometry< int TDim, int TWorldDim >::update(), and ug::DimFV1Geometry::SCV::volume().
| bool ug::LevelSet::FV1LevelSetDisc< TGridFunction >::compute_ddnormal | ( | TGridFunction & | ddnormal, |
| TGridFunction & | dnormal, | ||
| TGridFunction & | vx, | ||
| TGridFunction & | vy, | ||
| TGridFunction & | phi, | ||
| TGridFunction & | u | ||
| ) |
UG_LOG("#\n");
References ug::DoFRef(), grid(), ug::SetAttachmentValues(), and UG_LOG.
| bool ug::LevelSet::FV1LevelSetDisc< TGridFunction >::compute_dnormal | ( | TGridFunction & | dnormal, |
| TGridFunction & | vx, | ||
| TGridFunction & | vy, | ||
| TGridFunction & | phi, | ||
| TGridFunction & | u | ||
| ) |
References ug::DoFRef(), grid(), ug::SetAttachmentValues(), and UG_LOG.
| bool ug::LevelSet::FV1LevelSetDisc< TGridFunction >::compute_error | ( | TGridFunction & | numsol | ) |
computes error w.r.t. the analytical solution (taken from the dirichlet bc)
computes error w.r.t. the analytical solution (taken from the dirichlet bc)
This is used in test cases.
References ug::DoFRef(), grid(), ug::SetAttachmentValues(), and UG_LOG.
| bool ug::LevelSet::FV1LevelSetDisc< TGridFunction >::compute_normal | ( | TGridFunction & | vx, |
| TGridFunction & | vy, | ||
| TGridFunction & | u | ||
| ) |
References ug::DoFRef(), grid(), ug::SetAttachmentValues(), UG_LOG, and ug::VecLength().
| void ug::LevelSet::FV1LevelSetDisc< TGridFunction >::create_ls_subsets | ( | TGridFunction & | phi | ) |
References UG_LOG.
|
inline |
| bool ug::LevelSet::FV1LevelSetDisc< TGridFunction >::init_ls_subsets | ( | TGridFunction & | phi | ) |
subset handling methods:
|
protected |
limit previously computed gradient so that the control-volume-wise linear interpolation function does not introduce new maxima or minima into the data
References ug::DoFRef(), grid(), ug::VecAppend(), ug::VecScaleAdd(), ug::VecSubtract(), and ug::EdgeVertices::vertex().
| bool ug::LevelSet::FV1LevelSetDisc< TGridFunction >::overwrite | ( | TGridFunction & | unew, |
| number | value, | ||
| TGridFunction & | phi, | ||
| int | sign | ||
| ) |
References ug::DoFRef().
| bool ug::LevelSet::FV1LevelSetDisc< TGridFunction >::overwrite | ( | TGridFunction & | unew, |
| TGridFunction & | uold, | ||
| TGridFunction & | phi, | ||
| int | sign | ||
| ) |
References ug::DoFRef().
| bool ug::LevelSet::FV1LevelSetDisc< TGridFunction >::runtimetest | ( | TGridFunction & | u | ) |
|
inline |
|
inline |
boundary condition subset handling
References ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_dirichlet_sg, and UG_CATCH_THROW.
|
inline |
|
inline |
|
inline |
|
inline |
set time step
References ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_dt, and UG_LOG.
|
inline |
References ug::SubsetGroup::contains(), ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_inactive_sg, ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_inside_elements_si, ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_onls_elements_si, ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_outside_elements_si, and ug::SubsetGroup::remove().
Referenced by ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_elements_active(), and ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_elements_active().
|
inline |
|
inline |
|
inline |
References ug::SubsetGroup::add(), ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_inactive_sg, ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_inside_elements_si, ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_onls_elements_si, and ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_outside_elements_si.
Referenced by ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_elements_inactive(), and ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_elements_inactive().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_inactive_sg, ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_inside_nodes_si, ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_onls_nodes_si, ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_outside_nodes_si, and ug::SubsetGroup::remove().
Referenced by ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_nodes_active(), and ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_nodes_active().
|
inline |
|
inline |
|
inline |
References ug::SubsetGroup::add(), ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_inactive_sg, ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_inside_nodes_si, ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_onls_nodes_si, and ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_outside_nodes_si.
Referenced by ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_nodes_inactive(), and ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_nodes_inactive().
|
inline |
|
inline |
|
inline |
set nr of time steps to perform in advect_lsf (default is 1)
References ug::LevelSet::FV1LevelSetDisc< TGridFunction >::m_nrOfSteps.
|
inline |
|
inline |
|
inline |
References make_sp(), and ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_source().
Referenced by ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_source().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool ug::LevelSet::FV1LevelSetDisc< TGridFunction >::update_ls_subsets | ( | TGridFunction & | phi | ) |
References ug::DoFRef(), num_subsets(), and UG_LOG.
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
Referenced by ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_dt().
|
private |
|
private |
Data import for the Dirichlet values.
Referenced by ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_dirichlet_data().
|
private |
Data import for the right-hand side.
Referenced by ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_source().
|
private |
Data import for the Velocity field.
Referenced by ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_velocity().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by ug::LevelSet::FV1LevelSetDisc< TGridFunction >::set_info().
|
private |
|
private |