p4est  1.0
Functions | Variables
example/steps/p4est_step2.c File Reference

This 2D example program refines a domain given by an ABAQUS .inp file. More...

#include <p4est_bits.h>
#include <p4est_vtk.h>
Include dependency graph for p4est_step2.c:
This graph shows which files directly or indirectly include this file:

Functions

static int refine_fn (p4est_t *p4est, p4est_topidx_t which_tree, p4est_quadrant_t *quadrant)
 Callback function to decide on refinement.
int main (int argc, char **argv)
 The main function of the step2 example program.

Variables

static int refine_level = 0
 We're not using p4est->user_pointer here but take a shortcut.

Detailed Description

This 2D example program refines a domain given by an ABAQUS .inp file.


Function Documentation

int main ( int  argc,
char **  argv 
)

The main function of the step2 example program.

It creates a connectivity from an ABAQUS .inp file and forest, refines it, and writes a VTK file.

static int refine_fn ( p4est_t p4est,
p4est_topidx_t  which_tree,
p4est_quadrant_t quadrant 
) [static]

Callback function to decide on refinement.

Refinement and coarsening is controlled by callback functions. This function is called for every processor-local quadrant in order; its return value is understood as a boolean refinement flag.

Here we use uniform refinement. Note that this function is not suitable for recursive refinement and must be used in an iterative fashion.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines