2023-05-10 23:33:29 +00:00
|
|
|
/*
|
|
|
|
Copyright 2017-2023 Ian Jauslin
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2022-05-26 19:05:30 +00:00
|
|
|
#ifndef INIT_H
|
|
|
|
#define INIT_H
|
|
|
|
|
2022-05-27 20:09:17 +00:00
|
|
|
#include <stdio.h>
|
2023-04-06 02:41:19 +00:00
|
|
|
#include <stdbool.h>
|
2022-05-27 20:09:17 +00:00
|
|
|
|
2022-05-26 19:05:30 +00:00
|
|
|
// random initial condition
|
2023-04-06 02:41:19 +00:00
|
|
|
int init_random(_Complex double* u0, double init_en, int K1, int K2, double L, int seed, bool irreversible);
|
2022-05-26 19:05:30 +00:00
|
|
|
|
|
|
|
// Gaussian initial condition
|
2023-04-06 02:41:19 +00:00
|
|
|
int init_gaussian(_Complex double* u0, double init_en, int K1, int K2, double L, bool irreversible);
|
2022-05-26 19:05:30 +00:00
|
|
|
|
2022-05-27 20:09:17 +00:00
|
|
|
// Initialize from file
|
2023-04-24 16:06:35 +00:00
|
|
|
int init_file_txt (_Complex double* u0, int K1, int K2, FILE* initfile);
|
|
|
|
int init_file_bin (_Complex double* u0, int K1, int K2, FILE* initfile);
|
2022-05-27 20:09:17 +00:00
|
|
|
|
2022-05-26 19:05:30 +00:00
|
|
|
#endif
|