Commit Graph
215 Commits
Author SHA1 Message Date
camierjs b534c77ce3 - Adding -tf 1.0 to ex41p* test command
- Fix std::pow to int cast warning
2025-12-09 17:44:01 -08:00
Veselin Dobrev e2f5504b6c Remove ex41p from the lists of examples with device support 2025-12-03 17:44:14 -08:00
Boyan Lazarov 487c665968 Merge branch 'master' into imex-conv-diff-dg 2025-11-29 01:11:46 -08:00
Stowell, Mark L. 7843bfe46a Fixing CI errors 2025-10-24 08:05:44 -07:00
Anthony 435e1dfe3c Merge branch 'master' into imex-conv-diff-dg 2025-10-02 18:51:19 +00:00
Veselin Dobrev 8f2b4bb539 Add a "parallel libCEED example" test to cover more libCEED related code. 2025-08-16 15:41:26 -07:00
Toni-ko bb467f97da First draft of the parallel version of ex41. Still some debugging to do. 2025-08-01 16:24:44 -07:00
Toni-ko b8660af425 Implements SplitTimeDependentOperator class along with supporting methods. Implements an IMEX scheme for ex41. Solutions to ex41 look reasonable. 2025-07-28 16:55:23 -07:00
Dylan Copeland 4c62788e60 Merge branch 'master' of github.com:mfem/mfem into ppr 2025-02-04 16:18:17 -08:00
Tzanio Kolev e4c2152419 Update Copyright to 2010-2025 2025-02-03 12:17:26 -08:00
Dylan Copeland a4c097f47c Merge branch 'master' of github.com:mfem/mfem into ppr 2024-08-16 18:15:41 -07:00
Tzanio Kolev 0952809e5e Merge pull request #4252 from farscape-project/makefile
Improve support for out-of-tree installations
2024-07-19 14:12:27 -07:00
Nuno Nobre c32d62f83c Try to be a bit cleverer when looking for config.mk 2024-07-15 00:10:18 +01:00
Tzanio Kolev c7772c33dc Merge branch 'master' into ex40 2024-05-26 14:23:41 -07:00
dylan-copeland 26f0dad6fa make clean 2024-05-26 13:22:56 -07:00
Will Pazner 14b1c27dc5 Override flags for ex14 and ex14p device tests 2024-05-16 16:06:56 -07:00
Will Pazner 52d467de56 Add device tests for ex14 and ex14p 2024-05-16 12:38:41 -07:00
Brendan Keith 901a714fac ex40 2024-04-14 21:37:39 -04:00
Tzanio Kolev 056a321bb0 Merge pull request #4044 from mfem/named-attr-sets
Named attribute sets
2024-04-03 13:42:46 -07:00
aa1d6441f8 General hyperbolic class and Refactored Ex18, Ex18p (#3598)
* include cfl

* include 2x2 periodic mesh to have 2^N elements.

* include computation of initial max char speed for t=0

* reorder classes to avoid incomplete type

* fix function spaces for solution variables

* Initial conditions and problems. Not yet done I think

* problem setting

* begin time stepping implementation

* Initial state assignment

* arg parser!

* default periodic square mesh updated

it seems that 2x2 periodic mesh does not work.
-> This is because 2x2 contains both 0->1 edge and 1->0 edge on the boundary
due to periodic constraint.
I believe that is why 3x3 elements are used in the data folder.

* correct errors in euler flux functions

* General Hyperbolic Form updated

* Burgers example included

* Rename FE_Evolution to HCL

* Give operators more meaningful names

* remove Aflux and include divA.
This will allow us to update operators within HCL class

* Allow variable size of invMe to handle p-refine.
invMe Type: DenseTensor -> vector<DenseMatrix>

* Update method included for HCL.
It is not tested yet.
Also, since Operator does not have Update method,
we needed to restrict Operator to NonlinearForm

* Finalize update functionality. Visualization not yet implemented.
Tested with derefine and refine after system construction.
Current code seems to give correct result.
May require further verification.

* update burgers equation

* Fix 1-d bug!
As MFEM positive/negative elements ordering
does not respect the original mesh ordering,
normal vector can be positive or negative in 1D.
We check this by checking integration point is either right or left for 1D.

* move global constants (num_eq, gas.. etc) inside of the classes

* revert back visualization code.

* Add comments and reorder classes

* Remove redundant example code as it is not used anymore.

* rename and move problem-specific defintions to cpp files

* Merged debugged code.

* shallow water an example with periodic boundary included

* rename num_equation to num_equations and include GetIntRule

* Element-wise form integrator for further refactoring

* just testing...

* rename to DGHyperbolicConservationLaws

* max_char_speed now shared by pointer

* use reference instead of pointer

* Rename HCL class to DGHCL

* Form now have pointer to max_char_speed which points to HCL class max_char_speed.
max_char_speed is not exposed to outside.
Use getter instead.

* MPI_Reduce -> MPI_All_Reduce as all workers share the same max_char_speed

* rename faceform to hyperbolic faceform

* Include HyperbolicElementForm for accurate flux evaluation

* Rename form to formintegrator as this is appropriate name

* evaluation template for element assembly

* funval -> state for readibility

* fix bug in the arguments of AssembleElementVector

* compute flux now takes correct function arguments

* ElementFormIntegrator is done. Not yet tested.🤞

* Euler problem is verified.
Burgers and shallow water will be updated

* correct typo Hyperboilic.... :(

* Burgers done. Euler typo fixed

* Shallow water also done!

* Shallow water gauss bump problem included

* include transformations to flux evaluation functions

* This fixes Allow HCL flux functions utilize space-dependent evaluation dohyun-cse/mfem#1.
Advection equation is now included

* Now DGHCL takes nonlinear form as an input argument to handle ParNonlinearForm

* Parallel euler implementation

* remove hello from..

* print function updated

* code cleanup

* Euler cleanup and parallel version bug fix

* Burgers code cleanup and parallel implementation

* shallow water updated.

* advection serial parallel done.

* correct typo in option (parallel refine)

* move hyperbolic_conservation_laws file to fem folder

* include path update

* Take NonlinearForm as reference, not a pointer. Updated Makefile, too.

* Documentation and change some variable names

* form integrators are now in heap memory to avoid malloc error

* changed nonlinear form as a pointer
It seems that PyMFEM does not like reference of nonlinear form... :(

* ignore generated files

* max_char_speed get set method instead of pointer

* nonilnForm pointer update

* nonlinearForm pass by reference

* typo correction

* Test for PyMFEM.. Other examples are not updated yet

* example scripts updated

* ternary to max function

* simplify creating parallel version.

* p-refinement done. test needed.

* testing begins!

* update procedure for main class is included.

* Testing. Still having problem. Not identified yet

* Correct size, but incorrect values.

* p-refinement done and remove nonlinear form exposure.
Parallel checking is done by dynamic_cast.
Therefore, there is no reason to expose nonlienar form to user.
This simplifies class creation :)

* p-refinement test done.

It seems that p-refinement does not result in more accurate solution.

* add option for refinement. h-refinement impl start

* h-refine works fine, but threshold should be modified to obtain bounded number of elements.

* namespace update

* examples tested.

* h-refinement done. Update marking procedure by using confidence interval

* formatting and remove cout from derefine

* include adaptive code to make file

* visualization update

* NumericalFlux -> RiemannSolver

* It seems that set is ambiguous for SWIG..

* comment on hDerefine and now use VectorFunctionCoefficient for IC and Velocity

* testing....

* make flux related methods public

* remove commented out codes

* make style

* doxygen update

* update ex18 with new implementation

* Combine Element/Face Form integrators.

* astyle

* remove redundant ;

* remove refinement procedures.

* thread safe clause

* remove using namespace from hpp file

* ProlongToMaxOrderDG included with interpolation

* remove lambda_function type and return VectorFunctionCoeff for initial/velocity

* removed sinpi

* Some comments

* remove other examples and style

* remove examples not included anymore

* std::cout to mfem::out and correct minor bugs

* ignore mesh file

* update makefile

* remove MPI from serial

* remove unused captured variables in lambda functions

* style

* remove ex34 from makefile and reorder initialization

* remove initialization for auxiliary variables in formintegrator

* remove gas constant from the euler system

* fix broken parts due to uninitialization

* move initialization of local variables inside of FormIntegrator constructor

* forgot to update the other constructor!

* ignore mesh and gridfunctions

* resolved memory leak. Need to check

* remove pragma omp atomic

* remove delete nonlinearForm

* resolve shadowing

* correct dof report and remove barrier in visualization

* forgot to update variable name in euler form

* nonlinearForm memory leak resolved.

destructor of nonlinearForm always delete integrators.
This results in double deletion of the form integrator if we use for both domain and face integration.
To resolve this issue, just create two integrators and pass it to nonlinearForm

* proper header setting and faster test by reducing mesh size

* delete ex18.hpp

* move lengthy functions to cpp

* header order changed

* simpler inclusion.. still have duplicated symbols

* resolved linker problem and include pnonlinear

* remove commented out functions

* documentation

* fixing memory leak..

* delete nonlinearForm

* formatting

* distclean update

* Ignore binaries and result files

* copyright

* Riemann solver comment, input updated.
Riemann solver is now passed as reference

* pass riemann solver by reference

* move default normal flux eval to cpp

* Advection uses inferred dimension from velocity field

* integration rule uses Jacobian order, too

* delete not implemented

* mark override

* format

* unique ptr and mark override

* use single HyperbolicFormIntegrator

* static GetRule

* proper creation without copying

* proper jacobian order in GetRule

* moved member function implementation to cpp file

* new line

* pass by reference

* removed 4x4 mesh and update ignore

* doxygen updated

* remove constructor with integration rule.
Users can set integration rule via NonlinearFormIntegrator::SetIntRule

* useExternalData to indicate ownership of integrator for nonlinear form

* extract flux function from the form integrator

As suggested by @pazner, flux function is now seperated from form integrator. By doing so, riemann solver takes simpler argument but can access to equation-specific information.

* documentation

* documentation --

* initialization order

* update naming of form integrators

* initialization order...

* use normal wavespeed

* shorter Rusanov flux evaluation

* minor code style update

See, https://github.com/mfem/mfem/pull/3598#pullrequestreview-1803234677

* fix syntax error due to pointer -> reference

* std::

* Update fem/nonlinearform.hpp

Co-authored-by: Will Pazner <11493037+pazner@users.noreply.github.com>

* return Mesh instead of string

* Moved DG to ex18.hpp and other styling updates
- Ex18p not yet updated

* update similar to previous commit

* remove ResetMaxChar in the constructor + comment update

Since reset max char will be called each Mult() call, we do not need reset in the constructor

* comment and include functional

* removed inlined namewspace

* style

* move common functions to hpp

* formatting and minor fixes in parallel code.

* update filename and fix typo in `GetMovingVortexInit`

* add hyperbolic to changelog and ex18 comment update

* removed Kelvin–Helmholtz instability example

It is hard to get a satisfactory result with the current DG method without additional treatment.

* fluxFunction is now input of RiemannSolver::Eval instead of being a member.

* compatibility check between flux function and Riemann solver

Some Riemann solver are system-specific. Such Riemann solver can prevent user-error by overriding `IsCompatible`.

* More error-proofing constructors of `RiemannSolver` and `HyperbolicFormIntegrator`

* documentation

* header file description updated

* add examples in the comment

* style

* copyright update

* use unique_ptr in the constructor to make ownership clear

* removed unused member, dim

* Some minor edits, mostly formatting

* add option for pre-assembly

* remove unused ComputeFlux

* keep momentum variable as in serial code

* Fix warnings

* preassembly by default and minor optimization

* remove mutable vector and revert back variable name

flux is now a local variable that changes size at each element. So, it would better to remove it from member variables.

* std::sqrt instead of sqrt

* another minor optimization

* rename options and add comments

* linearized->interpolated

* typo correction in comment

* remove auto from example

Co-authored-by: Chris Vogl <vogl2@llnl.gov>

* Comment update
Correct condition check comment on weak-divergence, and additional comments on auxiliary variable

* Momentum for visualization should be shifted.
FE implementation is correct, but visualization was using u[0,dim). It should be u[1,dim) and now fixed.

* example comments

* style..

* strangely, a trailing space was not updated.

* Fix the thread-safe build. Some doxygen and formatting tweaks.

* fix doxygen error

* Some small tweaks in ex18/ex18p; remove small diffs between the
serial and the parallel versions.

* Small formatting tweaks in ex18.hpp

* unused problem mesh transform

* Remove transformation dependent integration order

* Minor formatting

* support general precision

* format

---------

Co-authored-by: adam-sim-dev <adam.d.schmidt@hotmail.com>
Co-authored-by: Will Pazner <11493037+pazner@users.noreply.github.com>
Co-authored-by: Veselin Dobrev <dobrev@llnl.gov>
Co-authored-by: Chris Vogl <vogl2@llnl.gov>
Co-authored-by: Veselin Dobrev <v-dobrev@users.noreply.github.com>
2024-04-03 13:30:41 -07:00
Veselin Dobrev 8af7493023 Add ex38,ex39,ex39p to the GNU make build system.
Updated ex38.cpp to return MFEM_SKIP_RETURN_VALUE when MFEM is
built without LAPACK.

In the examples CMakeLists.txt, treat ex38 similar to other tests
that are conditionally skipped.
2024-03-30 14:09:01 -07:00
Tzanio Kolev 87290fbf56 Update Copyright to 2010-2024 2024-01-27 13:06:49 -08:00
Tzanio Kolev b25c4e30ee minor 2023-11-21 09:55:32 -08:00
Vladimir Z Tomov 79cc10d12b Merge branch 'master' into baecker/cutint 2023-11-02 16:50:50 -07:00
Vladimir Z Tomov 4d247cff97 changed example number. 2023-11-02 16:50:31 -07:00
Brendan Keith 7357444a84 update tests for example 37 2023-09-18 17:05:09 -04:00
Baecker 34842a5c71 Added CutIntRules 2023-08-30 13:15:20 -07:00
Brendan Keith 7f87b66763 deal with merge conflicts 2023-08-10 22:10:38 -04:00
Stowell, Mark L c00a10a54a Merge remote-tracking branch 'origin/master' into submesh-nd-dev
# Conflicts:
#	examples/CMakeLists.txt
#	examples/makefile
2023-07-28 08:39:57 -07:00
Stowell, Mark L 1e66469f5e Adding device examples as suggested by @v-dobrev 2023-07-28 08:37:02 -07:00
Brendan Keith a83cb7ada9 deal with makefile conflict 2023-07-14 17:20:49 -04:00
Brendan Keith 980956624b change obstacle problem example name to ex36 2023-07-14 17:15:27 -04:00
Stowell, Mark L 03117fbad2 Adding missing pattern to make clean 2023-06-30 13:06:19 -07:00
Stowell, Mark L b2b95cd074 Adding serial version of example 34 2023-06-29 15:06:53 -07:00
Stowell, Mark L 8fc3e8038b Adding new examples to PAR_EXAMPLES 2023-06-22 15:09:17 -07:00
Stowell, Mark L c727426338 Removing saved files from new examples 2023-05-18 20:19:13 -07:00
Dohyun Kim a0fc494c8d Merge remote-tracking branch 'origin/master' into efem-topopt 2023-04-12 12:42:33 -04:00
Tzanio Kolev 05f7c9f498 Merge branch 'master' into efem 2023-04-09 13:11:37 -07:00
Tzanio Kolev 96e00dc815 Updated COPYRIGHT to 2010-2023 2023-03-11 16:58:18 -08:00
Brendan Keith 7c6b6cc6b7 initial files 2023-01-07 10:50:08 -05:00
Brendan Keith 0555904e50 removed final warnings and edited makefile 2023-01-07 10:10:30 -05:00
Tzanio aa333a455a Merge branch 'master' into fractionalpde 2022-04-17 17:12:05 -07:00
Patrick Zulian ebbcdfee4f fixed conflicts with master branch 2022-03-22 09:01:16 +01:00
Socratis Petrides 7251db148f fix examples makefile 2022-03-14 16:22:39 -07:00
Socratis Petrides ca9fc08315 resolving conflicts with master 2022-03-14 14:52:18 -07:00
Keith 365840c604 new example checklist 2022-03-09 17:20:41 -08:00
Tzanio 27e4b547c4 Merge branch 'master' into lo-dim-em-dev 2022-03-01 17:48:01 -08:00
Keith 4a6b6adebb change default coefficient 2022-03-01 09:25:40 -08:00
Tzanio 6d2530775b Extended copyright to 2022 2022-02-25 10:24:50 -08:00
Socratis Petrides fb835094a3 Adding fractional Laplacian example 2022-02-17 17:49:44 -08:00