-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Level set: composition #14
Merged
Merged
Changes from all commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
2666486
Move some implementations around
peterrum bb1837f
Create new file for instatiatiosn
peterrum 7e6cf36
Move reinitialization in new files
peterrum c9edb35
Move implementation of compute_normal
peterrum 8e92794
Move implementation advance_concentration
peterrum 9eb29dd
Move implementation of compute_curvature
peterrum d356923
Rename variables
peterrum 7472b3e
Introduce composition
peterrum 6b2ee61
Create operators in constructor
peterrum baa724d
Remove float specialization
peterrum 3a0e12f
Advection: Work on L:d:V
peterrum ea4da54
Add const
peterrum 657b59a
Rename variables
peterrum 01063d8
Advection: remove triangulation
peterrum 22ad56d
Remove mapping
peterrum 78f3db6
Advection remove fe
peterrum d5b1221
Introduce LevelSetOKZSolverAdvanceConcentration
peterrum 630a3e5
Introduce VectorType
peterrum 587275a
Extract velocity vectors
peterrum 6bbdab5
Remove ns from advection operator
peterrum d9ddbef
Reshuffle code
peterrum 16a3545
Make indices parameter
peterrum 906e6d6
(unused) tolerance_val removed from timestepping; comments to member …
mschreter b46fb9f
make constant time stepping members const
mschreter 9fb43da
Make parameter non-static
peterrum 1929a12
Introduce LevelSetOKZSolverAdvanceConcentrationParameter::time_step_s…
peterrum 3557dd2
Intoduce LevelSetOKZSolverAdvanceConcentrationBoundaryDescriptor
peterrum b861386
Fix quad index
peterrum a78a008
Remove timer and user new functions
peterrum e1395e0
Simplify stabilization code
peterrum a1a837f
Use iterators
peterrum 31a0990
Set dof and quad indices in ls
peterrum ee5c9e2
Move constructor
peterrum 47af9cd
Remove cyclic depdendency
peterrum 7c13eb3
temporary constructor in time stepping class introduced; separate tim…
mschreter f93c92c
Set up LevelSetOKZSolverAdvanceConcentration in constructor
peterrum ec95ab0
Fix time advance
peterrum 7802eb2
Make fluid type a function
peterrum a528252
Merg phase type maps
peterrum 052234b
Make artificial_viscosities private
peterrum 3f7769f
Simplify code
peterrum 0818013
Remove ns
peterrum 06a31b2
Sort
peterrum 8e35f6e
Simplify code
peterrum b9e79e2
Remove timer
peterrum b631769
Simplify LevelSetOKZSolverComputeCurvature
peterrum 7039ea8
Create vector alias
peterrum dc8764a
Sort fields
peterrum 393945d
Fix index
peterrum e98639c
update_ghost_values() in get_maximal_velocity
mschreter ad4d220
Format file
peterrum 2b90450
Extract quantities from block vector
peterrum fcf4957
Move implementation of constructor
peterrum 10c9162
Move timer
peterrum b846aac
Remove ns
peterrum ae3965d
Inline function
peterrum a9829f0
Move timer
peterrum 39ea6ce
Extract block components
peterrum d19360c
Sort variables
peterrum 12ce3a3
Make evaluated_convection and evaluated_normal operator private
peterrum 1606432
Introduce LevelSetOKZSolverReinitializationParameter
peterrum 03b7a9e
Intoruce time stepper in reinit
peterrum 5623f60
Use variables for indices
peterrum 3077de7
Introduce alias
peterrum bd7ce74
Update comment
peterrum 4bfb6fb
Enable degree_u == 1
peterrum 3d777f2
Move template instantiation
peterrum c108719
Create mass_matrix_diagonal
peterrum a2106bf
Pass to mass_matrix_diagonal quad index
peterrum 0b42cdf
WIP
peterrum a223511
Fix
peterrum a6cef9b
Move implementation
peterrum f50a334
Instantiate
peterrum ba2da63
Generalize indices
peterrum a1d58ab
Do not use concentration_subdivisions
peterrum 027d894
Remove parameter concentration_subdivisions
peterrum 2bdb64a
Enable simplex in LevelSetOKZSolverAdvanceConcentration
peterrum 775ca44
Fix quadrature rule for simplex in LevelSetOKZSolverAdvanceConcentration
peterrum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
// -------------------------------------------------------------------------- | ||
// | ||
// Copyright (C) 2020 by the adaflo authors | ||
// | ||
// This file is part of the adaflo library. | ||
// | ||
// The adaflo library is free software; you can use it, redistribute it, | ||
// and/or modify it under the terms of the GNU Lesser General Public License | ||
// as published by the Free Software Foundation; either version 2.1 of the | ||
// License, or (at your option) any later version. The full text of the | ||
// license can be found in the file LICENSE at the top level of the adaflo | ||
// distribution. | ||
// | ||
// -------------------------------------------------------------------------- | ||
|
||
|
||
#ifndef __adaflo_level_set_advance_concentration_h | ||
#define __adaflo_level_set_advance_concentration_h | ||
|
||
#include <deal.II/lac/la_parallel_vector.h> | ||
|
||
#include <deal.II/matrix_free/matrix_free.h> | ||
|
||
#include <adaflo/diagonal_preconditioner.h> | ||
#include <adaflo/navier_stokes.h> | ||
#include <adaflo/time_stepping.h> | ||
#include <adaflo/util.h> | ||
|
||
using namespace dealii; | ||
|
||
/** | ||
* Parameters of the advection-concentration operator. | ||
*/ | ||
struct LevelSetOKZSolverAdvanceConcentrationParameter | ||
{ | ||
/** | ||
* TODO | ||
*/ | ||
unsigned int dof_index_ls; | ||
|
||
/** | ||
* TODO | ||
*/ | ||
unsigned int dof_index_vel; | ||
|
||
/** | ||
* TODO | ||
*/ | ||
unsigned int quad_index; | ||
|
||
/** | ||
* TODO | ||
*/ | ||
bool convection_stabilization; | ||
|
||
/** | ||
* TODO | ||
*/ | ||
bool do_iteration; | ||
|
||
/** | ||
* TODO | ||
*/ | ||
double tol_nl_iteration; | ||
|
||
/** | ||
* TODO | ||
*/ | ||
TimeSteppingParameters time; | ||
}; | ||
|
||
/** | ||
* Boundary descriptors of the advection-concentration operator. | ||
*/ | ||
template <int dim> | ||
struct LevelSetOKZSolverAdvanceConcentrationBoundaryDescriptor | ||
{ | ||
/** | ||
* TODO | ||
*/ | ||
std::map<types::boundary_id, std::shared_ptr<Function<dim>>> dirichlet; | ||
|
||
/** | ||
* TODO | ||
*/ | ||
std::set<types::boundary_id> symmetry; | ||
}; | ||
|
||
template <int dim> | ||
class LevelSetOKZSolverAdvanceConcentration | ||
{ | ||
public: | ||
using VectorType = LinearAlgebra::distributed::Vector<double>; | ||
|
||
LevelSetOKZSolverAdvanceConcentration( | ||
VectorType & solution, | ||
const VectorType & solution_old, | ||
const VectorType & solution_old_old, | ||
VectorType & increment, | ||
VectorType & rhs, | ||
const VectorType & vel_solution, | ||
const VectorType & vel_solution_old, | ||
const VectorType & vel_solution_old_old, | ||
const double & global_omega_diameter, | ||
const AlignedVector<VectorizedArray<double>> &cell_diameters, | ||
const AffineConstraints<double> & constraints, | ||
const ConditionalOStream & pcout, | ||
const LevelSetOKZSolverAdvanceConcentrationBoundaryDescriptor<dim> &boundary, | ||
const MatrixFree<dim> & matrix_free, | ||
const LevelSetOKZSolverAdvanceConcentrationParameter & parameters, | ||
double & global_max_velocity, | ||
const DiagonalPreconditioner<double> &preconditioner); | ||
|
||
virtual void | ||
advance_concentration(const double dt); | ||
|
||
void | ||
advance_concentration_vmult(VectorType &dst, const VectorType &src) const; | ||
|
||
private: | ||
template <int ls_degree, int velocity_degree> | ||
void | ||
local_advance_concentration( | ||
const MatrixFree<dim, double> & data, | ||
VectorType & dst, | ||
const VectorType & src, | ||
const std::pair<unsigned int, unsigned int> &cell_range) const; | ||
|
||
template <int ls_degree, int velocity_degree> | ||
void | ||
local_advance_concentration_rhs( | ||
const MatrixFree<dim, double> & data, | ||
VectorType & dst, | ||
const VectorType & src, | ||
const std::pair<unsigned int, unsigned int> &cell_range); | ||
|
||
/** | ||
* Parameters | ||
*/ | ||
const LevelSetOKZSolverAdvanceConcentrationParameter parameters; // [i] | ||
|
||
/** | ||
* Vector section | ||
*/ | ||
VectorType & solution; // [o] new ls solution | ||
const VectorType &solution_old; // [i] old ls solution | ||
const VectorType &solution_old_old; // [i] old ls solution | ||
VectorType & increment; // [-] temp | ||
VectorType & rhs; // [-] temp | ||
|
||
const VectorType &vel_solution; // [i] new velocity solution | ||
const VectorType &vel_solution_old; // [i] old velocity solution | ||
const VectorType &vel_solution_old_old; // [i] old velocity solution | ||
|
||
/** | ||
* MatrixFree | ||
*/ | ||
const MatrixFree<dim> & matrix_free; // [i] | ||
const AffineConstraints<double> &constraints; // [i] | ||
|
||
/** | ||
* Utility | ||
*/ | ||
const ConditionalOStream &pcout; // [i] | ||
TimeStepping time_stepping; // [i] | ||
|
||
/** | ||
* Physics section | ||
*/ | ||
const double & global_omega_diameter; // [i] | ||
const AlignedVector<VectorizedArray<double>> &cell_diameters; // [i] | ||
const LevelSetOKZSolverAdvanceConcentrationBoundaryDescriptor<dim> boundary; // [i] | ||
AlignedVector<VectorizedArray<double>> artificial_viscosities; // [-] | ||
double & global_max_velocity; // [o] | ||
AlignedVector<Tensor<1, dim, VectorizedArray<double>>> evaluated_convection; // [o] | ||
|
||
/** | ||
* Solver section | ||
*/ | ||
const DiagonalPreconditioner<double> &preconditioner; // [i] preconditioner | ||
}; | ||
|
||
#endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @mschreter