Skip to content
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

Add tutorial step7 - interpolation #560

Merged
merged 12 commits into from
Jun 2, 2023
8 changes: 7 additions & 1 deletion tutorials/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bin_PROGRAMS += \
tutorials/general/t8_step5_element_data \
tutorials/general/t8_step5_element_data_c_interface \
tutorials/general/t8_step6_stencil \
tutorials/general/t8_step7_interpolation \
tutorials/general/t8_tutorial_search \
tutorials/features/t8_features_curved_meshes

Expand Down Expand Up @@ -43,6 +44,10 @@ tutorials_general_t8_step6_stencil_SOURCES = \
tutorials/general/t8_step3_adapt_forest.cxx \
tutorials/general/t8_step6_stencil.cxx \
tutorials/general/t8_step6_main.cxx
tutorials_general_t8_step7_interpolation_SOURCES = \
tutorials/general/t8_step3_adapt_forest.cxx \
tutorials/general/t8_step7_interpolation.cxx \
tutorials/general/t8_step7_main.cxx
tutorials_general_t8_tutorial_search_SOURCES = \
tutorials/general/t8_tutorial_search.cxx \
tutorials/general/t8_step3_adapt_forest.cxx
Expand All @@ -53,4 +58,5 @@ libt8_installed_headers += \
tutorials/general/t8_step3.h \
tutorials/general/t8_step4.h \
tutorials/general/t8_step5.h \
tutorials/general/t8_step6.h
tutorials/general/t8_step6.h \
tutorials/general/t8_step7.h
49 changes: 49 additions & 0 deletions tutorials/general/t8_step7.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
This file is part of t8code.
t8code is a C library to manage a collection (a forest) of multiple
connected adaptive space-trees of general element classes in parallel.

Copyright (C) 2015 the developers

t8code is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

t8code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with t8code; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

/** file t8_step7.h
*/

#ifndef T8_STEP7_H
#define T8_STEP7_H

#include <t8.h>

T8_EXTERN_C_BEGIN ();

/* This is our own defined data that we will pass on to the
* adaptation callback. */
struct t8_step7_adapt_data
{
double midpoint[3]; /* The midpoint of our sphere. */
double refine_if_inside_radius; /* if an element's center is smaller than this value, we refine the element. */
double coarsen_if_outside_radius; /* if an element's center is larger this value, we coarsen its family. */
double *element_data;
};

/** This is the main program of this example.
*/
int t8_step7_main (int argc, char **argv);

T8_EXTERN_C_END ();

#endif /* !T8_STEP7_H */
Loading