PICurv
0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
Loading...
Searching...
No Matches
include
initialcondition.h
Go to the documentation of this file.
1
#ifndef INITIALCONDITION_H
2
#define INITIALCONDITION_H
3
4
#include <petscpf.h>
5
#include <petscdmswarm.h>
6
#include <stdlib.h>
7
#include <time.h>
8
#include <math.h>
9
#include <petsctime.h>
10
#include <petscsys.h>
11
#include <petscdmcomposite.h>
12
#include <petscsystypes.h>
13
// Include additional headers
14
#include "
variables.h
"
// Shared type definitions
15
#include "
ParticleSwarm.h
"
// Particle swarm functions
16
#include "
walkingsearch.h
"
// Particle location functions
17
#include "
grid.h
"
// Grid functions
18
#include "
logging.h
"
// Logging macros
19
#include "
io.h
"
// Data Input and Output functions
20
#include "
interpolation.h
"
// Interpolation routines
21
#include "
AnalyticalSolutions.h
"
// Analytical Solution for testing
22
#include "
ParticleMotion.h
"
// Functions related to motion of particles
23
#include "
Boundaries.h
"
// Functions related to Boundary condition
24
#include "
runloop.h
"
25
26
/**
27
* @brief Populate Ucont for one fresh-start block from the initial source (`-ic_source_*`).
28
* @details A staged field, when there is one, is read first: Ucat, or Ucont. The source's
29
* expressions then add their flux at every owned face. With `-ic_source_field_weight w`
30
* the staged field is scaled by w, and with a bulk velocity the expressions are scaled
31
* by PicurvSourceCellBulkFactor(). Collective.
32
* @param[in,out] user Block context whose velocity field is populated.
33
* @return PETSc error code.
34
*/
35
PetscErrorCode
PopulateInitialUcont
(
UserCtx
*user);
36
37
/**
38
* @brief High-level orchestrator to set the complete initial state of the Eulerian solver.
39
*
40
* This function is called once from main() before the time loop begins. It inspects
41
* the simulation context to determine whether to perform a fresh start (t=0) or
42
* restart from saved files. It then delegates to the appropriate helper function.
43
* Finally, it initializes the solver's history vectors (Ucont_o, P_o, etc.)
44
* to ensure the first time step has the necessary data.
45
*
46
* @param simCtx Simulation context controlling the operation.
47
* @return PetscErrorCode 0 on success.
48
*/
49
PetscErrorCode
InitializeEulerianState
(
SimCtx
*simCtx);
50
51
#endif
// INITIALCONDITION_H
AnalyticalSolutions.h
Boundaries.h
ParticleMotion.h
Header file for Particle Motion and migration related functions.
ParticleSwarm.h
Header file for Particle Swarm management functions.
grid.h
Public interface for grid, solver, and metric setup routines.
InitializeEulerianState
PetscErrorCode InitializeEulerianState(SimCtx *simCtx)
High-level orchestrator to set the complete initial state of the Eulerian solver.
Definition
initialcondition.c:242
PopulateInitialUcont
PetscErrorCode PopulateInitialUcont(UserCtx *user)
Populate Ucont for one fresh-start block from the initial source (-ic_source_*).
Definition
initialcondition.c:53
interpolation.h
io.h
Public interface for data input/output routines.
logging.h
Logging utilities and macros for PETSc-based applications.
runloop.h
variables.h
Main header file for a complex fluid dynamics solver.
SimCtx
The master context for the entire simulation.
Definition
variables.h:916
UserCtx
User-defined context containing data specific to a single computational grid level.
Definition
variables.h:1157
walkingsearch.h
Header file for particle location functions using the walking search algorithm.
Generated by
1.9.8